|
@@ -9,7 +9,7 @@
|
|
|
<view class="sku-price-viw">
|
|
|
<view
|
|
|
class="sku-price-text">
|
|
|
- ¥{{skuProduct.price | NumFormat}}
|
|
|
+ ¥{{skuProductPrice | NumFormat}}
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -102,7 +102,6 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- vipFlag: 0, // 是否是超级会员 0否 1是
|
|
|
skuIndex: 0,
|
|
|
isStock: false, //
|
|
|
isQuantity: false,
|
|
@@ -117,7 +116,8 @@ export default {
|
|
|
userId: 0,
|
|
|
source: 1
|
|
|
},
|
|
|
- isBtnDisabled: false
|
|
|
+ isBtnDisabled: false,
|
|
|
+ skuProductPrice:''
|
|
|
}
|
|
|
},
|
|
|
filters: {
|
|
@@ -135,11 +135,11 @@ export default {
|
|
|
methods: {
|
|
|
async initData() {
|
|
|
const userInfo = await this.$api.getStorage()
|
|
|
- this.vipFlag = userInfo.vipFlag ? userInfo.vipFlag : 0
|
|
|
this.addParams.userId = userInfo.userId ? userInfo.userId : 0
|
|
|
this.addParams.productId = this.skuProduct.productId
|
|
|
- this.skuList = this.skuProduct.skus
|
|
|
+ this.skuList = this.skuProduct.organizeSkus
|
|
|
this.productCount = this.skuList[0].minBuyNumber
|
|
|
+ this.skuProductPrice =this.skuList[0].price
|
|
|
this.addParams.skuId = this.skuList[0].skuId
|
|
|
this.handleMinNumber = this.skuList[0].minBuyNumber
|
|
|
this.handleStock = this.skuList[0].stock
|
|
@@ -210,10 +210,6 @@ export default {
|
|
|
if (!this.$api.isNumber(_value)) {
|
|
|
this.productCount = this.handleMinNumber
|
|
|
} else if (_value < this.handleMinNumber) {
|
|
|
- this.$util.msg(`该商品最小起订量为${this.handleMinNumber}`, 2000)
|
|
|
- this.productCount = this.handleMinNumber
|
|
|
- } else if (_value % this.handleMinNumber != 0) {
|
|
|
- this.$util.msg('购买量必须为起订量的整数倍', 2000)
|
|
|
this.productCount = this.handleMinNumber
|
|
|
} else if (_value > this.handleStock) {
|
|
|
this.productCount = this.handleStock
|
|
@@ -258,6 +254,7 @@ export default {
|
|
|
this.addParams.skuId = sku.skuId
|
|
|
this.handleStock = sku.stock
|
|
|
this.isBtnDisabled = sku.stock === 0
|
|
|
+ this.skuProductPrice = sku.price
|
|
|
this.$emit('skuClick', sku)
|
|
|
},
|
|
|
hidePopup() {
|