|
|
@@ -1,42 +1,52 @@
|
|
|
<template>
|
|
|
- <div class="app-content">
|
|
|
+ <view class="app-content">
|
|
|
<app-swiper :height="{type: 'number',val: 750}" :tagShow="true" :list="imgList" />
|
|
|
- <div class="shop-intro">
|
|
|
- <div class="app-price app-bold">
|
|
|
- <text class="app-size-34">¥{{ productInfo.price }}</text>
|
|
|
- </div>
|
|
|
- <div class="tui-pro-titbox">
|
|
|
- <div class="tui-pro-title app-size-32">{{ productInfo.discountPrice > 0 ? '【特价】'+productInfo.name : productInfo.name }}</div>
|
|
|
+ <view class="shop-intro">
|
|
|
+ <view class="app-price app-bold">
|
|
|
+ <text class="app-size-34">¥{{ productInfo.price?parseFloat(productInfo.price):0 }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="tui-pro-titbox">
|
|
|
+ <view class="tui-pro-title app-size-32">
|
|
|
+ <text v-if="productInfo.presell == 1">【预售】</text>
|
|
|
+ <text v-if="Number(productInfo.discountPrice) > 0">【特价】</text>
|
|
|
+ {{ productInfo.name}}
|
|
|
+ </view>
|
|
|
<button open-type="share" class="tui-share-btn tui-share-position" >
|
|
|
<app-tag type="gray" tui-tag-class="tui-tag-share tui-size" shape="circleLeft" size="small" >
|
|
|
- <div class="flex-center">
|
|
|
+ <view class="flex-center">
|
|
|
<i class="iconfont iconfenxiang"></i>
|
|
|
<text class="tui-share-text tui-gray">分享</text>
|
|
|
- </div>
|
|
|
+ </view>
|
|
|
</app-tag>
|
|
|
</button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="module-wrap shop-detail">
|
|
|
- <div class="module-tit app-size-30">商品详情</div>
|
|
|
- <div class="module-det">
|
|
|
- <div class="module-det-text">
|
|
|
+ </view>
|
|
|
+ <view class="shop-express app-color-3" v-if="productInfo.presell == 1">
|
|
|
+ <view>
|
|
|
+ 到货日期:
|
|
|
+ <block v-if="!$util.isEmpty(productInfo.presellDateShow)">
|
|
|
+ <text v-for="(dateItem, dateIndex) in productInfo.presellDateShow" :key="dateIndex" style="">{{dateItem}}<text v-if="dateIndex!=productInfo.presellDateShow.length-1">,</text></text>
|
|
|
+ </block>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="module-wrap shop-detail">
|
|
|
+ <view class="module-tit app-size-30">商品详情</view>
|
|
|
+ <view class="module-det">
|
|
|
+ <view class="module-det-text">
|
|
|
<template v-if="$util.isEmpty(productInfo.content) == false">
|
|
|
<rich-text :nodes="productInfo.content"></rich-text>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
<rich-text :nodes="productInfo.briefContent"></rich-text>
|
|
|
</template>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <buy-foot :isShare="isShare" />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <buy-foot @buy="showPopup" />
|
|
|
+ <sel-popup :show="popupShow" :info="productInfo" :buyNum="buyNum" @change="changeNum" @close="hidePopup" @nextFn="nextFn" />
|
|
|
<app-share-mask :show="showShare" text="分享商品" @click="hideShare" />
|
|
|
- </div>
|
|
|
+ </view>
|
|
|
</template>
|
|
|
-
|
|
|
<script>
|
|
|
import AppImg from "@/components/app-img";
|
|
|
import AppSwiper from "@/components/app-swiper";
|
|
|
@@ -48,9 +58,10 @@ import { share } from "@/mixins";
|
|
|
import { mapGetters } from "vuex";
|
|
|
import { getGhsProductDetail } from "@/api/product";
|
|
|
import { ghsInfo,getGhsDataApi } from "@/api/ghs/index";
|
|
|
+import productMins from "@/mixins/cgProduct";
|
|
|
export default {
|
|
|
- name: "product-detail",
|
|
|
- mixins: [share],
|
|
|
+ name: "detail",
|
|
|
+ mixins: [share,productMins],
|
|
|
components: {
|
|
|
AppSwiper,
|
|
|
AppTag,
|
|
|
@@ -67,7 +78,8 @@ export default {
|
|
|
popupShow: false,
|
|
|
loginShow: false,
|
|
|
showShare: false,
|
|
|
- isShare:true
|
|
|
+ isShare:true,
|
|
|
+ pageType: "cg"
|
|
|
};
|
|
|
},
|
|
|
onLoad(option) {},
|
|
|
@@ -76,6 +88,11 @@ export default {
|
|
|
...mapGetters({ shopUser: "getShopUser" })
|
|
|
},
|
|
|
methods: {
|
|
|
+ nextFn(num){
|
|
|
+ let customData = {...this.productInfo,bigCount: Number(num),smallCount:0,itemPrice:this.productInfo.price,bigPrice:this.productInfo.price,smallPrice:0}
|
|
|
+ this.addItemEvent(customData)
|
|
|
+ this.$util.pageTo({url:"/admin/billing/affirmGhs?id="+this.option.ghsId,type:2})
|
|
|
+ },
|
|
|
init() {
|
|
|
let that = this
|
|
|
|
|
|
@@ -128,7 +145,6 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- // 更换数量
|
|
|
changeNum(e) {
|
|
|
this.buyNum = e.value;
|
|
|
},
|
|
|
@@ -137,11 +153,7 @@ export default {
|
|
|
this.$util.pageTo({url: '/pages/home/shop',type: 4,query: {account: account}})
|
|
|
},
|
|
|
showPopup() {
|
|
|
- if (this.$util.isLogin()) {
|
|
|
- this.popupShow = true;
|
|
|
- } else {
|
|
|
- this.loginShow = true;
|
|
|
- }
|
|
|
+ this.popupShow = true
|
|
|
},
|
|
|
hidePopup() {
|
|
|
this.popupShow = false;
|