Przeglądaj źródła

has token login

shish 4 lat temu
rodzic
commit
7ae053b564

+ 1 - 1
ghsApp/src/api/common/index.js

@@ -51,4 +51,4 @@ export const initSocket = async clientId => {
 export const appLogin = data => https.get("/auth/app-login", data);
 
 //app重新获取登陆信息
-export const autoLogin = data => https.get("/admin/auto-login", data);
+export const hasTokenAutoLogin = data => https.get("/admin/has-token-auto-login", data);

+ 3 - 3
ghsApp/src/mixins/globalMixins.js

@@ -3,7 +3,7 @@ import { mapGetters,mapActions } from 'vuex'
 import { pageTo, isLogin } from '@/utils/util.js'
 import { getUser, wxMiniLogin } from '@/utils/auth'
 import { postWxCode, getDictionaries } from '@/api/mini'
-import { getStaffApi,autoLogin } from '@/api/common'
+import { getStaffApi,hasTokenAutoLogin } from '@/api/common'
 import { allProduct } from '@/api/product'
 import { codePay} from "@/api/order/index";
 
@@ -74,7 +74,7 @@ export default {
         }
       }else{
         let that = this
-        autoLogin().then(subRes=>{
+        hasTokenAutoLogin().then(subRes=>{
           if(subRes.code != 1){
             return
           }
@@ -102,7 +102,7 @@ export default {
       const appToken = uni.getStorageSync('token')
       if(!this.$util.isEmpty(appToken)){
         let that = this
-        autoLogin().then(subRes=>{
+        hasTokenAutoLogin().then(subRes=>{
           if(subRes.code != 1){
             return
           }