From fc96dceea90201462a626ebd9ca93806defad686 Mon Sep 17 00:00:00 2001 From: 1154079537 <1154079537@qq.com> Date: Mon, 20 May 2024 17:34:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E4=BC=98=E5=8C=96=20?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/admin/orderList/index.vue | 8 +++---- pages/product/addGoodDetail/addGoodDetail.vue | 10 +++++++-- pages/product/addGoodDetail/goodsPrice.vue | 21 ++++++++----------- 3 files changed, 21 insertions(+), 18 deletions(-) diff --git a/pages/admin/orderList/index.vue b/pages/admin/orderList/index.vue index 2315aa1..d8126b9 100644 --- a/pages/admin/orderList/index.vue +++ b/pages/admin/orderList/index.vue @@ -157,12 +157,12 @@ {{ val.cart_info.productAttr.sku }} - 价格:¥{{ val.cart_info.product.price }} + 价格:¥{{ val.product_price}} - x{{ item.storeOrder.total_num }} + x{{ val.product_num }} @@ -546,7 +546,9 @@ that.loaded = res.data.list.length < that.where.limit; that.list.push.apply(that.list, res.data.list); that.where.page = that.where.page + 1; + uni.stopPullDownRefresh(); }, err => { + uni.stopPullDownRefresh(); that.$util.Tips({ title: err }); @@ -559,8 +561,6 @@ that.list.push.apply(that.list, res.data.list); that.where.page = that.where.page + 1; uni.stopPullDownRefresh(); - - // console.log(that.list); }, err => { uni.stopPullDownRefresh(); diff --git a/pages/product/addGoodDetail/addGoodDetail.vue b/pages/product/addGoodDetail/addGoodDetail.vue index 6222e70..caa9875 100644 --- a/pages/product/addGoodDetail/addGoodDetail.vue +++ b/pages/product/addGoodDetail/addGoodDetail.vue @@ -652,8 +652,14 @@ }) }, back() { - this.go = false - uni.navigateBack() + this.go = false; + let delta = uni.getStorageSync('delta') || 1; + uni.navigateBack({ + delta: delta, + success() { + uni.removeStorageSync('delta'); + } + }) }, showlayFn() { uni.navigateBack() diff --git a/pages/product/addGoodDetail/goodsPrice.vue b/pages/product/addGoodDetail/goodsPrice.vue index 088d5cd..80f9934 100644 --- a/pages/product/addGoodDetail/goodsPrice.vue +++ b/pages/product/addGoodDetail/goodsPrice.vue @@ -109,9 +109,6 @@ - - - @@ -176,25 +173,19 @@ stock: '库存不能为空', } - - } }, methods: { onInput(event, item) { - if (!/^\d*$/.test(event)) { event = event.replace(/[^\d]/g, ''); } - console.log(event); - item.stock = event; this.$forceUpdate(); // 更新整数值 }, - delFn(index) { if (this.attrValue.length == 1) { return this.$util.Tips({ @@ -202,7 +193,7 @@ }) } this.attrValue.splice(index, 1) - this.formData.attr.splice(index, 1) + this.formData.attr[0].detail.splice(index, 1) }, choseAttr(name) { @@ -286,7 +277,9 @@ return } // 校验结束 - this.formData.attr[0].detail = [] + if (this.formData.attr && this.formData.attr.length > 0) + this.formData.attr[0].detail = []; + this.attrValue.forEach(item => { typeof(item.detail) == 'object' ? item.detail[' '] = item.sku: (item.detail = {}, item.detail[' '] = item.sku) @@ -298,8 +291,12 @@ }) let that = this this.formData.spec_type = this.formData.attrValue.length > 1 ? '1' : '0' + 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) {