Browse Source

代码优化、依赖升级

fanghuisheng 2 years ago
parent
commit
f7f990bdea

+ 0 - 1
mock/index.js

@@ -1,5 +1,4 @@
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 导入所有 controller 模块,npm run serve时在node环境中自动输出controller文件夹下Mock接口,请勿修改。
  */
 

+ 0 - 2
mock/utils/index.js

@@ -3,7 +3,6 @@ const { join } = require('path')
 const fs = require('fs')
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 随机生成图片url。
  * @param width
  * @param height
@@ -14,7 +13,6 @@ function handleRandomImage(width = 50, height = 50) {
 }
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 处理所有 controller 模块,npm run serve时在node环境中自动输出controller文件夹下Mock接口,请勿修改。
  * @returns {[]}
  */

+ 2 - 2
package.json

@@ -27,7 +27,7 @@
     "vue-amap": "^0.5.10",
     "vue-grid-layout": "^3.0.0-beta1",
     "vue-router": "^4.0.3",
-    "vuex": "^4.0.0-0"
+    "vuex": "^4.1.0"
   },
   "devDependencies": {
     "@vue/cli-plugin-babel": "^4.5.9",
@@ -55,7 +55,7 @@
     "svg-sprite-loader": "^5.2.1",
     "uglifyjs-webpack-plugin": "^2.2.0",
     "vab-config": "file:vab-config",
-    "webpackbar": "^5.0.0-3"
+    "webpackbar": "^5.0.2"
   },
   "gitHooks": {
     "pre-commit": "lint-staged"

+ 1 - 3
public/index.html

@@ -12,9 +12,7 @@
     <script type="text/javascript"
         src="https://webapi.amap.com/maps?v=1.4.15&key=246349bf278f6225fa80156828d0f061"></script>
 
-    <meta
-        content="vab,vab官网,后台管理框架,vue后台管理框架,vue-admin-beautiful,vue-admin-beautiful-pro,vue-admin-beautiful官网,vue-admin-beautiful文档,vue-element-admin,vue-element-admin官网,vue-element-admin文档,vue-admin,vue-admin官网,vue-admin文档"
-        name="keywords" />
+
     <meta content="<%= VUE_APP_AUTHOR %>" name="author" />
     <!-- <link href="<%= BASE_URL %>static/css/loading.css" rel="stylesheet" /> -->
     <script>

+ 0 - 1
src/config/config.js

@@ -3,7 +3,6 @@
  **/
 const config = {
   layout: 'vertical',
-  donation: false,
   templateFolder: 'project',
 }
 module.exports = config

+ 2 - 2
src/config/default/setting.config.js

@@ -72,9 +72,9 @@ const setting = {
     build7z: false,
     //代码生成机生成在view下的文件夹名称
     templateFolder: 'project',
-    //是否显示终端donation打印
-    donation: false,
     //画廊布局和综合布局时,是否点击一级菜单默认开启第一个二级菜单
     openFirstMenu: true,
+    //控制台显示的项目名称
+    webpackBarName:"vue-admin-better"
 }
 module.exports = setting

+ 0 - 1
src/store/index.js

@@ -1,5 +1,4 @@
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 导入所有 vuex 模块,自动加入namespaced:true,用于解决vuex命名冲突,请勿修改。
  */
 import { createStore } from 'vuex'

+ 0 - 4
src/store/modules/routes.js

@@ -1,5 +1,4 @@
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 路由拦截状态管理,目前两种模式:all模式与intelligence模式,其中partialRoutes是菜单暂未使用
  */
 import { asyncRoutes, constantRoutes } from '@/router'
@@ -28,7 +27,6 @@ const mutations = {
 }
 const actions = {
     /**
-     * @author chuzhixin 1204505056@qq.com
      * @description intelligence模式设置路由
      * @param {*} { commit }
      * @returns
@@ -39,7 +37,6 @@ const actions = {
         return [...asyncRoutes]
     },
     /**
-     * @author chuzhixin 1204505056@qq.com
      * @description all模式设置路由
      * @param {*} { commit }
      * @returns
@@ -91,7 +88,6 @@ const actions = {
         return [...asyncRoutes]
     },
     /**
-     * @author chuzhixin 1204505056@qq.com
      * @description 画廊布局、综合布局设置路由
      * @param {*} { commit }
      * @param accessedRoutes 画廊布局、综合布局设置路由

+ 0 - 1
src/store/modules/settings.js

@@ -1,5 +1,4 @@
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 所有全局配置的状态管理,如无必要请勿修改
  */
 import defaultSettings from '@/config'

+ 82 - 84
src/store/modules/tagsBar.js

@@ -1,150 +1,148 @@
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description tagsBar多标签页逻辑,前期借鉴了很多开源项目发现都有个共同的特点很繁琐并不符合框架设计的初衷,后来在github用户cyea的启发下完成了重构,请勿修改
  */
 
 const state = () => ({
-    visitedRoutes: [],
+  visitedRoutes: [],
 })
 const getters = {
-    visitedRoutes: (state) => state.visitedRoutes,
+  visitedRoutes: (state) => state.visitedRoutes,
 }
 const mutations = {
-    /**
-     * @author chuzhixin 1204505056@qq.com
+  /**
+     
      * @description 添加标签页
      * @param {*} state
      * @param {*} route
      * @returns
      */
-    addVisitedRoute(state, route) {
+  addVisitedRoute(state, route) {
+    let target = state.visitedRoutes.find((item) => item.path === route.path)
+    if (target) {
+      if (route.fullPath !== target.fullPath) Object.assign(target, route)
+      return
+    }
 
-        let target = state.visitedRoutes.find((item) => item.path === route.path)
-        if (target) {
-            if (route.fullPath !== target.fullPath) Object.assign(target, route)
-            return
-        }
-
-        state.visitedRoutes.push(Object.assign({}, route))
-        // state.visitedRoutes = state.visitedRoutes.shift()
-    },
-    /**
-     * @author chuzhixin 1204505056@qq.com
+    state.visitedRoutes.push(Object.assign({}, route))
+    // state.visitedRoutes = state.visitedRoutes.shift()
+  },
+  /**
+     
      * @description 删除当前标签页
      * @param {*} state
      * @param {*} route
      * @returns
      */
-    delVisitedRoute(state, route) {
-        state.visitedRoutes.forEach((item, index) => {
-            if (item.path === route.path) state.visitedRoutes.splice(index, 1)
-        })
-    },
-    /**
-     * @author chuzhixin 1204505056@qq.com
+  delVisitedRoute(state, route) {
+    state.visitedRoutes.forEach((item, index) => {
+      if (item.path === route.path) state.visitedRoutes.splice(index, 1)
+    })
+  },
+  /**
+     
      * @description 删除当前标签页以外其它全部多标签页
      * @param {*} state
      * @param {*} route
      * @returns
      */
-    delOthersVisitedRoutes(state, route) {
-        state.visitedRoutes = state.visitedRoutes.filter(
-            (item) => item.meta.affix || item.path === route.path
-        )
-    },
-    /**
-     * @author chuzhixin 1204505056@qq.com
+  delOthersVisitedRoutes(state, route) {
+    state.visitedRoutes = state.visitedRoutes.filter(
+      (item) => item.meta.affix || item.path === route.path
+    )
+  },
+  /**
+     
      * @description 删除当前标签页左边全部多标签页
      * @param {*} state
      * @param {*} route
      * @returns
      */
-    delLeftVisitedRoutes(state, route) {
-        let index = state.visitedRoutes.length
-        state.visitedRoutes = state.visitedRoutes.filter((item) => {
-            if (item.name === route.name) index = state.visitedRoutes.indexOf(item)
-            return item.meta.affix || index <= state.visitedRoutes.indexOf(item)
-        })
-    },
-    /**
-     * @author chuzhixin 1204505056@qq.com
+  delLeftVisitedRoutes(state, route) {
+    let index = state.visitedRoutes.length
+    state.visitedRoutes = state.visitedRoutes.filter((item) => {
+      if (item.name === route.name) index = state.visitedRoutes.indexOf(item)
+      return item.meta.affix || index <= state.visitedRoutes.indexOf(item)
+    })
+  },
+  /**
+     
      * @description 删除当前标签页右边全部多标签页
      * @param {*} state
      * @param {*} route
      * @returns
      */
-    delRightVisitedRoutes(state, route) {
-        let index = state.visitedRoutes.length
-        state.visitedRoutes = state.visitedRoutes.filter((item) => {
-            if (item.name === route.name) index = state.visitedRoutes.indexOf(item)
-            return item.meta.affix || index >= state.visitedRoutes.indexOf(item)
-        })
-    },
-    /**
-     * @author chuzhixin 1204505056@qq.com
+  delRightVisitedRoutes(state, route) {
+    let index = state.visitedRoutes.length
+    state.visitedRoutes = state.visitedRoutes.filter((item) => {
+      if (item.name === route.name) index = state.visitedRoutes.indexOf(item)
+      return item.meta.affix || index >= state.visitedRoutes.indexOf(item)
+    })
+  },
+  /**
+     
      * @description 删除全部多标签页
      * @param {*} state
      * @param {*} route
      * @returns
      */
-    delAllVisitedRoutes(state) {
-        // state.visitedRoutes = state.visitedRoutes.filter((item) => item.meta.affix)
-        state.visitedRoutes = []
-    },
+  delAllVisitedRoutes(state) {
+    // state.visitedRoutes = state.visitedRoutes.filter((item) => item.meta.affix)
+    state.visitedRoutes = []
+  },
 }
 const actions = {
-    /**
-     * @author chuzhixin 1204505056@qq.com
+  /**
+     
      * @description 添加标签页
      * @param {*} { commit }
      * @param {*} route
      */
-    addVisitedRoute({ commit }, route) {
-        commit('addVisitedRoute', route)
-    },
-    /**
-     * @author chuzhixin 1204505056@qq.com
+  addVisitedRoute({ commit }, route) {
+    commit('addVisitedRoute', route)
+  },
+  /**
+     
      * @description 删除当前标签页
      * @param {*} { commit }
      * @param {*} route
      */
-    delVisitedRoute({ commit }, route) {
-        commit('delVisitedRoute', route)
-    },
-    /**
-     * @author chuzhixin 1204505056@qq.com
+  delVisitedRoute({ commit }, route) {
+    commit('delVisitedRoute', route)
+  },
+  /**
+     
      * @description 删除当前标签页以外其它全部多标签页
      * @param {*} { commit }
      * @param {*} route
      */
-    delOthersVisitedRoutes({ commit }, route) {
-        commit('delOthersVisitedRoutes', route)
-    },
-    /**
-     * @author chuzhixin 1204505056@qq.com
+  delOthersVisitedRoutes({ commit }, route) {
+    commit('delOthersVisitedRoutes', route)
+  },
+  /**
+     
      * @description 删除当前标签页左边全部多标签页
      * @param {*} { commit }
      * @param {*} route
      */
-    delLeftVisitedRoutes({ commit }, route) {
-        commit('delLeftVisitedRoutes', route)
-    },
-    /**
-     * @author chuzhixin 1204505056@qq.com
+  delLeftVisitedRoutes({ commit }, route) {
+    commit('delLeftVisitedRoutes', route)
+  },
+  /**
+     
      * @description 删除当前标签页右边全部多标签页
      * @param {*} { commit }
      * @param {*} route
      */
-    delRightVisitedRoutes({ commit }, route) {
-        commit('delRightVisitedRoutes', route)
-    },
-    /**
-     * @author chuzhixin 1204505056@qq.com
+  delRightVisitedRoutes({ commit }, route) {
+    commit('delRightVisitedRoutes', route)
+  },
+  /**
+     
      * @description 删除全部多标签页
      * @param {*} { commit }
      */
-    delAllVisitedRoutes({ commit }) {
-        commit('delAllVisitedRoutes')
-    },
+  delAllVisitedRoutes({ commit }) {
+    commit('delAllVisitedRoutes')
+  },
 }
-export default { state, getters, mutations, actions }
+export default { state, getters, mutations, actions }

+ 10 - 10
src/store/modules/user.js

@@ -1,5 +1,5 @@
 /**
- * @author chuzhixin 1204505056@qq.com
+ 
  * @description 登录、获取用户信息、退出登录、清除accessToken逻辑,不建议修改
  */
 import { getUserInfo, login, logout } from '@/api/user'
@@ -24,7 +24,7 @@ const getters = {
 }
 const mutations = {
     /**
-     * @author chuzhixin 1204505056@qq.com
+     
      * @description 设置accessToken
      * @param {*} state
      * @param {*} accessToken
@@ -34,7 +34,7 @@ const mutations = {
         setAccessToken(accessToken)
     },
     /**
-     * @author chuzhixin 1204505056@qq.com
+     
      * @description 设置用户名
      * @param {*} state
      * @param {*} username
@@ -43,7 +43,7 @@ const mutations = {
         state.username = username
     },
     /**
-     * @author chuzhixin 1204505056@qq.com
+     
      * @description 设置头像
      * @param {*} state
      * @param {*} avatar
@@ -54,7 +54,7 @@ const mutations = {
 }
 const actions = {
     /**
-     * @author chuzhixin 1204505056@qq.com
+     
      * @description 登录拦截放行时,设置虚拟角色
      * @param {*} { commit, dispatch }
      */
@@ -64,7 +64,7 @@ const actions = {
         commit('setUsername', 'admin(未开启登录拦截)')
     },
     /**
-     * @author chuzhixin 1204505056@qq.com
+     
      * @description 登录
      * @param {*} { commit }
      * @param {*} userInfo
@@ -100,7 +100,7 @@ const actions = {
         }
     },
     /**
-     * @author chuzhixin 1204505056@qq.com
+     
      * @description 获取用户信息接口 这个接口非常非常重要,如果没有明确底层前逻辑禁止修改此方法,错误的修改可能造成整个框架无法正常使用
      * @param {*} { commit, dispatch, state }
      * @returns
@@ -129,7 +129,7 @@ const actions = {
     },
 
     /**
-     * @author chuzhixin 1204505056@qq.com
+     
      * @description 退出登录
      * @param {*} { dispatch }
      */
@@ -139,7 +139,7 @@ const actions = {
         await dispatch('resetAll')
     },
     /**
-     * @author chuzhixin 1204505056@qq.com
+     
      * @description 重置accessToken、roles、ability、router等
      * @param {*} { commit, dispatch }
      */
@@ -152,7 +152,7 @@ const actions = {
         removeAccessToken()
     },
     /**
-     * @author chuzhixin 1204505056@qq.com
+     
      * @description 设置token
      */
     setAccessToken({ commit }, accessToken) {

+ 0 - 3
src/utils/accessToken.js

@@ -2,7 +2,6 @@ import { storage, tokenTableName } from '@/config'
 import cookie from 'js-cookie'
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 获取accessToken
  * @returns {string|ActiveX.IXMLDOMNode|Promise<any>|any|IDBRequest<any>|MediaKeyStatus|FormDataEntryValue|Function|Promise<Credential | null>}
  */
@@ -23,7 +22,6 @@ export function getAccessToken() {
 }
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 存储accessToken
  * @param accessToken
  * @returns {void|*}
@@ -45,7 +43,6 @@ export function setAccessToken(accessToken) {
 }
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 移除accessToken
  * @returns {void|Promise<void>}
  */

+ 0 - 11
src/utils/index.js

@@ -1,7 +1,6 @@
 import { devDependencies } from '../../package.json'
 if (!devDependencies['vab-config']) document.body.innerHTML = ''
     /**
-     * @author chuzhixin 1204505056@qq.com
      * @description 格式化时间
      * @param time
      * @param cFormat
@@ -81,7 +80,6 @@ export function parseTime2(time, cFormat) {
 }
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 格式化时间
  * @param time
  * @param option
@@ -126,7 +124,6 @@ export function formatTime(time, option) {
 }
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 将url请求参数转为json格式
  * @param url
  * @returns {{}|any}
@@ -148,7 +145,6 @@ export function paramObj(url) {
 }
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 父子关系的数组转换成树形结构数据
  * @param data
  * @returns {*}
@@ -179,7 +175,6 @@ export function translateDataToTree(data) {
 }
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 树形结构数据转换成父子关系的数组
  * @param data
  * @returns {[]}
@@ -206,7 +201,6 @@ export function translateTreeToData(data) {
 }
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 10位时间戳转换
  * @param time
  * @returns {string}
@@ -228,7 +222,6 @@ export function tenBitTimestamp(time) {
 }
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 13位时间戳转换
  * @param time
  * @returns {string}
@@ -250,7 +243,6 @@ export function thirteenBitTimestamp(time) {
 }
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 获取随机id
  * @param length
  * @returns {string}
@@ -265,7 +257,6 @@ export function uuid(length = 32) {
 }
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description m到n的随机数
  * @param m
  * @param n
@@ -276,7 +267,6 @@ export function random(m, n) {
 }
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description addEventListener
  * @type {function(...[*]=)}
  */
@@ -289,7 +279,6 @@ export const on = (function() {
 })()
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description removeEventListener
  * @type {function(...[*]=)}
  */

+ 0 - 1
src/utils/pageTitle.js

@@ -1,7 +1,6 @@
 import { title, titleReverse, titleSeparator } from '@/config'
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 设置标题
  * @param pageTitle
  * @returns {string}

+ 0 - 4
src/utils/request.js

@@ -20,7 +20,6 @@ let loadingInstance
 var tag = true
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 处理code异常
  * @param {*} code
  * @param {*} msg
@@ -49,7 +48,6 @@ const handleCode = (code, msg) => {
 }
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description axios初始化
  */
 // const baseURL = window.PLATFROM_CONFIG.baseUrl
@@ -67,7 +65,6 @@ const instance = axios.create({
 })
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description axios请求拦截器
  */
 instance.interceptors.request.use(
@@ -100,7 +97,6 @@ instance.interceptors.request.use(
 )
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description axios响应拦截器
  */
 instance.interceptors.response.use(

+ 0 - 1
src/utils/static.js

@@ -1,5 +1,4 @@
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 导入所有 controller 模块,浏览器环境中自动输出controller文件夹下Mock接口,请勿修改。
  */
 import Mock from 'mockjs'

+ 16 - 31
src/utils/validate.js

@@ -1,5 +1,4 @@
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 判读是否为外链
  * @param path
  * @returns {boolean}
@@ -9,7 +8,6 @@ export function isExternal(path) {
 }
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 校验密码是否小于6位
  * @param value
  * @returns {boolean}
@@ -19,7 +17,6 @@ export function isPassword(value) {
 }
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 判断是否为数字
  * @param value
  * @returns {boolean}
@@ -30,7 +27,6 @@ export function isNumber(value) {
 }
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 判断是否是名称
  * @param value
  * @returns {boolean}
@@ -41,29 +37,28 @@ export function isName(value) {
 }
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 判断是否为IP
  * @param ip
  * @returns {boolean}
  */
 export function isIP(ip) {
-  const reg = /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/
+  const reg =
+    /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/
   return reg.test(ip)
 }
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 判断是否是传统网站
  * @param url
  * @returns {boolean}
  */
 export function isUrl(url) {
-  const reg = /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/
+  const reg =
+    /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/
   return reg.test(url)
 }
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 判断是否是小写字母
  * @param value
  * @returns {boolean}
@@ -74,7 +69,6 @@ export function isLowerCase(value) {
 }
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 判断是否是大写字母
  * @param value
  * @returns {boolean}
@@ -85,7 +79,6 @@ export function isUpperCase(value) {
 }
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 判断是否是大写字母开头
  * @param value
  * @returns {boolean}
@@ -96,7 +89,6 @@ export function isAlphabets(value) {
 }
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 判断是否是字符串
  * @param value
  * @returns {boolean}
@@ -106,7 +98,6 @@ export function isString(value) {
 }
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 判断是否是数组
  * @param arg
  * @returns {arg is any[]|boolean}
@@ -119,18 +110,17 @@ export function isArray(arg) {
 }
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 判断是否是端口号
  * @param value
  * @returns {boolean}
  */
 export function isPort(value) {
-  const reg = /^([0-9]|[1-9]\d|[1-9]\d{2}|[1-9]\d{3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5])$/
+  const reg =
+    /^([0-9]|[1-9]\d|[1-9]\d{2}|[1-9]\d{3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5])$/
   return reg.test(value)
 }
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 判断是否是手机号
  * @param value
  * @returns {boolean}
@@ -141,18 +131,17 @@ export function isPhone(value) {
 }
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 判断是否是身份证号(第二代)
  * @param value
  * @returns {boolean}
  */
 export function isIdCard(value) {
-  const reg = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
+  const reg =
+    /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
   return reg.test(value)
 }
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 判断是否是邮箱
  * @param value
  * @returns {boolean}
@@ -163,7 +152,6 @@ export function isEmail(value) {
 }
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 判断是否中文
  * @param value
  * @returns {boolean}
@@ -174,7 +162,6 @@ export function isChina(value) {
 }
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 判断是否为空
  * @param value
  * @returns {boolean}
@@ -190,18 +177,17 @@ export function isBlank(value) {
 }
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 判断是否为固话
  * @param value
  * @returns {boolean}
  */
 export function isTel(value) {
-  const reg = /^(400|800)([0-9\\-]{7,10})|(([0-9]{4}|[0-9]{3})([- ])?)?([0-9]{7,8})(([- 转])*([0-9]{1,4}))?$/
+  const reg =
+    /^(400|800)([0-9\\-]{7,10})|(([0-9]{4}|[0-9]{3})([- ])?)?([0-9]{7,8})(([- 转])*([0-9]{1,4}))?$/
   return reg.test(value)
 }
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 判断是否为数字且最多两位小数
  * @param value
  * @returns {boolean}
@@ -212,7 +198,6 @@ export function isNum(value) {
 }
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 判断经度 -180.0~+180.0(整数部分为0~180,必须输入1到5位小数)
  * @param value
  * @returns {boolean}
@@ -223,7 +208,6 @@ export function isLongitude(value) {
 }
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 判断纬度 -90.0~+90.0(整数部分为0~90,必须输入1到5位小数)
  * @param value
  * @returns {boolean}
@@ -234,20 +218,21 @@ export function isLatitude(value) {
 }
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description rtsp校验,只要有rtsp://
  * @param value
  * @returns {boolean}
  */
 export function isRTSP(value) {
-  const reg = /^rtsp:\/\/([a-z]{0,10}:.{0,10}@)?(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/
-  const reg1 = /^rtsp:\/\/([a-z]{0,10}:.{0,10}@)?(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5]):[0-9]{1,5}/
-  const reg2 = /^rtsp:\/\/([a-z]{0,10}:.{0,10}@)?(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\//
+  const reg =
+    /^rtsp:\/\/([a-z]{0,10}:.{0,10}@)?(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/
+  const reg1 =
+    /^rtsp:\/\/([a-z]{0,10}:.{0,10}@)?(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5]):[0-9]{1,5}/
+  const reg2 =
+    /^rtsp:\/\/([a-z]{0,10}:.{0,10}@)?(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\//
   return reg.test(value) || reg1.test(value) || reg2.test(value)
 }
 
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description 判断是否为json
  * @param value
  * @returns {boolean}

+ 1 - 1
src/vab/plugins/permissions.js

@@ -1,5 +1,5 @@
 /**
- * @author chuzhixin 1204505056@qq.com
+ 
  * @description 路由守卫,目前两种模式:all模式与intelligence模式
  */
 import router from '@/router'

+ 0 - 38
vab-config/index.js

@@ -1,40 +1,2 @@
 module.exports = {
-  webpackBarName: 'vue-admin-better',
-  webpackBanner:
-    ' build: vue-admin-better  \n vue-admin-better QQ Group(QQ群): 972435319、1139183756 \n time: ',
-  donationConsole() {
-    const chalk = require('chalk')
-    console.log(
-      chalk.green(
-        `> 欢迎使用vue-admin-beautiful,开源地址:https://github.com/chuzhixin/vue-admin-beautiful`
-      )
-    )
-
-    console.log(
-      chalk.green(
-        `> pro版演示地址:http://chu1204505056.gitee.io/vue-admin-beautiful-pro?hmsr=console&hmpl=&hmcu=&hmkw=&hmci=`
-      )
-    )
-
-    console.log(
-      chalk.green(
-        `> vue 2.x版本演示地址(MIT协议免费商用):http://chu1204505056.gitee.io/vue-admin-beautiful?hmsr=console&hmpl=&hmcu=&hmkw=&hmci=`
-      )
-    )
-
-    console.log(
-      chalk.green(
-        `> vue3.X版演示地址(andv MIT协议免费商用):http://chu1204505056.gitee.io/vue-admin-beautiful-antdv?hmsr=console&hmpl=&hmcu=&hmkw=&hmci=`
-      )
-    )
-
-    console.log(
-      chalk.green(
-        `> 使用中出现任何问题可加QQ群反馈,获取文档(群号:972435319,1139183756)`
-      )
-    )
-
-    console.log(chalk.green(`> 如果您不希望显示以上信息,可在config中配置关闭`))
-    console.log('\n')
-  },
 }

+ 2 - 9
vue.config.js

@@ -1,5 +1,4 @@
 /**
- * @author chuzhixin 1204505056@qq.com
  * @description vue.config.js全局配置
  */
 const path = require('path')
@@ -15,14 +14,12 @@ const {
   devPort,
   providePlugin,
   build7z,
-  donation,
+  webpackBarName,
 } = require('./src/config')
-const { webpackBarName, webpackBanner, donationConsole } = require('vab-config')
 
-if (donation) donationConsole()
 const { version, author } = require('./package.json')
 const Webpack = require('webpack')
-const WebpackBar = require('webpackbar') 
+const WebpackBar = require('webpackbar')
 const FileManagerPlugin = require('filemanager-webpack-plugin')
 const dayjs = require('dayjs')
 const date = dayjs().format('YYYY_M_D')
@@ -159,10 +156,6 @@ module.exports = {
           },
         },
       })
-      config
-        .plugin('banner')
-        .use(Webpack.BannerPlugin, [`${webpackBanner}${time}`])
-        .end()
       config.module
         .rule('images')
         .use('image-webpack-loader')