baichun 5 lat temu
rodzic
commit
5b8c81fe88
48 zmienionych plików z 61 dodań i 54 usunięć
  1. 2 0
      _src/components/chatGroudMgr/index.vue
  2. 5 0
      _src/components/chatGroudMgr/style.scss
  3. 3 3
      _src/components/chatSet/index.vue
  4. 0 5
      _src/mixins/login.js
  5. 51 46
      _src/store/actions.js
  6. 0 0
      dist/css/chunk-008bd727.e64410a5.css
  7. 0 0
      dist/css/chunk-21bd4ca5.19ff19e6.css
  8. 0 0
      dist/css/chunk-3ab2e3e3.621d2337.css
  9. 0 0
      dist/css/chunk-484a20ba.6c4d2f2f.css
  10. 0 0
      dist/css/chunk-4eaa1259.4462b17e.css
  11. 0 0
      dist/css/chunk-4f1644cf.0f0a0132.css
  12. 0 0
      dist/css/chunk-579c6ae2.f3c7912e.css
  13. 0 0
      dist/css/chunk-5b86aac9.a00b706f.css
  14. 0 0
      dist/css/chunk-5c065784.1e2497e0.css
  15. 0 0
      dist/css/chunk-650cd7d0.f8b796f1.css
  16. 0 0
      dist/css/chunk-7fdb0984.f80ccfd7.css
  17. 0 0
      dist/css/chunk-a6830cb4.feb38348.css
  18. 0 0
      dist/css/chunk-ed0382aa.4b654aae.css
  19. 0 0
      dist/js/chunk-008bd727.05d1a6e8.js
  20. 0 0
      dist/js/chunk-21bd4ca5.5edf431f.js
  21. 0 0
      dist/js/chunk-3a7aa49c.23f972a0.js
  22. 0 0
      dist/js/chunk-3ab2e3e3.e83f44a7.js
  23. 0 0
      dist/js/chunk-484a20ba.f98c653b.js
  24. 0 0
      dist/js/chunk-4a300287.71c4eeb4.js
  25. 0 0
      dist/js/chunk-4eaa1259.f6897660.js
  26. 0 0
      dist/js/chunk-4f1644cf.f25060f8.js
  27. 0 0
      dist/js/chunk-579c6ae2.801520b4.js
  28. 0 0
      dist/js/chunk-57fc05d2.4d278541.js
  29. 0 0
      dist/js/chunk-587d9e67.b63ab5a9.js
  30. 0 0
      dist/js/chunk-5b86aac9.6cd73d35.js
  31. 0 0
      dist/js/chunk-5c065784.1ecea1c6.js
  32. 0 0
      dist/js/chunk-650cd7d0.4edc6889.js
  33. 0 0
      dist/js/chunk-7fdb0984.21c4c9c5.js
  34. 0 0
      dist/js/chunk-868985ce.201b2bd7.js
  35. 0 0
      dist/js/chunk-a6830cb4.1ed61dfc.js
  36. 0 0
      dist/js/chunk-common.c6acac60.js
  37. 0 0
      dist/js/chunk-common.c6d8c033.js
  38. 0 0
      dist/js/chunk-d94a81b0.cfd6bc92.js
  39. 0 0
      dist/js/chunk-ed0382aa.62c0e7d4.js
  40. 0 0
      dist/js/chunk-vendors.4cbea558.js
  41. 0 0
      dist/js/h5.a887ff41.js
  42. 0 0
      dist/js/h5.f3173740.js
  43. 0 0
      dist/js/mini.c1049ec5.js
  44. 0 0
      dist/js/pc.8aab2f7f.js
  45. 0 0
      dist/sw.js
  46. 0 0
      mini.html
  47. 0 0
      protected/views/h5.html
  48. 0 0
      protected/views/pc.html

+ 2 - 0
_src/components/chatGroudMgr/index.vue

@@ -23,6 +23,7 @@
           {{$t('group.relateTelegram')}}<i class="el-icon-arrow-right"></i>
         </div>
       </div>
+      <a href="https://smartsignature.io/article/QmNrsHp36CTCQp5ggsy6dzSUuhzBKom7u53mtVf2JJoH3N" target="_blank" class="link-guide">群管理教程-&gt;</a>
     </template>
     <template v-else>
       <div class="groudMgr-top">
