|
|
@@ -23,20 +23,17 @@
|
|
|
</app-tag>
|
|
|
</button>
|
|
|
</div>
|
|
|
+
|
|
|
+ </div>
|
|
|
<div class="shop-express app-color-3">
|
|
|
- <div>品质保证</div>
|
|
|
- <div>
|
|
|
- <span class="prompt-text">已售</span>
|
|
|
- <span>{{ productInfo.actualSold }}</span>
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <template >
|
|
|
- <span class="prompt-text">剩余</span>
|
|
|
- <span>{{ productInfo.stock }}</span>
|
|
|
- </template>
|
|
|
- </div>
|
|
|
+
|
|
|
+ <text>普通 {{parseFloat(productInfo.price)||0}}</text>
|
|
|
+ <text>青铜 {{parseFloat(productInfo.qtPrice)||0}}</text>
|
|
|
+ <text>白银 {{parseFloat(productInfo.byPrice)||0}}</text>
|
|
|
+ <text>黄金 {{parseFloat(productInfo.hjPrice)||0}}</text>
|
|
|
+ <text>钻石 {{parseFloat(productInfo.zsPrice)||0}}</text>
|
|
|
+
|
|
|
</div>
|
|
|
- </div>
|
|
|
<!-- 商品详情 -->
|
|
|
|
|
|
<div class="module-wrap shop-detail">
|
|
|
@@ -54,7 +51,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <buy-foot />
|
|
|
+ <buy-foot :isShare="isShare" />
|
|
|
<app-share-mask :show="showShare" text="分享商品" @click="hideShare" />
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -69,7 +66,7 @@ import AppShareMask from "@/components/module/app-share-mask";
|
|
|
import { share } from "@/mixins";
|
|
|
import { mapGetters } from "vuex";
|
|
|
import { getGhsProductDetail } from "@/api/product";
|
|
|
-import { ghsInfo } from "@/api/ghs/index";
|
|
|
+import { ghsInfo,getGhsDataApi } from "@/api/ghs/index";
|
|
|
export default {
|
|
|
name: "product-detail",
|
|
|
mixins: [share],
|
|
|
@@ -88,7 +85,8 @@ export default {
|
|
|
buyNum: 1,
|
|
|
popupShow: false,
|
|
|
loginShow: false,
|
|
|
- showShare: false
|
|
|
+ showShare: false,
|
|
|
+ isShare:true
|
|
|
};
|
|
|
},
|
|
|
onLoad(option) {},
|
|
|
@@ -102,11 +100,29 @@ export default {
|
|
|
|
|
|
let ghsShopAdminId = this.option.ghsShopAdminId ? this.option.ghsShopAdminId : 0
|
|
|
|
|
|
- ghsInfo({shopId: this.option.shopId}).then(res => {
|
|
|
+ if(this.option.ghsId){
|
|
|
+ this.isShare = false
|
|
|
+ getGhsDataApi({id: this.option.ghsId}).then(res => {
|
|
|
+
|
|
|
+ let shopId = res.data.shopId
|
|
|
+ let ghsId = this.option.ghsId
|
|
|
+ that.productDetail(ghsId,ghsShopAdminId,shopId)
|
|
|
+
|
|
|
+ }).catch(err => {})
|
|
|
|
|
|
- let ghsId = res.data.id;
|
|
|
+ }else{
|
|
|
|
|
|
+ ghsInfo({shopId: this.option.shopId}).then(res => {
|
|
|
+ let ghsId = res.data.id;
|
|
|
+ let shopId = this.option.shopId
|
|
|
+ that.productDetail(ghsId,ghsShopAdminId,shopId)
|
|
|
+ }).catch(err => {})
|
|
|
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ productDetail(ghsId,ghsShopAdminId,shopId){
|
|
|
+ let that = this
|
|
|
getGhsProductDetail({ id: this.option.id,ghsId:ghsId }).then(res => {
|
|
|
if (!this.$util.isEmpty(res.data)){
|
|
|
|
|
|
@@ -124,14 +140,12 @@ export default {
|
|
|
title: title,
|
|
|
desc: res.data.price,
|
|
|
imgUrl: res.data.bigCover,
|
|
|
- pagePath: `pagesPurchase/ghsProduct?hdShopAdminId=${that.loginInfo.shopAdminId}&ghsShopAdminId=${ghsShopAdminId}&shopId=${that.option.shopId}&id=0`
|
|
|
+ pagePath: `pagesPurchase/ghsProduct?hdShopAdminId=${that.loginInfo.shopAdminId}&ghsShopAdminId=${ghsShopAdminId}&shopId=${shopId}&id=0`
|
|
|
};
|
|
|
that.jweixinFn(shareParams);
|
|
|
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
- }).catch(err => {})
|
|
|
},
|
|
|
// 更换数量
|
|
|
changeNum(e) {
|
|
|
@@ -176,10 +190,9 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- // 公共模块
|
|
|
.shop-intro {
|
|
|
background: #fff;
|
|
|
- padding: 30px 0 30px 30px;
|
|
|
+ padding: 30px 0 10px 30px;
|
|
|
.tui-pro-titbox {
|
|
|
margin: 30px 0 20px;
|
|
|
@include disFlex(center, space-between);
|
|
|
@@ -203,17 +216,18 @@ export default {
|
|
|
margin-right: 6px;
|
|
|
}
|
|
|
}
|
|
|
- .shop-express {
|
|
|
- padding-right: 30px;
|
|
|
- @include disFlex(center, space-between);
|
|
|
- .prompt-text {
|
|
|
- margin-right: 4px;
|
|
|
- }
|
|
|
- }
|
|
|
+ }
|
|
|
+ .shop-express {
|
|
|
+ display: -webkit-flex;
|
|
|
+ display: flex;
|
|
|
+ -webkit-justify-content: space-between;
|
|
|
+ justify-content: space-between;
|
|
|
+ background:white;
|
|
|
+ color:rgb(5, 116, 5);
|
|
|
+ padding:0 22rpx 20rpx 22rpx;
|
|
|
}
|
|
|
.shop-desc {
|
|
|
.module-det {
|
|
|
- // padding: 24px;
|
|
|
line-height: 48px;
|
|
|
}
|
|
|
}
|