This commit is contained in:
parent
069dba3a17
commit
cb0aee5cd5
90
App.vue
90
App.vue
|
@ -1,6 +1,6 @@
|
|||
<script>
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ] 测试分指
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
|
@ -20,9 +20,9 @@
|
|||
getUserInfo
|
||||
|
||||
} from '@/api/user.js';
|
||||
import {
|
||||
parseToken
|
||||
} from "@/api/appLet.js";
|
||||
import {
|
||||
parseToken
|
||||
} from "@/api/appLet.js";
|
||||
import {
|
||||
HTTP_REQUEST_URL
|
||||
} from './config/app';
|
||||
|
@ -32,7 +32,9 @@
|
|||
history
|
||||
} from '@/api/public.js'
|
||||
import Routine from './libs/routine.js';
|
||||
import { Toast } from "./libs/uniApi";
|
||||
import {
|
||||
Toast
|
||||
} from "./libs/uniApi";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
|
@ -97,26 +99,26 @@
|
|||
key: 'launchFlag'
|
||||
})
|
||||
|
||||
// 用于调试中台登录
|
||||
// parseToken({
|
||||
// token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJjZXNoaS1taWRkbGUubGloYWluay5jbiIsImF1ZCI6ImNlc2hpLW1pZGRsZS5saWhhaW5rLmNuIiwiaWF0IjoxNzAwNjIwMjUxLCJuYmYiOjE3MDA2MjAyNTEsImV4cCI6MTcwMTIyNTA1MSwiZGF0YSI6eyJ1aWQiOjUsInBob25lIjoiMTc2ODUxNTE2NDMiLCJhdmF0YXIiOiIvcmVzb3VyY2UvaW1hZ2UvYWRtaW5hcGkvZGVmYXVsdC9kZWZhdWx0X2F2YXRhci5wbmciLCJuaWNrbmFtZSI6Ilx1NzUyOFx1NjIzNzE3Njg1MTUxNjQzIn19.sTWAHCScRY9FExwJw1MReHTnRBcK7tYu1AMSia_Sm4M'
|
||||
// }).then((res)=>{
|
||||
// this.$store.commit("LOGIN", {
|
||||
// 'token': res.data.token,
|
||||
// 'time': 604800
|
||||
// });
|
||||
// this.$isResolve()
|
||||
// }).catch((err)=>{
|
||||
// if(err=='签名错误'){
|
||||
// this.$store.commit("LOGIN", {
|
||||
// 'token': option.referrerInfo?.extraData?.uniMP,
|
||||
// 'time': 604800
|
||||
// });
|
||||
// }else {
|
||||
// Toast(err);
|
||||
// }
|
||||
// this.$isResolve()
|
||||
// })
|
||||
// 用于调试中台登录
|
||||
// parseToken({
|
||||
// token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJjZXNoaS1taWRkbGUubGloYWluay5jbiIsImF1ZCI6ImNlc2hpLW1pZGRsZS5saWhhaW5rLmNuIiwiaWF0IjoxNzAwNjIwMjUxLCJuYmYiOjE3MDA2MjAyNTEsImV4cCI6MTcwMTIyNTA1MSwiZGF0YSI6eyJ1aWQiOjUsInBob25lIjoiMTc2ODUxNTE2NDMiLCJhdmF0YXIiOiIvcmVzb3VyY2UvaW1hZ2UvYWRtaW5hcGkvZGVmYXVsdC9kZWZhdWx0X2F2YXRhci5wbmciLCJuaWNrbmFtZSI6Ilx1NzUyOFx1NjIzNzE3Njg1MTUxNjQzIn19.sTWAHCScRY9FExwJw1MReHTnRBcK7tYu1AMSia_Sm4M'
|
||||
// }).then((res)=>{
|
||||
// this.$store.commit("LOGIN", {
|
||||
// 'token': res.data.token,
|
||||
// 'time': 604800
|
||||
// });
|
||||
// this.$isResolve()
|
||||
// }).catch((err)=>{
|
||||
// if(err=='签名错误'){
|
||||
// this.$store.commit("LOGIN", {
|
||||
// 'token': option.referrerInfo?.extraData?.uniMP,
|
||||
// 'time': 604800
|
||||
// });
|
||||
// }else {
|
||||
// Toast(err);
|
||||
// }
|
||||
// this.$isResolve()
|
||||
// })
|
||||
|
||||
if (option?.referrerInfo?.extraData?.uniMP) {
|
||||
uni.setStorageSync('uniMP', option.referrerInfo?.extraData?.uniMP);
|
||||
|
@ -124,25 +126,25 @@
|
|||
// 'token': option.referrerInfo?.extraData?.token,
|
||||
// 'time': 604800
|
||||
// });
|
||||
parseToken({
|
||||
token: option.referrerInfo?.extraData?.token
|
||||
}).then((res)=>{
|
||||
this.$store.commit("LOGIN", {
|
||||
'token': res.data.token,
|
||||
'time': 604800
|
||||
});
|
||||
this.$isResolve()
|
||||
}).catch((err)=>{
|
||||
this.$store.commit("LOGIN", {
|
||||
'token': option.referrerInfo?.extraData?.token,
|
||||
'time': 604800
|
||||
});
|
||||
console.log('TOKEN解析错误:', err);
|
||||
this.$isResolve()
|
||||
})
|
||||
}else {
|
||||
this.$isResolve()
|
||||
}
|
||||
parseToken({
|
||||
token: option.referrerInfo?.extraData?.token
|
||||
}).then((res) => {
|
||||
this.$store.commit("LOGIN", {
|
||||
'token': res.data.token,
|
||||
'time': 604800
|
||||
});
|
||||
this.$isResolve()
|
||||
}).catch((err) => {
|
||||
this.$store.commit("LOGIN", {
|
||||
'token': option.referrerInfo?.extraData?.token,
|
||||
'time': 604800
|
||||
});
|
||||
console.log('TOKEN解析错误:', err);
|
||||
this.$isResolve()
|
||||
})
|
||||
} else {
|
||||
this.$isResolve()
|
||||
}
|
||||
// #ifdef APP-PLUS
|
||||
|
||||
// #endif
|
||||
|
|
Loading…
Reference in New Issue