Commit d6d031c5 by 李嘉林

feat: 登录重定向调整

parent 42b0fc64
......@@ -103,6 +103,7 @@ import richText from "../../components/basicTool/rich-text";
import interval from '@/components/basicTool/interval/index.vue'
import partition from '@/components/basicTool/partition/index.vue'
import SelectEnterpriseAccount from "@/components/common/SelectEnterpriseAccount"
import memberInfo from '@/api/memberInfo'
const app = getApp();
const { log } = app;
export default {
......@@ -674,8 +675,25 @@ export default {
let parseLink=decodeURIComponent(this.backPath);
log.info(this.backPath,parseLink,'---------------------------325')
console.log(this.backPath,parseLink,this.ossLink, '---------------------------595')
if(parseLink.includes('/pages/') && !parseLink.startsWith("http")){
console.log(this.backPath, parseLink, this.ossLink, '---------------------------595')
if (parseLink.includes('/pagesD/userCenterLogin/index')) {
memberInfo.getUserInfo().then(res => {
let loginUserInfo = res.data.data;
if (loginUserInfo) {
const user = { phone: loginUserInfo.mobilephone, uid: `C${loginUserInfo.userId}`, timestamp: new Date().getTime() };
let token = app.generateToken(user);
console.log('token->', token);
let query = {
token: token
}
parseLink = `${parseLink}?query=${JSON.stringify(query)}`;
}
console.log('parseLink->', parseLink)
wx.reLaunch({
url: `../wxArticle/main?link=${encodeURIComponent(parseLink)}`
});
})
} else if(parseLink.includes('/pages/') && !parseLink.startsWith("http")){
wx.reLaunch({
url: parseLink
});
......
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