Browse Source

permission.ts中写死token

Liuzhenyu 21 hours ago
parent
commit
0352be2a75
4 changed files with 12 additions and 33 deletions
  1. 1 1
      .env.development
  2. 2 1
      src/permission.ts
  3. 1 31
      src/utils/commonMeth.ts
  4. 8 0
      src/views/myPublish/index.vue

+ 1 - 1
.env.development

@@ -5,4 +5,4 @@ VITE_APP_TITLE = 中华人民共和国海事局
 VITE_APP_ENV = 'development'
 
 # 中华人民共和国海事局/开发环境
-VITE_APP_BASE_API = 'http://192.168.86.149:8080/api'
+VITE_APP_BASE_API = 'http://u68b4f5c.natappfree.cc/api'

+ 2 - 1
src/permission.ts

@@ -66,7 +66,8 @@ router.beforeEach((to, from, next) => {
             next();
         }
     } else {
-        // 暂时使用 待联调登陆的时候删除
+        // TODO 暂时使用 待联调登陆的时候删除
+        setToken('Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOiJzeXNfdXNlcjoxIiwicm5TdHIiOiI5V3ZQVmZidzlyajJFbTl6c1pkTGdPdG4weVB5VExreSIsImNsaWVudGlkIjoiZTVjZDdlNDg5MWJmOTVkMWQxOTIwNmNlMjRhN2IzMmUiLCJ0ZW5hbnRJZCI6IjAwMDAwMCIsInVzZXJJZCI6MSwidXNlck5hbWUiOiJhZG1pbiIsImRlcHRJZCI6MTAzLCJkZXB0TmFtZSI6IueglOWPkemDqOmXqCIsImRlcHRDYXRlZ29yeSI6IiJ9.kwUOvSGXLVGJJxJE4Lvplov6vyItS-_NhKdw5cOwis4');
         next();
         // 没有token
         if (whiteList.indexOf(to.path) !== -1) {

+ 1 - 31
src/utils/commonMeth.ts

@@ -43,34 +43,4 @@ export function simulateCopyText(text) {
         type: 'success',
         message: '文本已复制',
     });
-}
-
-// 全局匹配费用计算公式
-export function matchStringAndFormat(str, regArr) {
-    // 使用正则表达式匹配非计算字符的序列
-    const nonCalculationCharacters = str.match(/[^\+\-*/\(\) ]+/g);
-    let res = str.replace(/[^\+\-*/\(\) ]+/g, '$');
-    let filterArr = [] as any;
-    regArr.filter(item => {
-        nonCalculationCharacters.forEach((team, index) => {
-            if (item.label === team) {
-                filterArr[index] = item.value;
-            }
-        });
-    });
-    filterArr = Array.from(filterArr);
-    filterArr.forEach((item, index) => {
-        if (!item) {
-            filterArr[index] = nonCalculationCharacters[index];
-        }
-    });
-    if (filterArr.length < nonCalculationCharacters.length) {
-        const sliceArr = nonCalculationCharacters.slice(filterArr.length);
-        filterArr = [...filterArr, ...sliceArr];
-    }
-    filterArr.forEach(item => {
-        res = res.replace('$', item);
-    });
-    const newStr = res.replace(/(/g, '(').replace(/)/g, ')');
-    return newStr;
-}
+}

+ 8 - 0
src/views/myPublish/index.vue

@@ -41,6 +41,14 @@ import pageContent from '@/components/components/pageContent.vue';
 import searchConfig from './config/search.config';
 import pageSearch from '@/components/components/pageSearch.vue';
 import useSystemStore from '@/store/main';
+import { outTypeList } from '@/libs/commonMeth';
+const allNotificationStatus = outTypeList('bj_notify_os');
+const categoryOnm = outTypeList('bj_category_onm');
+const notificationStatus = outTypeList('bj_notification_status');
+const isFeedback = outTypeList('bj_is_feedback');
+const overdueStatus = outTypeList('bj_overdue_status');
+const takeMeasures = outTypeList('bj_take_measures');
+
 const systemStore = useSystemStore();
 
 const total = ref(0);