|
|
@@ -31,7 +31,9 @@
|
|
|
<div class="wrapper">
|
|
|
<div class="share acea-row row-between row-bottom">
|
|
|
<div class="money font-color-red">
|
|
|
- ¥<span class="num">{{ isVip ? storeInfo.vip_price : storeInfo.price }}</span>
|
|
|
+ ¥<span class="num">{{
|
|
|
+ isVip ? storeInfo.vip_price : storeInfo.price
|
|
|
+ }}</span>
|
|
|
<!-- <span
|
|
|
class="vip-money"
|
|
|
v-if="storeInfo.vip_price && storeInfo.vip_price > 0"
|
|
|
@@ -42,11 +44,16 @@
|
|
|
v-if="storeInfo.vip_price && storeInfo.vip_price > 0"
|
|
|
/> -->
|
|
|
</div>
|
|
|
- <div v-if="isVip"
|
|
|
+ <div
|
|
|
+ v-if="isVip"
|
|
|
@click="listenerActionSheet"
|
|
|
class="font-color-green"
|
|
|
- >分享赚¥{{ (storeInfo.price - storeInfo.vip_price).toFixed(2) }}<span class="iconfont icon-fenxiang"></span></div>
|
|
|
- <div v-else
|
|
|
+ >
|
|
|
+ 分享赚¥{{ (storeInfo.price - storeInfo.vip_price).toFixed(2)
|
|
|
+ }}<span class="iconfont icon-fenxiang"></span>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ v-else
|
|
|
class="iconfont icon-fenxiang"
|
|
|
@click="listenerActionSheet"
|
|
|
></div>
|
|
|
@@ -724,18 +731,18 @@ export default {
|
|
|
this.updateVIP();
|
|
|
},
|
|
|
methods: {
|
|
|
- updateVIP () {
|
|
|
+ updateVIP() {
|
|
|
var userinfo = this.$store.state.app.userInfo;
|
|
|
if (this.$store.state.app.token) {
|
|
|
getUserInfo().then(res => {
|
|
|
userinfo = res.data;
|
|
|
this.isVip = userinfo.vip_level > 0;
|
|
|
- console.log('Current VIP:', userinfo.vip_level);
|
|
|
+ console.log("Current VIP:", userinfo.vip_level);
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
this.isVip = false;
|
|
|
- console.log('Current is not Login');
|
|
|
+ console.log("Current is not Login");
|
|
|
},
|
|
|
// 商品详情跳转
|
|
|
goDetail(item) {
|
|
|
@@ -960,7 +967,9 @@ export default {
|
|
|
function(success) {
|
|
|
if (success) console.log("share success !");
|
|
|
else console.log("share falied !");
|
|
|
- }, false);
|
|
|
+ },
|
|
|
+ false
|
|
|
+ );
|
|
|
},
|
|
|
//产品详情接口;
|
|
|
productCon: function() {
|
|
|
@@ -984,7 +993,9 @@ export default {
|
|
|
that.posterData.title = that.storeInfo.store_name;
|
|
|
}
|
|
|
that.storeSelfMention = res.data.store_self_mention ? true : false;
|
|
|
- that.posterData.price = that.isVip ? that.storeInfo.vip_price : that.storeInfo.price;
|
|
|
+ that.posterData.price = that.isVip
|
|
|
+ ? that.storeInfo.vip_price
|
|
|
+ : that.storeInfo.price;
|
|
|
that.posterData.code = that.storeInfo.code_base;
|
|
|
that.system_store = res.data.system_store || {};
|
|
|
let good_list = res.data.good_list || [];
|
|
|
@@ -1046,7 +1057,11 @@ export default {
|
|
|
this.storeInfo.store_name
|
|
|
);
|
|
|
this.$set(this.attr.productSelect, "image", productSelect.image);
|
|
|
- this.$set(this.attr.productSelect, "price", this.isVip ? productSelect.vip_price : productSelect.price);
|
|
|
+ this.$set(
|
|
|
+ this.attr.productSelect,
|
|
|
+ "price",
|
|
|
+ this.isVip ? productSelect.vip_price : productSelect.price
|
|
|
+ );
|
|
|
this.$set(this.attr.productSelect, "stock", productSelect.stock);
|
|
|
this.$set(this.attr.productSelect, "unique", productSelect.unique);
|
|
|
this.$set(this.attr.productSelect, "cart_num", 1);
|
|
|
@@ -1059,7 +1074,11 @@ export default {
|
|
|
this.storeInfo.store_name
|
|
|
);
|
|
|
this.$set(this.attr.productSelect, "image", this.storeInfo.image);
|
|
|
- this.$set(this.attr.productSelect, "price", this.isVip ? this.storeInfo.vip_price : this.storeInfo.price);
|
|
|
+ this.$set(
|
|
|
+ this.attr.productSelect,
|
|
|
+ "price",
|
|
|
+ this.isVip ? this.storeInfo.vip_price : this.storeInfo.price
|
|
|
+ );
|
|
|
this.$set(this.attr.productSelect, "stock", 0);
|
|
|
this.$set(this.attr.productSelect, "unique", "");
|
|
|
this.$set(this.attr.productSelect, "cart_num", 0);
|
|
|
@@ -1072,7 +1091,11 @@ export default {
|
|
|
this.storeInfo.store_name
|
|
|
);
|
|
|
this.$set(this.attr.productSelect, "image", this.storeInfo.image);
|
|
|
- this.$set(this.attr.productSelect, "price", this.isVip ? this.storeInfo.vip_price : this.storeInfo.price);
|
|
|
+ this.$set(
|
|
|
+ this.attr.productSelect,
|
|
|
+ "price",
|
|
|
+ this.isVip ? this.storeInfo.vip_price : this.storeInfo.price
|
|
|
+ );
|
|
|
this.$set(this.attr.productSelect, "stock", this.storeInfo.stock);
|
|
|
this.$set(
|
|
|
this.attr.productSelect,
|
|
|
@@ -1155,7 +1178,11 @@ export default {
|
|
|
let productSelect = this.productValue[res];
|
|
|
if (productSelect) {
|
|
|
this.$set(this.attr.productSelect, "image", productSelect.image);
|
|
|
- this.$set(this.attr.productSelect, "price", this.isVip ? productSelect.vip_price : productSelect.price);
|
|
|
+ this.$set(
|
|
|
+ this.attr.productSelect,
|
|
|
+ "price",
|
|
|
+ this.isVip ? productSelect.vip_price : productSelect.price
|
|
|
+ );
|
|
|
this.$set(this.attr.productSelect, "stock", productSelect.stock);
|
|
|
this.$set(this.attr.productSelect, "unique", productSelect.unique);
|
|
|
this.$set(this.attr.productSelect, "cart_num", 1);
|
|
|
@@ -1163,7 +1190,11 @@ export default {
|
|
|
this.$set(this, "attrTxt", "已选择");
|
|
|
} else {
|
|
|
this.$set(this.attr.productSelect, "image", this.storeInfo.image);
|
|
|
- this.$set(this.attr.productSelect, "price", this.isVip ? this.storeInfo.vip_price : this.storeInfo.price);
|
|
|
+ this.$set(
|
|
|
+ this.attr.productSelect,
|
|
|
+ "price",
|
|
|
+ this.isVip ? this.storeInfo.vip_price : this.storeInfo.price
|
|
|
+ );
|
|
|
this.$set(this.attr.productSelect, "stock", 0);
|
|
|
this.$set(this.attr.productSelect, "unique", "");
|
|
|
this.$set(this.attr.productSelect, "cart_num", 0);
|