Commit 23cfa4e7 by 程默

添加 webview加载异常提示

parent 68cb1d78
<template> <template>
<div> <div>
<web-view :src="link+page+params" @message="getMessage"></web-view> <web-view :src="link+page+params" @message="getMessage" @error="handleError" @load="handleLoad"></web-view>
</div> </div>
</template> </template>
...@@ -301,6 +301,15 @@ export default { ...@@ -301,6 +301,15 @@ export default {
this.newWindowHref = res.target.data[len].shareImgUrl; this.newWindowHref = res.target.data[len].shareImgUrl;
console.log("分享信息:", this.shareLogoUrl, this.shareShopName,this.newWindowHref); console.log("分享信息:", this.shareLogoUrl, this.shareShopName,this.newWindowHref);
}, },
//加载成功
handleLoad(){
console.log('网页加载成功');
},
handleError(){
wx.showLoading({
title: "网页加载失败 请右上角刷新"
});
},
checkPageUrl(val) { checkPageUrl(val) {
for (let i = 0; i < this.sharePageList.length; i++) { for (let i = 0; i < this.sharePageList.length; i++) {
if (val.indexOf(this.sharePageList[i]) != -1) { if (val.indexOf(this.sharePageList[i]) != -1) {
......
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