Commit a3849ab0 authored by 郭志伟's avatar 郭志伟

feature(sa): 完成调整

parent 0a30cf12
// import store from '../store';
import { isWechat, isApp, errorQueryValues } from './utils.service';
import { errorQueryValues } from './utils.service';
import { loginSa } from './sa.service';
import Cookies from './cookieStorage.service';
import localStorage from './localStorage.service';
// formXcxPage:标识是从小程序跳转过来的;
const localStorageParams = ['creditToken', 'vccToken', 'vccChannel', 'sonVccChannel', 'formXcxPage', 'tenantId'];
const localStorageParams = ['creditToken', 'vccToken', 'vccChannel', 'sonVccChannel', 'formXcxPage', 'tenantId', 'distinctID'];
const cookiesParams = ['h'];
export default {
......@@ -17,7 +17,11 @@ export default {
if (router.mode === 'history' && !to.hash) {
localStorageParams.forEach(item => {
if (to.query[item] && errorQueryValues.indexOf(to.query[item]) === -1) {
if (item === 'distinctID') {
loginSa(to.query[item]);
} else {
localStorage.set(item, to.query[item]);
}
} else {
localStorage.set(item, '');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment