From 22c8d4d6dc3f53a9a60d82a01ffdcd906e385554 Mon Sep 17 00:00:00 2001 From: xiaozhiyong Date: Wed, 1 Mar 2023 13:52:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/permission.js | 1 - src/utils/request.js | 2 +- src/views/product/index.vue | 26 +++++++++++--------------- 3 files changed, 12 insertions(+), 17 deletions(-) diff --git a/src/permission.js b/src/permission.js index 3b1b11a..5a4ebeb 100644 --- a/src/permission.js +++ b/src/permission.js @@ -28,7 +28,6 @@ router.beforeEach(async (to, from, next) => { try { let infoRes = await serve.info(); infoRes.data.authList = [1]; - store.dispatch("user/info", infoRes.data); let routerRes = await serve.getCustomerRouters(); diff --git a/src/utils/request.js b/src/utils/request.js index 1072e21..4a543df 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -64,7 +64,7 @@ service.interceptors.response.use( if (res && res.code) { if (res.code === 42011) { Vue.prototype.$message.error(res.msg || "您的登录已失效,请重新登录"); - localStorage.removeItem("removeItem"); + localStorage.removeItem("customerToken"); store.dispatch("user/remove"); setTimeout(() => { window.location.reload(); diff --git a/src/views/product/index.vue b/src/views/product/index.vue index ca4eda1..71f65a1 100644 --- a/src/views/product/index.vue +++ b/src/views/product/index.vue @@ -72,12 +72,6 @@ > - - 详情 - 下单 + 下单 @@ -248,19 +244,19 @@ export default { }, //下单 createOrder(row) { - this.controlWindows.addInfo = {} + this.controlWindows.addInfo = {}; this.controlWindows.addInfo.title = "创建订单"; this.controlWindows.create = true; - console.log(this.controlWindows,'新增') + console.log(this.controlWindows, "新增"); }, //修改订单 - updateCreate(row){ + updateCreate(row) { this.controlWindows.addInfo = { - title: "创建订单", - ...row, - }; - this.controlWindows.create = true; - console.log('修改') + title: "创建订单", + ...row, + }; + this.controlWindows.create = true; + console.log("修改"); }, //详情 detail(row) {