From a8f01db5e3951bbae181c5ed87639eacaefb6c0a 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 13:36:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/product/add_shop.vue | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/views/product/add_shop.vue b/src/views/product/add_shop.vue index 2587310..377a0e9 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,6 +602,7 @@ export default { batchNumberForm: { batchNumber: 0, }, + routequery:'' }; }, mounted() { @@ -613,7 +614,21 @@ export default { this.tbProductGetDetail(); } }, - methods: { + 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); console.log(item);