소스 검색

init page

傅豪杰 7 달 전
부모
커밋
f737587666

+ 56 - 28
package-lock.json

@@ -1815,6 +1815,29 @@
         "webpack-merge": "^5.7.3",
         "webpack-virtual-modules": "^0.4.2",
         "whatwg-fetch": "^3.6.2"
+      },
+      "dependencies": {
+        "@vue/vue-loader-v15": {
+          "version": "npm:vue-loader@15.11.1",
+          "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-15.11.1.tgz",
+          "integrity": "sha512-0iw4VchYLePqJfJu9s62ACWUXeSqM30SQqlIftbYWM3C+jpPcEHKSPUZBLjSF9au4HTHQ/naF6OGnO3Q/qGR3Q==",
+          "dev": true,
+          "requires": {
+            "@vue/component-compiler-utils": "^3.1.0",
+            "hash-sum": "^1.0.2",
+            "loader-utils": "^1.1.0",
+            "vue-hot-reload-api": "^2.3.0",
+            "vue-style-loader": "^4.1.0"
+          },
+          "dependencies": {
+            "hash-sum": {
+              "version": "1.0.2",
+              "resolved": "https://registry.npmmirror.com/hash-sum/-/hash-sum-1.0.2.tgz",
+              "integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==",
+              "dev": true
+            }
+          }
+        }
       }
     },
     "@vue/cli-shared-utils": {
@@ -1960,27 +1983,6 @@
         }
       }
     },
