diff --git a/src/App.vue b/src/App.vue index de0fe53e..0210243c 100644 --- a/src/App.vue +++ b/src/App.vue @@ -25,19 +25,19 @@ export default { // setToken(token[1].slice(1)); // this.$router.push({ path: "/" }); // } - const urlParams = new URLSearchParams(window.location.search) - const token = urlParams.get('token') - console.log('🚀 ~ created ~ token:', token) - if (token) { - setToken(token) - this.$router.push({ path: '/' }) - } - - // 确保 Vuex store 中的 token 状态与 Cookie 同步 - const cookieToken = getToken() - if (cookieToken && !this.$store.state.user.token) { - this.$store.commit('user/SET_TOKEN', cookieToken) - } + // const urlParams = new URLSearchParams(window.location.search) + // const token = urlParams.get('token') + // console.log('🚀 ~ created ~ token:', token) + // if (token) { + // setToken(token) + // this.$router.push({ path: '/' }) + // } + // + // // 确保 Vuex store 中的 token 状态与 Cookie 同步 + // const cookieToken = getToken() + // if (cookieToken && !this.$store.state.user.token) { + // this.$store.commit('user/SET_TOKEN', cookieToken) + // } }, metaInfo() { return { diff --git a/src/api/login.js b/src/api/login.js index effe8e0d..bd648e2a 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -3,13 +3,26 @@ import request from '@/utils/request' // 登录方法 export function login(data) { return request({ - url: '/auth/login', + // url: '/auth/login', + // headers: { + // isToken: false, + // repeatSubmit: false + // }, + // method: 'post', + // data: data + }) +} + +// iws登录 +export function iwsLogin(data) { + return request({ + url: '/auth/iwsLogin', headers: { isToken: false, repeatSubmit: false }, method: 'post', - data: data + data }) } diff --git a/src/router/index.js b/src/router/index.js index d5501ad7..ee56d95c 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -75,7 +75,7 @@ export const constantRoutes = [ ] }, - { + /* { path: '', component: Layout, redirect: 'index1', @@ -88,7 +88,7 @@ export const constantRoutes = [ }, ] - }, + }, */ { path: '/qrCode/qrCodePage', component: () => import('@/views/qrCode/qrCode'), @@ -401,8 +401,8 @@ Router.prototype.replace = function push(location) { } export default new Router({ - mode: 'history', // 去掉url中的# / 宏源为history + mode: 'hash', // 去掉url中的# / 宏源为history scrollBehavior: () => ({ y: 0 }), routes: constantRoutes, - base: process.env.NODE_ENV === 'production' ? '/' : '' // 宏源打包时隐藏 + base: process.env.NODE_ENV === 'production' ? '/iws/glweb' : '' // 宏源打包时隐藏 }) diff --git a/src/views/EquipmentRetireApply/audit-detail.vue b/src/views/EquipmentRetireApply/audit-detail.vue index face7f41..f4d872fd 100644 --- a/src/views/EquipmentRetireApply/audit-detail.vue +++ b/src/views/EquipmentRetireApply/audit-detail.vue @@ -1,7 +1,7 @@