|
@@ -12,9 +12,10 @@
|
|
|
</view>
|
|
|
<view class="money font-color">
|
|
|
<view class="acea-row row-middle">
|
|
|
- {{ $t(`¥`) }}<text class="num">{{ attr.productSelect.salePrice - 0}}</text>
|
|
|
- <text class='vip-money'
|
|
|
- v-if="is_vip > 0 && attr.productSelect.vip_price">{{ $t(`¥`) }}{{ attr.productSelect.vip_price }}</text>
|
|
|
+ {{ $t(`¥`) }}<text class="num">{{ attr.productSelect.salePrice - 0 }}</text>
|
|
|
+ <text class='vip-money' v-if="is_vip > 0 && attr.productSelect.vip_price">{{ $t(`¥`) }}{{
|
|
|
+ attr.productSelect.vip_price
|
|
|
+ }}</text>
|
|
|
<view class="vipImg" v-if="is_vip > 0 && attr.productSelect.vip_price">
|
|
|
<image src="../../static/images/svip.gif"></image>
|
|
|
</view>
|
|
@@ -48,20 +49,28 @@
|
|
|
v-if="attr.productSelect.totalSales <= 1">
|
|
|
<text class="iconfont icon-shangpinshuliang-jian"></text>
|
|
|
</view>
|
|
|
+
|
|
|
<view class="item reduce acea-row row-center-wrapper"
|
|
|
:class="attr.productSelect.totalSales <= 1 ? 'on' : ''" @click="CartNumDes" v-else>
|
|
|
<text class="iconfont icon-shangpinshuliang-jian"></text>
|
|
|
</view>
|
|
|
<view class='item num acea-row row-middle'>
|
|
|
<input type="number" v-model="attr.productSelect.totalSales"
|
|
|
- data-name="productSelect.totalSales" @input="bindCode(attr.productSelect.totalSales)" />
|
|
|
+ :disabled="attr.productSelect.zoneType == 8" data-name="productSelect.totalSales"
|
|
|
+ @input="bindCode(attr.productSelect.totalSales)" />
|
|
|
</view>
|
|
|
- <view v-if="iSplus" class="item plus acea-row row-center-wrapper" :class="
|
|
|
- attr.productSelect.totalSales >= attr.productSelect.totalStock
|
|
|
- ? 'on'
|
|
|
- : ''
|
|
|
- " @click="CartNumAdd">
|
|
|
- <text class="iconfont icon-shangpinshuliang-jia"></text>
|
|
|
+ <view v-if="iSplus">
|
|
|
+ <view v-if="attr.productSelect.zoneType != 8" class="item plus acea-row row-center-wrapper"
|
|
|
+ :class="
|
|
|
+ attr.productSelect.totalSales >= attr.productSelect.totalStock
|
|
|
+ ? 'on'
|
|
|
+ : ''
|
|
|
+ " @click="CartNumAdd">
|
|
|
+ <text class="iconfont icon-shangpinshuliang-jia"></text>
|
|
|
+ </view>
|
|
|
+ <view v-else class="item plus acea-row row-center-wrapper on">
|
|
|
+ <text class="iconfont icon-shangpinshuliang-jia"></text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<view v-else class='item plus'
|
|
|
:class='attr.productSelect.totalSales >= attr.productSelect.totalStock ? "on" : ""'
|
|
@@ -77,7 +86,8 @@
|
|
|
v-else-if="(iSbnt && attr.productSelect.quota <= 0) || (iSbnt && attr.productSelect.product_stock <= 0)">
|
|
|
{{ $t(`已售罄`) }}
|
|
|
</view>
|
|
|
- <view class="joinBnt bg-color" v-if="iScart && attr.productSelect.stock" @click="goCat">{{ $t(`确定`) }}</view>
|
|
|
+ <view class="joinBnt bg-color" v-if="iScart && attr.productSelect.stock" @click="goCat">{{ $t(`确定`) }}
|
|
|
+ </view>
|
|
|
<view class="joinBnt on" v-else-if="iScart && !attr.productSelect.stock">{{ $t(`已售罄`) }}</view>
|
|
|
</view>
|
|
|
<view class="mask" @touchmove.prevent :hidden="attr.cartAttr === false" @click="closeAttr"></view>
|
|
@@ -132,7 +142,7 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
-
|
|
|
+ console.log(this.attr);
|
|
|
},
|
|
|
methods: {
|
|
|
getpreviewImage: function () {
|
|
@@ -149,14 +159,14 @@ export default {
|
|
|
*
|
|
|
*/
|
|
|
bindCode: function (e) {
|
|
|
- if (e > this.attr.productSelect.totalStock){
|
|
|
+ if (e > this.attr.productSelect.totalStock) {
|
|
|
this.$util.Tips({
|
|
|
title: this.$t(`数量大于库存,请重新输入`),
|
|
|
success: () => {
|
|
|
|
|
|
},
|
|
|
});
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
this.$emit('iptCartNum', e);
|
|
|
}
|
|
|
},
|
|
@@ -171,7 +181,7 @@ export default {
|
|
|
},
|
|
|
tapAttr: function (item, indexn) {
|
|
|
let that = this;
|
|
|
- if(item.canSale){
|
|
|
+ if (item.canSale) {
|
|
|
that.$emit("ChangeAttr", item);
|
|
|
}
|
|
|
},
|