在小程序初始化时候用wx.setStorageSync 无效?

小程序 文章 2022-04-19 18:40 992 0 全屏看文

AI助手支持GPT4.0

在小程序初始化时候用wx.setStorageSync 无效?Is it invalid to use wx.setStorageSync when the applet is initialized?

在小程序初始化时候用wx.setStorageSync 无效?
 wx.setStorageSync('isAgree','false')或者 wx.setStorageSync('isAgree',false)都没有用

在login的index拿不到连,wx.getStorageInfoSync()一个key都没有


wx. Setstoragesync ('isagree ',' false ') or Wx Setstoragesync ('isagree ', false) is not used in the index of login. Wx Getstorageinfosync() has no key

回答:

用爱发电:

丢个可以复现问题的代码片段看看 https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

Dregs:额,我评论截图就是全部代码
麻烦少女:

wx.getStorageSync("isAgree")

Dregs:这个跟单引号双引号有关系嘛?我用这个方法单引号取不到值
Dregs:

-EOF-

AI助手支持GPT4.0