Jelajahi Sumber

feat: 修改bug

tangning 3 tahun lalu
induk
melakukan
1b9f2bad4b

+ 1 - 1
package.json

@@ -4,7 +4,7 @@
   "scripts": {
     "bootstrap": "pnpm install",
     "serve": "npm run dev",
-    "dev": "vite --debug",
+    "dev": "vite",
     "build": "cross-env NODE_ENV=production vite build --mode production && esno ./build/script/postBuild.ts",
     "build:test": "cross-env vite build --mode test && esno ./build/script/postBuild.ts",
     "build:no-cache": "pnpm clean:cache && npm run build",

+ 3 - 3
src/settings/componentSetting.ts

@@ -9,13 +9,13 @@ export default {
     // support xxx.xxx.xxx
     fetchSetting: {
       // The field name of the current page passed to the background
-      pageField: 'page',
+      pageField: 'pageNum',
       // The number field name of each page displayed in the background
-      sizeField: 'limit',
+      sizeField: 'pageSize',
       // Field name of the form data returned by the interface
       listField: 'list',
       // Total number of tables returned by the interface field name
-      totalField: 'totalCount',
+      totalField: 'total',
     },
     // Number of pages that can be selected
     pageSizeOptions: ['10', '50', '80', '100'],

+ 7 - 2
src/utils/http/axios/index.ts

@@ -95,11 +95,16 @@ const transform: AxiosTransform = {
         if (msg) {
           timeoutMsg = msg;
         }
-
         if (code > 3000 && code < 10000) {
           const transKeys = `apiCode.errCode${code}`;
-          console.log('transKeys', transKeys);
           timeoutMsg = t(transKeys);
+          if (code > 3001 && code < 3005) {
+            setTimeout(() => {
+              const userStore = useUserStoreWithOut();
+              userStore.setToken(undefined);
+              userStore.logout(true);
+            }, 1000);
+          }
         }
         break;
     }

+ 0 - 6
src/views/bulletin/decoration.vue

@@ -170,12 +170,6 @@
         tableSetting: { fullScreen: true },
         showIndexColumn: false,
         rowKey: 'id',
-        fetchSetting: {
-          pageField: 'pageNum',
-          sizeField: 'pageSize',
-          listField: 'list',
-          totalField: 'total',
-        },
       });
 
       return {

+ 0 - 7
src/views/bulletin/rent.vue

@@ -170,13 +170,6 @@
         tableSetting: { fullScreen: true },
         showIndexColumn: false,
         rowKey: 'id',
-        //TODO
-        fetchSetting: {
-          pageField: 'pageNum',
-          sizeField: 'pageSize',
-          listField: 'list',
-          totalField: 'total',
-        },
       });
 
       async function handleDelete(record: Recordable) {

+ 0 - 6
src/views/bulletin/sell.vue

@@ -170,12 +170,6 @@
         tableSetting: { fullScreen: true },
         showIndexColumn: false,
         rowKey: 'id',
-        fetchSetting: {
-          pageField: 'pageNum',
-          sizeField: 'pageSize',
-          listField: 'list',
-          totalField: 'total',
-        },
       });
       // pagination.value = { pageSize: 20 };
       return {

+ 0 - 6
src/views/corporation/cameraModal.vue

@@ -143,12 +143,6 @@
         immediate: false,
         rowKey: 'id',
         pagination: false,
-        fetchSetting: {
-          pageField: 'pageNum',
-          sizeField: 'pageSize',
-          listField: 'list',
-          totalField: 'totalCount',
-        },
         actionColumn: {
           width: 100,
           title: t('common.operation'),

+ 0 - 7
src/views/corporation/index.vue

@@ -241,13 +241,6 @@
         tableSetting: { fullScreen: true },
         showIndexColumn: true,
         rowKey: 'id',
-        //TODO
-        fetchSetting: {
-          pageField: 'page',
-          sizeField: 'limit',
-          listField: 'list',
-          totalField: 'totalCount',
-        },
         actionColumn: {
           width: isJA.value ? 200 : 120,
           title: t('common.operation'),

+ 0 - 7
src/views/corporation/verify.vue

@@ -143,13 +143,6 @@
         },
         showIndexColumn: false,
         rowKey: 'id',
-        //TODO
-        fetchSetting: {
-          pageField: 'pageNum',
-          sizeField: 'pageSize',
-          listField: 'list',
-          totalField: 'totalCount',
-        },
       });
       function infoText(record) {
         openDeviceModal(true, { record });

+ 0 - 6
src/views/devices/list.vue

@@ -150,12 +150,6 @@
         tableSetting: { fullScreen: true },
         showIndexColumn: false,
         rowKey: 'id',
-        fetchSetting: {
-          pageField: 'page',
-          sizeField: 'limit',
-          listField: 'list',
-          totalField: 'total',
-        },
         handleSearchInfoFn: function (searchData) {
           if (searchData.fieldTime) {
             searchData.startDate = searchData.fieldTime[0];

+ 0 - 6
src/views/feedback/list.vue

@@ -129,12 +129,6 @@
         // rowKey: 'userId',
         pagination: { pageSize: 20 },
         bordered: true,
-        fetchSetting: {
-          pageField: 'page',
-          sizeField: 'limit',
-          listField: 'list',
-          totalField: 'totalCount',
-        },
       });
 
       function renderFeedbackType(type: number): string {

+ 0 - 6
src/views/member/list.vue

@@ -162,12 +162,6 @@ weixinOpenid: "oeADe5U9uLeMYsNigq98zdu8J96A"
         rowKey: 'id',
         pagination: { pageSize: 20 },
         bordered: true,
-        fetchSetting: {
-          pageField: 'page',
-          sizeField: 'limit',
-          listField: 'list',
-          totalField: 'totalCount',
-        },
       });
 
       function renderGenderLabel(gender: number): string {

+ 0 - 6
src/views/order/list.vue

@@ -285,12 +285,6 @@
         rowKey: 'id',
         pagination: { pageSize: 20 },
         ellipsis: false,
-        fetchSetting: {
-          pageField: 'page',
-          sizeField: 'limit',
-          listField: 'list',
-          totalField: 'totalCount',
-        },
         bordered: true,
       });
 

