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