Tang 2 лет назад
Родитель
Сommit
bf7d8d71b6
6 измененных файлов с 47 добавлено и 18 удалено
  1. 1 0
      package.json
  2. 0 1
      public/index.html
  3. 2 0
      src/main.js
  4. 8 1
      src/newApi/systemRemind.js
  5. 22 2
      src/permission.js
  6. 14 14
      src/views/index.vue

+ 1 - 0
package.json

@@ -46,6 +46,7 @@
     "element-ui": "2.15.6",
     "file-saver": "^2.0.5",
     "fuse.js": "6.4.3",
+    "gsap": "^3.11.4",
     "highlight.js": "9.18.5",
     "js-beautify": "1.13.0",
     "js-cookie": "2.2.1",

+ 0 - 1
public/index.html

@@ -11,7 +11,6 @@
     <%= webpackConfig.name %>
   </title>
   <!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
-  <script src="https://manage.xyyxt.net/static/js/gsap.min.js"></script>
   <style>
     html,
     body,

+ 2 - 0
src/main.js

@@ -17,6 +17,7 @@ import router from './router'
 import directive from './directive' //directive
 import plugins from './plugins' // plugins
 import './assets/icons' // icon
+import gsap from 'gsap'
 import './permission' // permission control
 import { getDicts } from "@/api/system/dict/data";
 import { getConfigKey } from "@/api/system/config";
@@ -53,6 +54,7 @@ Vue.prototype.selectDictLabel = selectDictLabel
 Vue.prototype.selectDictLabels = selectDictLabels
 Vue.prototype.handleTree = handleTree
 Vue.prototype.$api = api
+Vue.prototype.gsap = gsap
 Vue.prototype.$upload = upload
 Vue.prototype.$methodsTools = methodsTools
 Vue.prototype.$bus = bus

+ 8 - 1
src/newApi/systemRemind.js

@@ -39,5 +39,12 @@ export default {
             params: data
         })
     },
-    
+    //检查密码修改时间
+    inquireusercheckPwdTime(data) {
+        return request({
+            url: '/system/user/checkPwdTime',
+            method: 'get',
+            params: data
+        })
+    },
 }

+ 22 - 2
src/permission.js

@@ -1,10 +1,11 @@
 import router from './router'
 import store from './store'
-import { Message } from 'element-ui'
+import { MessageBox, Message } from 'element-ui'
 import NProgress from 'nprogress'
 import 'nprogress/nprogress.css'
 import methods from '@/utils/methodsTool';
 import { getToken } from '@/utils/auth'
+import $api from "@/api/api"
 
 NProgress.configure({ showSpinner: false })
 
@@ -49,6 +50,9 @@ router.beforeEach((to, from, next) => {
           to.query.TenantId = sessionStorage.TenantId
           next(to)
         } else {
+          if (!to.path.includes('/user/profile')) {
+            checkFunc()
+          }
           next()
         }
       }
@@ -68,7 +72,23 @@ router.beforeEach((to, from, next) => {
     }
   }
 })
-
+function checkFunc() {
+  $api.inquireusercheckPwdTime().then(res => {
+    if (res.data) {
+      MessageBox.confirm('您已90天为修改密码,请前往修改密码', '系统提示', {
+        confirmButtonText: '前往修改',
+        showCancelButton: false,
+        closeOnClickModal: false,
+        closeOnPressEscape: false,
+        showClose: false,
+        type: 'warning'
+      }
+      ).then(() => {
+        location.href = '/user/profile';
+      }).catch(() => { });
+    }
+  })
+}
 router.afterEach(() => {
   NProgress.done()
 })

+ 14 - 14
src/views/index.vue

@@ -718,67 +718,67 @@ export default {
       this.getBusUploadData(val);
     },
     "studentInfomModification.allStudent"(val) {
-      gsap.to(this.$data.uploadAnimalData, {
+      this.gsap.to(this.$data.uploadAnimalData, {
         duration: 0.5,
         allStudent: val,
       });
     },
     orderconsoledData(val) {
-      gsap.to(this.$data.uploadAnimalData, {
+      this.gsap.to(this.$data.uploadAnimalData, {
         duration: 0.5,
         allNum: val.allNum,
       });
-      gsap.to(this.$data.uploadAnimalData, {
+      this.gsap.to(this.$data.uploadAnimalData, {
         duration: 0.5,
         todNum: val.todNum,
       });
-      gsap.to(this.$data.uploadAnimalData, {
+      this.gsap.to(this.$data.uploadAnimalData, {
         duration: 0.5,
         ytdNum: val.ytdNum,
       });
-      gsap.to(this.$data.uploadAnimalData, {
+      this.gsap.to(this.$data.uploadAnimalData, {
         duration: 0.5,
         allRebuyNum: val.allRebuyNum,
       });
-      gsap.to(this.$data.uploadAnimalData, {
+      this.gsap.to(this.$data.uploadAnimalData, {
         duration: 0.5,
         todRebuyNum: val.todRebuyNum,
       });
-      gsap.to(this.$data.uploadAnimalData, {
+      this.gsap.to(this.$data.uploadAnimalData, {
         duration: 0.5,
         ytdRebuyNum: val.ytdRebuyNum,
       });
-      gsap.to(this.$data.uploadAnimalData, {
+      this.gsap.to(this.$data.uploadAnimalData, {
         duration: 0.5,
         sevenRebuyNum: val.sevenRebuyNum,
       });
     },
     classconsoleData(val) {
-      gsap.to(this.$data.uploadAnimalData, {
+      this.gsap.to(this.$data.uploadAnimalData, {
         duration: 0.5,
         allNumClass: val.allNum,
       });
-      gsap.to(this.$data.uploadAnimalData, {
+      this.gsap.to(this.$data.uploadAnimalData, {
         duration: 0.5,
         allOpenNumClass: val.allOpenNum,
       });
-      gsap.to(this.$data.uploadAnimalData, {
+      this.gsap.to(this.$data.uploadAnimalData, {
         duration: 0.5,
         allPreNumClass: val.allPreNum,
       });
     },
     periodconsoleData(val) {
-      gsap.to(this.$data.uploadAnimalData, {
+      this.gsap.to(this.$data.uploadAnimalData, {
         duration: 0.5,
         waitAllNum: val.waitAllNum,
       });
-      gsap.to(this.$data.uploadAnimalData, {
+      this.gsap.to(this.$data.uploadAnimalData, {
         duration: 0.5,
         ingAllNum: val.ingAllNum,
       });
     },
     periodconsoleprofileData(val) {
-      gsap.to(this.$data.uploadAnimalData, {
+      this.gsap.to(this.$data.uploadAnimalData, {
         duration: 0.5,
         pendingTrialNum: val.pendingTrialNum,
       });