+ 0 - 6
src/views/product/list.vue

@@ -104,12 +104,6 @@
         pagination: { pageSize: 20 },
         clickToRowSelect: false,
         bordered: true,
-        fetchSetting: {
-          pageField: 'page',
-          sizeField: 'limit',
-          listField: 'list',
-          totalField: 'totalCount',
-        },
       });
 
       function handleEdit(record: Recordable) {

+ 0 - 6
src/views/product/ref.vue

@@ -64,12 +64,6 @@
         // rowSelection: { type: 'checkbox' },
         rowKey: 'id',
         bordered: true,
-        fetchSetting: {
-          pageField: 'page',
-          sizeField: 'limit',
-          listField: 'list',
-          totalField: 'totalCount',
-        },
         formConfig: {
           labelWidth: 66,
           schemas: [

+ 8 - 14
src/views/scenes/list.vue

@@ -113,11 +113,11 @@
     // downloadByOnlineUrl,
   } from '/@/utils/file/download';
 
-  // import { useUserStore } from '/@/store/modules/user';
+  import { useUserStore } from '/@/store/modules/user';
   import DownloadModal from './downloadModal.vue';
   import { useLocaleStore } from '/@/store/modules/locale';
   const localeStore = useLocaleStore();
-  // const userStore = useUserStore();
+  const userStore = useUserStore();
 
   export default defineComponent({
     components: {
@@ -270,13 +270,6 @@
           loading.value = false;
           return T;
         },
-        //TODO
-        fetchSetting: {
-          pageField: 'page',
-          sizeField: 'limit',
-          listField: 'list',
-          totalField: 'total',
-        },
       });
       function handleLivestream(item) {
         let url = item.webSite;
@@ -301,14 +294,15 @@
       async function openSceneEditor(record: Recordable) {
         try {
           const langtext = isJA.value ? 'ja' : 'zh';
-          // const token = userStore.getToken;//&token=${token}
+          const token = userStore.getToken; //&token=${token}
+          let url = record.webSite.replace('smobile', 'epc') + `&lang=${langtext}`;
           if (record.isUpgrade == 1) {
             window.open(record.webSite.replace('smg', 'epg') + `&lang=${langtext}`);
-            console.log('isUpgrade', record.webSite.replace('smg', 'epg') + `&lang=${langtext}`);
-            return;
           }
-          const url = record.webSite.replace('smobile', 'epc') + `&lang=${langtext}`;
-          console.log('url', record.webSite.replace('smobile', 'epc') + `&lang=${langtext}`);
+          if (tableType.value == 4 || tableType.value == 2) {
+            url = url + `&token=${token}`;
+          }
+          console.log('tableTypeurl', url);
           window.open(url);
         } catch (error) {
           console.log('error', error);

+ 0 - 6
src/views/scenes/live.vue

@@ -268,12 +268,6 @@ updateUserId: 427 -->
         rowKey: 'id',
         pagination: { pageSize: 20 },
         clickToRowSelect: false,
-        fetchSetting: {
-          pageField: 'page',
-          sizeField: 'limit',
-          listField: 'list',
-          totalField: 'totalCount',
-        },
         defSort: {
           field: 'order',
           order: 'asc',

+ 0 - 6
src/views/staff/list.vue

@@ -146,12 +146,6 @@
         showIndexColumn: false,
         rowKey: 'id',
         pagination: { pageSize: 20 },
-        fetchSetting: {
-          pageField: 'page',
-          sizeField: 'limit',
-          listField: 'list',
-          totalField: 'total',
-        },
         ellipsis: false,
         bordered: true,
       });