webview分享后,打开分享连接提示页面不存在问题
发布于 5 年前 作者 jiewang 20120 次浏览 来自 问答

Bug描述:

webview内嵌网页,然后实现转发操作,可成功转发,但是转发后的连接打开显示页面不存在。

options.webViewUrl获取到的地址为https://www.12366ca.com/ZiF2oo12fv.txt

webview配置:

<web-view src=https://www.12366ca.com/ZiF2oo12fv.txt”></web-view>

分享配置:

onShareAppMessage: function (options) {

   var that = this

   var return_url = options.webViewUrl

   console.log(return_url)

   return {

     title: “分享测试”,

     path: return_url,

     success: function (res) {

       that.web_url = return_url

       // 转发成功

       wx.showToast({

         title: “转发成功”,

         icon: ‘success’,

         duration: 2000

       })

     },

     fail: function (res) {

       // 转发失败

       wx.showToast({

         title: “转发失败”,

         icon: ‘fail’,

         duration: 2000

       })

     }

   }

}

webview页面转发成功截图如下:

点击转发后的连接,提示页面不存在截图如下:

1 回复

解决了吗?

回到顶部