From 5d3981c27e97bf59e5d80f30285993f3b4ba4a41 Mon Sep 17 00:00:00 2001 From: luofei <604446095@qq.com> Date: Thu, 16 May 2024 11:44:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=81=A2=E5=A4=8D=E5=95=86?= =?UTF-8?q?=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.vue | 2 ++ pages/product/list/index.vue | 32 ++++++++++++++++++++++++++++---- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/pages/index/index.vue b/pages/index/index.vue index 5a860fc..187c512 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -844,7 +844,9 @@ }, async onLoad() { + // #ifdef APP this.subNVue = uni.getSubNVueById('concat') + // #endif this.Fheight = uni.getSystemInfoSync().windowHeight + 'px'; await this.$onLaunched; this.list1(); diff --git a/pages/product/list/index.vue b/pages/product/list/index.vue index aaa87e1..79612b9 100644 --- a/pages/product/list/index.vue +++ b/pages/product/list/index.vue @@ -49,12 +49,12 @@ v-if='where.type==6||where.type==5||where.type==7||where.type==2'> 删除 - 修改库存 - 修改库存 @@ -68,9 +68,12 @@ @click="handleShelves(item,1)"> 上架 - + 编辑商品 + + 恢复 + @@ -214,7 +217,8 @@ productRecommendApi, productUpdateFree, productTitle, - productDestory + productDestory, + productRestore } from "@/api/product"; import { labelLst @@ -851,6 +855,26 @@ }) + this.showOverly = false + }, + handleRestore(item) { + let index = this.productList.findIndex(items => items.product_id == item.product_id) + let that = this + productRestore(that.mer_id, item.product_id) + .then(res => { + that.$util.Tips({ + title: res.message, + icon: 'success' + }); + that.getList(this.mer_id, true) + // this.$set(this, 'num', -1); + }) + .catch(rej => { + + this.$set(this, 'num', -1); + Toast(`${rej}, 删除失败`); + }) + this.showOverly = false }, //下架 0