value
2023-09-07 c48511779f77e1d525638ef2450fde5057dce9d5
调整部署
已修改8个文件
41 ■■■■ 文件已修改
.env.development 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
.env.production 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
postcss.config.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/permission.js 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inspectionManagement/commissionInspection/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.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/'
.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/'
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
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 })
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()
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
  })
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('链接已生成,点击复制按钮进行复制')
                })
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