收藏
回答

setStorageSync设置不进去值

问题模块 框架类型 问题类型 API/组件名称 终端类型 微信版本 基础库版本
API和组件 小程序 Bug setStorageSync 客户端 6.7.3 2.4.2

- 当前 Bug 的表现(可附上截图)


- 预期表现


- 复现路径


- 提供一个最简复现 Demo

2.4.2

微信版本:6.7.3


开发工具真机调试和真机(华为Nova)storage存储不进去。开发工具可以storage存储。





测试log如下:


[publib]:1 App: onLaunch have been invoked

[publib]:1 App: onShow have been invoked

[publib]:1 Register Page: pages/main

[publib]:1 Register Page: pages/home/main

[publib]:1 Register Page: pages/meeting/main

[publib]:1 Register Page: pages/register/main

[publib]:1 Register Page: pages/user/main

[publib]:1 Register Page: pages/user/management/main

[publib]:1 Register Page: pages/detail/main

[publib]:1 Register Page: pages/index/main

[publib]:1 On app route: pages/main

[publib]:1 Update view with init data

[publib]:1 pages/main: onLoad have been invoked

[publib]:1 pages/main: onShow have been invoked

[publib]:1 Invoke event onReady in page: pages/main

[publib]:1 pages/main: onReady have been invoked

[publib]:1 Invoke event handleProxy in page: pages/main

[publib]:1 On app route: pages/home/main

[publib]:1 pages/main: onUnload have been invoked

[publib]:1 Update view with init data

[publib]:1 pages/home/main: onLoad have been invoked

[publib]:1 pages/home/main: onShow have been invoked

[publib]:1 Invoke event onReady in page: pages/home/main

[publib]:1 pages/home/main: onReady have been invoked

[publib]:1 On app route: pages/user/main

[publib]:1 pages/home/main: onHide have been invoked

[publib]:1 Update view with init data

[publib]:1 pages/user/main: onLoad have been invoked

[publib]:1 pages/user/main: onShow have been invoked

main.js? [sm]:3 userInfo ? true : falsefalse {__ob__: ct}//我打印的 拿不到userInfo

[publib]:1 Invoke event onTabItemTap in page: pages/user/main

[publib]:1 Invoke event onReady in page: pages/user/main

[publib]:1 pages/user/main: onReady have been invoked

[publib]:1 pages/user/main: onHide have been invoked

[publib]:1 App: onHide have been invoked



最后一次编辑于  2018-12-10
回答关注问题邀请回答
收藏

2 个回答

  • 社区技术运营专员-娇华
    社区技术运营专员-娇华
    2018-12-10

    你好,请提供一下出现问题的机型和微信版本,以及能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。

    2018-12-10
    赞同
    回复
  • 狼
    2018-12-11

    楼主,请问问题解决了吗,是如何解决的呀

    2018-12-11
    赞同
    回复 1
    • Luoooo
      Luoooo
      2018-12-11

      没呢,打算引入第三方状态管理区存储

      2018-12-11
      回复