商品优化 返回 优化
This commit is contained in:
parent
04abb8b1b9
commit
fc96dceea9
|
@ -157,12 +157,12 @@
|
||||||
{{ val.cart_info.productAttr.sku }}
|
{{ val.cart_info.productAttr.sku }}
|
||||||
</view>
|
</view>
|
||||||
<view class="y-money refund-y-money">
|
<view class="y-money refund-y-money">
|
||||||
价格:¥{{ val.cart_info.product.price }}
|
价格:¥{{ val.product_price}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="money refund-money">
|
<view class="money refund-money">
|
||||||
<view class="num">x{{ item.storeOrder.total_num }}</view>
|
<view class="num">x{{ val.product_num }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -546,7 +546,9 @@
|
||||||
that.loaded = res.data.list.length < that.where.limit;
|
that.loaded = res.data.list.length < that.where.limit;
|
||||||
that.list.push.apply(that.list, res.data.list);
|
that.list.push.apply(that.list, res.data.list);
|
||||||
that.where.page = that.where.page + 1;
|
that.where.page = that.where.page + 1;
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
}, err => {
|
}, err => {
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
that.$util.Tips({
|
that.$util.Tips({
|
||||||
title: err
|
title: err
|
||||||
});
|
});
|
||||||
|
@ -559,8 +561,6 @@
|
||||||
that.list.push.apply(that.list, res.data.list);
|
that.list.push.apply(that.list, res.data.list);
|
||||||
that.where.page = that.where.page + 1;
|
that.where.page = that.where.page + 1;
|
||||||
uni.stopPullDownRefresh();
|
uni.stopPullDownRefresh();
|
||||||
|
|
||||||
// console.log(that.list);
|
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
uni.stopPullDownRefresh();
|
uni.stopPullDownRefresh();
|
||||||
|
|
|
@ -652,8 +652,14 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
back() {
|
back() {
|
||||||
this.go = false
|
this.go = false;
|
||||||
uni.navigateBack()
|
let delta = uni.getStorageSync('delta') || 1;
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: delta,
|
||||||
|
success() {
|
||||||
|
uni.removeStorageSync('delta');
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
showlayFn() {
|
showlayFn() {
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
|
|
|
@ -109,9 +109,6 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -176,25 +173,19 @@
|
||||||
stock: '库存不能为空',
|
stock: '库存不能为空',
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
onInput(event, item) {
|
onInput(event, item) {
|
||||||
|
|
||||||
if (!/^\d*$/.test(event)) {
|
if (!/^\d*$/.test(event)) {
|
||||||
event = event.replace(/[^\d]/g, '');
|
event = event.replace(/[^\d]/g, '');
|
||||||
}
|
}
|
||||||
console.log(event);
|
|
||||||
|
|
||||||
item.stock = event;
|
item.stock = event;
|
||||||
this.$forceUpdate();
|
this.$forceUpdate();
|
||||||
// 更新整数值
|
// 更新整数值
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
delFn(index) {
|
delFn(index) {
|
||||||
if (this.attrValue.length == 1) {
|
if (this.attrValue.length == 1) {
|
||||||
return this.$util.Tips({
|
return this.$util.Tips({
|
||||||
|
@ -202,7 +193,7 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.attrValue.splice(index, 1)
|
this.attrValue.splice(index, 1)
|
||||||
this.formData.attr.splice(index, 1)
|
this.formData.attr[0].detail.splice(index, 1)
|
||||||
},
|
},
|
||||||
|
|
||||||
choseAttr(name) {
|
choseAttr(name) {
|
||||||
|
@ -286,7 +277,9 @@
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 校验结束
|
// 校验结束
|
||||||
this.formData.attr[0].detail = []
|
if (this.formData.attr && this.formData.attr.length > 0)
|
||||||
|
this.formData.attr[0].detail = [];
|
||||||
|
|
||||||
this.attrValue.forEach(item => {
|
this.attrValue.forEach(item => {
|
||||||
typeof(item.detail) == 'object' ?
|
typeof(item.detail) == 'object' ?
|
||||||
item.detail[' '] = item.sku: (item.detail = {}, item.detail[' '] = item.sku)
|
item.detail[' '] = item.sku: (item.detail = {}, item.detail[' '] = item.sku)
|
||||||
|
@ -298,8 +291,12 @@
|
||||||
})
|
})
|
||||||
let that = this
|
let that = this
|
||||||
this.formData.spec_type = this.formData.attrValue.length > 1 ? '1' : '0'
|
this.formData.spec_type = this.formData.attrValue.length > 1 ? '1' : '0'
|
||||||
|
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: `/pages/product/addGoodDetail/addGoodDetail?mer_id=${that.mer_id}&&formData=${JSON.stringify(that.formData) }&&showSet=${true}`
|
url: `/pages/product/addGoodDetail/addGoodDetail?mer_id=${that.mer_id}&&formData=${JSON.stringify(that.formData) }&&showSet=${true}`,
|
||||||
|
success(res) {
|
||||||
|
uni.setStorageSync('delta', 2);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
initFomrData(option) {
|
initFomrData(option) {
|
||||||
|
|
Loading…
Reference in New Issue