Commit 047ba83a by 李嘉林

ios重新进入不触发onload处理

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