Browse Source

Merge branch 'fix-request-userinfo' into pre

jihuaqiang 2 years ago
parent
commit
94dfef9e7f
2 changed files with 6 additions and 4 deletions
  1. 2 1
      src/pages/tab-group.vue
  2. 4 3
      src/uilts/chromeExtension.js

+ 2 - 1
src/pages/tab-group.vue

@@ -206,6 +206,7 @@ const getListData = () => {
 }
 
 const initData = () => {
+    loading.value = true;
     let { windowLocation } = JSON.parse(getQueryString('params'));
     if (windowLocation.pathname) {
         let arr = windowLocation.pathname.split('/');
@@ -220,7 +221,7 @@ const initData = () => {
                     if (res.code == 0) {
                         groupInfo = res.data || {};
                         if (!groupInfo.nftGroupId) return;
-                        loading.value = true;
+                        // loading.value = true;
                         getListData()
                     }
                 })

+ 4 - 3
src/uilts/chromeExtension.js

@@ -33,18 +33,19 @@ export function setChromeStorage(params, callback) {
 export async function getChromeStorageFromExtension(key = '') {
     let params = {}
     params[key] = ''
-    return new Promise((res, rej) => { 
+    return new Promise((res, rej) => {
         messageCenter.send({
             actionType: MESSAGE_ENUM.IFRAME_GET_EXTENSION_STORGE_DATA,
             data: {
                 iframeID,//用于告诉父窗口会传消息给哪个iframe
                 key,// storage key
-                messageID: new Date().getTime() // 唯一的ID,用于标记回调函数
+                messageID: guid(), // 唯一的ID,用于标记回调函数
+                overTime: 200
             },
             callback: (data) => {
                 res(data)
             },
-            failback: (e) => { 
+            failback: (e) => {
                 rej(e)
             }
         })