From c48511779f77e1d525638ef2450fde5057dce9d5 Mon Sep 17 00:00:00 2001
From: value <z1292839451@163.com>
Date: 星期四, 07 九月 2023 09:46:06 +0800
Subject: [PATCH] 调整部署
---
.env.development | 2 +-
src/permission.js | 18 +++++++++---------
src/main.js | 2 +-
src/views/login/index.vue | 1 +
.env.production | 2 +-
src/router/index.js | 9 ++-------
postcss.config.js | 3 ++-
src/views/inspectionManagement/commissionInspection/index.vue | 4 ++--
8 files changed, 19 insertions(+), 22 deletions(-)
diff --git a/.env.development b/.env.development
index 6c8cdfe..dc51ced 100644
--- a/.env.development
+++ b/.env.development
@@ -2,4 +2,4 @@
ENV = 'development'
# base api
-VUE_APP_BASE_API = 'http://192.168.218.96:1234/'
+VUE_APP_BASE_API = 'http://114.132.189.42:1234/'
diff --git a/.env.production b/.env.production
index dd72fa5..0306dbf 100644
--- a/.env.production
+++ b/.env.production
@@ -3,5 +3,5 @@
# base api
# VUE_APP_BASE_API = '/prod-api'
-VUE_APP_BASE_API = 'http://localhost:1234/'
+VUE_APP_BASE_API = 'http://114.132.189.42:1234/'
diff --git a/postcss.config.js b/postcss.config.js
index 2926a37..8f99bd1 100644
--- a/postcss.config.js
+++ b/postcss.config.js
@@ -1,5 +1,6 @@
-// https://github.com/michael-ciniawsky/postcss-load-config
+// https://github.com/michael-ciniawsky/postcss-load-config
+const path = require('path');
module.exports = {
'plugins': {
// to edit target browsers: use "browserslist" field in package.json
diff --git a/src/main.js b/src/main.js
index 08ded1c..c029a5a 100644
--- a/src/main.js
+++ b/src/main.js
@@ -43,7 +43,7 @@
return JSON.parse(JSON.stringify(val))
}
-Vue.prototype.vueIp = "http://localhost:8080/"
+Vue.prototype.vueIp = "http://114.132.189.42:8080"
// set ElementUI lang to EN
Vue.use(ElementUI, { locale })
diff --git a/src/permission.js b/src/permission.js
index dafb844..beba60f 100644
--- a/src/permission.js
+++ b/src/permission.js
@@ -5,21 +5,21 @@
// import 'nprogress/nprogress.css' // progress bar style
// import { getToken } from '@/utils/auth' // get token from cookie
// import getPageTitle from '@/utils/get-page-title'
-
+//
// NProgress.configure({ showSpinner: false }) // NProgress Configuration
-
+//
// const whiteList = ['/login'] // no redirect whitelist
-
+//
// router.beforeEach(async(to, from, next) => {
// // start progress bar
// NProgress.start()
-
+//
// // set page title
// document.title = getPageTitle(to.meta.title)
-
+//
// // determine whether the user has logged in
// const hasToken = getToken()
-
+//
// if (hasToken) {
// if (to.path === '/login') {
// // if is logged in, redirect to the home page
@@ -33,7 +33,7 @@
// try {
// // get user info
// await store.dispatch('user/getInfo')
-
+//
// next()
// } catch (error) {
// // remove token and go to login page to re-login
@@ -47,7 +47,7 @@
// }
// } else {
// /* has no token*/
-
+//
// if (whiteList.indexOf(to.path) !== -1) {
// // in the free login whitelist, go directly
// next()
@@ -58,7 +58,7 @@
// }
// }
// })
-
+//
// router.afterEach(() => {
// // finish progress bar
// NProgress.done()
diff --git a/src/router/index.js b/src/router/index.js
index c6c68a8..8bc2979 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -321,11 +321,6 @@
hidden: true
},
{
- path: '/addCommision',
- component: () => import('@/views/inspectionManagement/commissionInspection/addCommision'),
- hidden: true
-},
-{
path: '/',
component: Layout,
redirect: '/home',
@@ -357,7 +352,7 @@
function createRouter(Routees) {
if (JSON.parse(sessionStorage.getItem("user")) != undefined && JSON.parse(sessionStorage.getItem("user")) != null) {
let sessionLayerId = JSON.parse(sessionStorage.getItem("user")).sessionLayerId
- if (sessionLayerId != 'f5c8bcb7d5a0fd27e2323280f7e98cad') {
+ if (sessionLayerId != 'c3284d0f94606de1fd2af172aba15bf3') {
let role = JSON.parse(sessionStorage.getItem("user")).role
let menuFather = baseRouter
const dataMenuFather = fn3(menuFather)
@@ -421,7 +416,7 @@
Routees = baseRouter
}
return new Router({
- mode: 'history', // require service support
+ // mode: 'history', // require service support
scrollBehavior: () => ({ y: 0 }),
routes: Routees
})
diff --git a/src/views/inspectionManagement/commissionInspection/index.vue b/src/views/inspectionManagement/commissionInspection/index.vue
index f349521..7901cd7 100644
--- a/src/views/inspectionManagement/commissionInspection/index.vue
+++ b/src/views/inspectionManagement/commissionInspection/index.vue
@@ -474,7 +474,7 @@
selectViewUUID({
day: this.day
}).then(res => {
- this.view = `${this.vueIp}addCommision/${res.data.id}`
+ this.view = `${this.vueIp}/#/addCommision/${res.data.id}`
this.viewId = res.data.id
this.viewTime2 = res.data.time
})
@@ -484,7 +484,7 @@
day: this.viewTime == null ? 1 : this.viewTime
}).then(res => {
this.viewId = res.data
- this.view = `${this.vueIp}addCommision/${res.data.id}`
+ this.view = `${this.vueIp}/#/addCommision/${res.data.id}`
this.viewDia = false
this.$message.success('閾炬帴宸茬敓鎴愶紝鐐瑰嚮澶嶅埗鎸夐挳杩涜澶嶅埗')
})
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index 1d73885..6fe0b63 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -218,6 +218,7 @@
this.$message.success("鐧诲綍鎴愬姛")
this.btnload = false
this.$router.push({ path: this.redirect || '/' })
+ // this.$router.push('/')
}).catch((error) => {
this.$message.error(error.message)
this.btnload = false
--
Gitblit v1.9.3