分享入口进入小程序webview页面,ios系统未加载数据,安卓正常是为啥?
发布于 5 年前 作者 yina 12978 次浏览 来自 官方Issues

IOS体验版可以,正式版不可以,感觉有可能是加载了页面,但是页面里发起的请求没有成功,然后页面就是无数据状态,大佬求指导芽

2 回复

麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

onLoad: function (res) {
    var that = this;
    if (res.url_encodeid != undefined) {
      that.data.encodeid = res.url_encodeid;
      if (res.htmlname!=undefined) {
        that.data.webname = res.htmlname;
      }
    }
    if (that.data.encodeid != "" && that.data.webname != "") {
      that.data.current_url = "https://xxxxxxxxxxxxxxxxxxxxxx/views/" + that.data.webname + ".html?" + that.data.encodeid + ",miniprogram";
      wx.setStorageSync('url_storage', that.data.current_url);
    }
    that.data.current_url = wx.getStorageSync('url_storage');
    that.setData({
      current_url: that.data.current_url
    })
  },
回到顶部