新增:token登录方式
This commit is contained in:
+21
-1
@@ -97,7 +97,7 @@ export function openSpmUrl(path: string, d?: any, id = 0): void {
|
||||
|
||||
// 跳转页面
|
||||
url.value = `${domain}${path}${spm.value}${token.value}`;
|
||||
console.log(url.value,'domain>>>>');
|
||||
console.log(url.value, 'domain>>>>');
|
||||
window.open(`${url.value}`);
|
||||
}
|
||||
|
||||
@@ -396,3 +396,23 @@ export const getPageTitle = () => {
|
||||
const { title } = meta;
|
||||
return title;
|
||||
};
|
||||
|
||||
/**
|
||||
* 提取传参中的ID
|
||||
* param 12334.html
|
||||
* return 1234
|
||||
* @param index
|
||||
*/
|
||||
export const getIdBySpm = (index: number) => {
|
||||
console.log('split', router.currentRoute.value.query.spm);
|
||||
const split = String(router.currentRoute.value.query.spm).split('.');
|
||||
console.log(split);
|
||||
return split[index];
|
||||
};
|
||||
|
||||
/**
|
||||
* 提取传参中的token
|
||||
*/
|
||||
export const getTokenBySpm = () => {
|
||||
return JSON.parse(router.currentRoute.value.query.token);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user