调试方法:扫描预览二维码。
小程序开发工具调试正常。发布后报错
console.log(shopInfo);输出结果为空
代码如下:
onLoad: function (options)
{
var shopInfo = wx.getStorageSync("shopInfo");
if (shopInfo!="")
{
this.setData({shopInfo:shopInfo});
wx.setNavigationBarTitle({ title: shopInfo.ShopName + 'AA拼团' });
}
else
{
wx.setNavigationBarTitle({ title:'AA拼团' });
}
}
System: Android 9, WeChat 7.0.12.1620
Network: wifi
UA: Mozilla/5.0 (Linux; Android 9; HLK-AL00 Build/HONORHLK-AL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/67.0.3396.87 XWEB/1178 MMWEBSDK/200201 Mobile Safari/537.36 MMWEBID/1915 MicroMessenger/7.0.12.1620(0x27000C36) Process/appbrand0 NetType/WIFI Language/zh_CN ABI/arm64
WeChatLib: 2.10.4 (2020.3.29 23:34:06)
代码里没看到你setStorageSync,但是有看到getStorageSync,如果没有setStorageSync过自然getStorageSync后为null