From 01d453a6d5a751a78eab5f56ad0f35a0a2ebf281 Mon Sep 17 00:00:00 2001 From: whycq <913841844@qq.com> Date: 星期三, 17 一月 2024 16:01:48 +0800 Subject: [PATCH] # --- pages/LoginDemo/LoginDemo.vue | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pages/LoginDemo/LoginDemo.vue b/pages/LoginDemo/LoginDemo.vue index c092a01..7eb0309 100644 --- a/pages/LoginDemo/LoginDemo.vue +++ b/pages/LoginDemo/LoginDemo.vue @@ -61,6 +61,7 @@ <script> // import { data } from 'jquery' + import { mapState } from 'vuex'//寮曞叆mapState import md5 from '../../static/js/md5.js' export default { data() { @@ -77,6 +78,9 @@ }, } }, + computed: mapState({ + project: state => state.project + }) , mounted() { uni.getSystemInfo({ success(res) { @@ -99,7 +103,6 @@ this.$refs.settings.open() }, cancel() { - console.log(uni.getStorageSync('Network')); this.$refs.settings.close() }, confirm() { @@ -114,8 +117,9 @@ title: '璇烽厤缃綉缁滀俊鎭�' }) } - path = network[0].address - path = path.substring(0, path.length - 3); + // path = network[0].address + // path = path.substring(0, path.length - 3); + path = _this.project.name let baseUrl = `http://${network[0].ip}:${network[0].port}/${network[0].address}` uni.request({ url: `${baseUrl}/login.action`, @@ -136,7 +140,7 @@ }) setTimeout(() => { uni.reLaunch({ - url: `/pages/project/${path}/home/home`, + url: `/pages/home/home`, }); }, 300) }, 700) -- Gitblit v1.9.1