Jelajahi Sumber

登录接口添加groupid参数

dmy 5 tahun lalu
induk
melakukan
074006c9b1
1 mengubah file dengan 7 tambahan dan 3 penghapusan
  1. 7 3
      _src/store/actions.js

+ 7 - 3
_src/store/actions.js

@@ -185,10 +185,13 @@ export const actions = {
 	 * @param {Object} store
 	 * @param {Object} params
    */
-  resetGameLogin ({ dispatch, commit, state }, params) {
+  async resetGameLogin ({ dispatch, commit, state }, params) {
     localStorage.removeItem('user_id')
     localStorage.removeItem('token')
-    dispatch('doContractLogin')
+    await dispatch('doContractLogin')
+    if (self !== top) {
+      location.replace(location.href.replace('show=false', 'show=true'))
+    }
   },
   /**
    * 合约登录, 生成业务登录态token
@@ -220,7 +223,8 @@ export const actions = {
       let param = {
         account: state.account.name,
         access_token: accessToken,
-        trx_id: trx.transaction_id
+        trx_id: trx.transaction_id,
+        group_id: state.group.groupId || null
       }
 
       let res = await API.user.eosLogin2(param)