From c79049443a315d5d1d04702dbf5eff31579b36f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AD=8F=E5=95=BE?= <1144797966@qq.com> Date: Mon, 11 Nov 2024 10:39:45 +0800 Subject: [PATCH 01/31] =?UTF-8?q?=E5=95=86=E5=93=81=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E7=BC=93=E5=AD=98=20=E6=B4=BB=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/shop.js | 11 ++ src/views/product/add_shop.vue | 19 ++- src/views/product/index.vue | 3 - src/views/user_manage/active_list.vue | 29 +++-- .../user_manage/components/addActive.vue | 112 ++++++++++++++---- .../user_manage/components/downloadQR.vue | 3 +- 6 files changed, 137 insertions(+), 40 deletions(-) diff --git a/src/api/shop.js b/src/api/shop.js index 79ed2c8..55e9508 100644 --- a/src/api/shop.js +++ b/src/api/shop.js @@ -417,6 +417,17 @@ export function modityActivate(data) { }); } +/** + * 新增、修改活动 新的! + * @returns + */ +export function storageupActivate(data) { + return request({ + url: `/shop/storage/upActivate`, + method: "post", + data + }); +} /** * 活动列表 * @returns diff --git a/src/views/product/add_shop.vue b/src/views/product/add_shop.vue index 2587310..9fb6b69 100644 --- a/src/views/product/add_shop.vue +++ b/src/views/product/add_shop.vue @@ -437,7 +437,7 @@ export default { Editor, addImg, }, - name:'add_shop', + name: 'add_shop', data() { const validatordateUsed = (rule, value, callback) => { if (!this.form.notices.dateUsed) { @@ -602,17 +602,32 @@ export default { batchNumberForm: { batchNumber: 0, }, + routequery: '' }; }, mounted() { this.tbShopUnit(); this.tbShopCategoryGet(); this.changeTypeEnum(0); - if (this.$route.query.goods_id) { this.tbProductGetDetail(); } }, + watch: { + // 监听路由对象中的参数变化 + $route(to, from) { + console.log(to.query.goods_id) + if (to.query.goods_id) { + if (this.routequery == to.query.goods_id) { + return false; + } else { + this.tbProductGetDetail(); + } + this.routequery = to.query.goods_id + } + + }, + }, methods: { uploadImgSucess(res, item) { console.log(res); diff --git a/src/views/product/index.vue b/src/views/product/index.vue index c9ff079..3499939 100644 --- a/src/views/product/index.vue +++ b/src/views/product/index.vue @@ -298,11 +298,9 @@ export default { } }, async mounted() { - console.log(this.$route.query.productId, 'tiaoshi1') if (this.$route.query.productId) { this.query.productId = this.$route.query.productId } - console.log(this.query) await this.tbShopCategoryGet() await this.getTableData() @@ -533,7 +531,6 @@ export default { }) }) - console.log(res); this.tableData.loading = false this.tableData.data = res.content diff --git a/src/views/user_manage/active_list.vue b/src/views/user_manage/active_list.vue index 2d0dc88..8badef1 100644 --- a/src/views/user_manage/active_list.vue +++ b/src/views/user_manage/active_list.vue @@ -19,24 +19,26 @@ 下载会员充值二维码