Commit 42b0fc64 by 李嘉林

feat: 加入口

parent 7cecbdee
...@@ -201,7 +201,7 @@ export default { ...@@ -201,7 +201,7 @@ export default {
if (this.link.includes('$%7Btoken%7D') && wx.getStorageSync("sessionid")) { if (this.link.includes('$%7Btoken%7D') && wx.getStorageSync("sessionid")) {
this.getSsoBcakUrl(decodeURIComponent(this.link)); this.getSsoBcakUrl(decodeURIComponent(this.link));
} }
if ((!this.link.includes('sessionid')) && wx.getStorageSync("sessionid")) { if ((!this.link.includes('sessionid')) && wx.getStorageSync("sessionid") && !this.link.includes('/pagesD/userCenterLogin/index')) {
this.link +=`${this.link.includes('?') && !this.link.includes('#/') || (this.link.split('?').length - 1 > 1) ?'&':'?'}sessionid=${wx.getStorageSync("sessionid")}` this.link +=`${this.link.includes('?') && !this.link.includes('#/') || (this.link.split('?').length - 1 > 1) ?'&':'?'}sessionid=${wx.getStorageSync("sessionid")}`
} }
this.useLink = this.link; this.useLink = this.link;
......
...@@ -86,13 +86,17 @@ Component({ ...@@ -86,13 +86,17 @@ Component({
methods: { methods: {
itemClick(e){ itemClick(e){
let item = e.currentTarget.dataset.item let item = e.currentTarget.dataset.item
if (item && item.link.link.includes('/pages/wlForYourPerusal/index')) { console.log('itemClick->link', item.link.link)
if (item && item.link.link.includes('/pagesD/userCenterLogin/index')) {
let loginUserInfo = wx.getStorageSync("loginUserInfo") || null; let loginUserInfo = wx.getStorageSync("loginUserInfo") || null;
if (loginUserInfo) { if (loginUserInfo) {
const user = { phone: loginUserInfo.mobilephone, uid: `C${loginUserInfo.userId}`, timestamp: new Date().getTime() }; const user = { phone: loginUserInfo.mobilephone, uid: `C${loginUserInfo.userId}`, timestamp: new Date().getTime() };
let token = app.generateToken(user); let token = app.generateToken(user);
console.log('token->', token); console.log('token->', token);
item.link.link = `http://trip.wuliangye.com.cn:8000/app/?token=${token}`; let query = {
token: token
}
item.link.link = `${item.link.link}?query=${JSON.stringify(query)}`;
item.link.name = item.link.link; item.link.name = item.link.link;
} }
} }
......
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