From 3bd1249b07a29f471cbdaf820d93b13fe18bbb3e Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Thu, 19 Sep 2024 13:22:34 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sgzb-screen/config/index.js | 2 +- sgzb-screen/src/App.vue | 12 + sgzb-screen/src/api/index.js | 4 + sgzb-screen/src/router/index.js | 16 +- sgzb-screen/src/views/login/index.vue | 2 +- sgzb-ui/src/views/dashboard.vue | 6 +- sgzb-ui/src/views/dashboard/PieChart.vue | 134 ++++++------ sgzb-ui/vue.config.js | 266 +++++++++++------------ 8 files changed, 232 insertions(+), 210 deletions(-) diff --git a/sgzb-screen/config/index.js b/sgzb-screen/config/index.js index 504ab0d3..343fc9f9 100644 --- a/sgzb-screen/config/index.js +++ b/sgzb-screen/config/index.js @@ -21,7 +21,7 @@ var proxyUrl = (module.exports = { // target: 'http://112.29.103.165:21626',//重庆 // target: 'http://192.168.0.14:21624',//测试 // target: 'http://112.29.103.165:21624/', //宁夏 - target: 'http://192.168.2.136:28080', + target: 'http://192.168.2.127:28080', changeOrigin: true, // secure: true, //如果是https接口,需要配置这个参数 pathRewrite: { diff --git a/sgzb-screen/src/App.vue b/sgzb-screen/src/App.vue index b35597cf..e5348d40 100644 --- a/sgzb-screen/src/App.vue +++ b/sgzb-screen/src/App.vue @@ -26,6 +26,18 @@ export default { resize: true, }) }, + + watch: { + $route: { + handler(newValue) { + console.log(newValue, '路由监听--') + if (newValue.query.token) { + localStorage.setItem('token', newValue.query.token) + } + }, + deep: true, + }, + }, }