@@ -59,6 +60,7 @@
       </div>
       <p>{{$t('group.teleStep1')}}</p>
       <p>{{$t('group.teleStep2')}}</p>
+      <p><a href="https://smartsignature.io/article/QmNrsHp36CTCQp5ggsy6dzSUuhzBKom7u53mtVf2JJoH3N" target="_blank" class="link-guide">Telegram同步教程-&gt;</a></p>
     </div>
   </div>
 </template>

+ 5 - 0
_src/components/chatGroudMgr/style.scss

@@ -172,4 +172,9 @@
     padding: 10px 10px;
     line-height: 24px;
   }
+}
+
+.link-guide{
+  font-size: 12px;
+  color: #2ca0f7;
 }

+ 3 - 3
_src/components/chatSet/index.vue

@@ -50,6 +50,9 @@
         {{limitHeight ? $t('group.showAll') : $t('group.hideAll')}} <i :class="`el-icon-arrow-${limitHeight ? 'down' : 'up'}`"></i>
       </div>
     </div>
+    <div class="setting-item cursor" v-if="isCreator" @click="handleGroudMgr">
+      <div class="title">{{$t('group.admin')}}<i class="el-icon-arrow-right team-arrow-icon"></i></div>
+    </div>
     <div class="setting-item" v-if="isAdmin || isCreator">
       <div class="title">{{$t('group.groupName')}}</div>
       <input class="edit-full-input" type="text" v-model="newGroupName" v-focus v-if="isEdit" @blur="handleTitleBlur">
@@ -122,9 +125,6 @@
       </el-switch>
       </p>
     </div>
-    <div class="setting-item cursor" v-if="isCreator" @click="handleGroudMgr">
-      <div class="title">{{$t('group.admin')}}<i class="el-icon-arrow-right team-arrow-icon"></i></div>
-    </div>
     <div class="setting-bottom" v-show="group.isJoin">
       <button class="delete-btn" @click="leaveGroup">{{$t('group.quitGroup')}}</button>
     </div>

+ 0 - 5
_src/mixins/login.js