-    "@vue/vue-loader-v15": {
-      "version": "npm:vue-loader@15.11.1",
-      "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-15.11.1.tgz",
-      "integrity": "sha512-0iw4VchYLePqJfJu9s62ACWUXeSqM30SQqlIftbYWM3C+jpPcEHKSPUZBLjSF9au4HTHQ/naF6OGnO3Q/qGR3Q==",
-      "dev": true,
-      "requires": {
-        "@vue/component-compiler-utils": "^3.1.0",
-        "hash-sum": "^1.0.2",
-        "loader-utils": "^1.1.0",
-        "vue-hot-reload-api": "^2.3.0",
-        "vue-style-loader": "^4.1.0"
-      },
-      "dependencies": {
-        "hash-sum": {
-          "version": "1.0.2",
-          "resolved": "https://registry.npmmirror.com/hash-sum/-/hash-sum-1.0.2.tgz",
-          "integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==",
-          "dev": true
-        }
-      }
-    },
     "@vue/web-component-wrapper": {
       "version": "1.3.0",
       "resolved": "https://registry.npmmirror.com/@vue/web-component-wrapper/-/web-component-wrapper-1.3.0.tgz",
@@ -3873,6 +3875,8 @@
     },
     "element-ui": {
       "version": "2.15.7",
+      "resolved": "https://registry.npmmirror.com/element-ui/-/element-ui-2.15.7.tgz",
+      "integrity": "sha512-+J6rnXajxzLwV6w8Q6bf7Yqzk1FO1ewbIrCy/4B5alnd7tj8WEpfQoAvISirVaUGVGy77d9Ji3o2bF4f0AsJLQ==",
       "requires": {
         "async-validator": "~1.8.1",
         "babel-helper-vue-jsx-merge-props": "^2.0.0",
@@ -4014,6 +4018,8 @@
     },
     "eslint-scope": {
       "version": "5.1.1",
+      "resolved": "https://registry.npmmirror.com/eslint-scope/-/eslint-scope-5.1.1.tgz",
+      "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==",
       "dev": true,
       "requires": {
         "esrecurse": "^4.3.0",
@@ -4342,7 +4348,9 @@
       }
     },
     "file-saver": {
-      "version": "2.0.5"
+      "version": "2.0.5",
+      "resolved": "https://registry.npmmirror.com/file-saver/-/file-saver-2.0.5.tgz",
+      "integrity": "sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA=="
     },
     "fill-range": {
       "version": "7.0.1",
@@ -5275,7 +5283,9 @@
       "integrity": "sha512-NnRs6dsyqUXejqk/yv2aiXlAvOs56sLkX6nUdeaNezI5LFFLlsZjOThmwnrcwh5ZZRwZlCMnVAY3CvhIhoVEKQ=="
     },
     "js-md5": {
-      "version": "0.7.3"
+      "version": "0.7.3",
+      "resolved": "https://registry.npmmirror.com/js-md5/-/js-md5-0.7.3.tgz",
+      "integrity": "sha512-ZC41vPSTLKGwIRjqDh8DfXoCrdQIyBgspJVPXHBGu4nZlAEvG3nf+jO9avM9RmLiGakg7vz974ms99nEV0tmTQ=="
     },
     "js-message": {
       "version": "1.0.7",
@@ -6076,7 +6086,9 @@
       }
     },
     "nprogress": {
-      "version": "0.2.0"
+      "version": "0.2.0",
+      "resolved": "https://registry.npmmirror.com/nprogress/-/nprogress-0.2.0.tgz",
+      "integrity": "sha512-I19aIingLgR1fmhftnbWWO3dXc0hSxqHQHQb3H8m+K3TnEn/iSeTZZOyvKXWqQESMwuUVnatlCnZdLBZZt2VSA=="
     },
     "nth-check": {
       "version": "2.0.1",
@@ -6397,7 +6409,9 @@
       "dev": true
     },
     "pako": {
-      "version": "1.0.11"
+      "version": "1.0.11",
+      "resolved": "https://registry.npmmirror.com/pako/-/pako-1.0.11.tgz",
+      "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw=="
     },
     "param-case": {
       "version": "3.0.4",
@@ -7844,6 +7858,8 @@
     },
     "socket.io-client": {
       "version": "2.3.1",
+      "resolved": "https://registry.npmmirror.com/socket.io-client/-/socket.io-client-2.3.1.tgz",
+      "integrity": "sha512-YXmXn3pA8abPOY//JtYxou95Ihvzmg8U6kQyolArkIyLd0pgVhrfor/iMsox8cn07WCOOvvuJ6XKegzIucPutQ==",
       "requires": {
         "backo2": "1.0.2",
         "component-bind": "1.0.0",
@@ -8444,6 +8460,8 @@
     },
     "svg-sprite-loader": {
       "version": "6.0.11",
+      "resolved": "https://registry.npmmirror.com/svg-sprite-loader/-/svg-sprite-loader-6.0.11.tgz",
+      "integrity": "sha512-TedsTf8wsHH6HgdwKjUveDZRC6q5gPloYV8A8/zZaRWP929J7x6TzQ6MvZFl+YYDJuJ0Akyuu/vNVJ+fbPuYXg==",
       "dev": true,
       "requires": {
         "bluebird": "^3.5.0",
@@ -8472,6 +8490,8 @@
     },
     "svgo": {
       "version": "2.8.0",
+      "resolved": "https://registry.npmmirror.com/svgo/-/svgo-2.8.0.tgz",
+      "integrity": "sha512-+N/Q9kV1+F+UeWYoSiULYo4xYSDQlTgb+ayMobAXPwMnLvop7oxKMo9OzIrX5x3eS4L4f2UHhc9axXwY8DpChg==",
       "dev": true,
       "requires": {
         "@trysound/sax": "0.2.0",
@@ -8942,10 +8962,14 @@
       "dev": true
     },
     "vue": {
-      "version": "2.6.14"
+      "version": "2.6.14",
+      "resolved": "https://registry.npmmirror.com/vue/-/vue-2.6.14.tgz",
+      "integrity": "sha512-x2284lgYvjOMj3Za7kqzRcUSxBboHqtgRE2zlos1qWaOye5yUmHn42LB1250NJBLRwEcdrB0JRwyPTEPhfQjiQ=="
     },
     "vue-count-to": {
-      "version": "1.0.13"
+      "version": "1.0.13",
+      "resolved": "https://registry.npmmirror.com/vue-count-to/-/vue-count-to-1.0.13.tgz",
+      "integrity": "sha512-6R4OVBVNtQTlcbXu6SJ8ENR35M2/CdWt3Jmv57jOUM+1ojiFmjVGvZPH8DfHpMDSA+ITs+EW5V6qthADxeyYOQ=="
     },
     "vue-hot-reload-api": {
       "version": "2.3.4",
@@ -9051,6 +9075,8 @@
     },
     "vue-template-compiler": {
       "version": "2.6.14",
+      "resolved": "https://registry.npmmirror.com/vue-template-compiler/-/vue-template-compiler-2.6.14.tgz",
+      "integrity": "sha512-ODQS1SyMbjKoO1JBJZojSw6FE4qnh9rIpUZn2EUT86FKizx9uH5z6uXiIrm4/Nb/gwxTi/o17ZDEGWAXHvtC7g==",
       "dev": true,
       "requires": {
         "de-indent": "^1.0.2",
@@ -9064,7 +9090,9 @@
       "dev": true
     },
     "vuex": {
-      "version": "3.6.2"
+      "version": "3.6.2",
+      "resolved": "https://registry.npmmirror.com/vuex/-/vuex-3.6.2.tgz",
+      "integrity": "sha512-ETW44IqCgBpVomy520DT5jf8n0zoCac+sxWnn+hMe/CzaSejb/eVw2YToiXYX+Ex/AuHHia28vWTq4goAexFbw=="
     },
     "watchpack": {
       "version": "2.3.1",

+ 1 - 6
src/api/request.js

@@ -13,12 +13,6 @@ const instance = axios.create({
 
 instance.interceptors.request.use(
     config => {
-        //登录状态下socket断连时,除登出外中断一切请求
-        if (isLogin() && !store.state.websocket.online && config.url !== '/account/logout') {
-            Message.error('请等待与服务器重新连接')
-            return Promise.reject('')
-        }
-
         //header添加token
         if (store.state.user.token) {
             config.headers['X-Token'] = store.state.user.token
@@ -107,6 +101,7 @@ export class PostApi extends Api {
 
 export class GetApi extends Api {
     constructor(url, arg, chain) {
+        console.log(url)
         super(url, arg, chain, 'get')
     }
 }

+ 5 - 5
src/config/index.js

@@ -1,25 +1,25 @@
-const contextPath = process.env.NODE_ENV === 'development' ? '/' : '/jxc-admin/'
+const contextPath = process.env.NODE_ENV === 'development' ? '/' : '/web/jxc-admin/'
 
 module.exports = {
     //项目的部署路径,始终以'/'开头,以'/'结束
     contextPath,
 
     //页面标题、登录注册页的标题
-    title: 'BiuBiuBiu~',
+    title: 'info-jxc',
 
     //logo地址
     logo: `${contextPath}static/img/logo.svg`,
 
     //全局axios的baseUrl、devServer的路由前缀
-    apiPrefix: '/api',
+    apiPrefix: process.env.NODE_ENV === 'development' ? '/' : 'https://infojxc.info666.com/api/',
 
     //socket连接地址
-    socketUrl: process.env.NODE_ENV === 'development' ? 'http://localhost:12580' : 'https://toesbieya.cn',
+    socketUrl: process.env.NODE_ENV === 'development' ? 'http://localhost:12580' : 'https://infojxc.info666.com/api/',
 
     //路由配置
     route: {
         //路由模式,['hash','history']
-        mode: 'history',
+        mode: 'hash',
 
         //是否使用由后端返回的数据作为路由
         useBackendDataAsRoute: false

+ 0 - 1
src/main.js

@@ -25,4 +25,3 @@ new Vue({
 })
 
 // //页面刷新时websocket重连
-// store.dispatch('websocket/init').catch()

+ 1 - 0
src/router/guardian/accessControl.js

@@ -4,6 +4,7 @@ import {isLogin, auth, needAuth} from "@/util/auth"
 const noLoginList = ['/login', '/register', '/403', '/404', '/500']
 
 const beforeEach = async (to, from, next) => {
+    console.log(to,from)
     //放行不需要登录即可访问的路由
     if (noLoginList.includes(to.path)) {
         return next()

+ 2 - 3
src/router/module/index.js

@@ -1,6 +1,5 @@
 import admin from './admin'
 import example from './example'
-import dev from './dev'
-import doc from './doc'
 
-export default [admin, example, dev, doc]
+
+export default [admin, example]

+ 1 - 1
src/store/module/setting.js

@@ -77,7 +77,7 @@ const state = {
     app: {
         showLogo: true,
         struct: 'left-right',
-        navMode: 'mix'
+        navMode: 'aside'
     },
     page: {
         showHeader: true,

+ 0 - 3
src/store/module/user.js

@@ -36,8 +36,6 @@ const actions = {
 
                 commit('$all', user)
                 setUser(user)
-
-                return dispatch('websocket/init', undefined, {root: true})
             })
     },
 
@@ -49,7 +47,6 @@ const actions = {
         return logout
             .request(state.token)
             .then(() => Promise.all([
-                dispatch('websocket/close', null, {root: true}),
                 dispatch('removeUser'),
                 //因为可能开启了页签的持久化功能,所以退出登陆时通过清空store来清空持久化数据
                 tagsViewMutations.delAllTagAndCache()

+ 0 - 9
src/view/_app/login/LoginForm.vue

@@ -43,11 +43,6 @@
         </el-button>
 
         <div class="flex" style="margin-top: 20px">
-            <p class="other-ways">
-                其他方式登录
-                <v-icon v-for="i in otherWays" :key="i" :icon="`svg-${i}`" @click="() => thirdPartyLogin(i)"/>
-            </p>
-
             <el-button type="text" @click="register">注册账户</el-button>
         </div>
     </el-form>
@@ -110,10 +105,6 @@ export default {
             window.setTimeout(() => this.$router.replace(redirect), 200)
         },
 
-        thirdPartyLogin(channel) {
-            this.$message.info('假装可以第三方登录')
-        },
-
         capsLockTip({keyCode}) {
             if (keyCode === 20) this.capsTooltip = !this.capsTooltip
         },

+ 1 - 3
src/view/example/test/develop/indexPage.vue

@@ -3,7 +3,6 @@
         <api-speed-test/>
         <export-excel-test/>
         <image-compress-test/>
-        <websocket-test/>
     </div>
 </template>
 
@@ -11,10 +10,9 @@
 import ApiSpeedTest from "./component/ApiSpeedTest"
 import ExportExcelTest from "./component/ExportExcelTest"
 import ImageCompressTest from "./component/ImageCompressTest"
-import WebsocketTest from "./component/WebsocketTest"
 
 export default {
     name: "testPage",
-    components: {ApiSpeedTest, ExportExcelTest, ImageCompressTest, WebsocketTest}
+    components: {ApiSpeedTest, ExportExcelTest, ImageCompressTest}
 }
 </script>

+ 3 - 6
vue.config.js

@@ -10,7 +10,7 @@ function resolve(dir) {
 
 module.exports = defineConfig({
   publicPath: settings.contextPath,
-  outputDir: 'dist',
+  outputDir: 'jxc-admin',
   assetsDir: 'static',
   runtimeCompiler: true,
   lintOnSave: false,
@@ -50,13 +50,10 @@ module.exports = defineConfig({
       },
       proxy: {
         [settings.apiPrefix]: {
-          target: 'http://192.168.31.138:8081',
-          ws: true,
+          target: 'https://infojxc.info666.com/api',
+          ws:false,
           secure: false,
           changeOrigin: true,
-          pathRewrite: {
-            [`^${settings.apiPrefix}`]: ''
-          }
         }
       }
     }