dedsudiyu 1 maand geleden
bovenliggende
commit
898c09b71a

+ 2 - 4
src/views/alarmPage/index.vue

@@ -369,16 +369,14 @@
         if (codeData.noticeId) {
           this.$set(this, 'warningId', codeData.noticeId);
           this.$set(this, 'warnType', 1);
+          this.systemMineWarningNoticeDetail();
         } else if (codeData.eventId) {
           this.$set(this, 'warningId', codeData.eventId);
           this.$set(this, 'warnType', 4);
+          this.laboratoryEventFindByEventId();
         } else if (codeData.id) {
           this.$set(this, 'warningId', codeData.id);
           this.$set(this, 'warnType', 4);
-        }
-        if (this.warnType != 4) {
-          this.systemMineWarningNoticeDetail();
-        } else if (this.warnType == 4) {
           this.laboratoryEventFindByEventId();
         }
       },

+ 1 - 1
src/views/login/accountLogin.vue

@@ -160,7 +160,7 @@
       //查询是否是管理员/安全员
       systemSubjectCheckIsAdminOrSafeUser(){
         systemSubjectCheckIsAdminOrSafeUser({}).then(response => {
-          if (response.data.isSafe || response.data.isAdmin) {
+          if (response.isSafe || response.isAdmin) {
             window.location.href = localStorage.getItem('alarmUrl');
           }else{
             this.securityDataStatisticsGetUserIdentity();

+ 4 - 1
src/views/miniProgramAuthentication/index.vue

@@ -5,6 +5,8 @@
   </div>
 </template>
 <script>
+  import { Toast } from 'vant';
+  import { Encrypt,Decrypt} from '@/utils/secret'
   import {
     getConfigByType,
     systemSubjectCheckIsAdminOrSafeUser,
@@ -119,9 +121,10 @@
       securityDataStatisticsGetUserIdentity(){
         let self = this;
         securityDataStatisticsGetUserIdentity({}).then(response => {
-          if(response.data.schoolAdmin || response.data.collegeAdmin){
+          if(response.schoolAdmin || response.collegeAdmin){
             window.location.href = localStorage.getItem('alarmUrl');
           }else{
+            localStorage.removeItem('touken');
             Toast.fail('您无权查看报警信息,请联系管理员.');
             setTimeout(function(){
               self.$router.push({ path: '/login' });