@@ -151,7 +151,6 @@ export const accountLoginMixin = {
         // 连接scatter
         ScatterJS.scatter.connect('MEE_CHAT').then(async connected => {
           if (connected) {
-            alert('connected')
             // 设置scatter
             this.setScatter(ScatterJS.scatter)
 
@@ -165,7 +164,6 @@ export const accountLoginMixin = {
             try {
               // 调起scatter授权登录
               await this.doScatterLogin(this.$router)
-              alert('doScatterLogin')
 
               if (this.meechatType == 'mini') {
                 localStorage.setItem('account', JSON.stringify(this.account))
@@ -179,10 +177,7 @@ export const accountLoginMixin = {
                   userId: ctLoginRes.data ? ctLoginRes.data.user_id : ctLoginRes.user_id,
                   token: ctLoginRes.data ? ctLoginRes.data.token : ctLoginRes.token
                 })
-
-                alert('doContractLogin loginSuccCallBack')
               } catch (e) {
-                alert('doScatterLogin error')
                 reject(e)
                 let err = e
                 if (typeof e == 'string') {

+ 51 - 46
_src/store/actions.js

@@ -22,56 +22,60 @@ export const actions = {
         localStorage.setItem('accounts', '')
         setUserOpt('isChangeIndentity', 0)
       }
-      alert('networkConfig before')
       // 获取最快主网
       let networkConfig = await getNetwork()
-      alert('networkConfig next')
 
-      return new Promise((resolve, reject) => {
-        state.scatter.getIdentity({
+      // 调用getIdentity方法获取用户名
+      try {
+        var identity = await state.scatter.getIdentity({
           accounts: [networkConfig]
-        }).then(async (identity) => {
-          let accounts = identity.accounts.find(x => x.blockchain === 'eos')
-
-          let lastAccounts = localStorage.getItem('accounts')
-
-          if (lastAccounts && JSON.parse(lastAccounts).name !== accounts.name) {
-            await actions.doScatterLogout(...arguments)
-            h5Router.push({ path: '/login' })
-            commit('setUserInfo', null)
-            commit('initChatData')
-            commit('initGroupData')
-            commit('chatAppLogin', false)
-            commit('toApp', false)
-          }
-
-          commit('setAccount', accounts)
-          localStorage.setItem('accounts', JSON.stringify(accounts))
-
-          // 如果当前登录的用户名和cookie中保存的account不一致
-          // 则删除cookie中保存的account
-          // 避免某些用户在移动端钱包中切换账号时跳过注销流程导致账号不一致的问题
-          // if (Cookie.getCookie('account') !== accounts.name) {
-          //   Cookie.delCookie('account')
-          // }
-          // 设置全局EOS对象
-          window.EOS = state.scatter.eos(networkConfig, Eos, {})
-
-          // 调用scatter登录成功后获取用户EOS、GT
-          // dispatch('getUserEOS')
-          // dispatch('getUserGT')
-          await dispatch('getAccount')
-
-          // 每分钟刷新一次
-          // this.limitTimer = setInterval(() => {
-          //   dispatch('getAccount')
-          // }, 60000)
-
-          resolve(true)
-        }).catch(e => {
-          reject(e)
         })
-      })
+        alert('identity next')
+      } catch (error) {
+        alert('identity error', error)
+        if (error.type !== 'identity_rejected') {
+          showError(error.message)
+        }
+        return Promise.reject(error)
+      }
+
+      let accounts = identity.accounts.find(x => x.blockchain === 'eos')
+
+      let lastAccounts = localStorage.getItem('accounts')
+
+      if (lastAccounts && JSON.parse(lastAccounts).name !== accounts.name) {
+        await actions.doScatterLogout(...arguments)
+        h5Router.push({ path: '/login' })
+        commit('setUserInfo', null)
+        commit('initChatData')
+        commit('initGroupData')
+        commit('chatAppLogin', false)
+        commit('toApp', false)
+      }
+
+      commit('setAccount', accounts)
+      localStorage.setItem('accounts', JSON.stringify(accounts))
+
+      // 如果当前登录的用户名和cookie中保存的account不一致
+      // 则删除cookie中保存的account
+      // 避免某些用户在移动端钱包中切换账号时跳过注销流程导致账号不一致的问题
+      // if (Cookie.getCookie('account') !== accounts.name) {
+      //   Cookie.delCookie('account')
+      // }
+      // 设置全局EOS对象
+      window.EOS = state.scatter.eos(networkConfig, Eos, {})
+
+      // 调用scatter登录成功后获取用户EOS、GT
+      // dispatch('getUserEOS')
+      // dispatch('getUserGT')
+      await dispatch('getAccount')
+
+      // 每分钟刷新一次
+      // this.limitTimer = setInterval(() => {
+      //   dispatch('getAccount')
+      // }, 60000)
+
+      return Promise.resolve(true)
     }
   },
   /**
@@ -226,7 +230,8 @@ export const actions = {
     commit('setAccount', '')
     setUserOpt('isChangeIndentity', 0)
 
-    return state.scatter && state.scatter.identity ? state.scatter.forgetIdentity && state.scatter.forgetIdentity() : true
+    // return state.scatter && state.scatter.identity ? state.scatter.forgetIdentity && state.scatter.forgetIdentity() : true
+    return (state.scatter && state.scatter.identity && state.scatter.forgetIdentity && state.scatter.forgetIdentity()) || true
   },
 
   /**

Plik diff jest za duży
+ 0 - 0
dist/css/chunk-008bd727.e64410a5.css


+ 0 - 0
dist/css/chunk-4a300287.95618aa0.css → dist/css/chunk-21bd4ca5.19ff19e6.css


+ 0 - 0
dist/css/chunk-587d9e67.621d2337.css → dist/css/chunk-3ab2e3e3.621d2337.css


+ 0 - 0
dist/css/chunk-cc6720b0.6c4d2f2f.css → dist/css/chunk-484a20ba.6c4d2f2f.css


Plik diff jest za duży
+ 0 - 0
dist/css/chunk-4eaa1259.4462b17e.css


+ 0 - 0
dist/css/chunk-e141921e.0f0a0132.css → dist/css/chunk-4f1644cf.0f0a0132.css


+ 0 - 0
dist/css/chunk-41737974.492bfa43.css → dist/css/chunk-579c6ae2.f3c7912e.css


+ 0 - 0
dist/css/chunk-868985ce.7de37954.css → dist/css/chunk-5b86aac9.a00b706f.css


+ 0 - 0
dist/css/chunk-d94a81b0.1e2497e0.css → dist/css/chunk-5c065784.1e2497e0.css


+ 0 - 0
dist/css/chunk-3a7aa49c.484561d2.css → dist/css/chunk-650cd7d0.f8b796f1.css


+ 0 - 0
dist/css/chunk-2ae77270.6c05c7a7.css → dist/css/chunk-7fdb0984.f80ccfd7.css


+ 0 - 0
dist/css/chunk-57fc05d2.feb38348.css → dist/css/chunk-a6830cb4.feb38348.css


Plik diff jest za duży
+ 0 - 0
dist/css/chunk-ed0382aa.4b654aae.css


Plik diff jest za duży
+ 0 - 0
dist/js/chunk-008bd727.05d1a6e8.js


Plik diff jest za duży
+ 0 - 0
dist/js/chunk-21bd4ca5.5edf431f.js


Plik diff jest za duży
+ 0 - 0
dist/js/chunk-3a7aa49c.23f972a0.js


Plik diff jest za duży
+ 0 - 0
dist/js/chunk-3ab2e3e3.e83f44a7.js


Plik diff jest za duży
+ 0 - 0
dist/js/chunk-484a20ba.f98c653b.js


Plik diff jest za duży
+ 0 - 0
dist/js/chunk-4a300287.71c4eeb4.js


Plik diff jest za duży
+ 0 - 0
dist/js/chunk-4eaa1259.f6897660.js


Plik diff jest za duży
+ 0 - 0
dist/js/chunk-4f1644cf.f25060f8.js


Plik diff jest za duży
+ 0 - 0
dist/js/chunk-579c6ae2.801520b4.js


Plik diff jest za duży
+ 0 - 0
dist/js/chunk-57fc05d2.4d278541.js


Plik diff jest za duży
+ 0 - 0
dist/js/chunk-587d9e67.b63ab5a9.js


Plik diff jest za duży
+ 0 - 0
dist/js/chunk-5b86aac9.6cd73d35.js


Plik diff jest za duży
+ 0 - 0
dist/js/chunk-5c065784.1ecea1c6.js


Plik diff jest za duży
+ 0 - 0
dist/js/chunk-650cd7d0.4edc6889.js


Plik diff jest za duży
+ 0 - 0
dist/js/chunk-7fdb0984.21c4c9c5.js


Plik diff jest za duży
+ 0 - 0
dist/js/chunk-868985ce.201b2bd7.js


Plik diff jest za duży
+ 0 - 0
dist/js/chunk-a6830cb4.1ed61dfc.js


Plik diff jest za duży
+ 0 - 0
dist/js/chunk-common.c6acac60.js


Plik diff jest za duży
+ 0 - 0
dist/js/chunk-common.c6d8c033.js


Plik diff jest za duży
+ 0 - 0
dist/js/chunk-d94a81b0.cfd6bc92.js


Plik diff jest za duży
+ 0 - 0
dist/js/chunk-ed0382aa.62c0e7d4.js


Plik diff jest za duży
+ 0 - 0
dist/js/chunk-vendors.4cbea558.js


Plik diff jest za duży
+ 0 - 0
dist/js/h5.a887ff41.js


Plik diff jest za duży
+ 0 - 0
dist/js/h5.f3173740.js


Plik diff jest za duży
+ 0 - 0
dist/js/mini.c1049ec5.js


Plik diff jest za duży
+ 0 - 0
dist/js/pc.8aab2f7f.js


Plik diff jest za duży
+ 0 - 0
dist/sw.js


Plik diff jest za duży
+ 0 - 0
mini.html


Plik diff jest za duży
+ 0 - 0
protected/views/h5.html


Plik diff jest za duży
+ 0 - 0
protected/views/pc.html


Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików