|
@@ -1,39 +1,50 @@
|
|
|
<template>
|
|
|
<div v-if="datas!==null">
|
|
|
<div v-document_title>商品详情</div>
|
|
|
+ <DownLoadApp></DownLoadApp>
|
|
|
+ <div class="goods_swiper" :style="{'-webkit-transform':'translate3d(0,'+scrollVal+',0)'}">
|
|
|
+ <swiper v-if="datas!=null" :list="getGoodsSwiperList" :show-desc-mask="false" height="720px" :auto="true" :loop="true"></swiper>
|
|
|
+ </div>
|
|
|
<div class="goods_detail_content">
|
|
|
- <div class="goods_img">
|
|
|
- <swiper v-if="datas!=null" :list="getGoodsSwiperList" :show-desc-mask="false" height="720px" :auto="true" :loop="true"></swiper>
|
|
|
+ <div class="goods_comment">
|
|
|
+ <div class="comment_swiper" v-if="this.datas.comment !== null">
|
|
|
+ <router-link :to="{ path: '/comments', query: { goods_commonid:this.datas.comment.common_id}}">
|
|
|
+ <img :src="this.datas.comment.member_avatar">
|
|
|
+ <span class="nick_name">{{this.datas.comment.nickname}}:</span>
|
|
|
+ <span class="comment_content">{{this.datas.comment.content}}</span>
|
|
|
+ </router-link>
|
|
|
+ </div>
|
|
|
<div class="collection">已收藏人数 {{getOneSummary.goods_collect}}</div>
|
|
|
</div>
|
|
|
- <div v-if="getOneSummary['act_type'] == 1" class="groupbuy_msg">
|
|
|
- <p><span class="groupbuy_title">抢购特价</span>仅剩<span class="groupbuy_label">{{getOneSummary.goods_storage}}</span>件,不可同享其他优惠。</p>
|
|
|
+ <div class="goods_content">
|
|
|
+ <div class="goods_name">
|
|
|
+ <p style="font-size: 34px;color: #000;">{{getOneSummary.goods_mobile_name}}</p>
|
|
|
+ <p>{{getOneSummary.goods_jingle}}</p>
|
|
|
+ </div>
|
|
|
+ <div class="bonus_price">
|
|
|
+ <span>¥{{getOneSummary['act_type'] !== 1?getOneSummary.bonus_price:datas['groupbuy'][0]['promotion_price']}}</span>
|
|
|
+ <span class="goods_price">专柜价 {{getOneSummary.goods_price}}</span>
|
|
|
+ </div>
|
|
|
+ <div class="goods_desc">
|
|
|
+ <span v-if="getOneSummary['act_type'] !== 1">红包抵{{(getOneSummary.goods_price - getOneSummary.bonus_price).toFixed(2)}}元 /</span>
|
|
|
+ <span>已售{{getOneSummary.goods_salenum}}件 / 库存{{getOneSummary.goods_storage}}件</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <flexbox style="margin-top: 20px;">
|
|
|
- <flexbox-item :class="{goods_bonus_price:true}">
|
|
|
- <span class="bonus_icon" style="position: relative;bottom: 16px; width: 25px;height: 32px;"></span>
|
|
|
- <span class="bonus_price">{{getOneSummary['act_type'] !== 1?getOneSummary.bonus_price:datas['groupbuy'][0]['promotion_price']}}</span>
|
|
|
- <div style="display: inline-block;">
|
|
|
- <span class="discount" v-if="getOneSummary['act_type'] !== 1">{{getOneSummary.bonus_price/getOneSummary.goods_price*10 == 10 ? "无折扣" : (getOneSummary.bonus_price/getOneSummary.goods_price*10).toFixed(1)+'折'}}</span>
|
|
|
- <span class="discount" style="margin-left: -1px;" v-if="getOneSummary['act_type'] !== 1">立省{{(getOneSummary.goods_price - getOneSummary.bonus_price).toFixed(2)}}元</span>
|
|
|
- </div>
|
|
|
- </flexbox-item>
|
|
|
- <flexbox-item :span="4" style="text-align: right;padding-right: 25px;">已售{{getOneSummary.goods_salenum}}件/库存{{getOneSummary.goods_storage}}件</flexbox-item>
|
|
|
- </flexbox>
|
|
|
- <p class="goods_price vux-1px-b">专柜价 {{getOneSummary.goods_price}}</p>
|
|
|
<div style="overflow: hidden; padding-left: 25px;" v-if="getOneSummary['act_type'] !== 1">
|
|
|
- <p style="color: #a7a7a7; padding: 25px 0; float: right; width: 726px;" class="vux-1px-b">{{getOneSummary.gap_desc}}</p>
|
|
|
+ <p style="color: #a7a7a7; padding: 16px 0; float: right; width: 726px;" class="vux-1px-b">{{getOneSummary.gap_desc}}</p>
|
|
|
</div>
|
|
|
<div style="overflow: hidden; padding-left: 25px;" v-if="getOneSummary['is_fcode']">
|
|
|
- <flexbox class="vux-1px-b" style="padding: 25px 0;">
|
|
|
- <flexbox-item style="color: #ef524d;">F码商品</flexbox-item>
|
|
|
- <flexbox-item style="color: #a7a7a7;text-align: right; padding-right: 25px;">{{getOneSummary.fcode_desc}}</flexbox-item>
|
|
|
+ <flexbox class="vux-1px-b" style="padding: 16px 0;">
|
|
|
+ <flexbox-item style="color: #ef524d;">F码购买</flexbox-item>
|
|
|
+ <flexbox-item style="color: #a7a7a7;text-align: right; padding-right: 25px;">
|
|
|
+ <span style="float: right;padding: 3px 16px;background: #ec5c56;border-radius: 20px;color: #f2cb64;font-size: 20px;">
|
|
|
+ <router-link :to="{ path: '/special', query: {title:'RueggeS4k-WMug,,',special_id:905,is_special:true}}">去看看 ></router-link>
|
|
|
+ </span>
|
|
|
+ </span>
|
|
|
+ </flexbox-item>
|
|
|
</flexbox>
|
|
|
</div>
|
|
|
- <div class="goods_name">
|
|
|
- <p style="font-size: 34px;color: #000;">{{getOneSummary.goods_mobile_name}}</p>
|
|
|
- <p>{{getOneSummary.goods_jingle}}</p>
|
|
|
- </div>
|
|
|
+
|
|
|
<div class="stamps">
|
|
|
<Flexbox>
|
|
|
<FlexboxItem :class="{stamps_item:true}"><img :src="getOneSummary.brand_country_logo" :class="{goods_logo:true}">{{getOneSummary.brand_country}}品牌</FlexboxItem>
|
|
@@ -44,12 +55,36 @@
|
|
|
<FlexboxItem :class="{stamps_item:true}"><img src="../../assets/seven_icon.png" :class="{goods_logo:true}">7天无理由退货</FlexboxItem>
|
|
|
</Flexbox>
|
|
|
</div>
|
|
|
- <div class="spec vux-1px-b" v-if="datas!=null">
|
|
|
- <p style="font-size: 28px;">选择{{getSpecName}}</p>
|
|
|
- <button type="button" v-for="(skus,index) in getSkus" :class="{active:skus.active}" @click.prevent="skusChange(getSkus,skus,index)">{{skus.spv_name}}</button>
|
|
|
+ <div style="background: #F7F7F7;height: 20px;"></div>
|
|
|
+ <div v-if="getOneSummary['act_type'] == 1" class="groupbuy_msg">
|
|
|
+ <p><span class="groupbuy_title">抢购特价</span>仅剩<span class="groupbuy_label">{{getOneSummary.goods_storage}}</span>件,限购<span class="groupbuy_label">1</span>件,不可同享其他优惠。</p>
|
|
|
</div>
|
|
|
- <div style="background: #fbfbfb;height: 18px;"></div>
|
|
|
- <p class="vux-1px-b" style="height: 80px; font-size:28px;line-height: 80px;width: 725px;position: relative;left: 25px;">产品参数</p>
|
|
|
+ <div class="opgoods_des" v-if="getOneSummary.is_opgoods">
|
|
|
+ <p style="color: #a7a7a7; padding: 16px 0; float: right; width: 726px;" class="vux-1px-b">
|
|
|
+ <span></span>{{getOneSummary.opgoods_desc}}
|
|
|
+ <span style="float: right;padding: 3px 16px;margin-right: 24px;background: #ec5c56;border-radius: 20px;color: #f2cb64;font-size: 20px;">
|
|
|
+ <router-link :to="{ path: '/special', query: {title:'TuWFg-S7u-mAiQ,,',special_id:869,is_special:true}}">去看看 ></router-link>
|
|
|
+ </span>
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ <div class="comments_block" v-if="this.datas.comment !== null">
|
|
|
+ <div class="label">
|
|
|
+ <div class="f_left" style="font-size: 28px;">用户评价<span class="comment_num">({{this.datas.common_info.comments}})</span></div>
|
|
|
+ <div class="f_right" style="font-size: 24px;">
|
|
|
+ <router-link :to="{ path: '/comments', query: {goods_commonid:this.datas.comment.common_id}}">
|
|
|
+ 查看全部评论<span class="arrow_right"></span>
|
|
|
+ </router-link>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <Comment :comments="this.datas.comment"></Comment>
|
|
|
+ <div style="background: #F7F7F7;height: 20px;"></div>
|
|
|
+ </div>
|
|
|
+ <!--<div class="spec vux-1px-b" v-if="datas!=null">-->
|
|
|
+ <!--<p style="font-size: 28px;">选择{{getSpecName}}</p>-->
|
|
|
+ <!--<button type="button" v-for="(skus,index) in getSkus" :class="{active:skus.active}" @click.prevent="skusChange(getSkus,skus,index)">{{skus.spv_name}}</button>-->
|
|
|
+ <!--</div>-->
|
|
|
+
|
|
|
+ <p class="vux-1px-b" style="height: 80px; font-size:28px;line-height: 80px;width: 725px;position: relative;left: 25px;color:#a7a7a7;">产品参数</p>
|
|
|
<ul v-if="datas!=null" class="vux-1px-b">
|
|
|
<li v-for="attr in attrs" class="attr_list">
|
|
|
<p style="float: left;color:#a7a7a7;">{{attr.label}}</p>
|
|
@@ -64,18 +99,23 @@
|
|
|
<img slot="icon-active" src="../../assets/tabbar_home_hight@2x.png">
|
|
|
<span slot="label">首页</span>
|
|
|
</tabbar-item>
|
|
|
- <tabbar-item @on-item-click="is_cart" style="background:#ffa82d;" v-if="getOneSummary.goods_storage">
|
|
|
+ <tabbar-item link="/main/shopping_cart">
|
|
|
+ <img slot="icon" src="../../assets/tabbar_shopcar_default@2x.png">
|
|
|
+ <img slot="icon-active" src="../../assets/tabbar_shopcar_hight@2x.png">
|
|
|
+ <span slot="label">购物车</span>
|
|
|
+ </tabbar-item>
|
|
|
+ <tabbar-item @on-item-click="is_cart" style="background:#000000; flex: 2; -webkit-flex: 2;" v-if="getOneSummary.goods_storage">
|
|
|
<span slot="label" style="color: #fff">加入购物车</span>
|
|
|
</tabbar-item>
|
|
|
- <tabbar-item @on-item-click="is_buy" style="background: #ff4e4e;" v-if="getOneSummary.goods_storage">
|
|
|
+ <tabbar-item @on-item-click="is_buy" style="background: #ff4e4e; flex: 2; -webkit-flex: 2;" v-if="getOneSummary.goods_storage">
|
|
|
<span slot="label" style="color: #fff">立即购买</span>
|
|
|
</tabbar-item>
|
|
|
- <tabbar-item style="background: #ff4e4e; font-size: 30px;" v-if="!getOneSummary.goods_storage">
|
|
|
+ <tabbar-item style="background: #ff4e4e; font-size: 30px; flex: 3; -webkit-flex: 3;" v-if="!getOneSummary.goods_storage">
|
|
|
<span slot="label" style="color: #fff">售罄</span>
|
|
|
</tabbar-item>
|
|
|
</tabbar>
|
|
|
</div>
|
|
|
- <popup height="800px" v-model="showPopup" :show-mask="true" @on-hide="closepopup">
|
|
|
+ <popup style="width: 750px;left:50%;margin-left: -375px;" height="800px" v-model="showPopup" :show-mask="true" @on-hide="closepopup">
|
|
|
<flexbox :class="{goods_price:true}" style="padding-bottom: 30px;">
|
|
|
<flexbox-item>
|
|
|
<div class="goods_small_img">
|
|
@@ -83,7 +123,7 @@
|
|
|
</div>
|
|
|
</flexbox-item>
|
|
|
<flexbox-item>
|
|
|
- <div><span class="bonus_icon popup_bonus_icon" style="position: relative;bottom: 6px;"></span><span style="color: #EB4E4F;font-size: 36px;">{{getOneSummary['act_type'] !== 1?getOneSummary.bonus_price:datas['groupbuy'][0]['promotion_price']}}</span> <span style="color: #a7a7a7;">{{getOneSummary.goods_price}}</span></div>
|
|
|
+ <div><span style="color:#EB4E4F;font-size: 36px;">¥</span><span style="color: #EB4E4F;font-size: 36px;">{{getOneSummary['act_type'] !== 1?getOneSummary.bonus_price:datas['groupbuy'][0]['promotion_price']}}</span> <span style="color: #a7a7a7;">{{getOneSummary.goods_price}}</span></div>
|
|
|
<div>已售{{getOneSummary.goods_salenum}}件/库存{{getOneSummary.goods_storage}}件</div>
|
|
|
</flexbox-item>
|
|
|
</flexbox>
|
|
@@ -123,6 +163,8 @@
|
|
|
import Proxy from '../blocks/util/proxy.js'
|
|
|
import WebView from '../blocks/webview.vue'
|
|
|
import WechatShare from '../../wechat/WechatShare'
|
|
|
+ import DownLoadApp from '../blocks/fixed_download_app.vue';
|
|
|
+ import Comment from '../blocks/comment.vue';
|
|
|
|
|
|
export default
|
|
|
{
|
|
@@ -160,6 +202,7 @@
|
|
|
});
|
|
|
},
|
|
|
mounted(){
|
|
|
+ var self = this;
|
|
|
this.$http.jsonp(Api.goodsContent(this.goods_id)).then(function(res){
|
|
|
if (res.body.code != 200) {
|
|
|
this.$vux.toast.show({
|
|
@@ -172,6 +215,7 @@
|
|
|
}
|
|
|
this.goodsHtml = res.body.datas.body;
|
|
|
});
|
|
|
+ window.addEventListener('scroll',this.hideSwiper);
|
|
|
},
|
|
|
beforeDestroy(){
|
|
|
document.body.removeEventListener('touchmove',this.noscroll,false);
|
|
@@ -185,10 +229,15 @@
|
|
|
goodsNumber:1,
|
|
|
check_goods_id:'',
|
|
|
isCart:false,
|
|
|
- goodsHtml:''
|
|
|
+ goodsHtml:'',
|
|
|
+ scrollVal:'0'
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
|
+ hideSwiper(){
|
|
|
+ let top = document.documentElement.scrollTop || document.body.scrollTop;
|
|
|
+ this.scrollVal = (top/7).toFixed(0) + 'px';
|
|
|
+ },
|
|
|
closepopup(){
|
|
|
document.body.removeEventListener('touchmove',this.noscroll,false);
|
|
|
},
|
|
@@ -337,6 +386,7 @@
|
|
|
},
|
|
|
getSkus(){
|
|
|
if(!this.datas)return;
|
|
|
+ if(this.datas.common_info.skus.length <= 0)return;
|
|
|
let newSkusArray = [];
|
|
|
let skusArray = this.datas.common_info.skus;
|
|
|
for(let i=0;i<skusArray.length;i++) {
|
|
@@ -361,7 +411,9 @@
|
|
|
Divider,
|
|
|
Popup,
|
|
|
Tabbar,
|
|
|
- TabbarItem
|
|
|
+ TabbarItem,
|
|
|
+ DownLoadApp,
|
|
|
+ Comment
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -412,7 +464,7 @@
|
|
|
.popup_bonus_icon {
|
|
|
width: 22px;
|
|
|
}
|
|
|
- .goods_img {
|
|
|
+ .goods_comment {
|
|
|
position: relative;
|
|
|
}
|
|
|
.collection {
|
|
@@ -426,16 +478,19 @@
|
|
|
font-size: 24px;
|
|
|
}
|
|
|
.stamps {
|
|
|
- background: #fbfbfb;
|
|
|
- padding: 15px 0;
|
|
|
+ height: 166px;
|
|
|
+ padding-top: 40px;
|
|
|
+ box-sizing: border-box;
|
|
|
}
|
|
|
.stamps_item {
|
|
|
- padding-left: 25px;
|
|
|
+ padding-left: 82px;
|
|
|
+ padding-top: 8px;
|
|
|
color: #a7a7a7;
|
|
|
+ font-size: 24px;
|
|
|
}
|
|
|
.goods_logo {
|
|
|
- width: 28px;
|
|
|
- height: 28px;
|
|
|
+ width: 30px;
|
|
|
+ height: 30px;
|
|
|
display: inline;
|
|
|
padding-right: 22px;
|
|
|
vertical-align: middle;
|
|
@@ -443,31 +498,44 @@
|
|
|
bottom: 3px;
|
|
|
}
|
|
|
.goods_name {
|
|
|
- padding: 20px 0 20px 25px;
|
|
|
+ color: #333333;
|
|
|
+ font-size: 28px;
|
|
|
+ }
|
|
|
+ .goods_name p {
|
|
|
+ padding: 0 30px;
|
|
|
+ white-space: nowrap;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ overflow: hidden;
|
|
|
+ }
|
|
|
+ .goods_name p:first-child {
|
|
|
+ font-size: 32px;
|
|
|
}
|
|
|
.goods_name h3 {
|
|
|
line-height: 80px;
|
|
|
font-size: 30px;
|
|
|
}
|
|
|
- .goods_name p {
|
|
|
- font-size: 26px;
|
|
|
- color: #a7a7a7;
|
|
|
- }
|
|
|
.bonus_price {
|
|
|
- font-size: 41px;
|
|
|
+ font-size: 36px;
|
|
|
color: #ef524d;
|
|
|
- vertical-align: bottom;
|
|
|
- font-weight: bold;
|
|
|
+ overflow: hidden;
|
|
|
}
|
|
|
- .goods_bonus_price {
|
|
|
- padding-left: 25px;
|
|
|
+ .bonus_price span {
|
|
|
+ float: left;
|
|
|
}
|
|
|
- .goods_price {
|
|
|
- line-height: 64px;
|
|
|
- color: #a7a7a7;
|
|
|
- width: 725px;
|
|
|
+ .bonus_price span:first-child {
|
|
|
+ width: 415px;
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
+ .bonus_price span.goods_price {
|
|
|
+ color: #9B9B9B;
|
|
|
+ font-size: 22px;
|
|
|
+ vertical-align: middle;
|
|
|
position: relative;
|
|
|
- left: 25px;
|
|
|
+ top: 13px;
|
|
|
+ left: 20px;
|
|
|
+ }
|
|
|
+ .goods_bonus_price {
|
|
|
+ padding-left: 25px;
|
|
|
}
|
|
|
.discount {
|
|
|
border: 1px solid #f6495a;
|
|
@@ -504,12 +572,11 @@
|
|
|
}
|
|
|
.goods_detail_content {
|
|
|
position: relative;
|
|
|
+ z-index: 2;
|
|
|
-webkit-transition: all 0.6s;
|
|
|
transition: all 0.6s;
|
|
|
+ background: #ffffff;
|
|
|
}
|
|
|
- /*.scale {*/
|
|
|
- /*-webkit-transform: scale(0.95,0.95);*/
|
|
|
- /*}*/
|
|
|
.goods_small_img {
|
|
|
width: 228px;
|
|
|
height: 228px;
|
|
@@ -571,4 +638,82 @@
|
|
|
list-style-type:none;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
+ .goods_swiper {
|
|
|
+ position: relative;
|
|
|
+ z-index: 1;
|
|
|
+ overflow: hidden;
|
|
|
+ -webkit-transition: transform .2s;
|
|
|
+ }
|
|
|
+ .goods_content {
|
|
|
+ text-align: center;
|
|
|
+ position: relative;
|
|
|
+ }
|
|
|
+ .goods_content:after {
|
|
|
+ position: absolute;
|
|
|
+ content: "";
|
|
|
+ bottom: 0;
|
|
|
+ left: 0;
|
|
|
+ width: 100%;
|
|
|
+ height: 1px;
|
|
|
+ background: #DADADA;
|
|
|
+ }
|
|
|
+ .goods_desc {
|
|
|
+ font-size: 24px;
|
|
|
+ }
|
|
|
+ .comment_swiper {
|
|
|
+ position: absolute;
|
|
|
+ bottom: 90px;
|
|
|
+ left: 19px;
|
|
|
+ background: rgba(140,140,140,0.5);
|
|
|
+ max-width: 430px;
|
|
|
+ height: 50px;
|
|
|
+ line-height: 50px;
|
|
|
+ overflow: hidden;
|
|
|
+ white-space: nowrap;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ border-radius: 30px;
|
|
|
+ padding: 0 21px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ color: #ffffff;
|
|
|
+ }
|
|
|
+ .comment_swiper img {
|
|
|
+ width: 40px;
|
|
|
+ height: 40px;
|
|
|
+ border-radius: 50px;
|
|
|
+ display: inline;
|
|
|
+ }
|
|
|
+ .comments_block .label {
|
|
|
+ position: relative;
|
|
|
+ height: 70px;
|
|
|
+ line-height: 70px;
|
|
|
+ overflow: hidden;
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding: 0 24px;
|
|
|
+ color: #a7a7a7;
|
|
|
+ }
|
|
|
+ .comments_block .label:after {
|
|
|
+ content: " ";
|
|
|
+ position: absolute;
|
|
|
+ bottom: 0;
|
|
|
+ right: 0;
|
|
|
+ width: 726px;
|
|
|
+ height: 1px;
|
|
|
+ border-bottom: 1px solid #C7C7C7;
|
|
|
+ color: #C7C7C7;
|
|
|
+ -webkit-transform-origin: 0 100%;
|
|
|
+ transform-origin: 0 100%;
|
|
|
+ -webkit-transform: scaleY(0.5);
|
|
|
+ transform: scaleY(0.5);
|
|
|
+ }
|
|
|
+ .comments_block .comment_num {
|
|
|
+ color: #ef524d;
|
|
|
+ }
|
|
|
+ .comments_block .arrow_right {
|
|
|
+ display: inline-block;
|
|
|
+ width: 10px;
|
|
|
+ height: 20px;
|
|
|
+ background: url("../../assets/arrow_right.png") no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ margin-left: 12px;
|
|
|
+ }
|
|
|
</style>
|