Commit 047ba83a by 李嘉林

ios重新进入不触发onload处理

parent 8cd8bbf2
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<template> <template>
<div> <div>
<web-view <web-view
:src="link" :src="useLink"
@message="getMessage" @message="getMessage"
@error="handleError" @error="handleError"
@load="handleLoad" @load="handleLoad"
...@@ -51,6 +51,7 @@ export default { ...@@ -51,6 +51,7 @@ export default {
data() { data() {
return { return {
link: "", link: "",
useLink: "",
shareShopName: "", //分享名称 shareShopName: "", //分享名称
shareLogoUrl: "", //分享图片url shareLogoUrl: "", //分享图片url
newWindowHref: "", //分享页面url newWindowHref: "", //分享页面url
...@@ -139,6 +140,12 @@ export default { ...@@ -139,6 +140,12 @@ export default {
} }
} }
}, },
onShow() {
console.log(this.link,'------------154')
setTimeout(() => {
console.log(this.link,'------------154---2')
}, 1000);
},
async onShareAppMessage(res) { async onShareAppMessage(res) {
console.log(res,'----------------------onShareAppMessage---------res') console.log(res,'----------------------onShareAppMessage---------res')
let url = ""; let url = "";
...@@ -192,13 +199,17 @@ export default { ...@@ -192,13 +199,17 @@ export default {
}, },
watch:{ watch:{
link() { link() {
console.log(this.link,'-----------------195') console.log(this.link,this.link.includes('$%7Btoken%7D'),wx.getStorageSync("sessionid"),'-------watch----link')
} if (this.link.includes('$%7Btoken%7D') && wx.getStorageSync("sessionid")) {
this.getSsoBcakUrl(decodeURIComponent(this.link));
}
this.useLink = this.link;
},
}, },
methods: { methods: {
setLink(data) { setLink(data) {
this.link = data; this.link = data;
console.log(this.link,89999999) console.log(this.useLink,89999999)
}, },
getSsoBcakUrl(link) { getSsoBcakUrl(link) {
console.log(link,'--------------------------------------------163-----link') console.log(link,'--------------------------------------------163-----link')
...@@ -215,6 +226,7 @@ export default { ...@@ -215,6 +226,7 @@ export default {
if (res.data.code == "200") { if (res.data.code == "200") {
console.log('14888888',res) console.log('14888888',res)
this.setLink(res.data.data); this.setLink(res.data.data);
} else { } else {
wx.showToast({ title: res.data.msg, icon: "none" }); wx.showToast({ title: res.data.msg, icon: "none" });
if(res.data.msg == "登录人信息错误") { if(res.data.msg == "登录人信息错误") {
......
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