-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Taro转百度小程序,getStorageSync获取本地数据与百度小程序格式不同 #3556
Comments
欢迎提交 Issue~ 如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏 如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。 Good luck and happy coding~ |
我在百度小程序文档中(https://smartprogram.baidu.com/docs/develop/api/storage_save/#swan-setStorageSync/)开发者预览是没有问题的。 |
@vfiee 没有复现,都是直接返回值。而且你在 Taro.getStorageSync 打个断点看看,就知道相当于直接调用 swan.getStorageSync。如果真的有你说的情况,也是百度的问题。 |
我先把这个问题关闭了,因为之前确实有这样的问题,但是今天我升级项目Cli版本之后没有这个问题了 |
我现在也出现这个问题了,假设我传的是 Taro.setStorageSync("test", {test: "2222"}) localStorage 里显示的是 |
问题描述
Taro转百度小程序使用Taro.getStorageSync(key)应该直接返回缓存数据,但是缓存数据格式与百度小程序getStorage格式相同
复现步骤
期望行为
期望直接返回false
特别说明:在开发工具中多次尝试,刚开始几次是直接返回false,但是多编译和刷新几次之后,就会返回对象模式的数据
报错信息
Taro.getStorageSync()返回数据格式不正确
系统信息
Taro CLI 1.3.4 environment info:
System:
OS: macOS 10.14.5
Shell: 5.3 - /bin/zsh
Binaries:
Node: 11.5.0 - /usr/local/bin/node
Yarn: 1.12.3 - /usr/local/bin/yarn
npm: 6.5.0 - /usr/local/bin/npm
npmPackages:
@tarojs/async-await: 1.3.4 => 1.3.4
@tarojs/components: 1.3.4 => 1.3.4
@tarojs/plugin-babel: 1.3.4 => 1.3.4
@tarojs/plugin-csso: 1.3.4 => 1.3.4
@tarojs/plugin-less: 1.3.4 => 1.3.4
@tarojs/plugin-uglifyjs: 1.3.4 => 1.3.4
@tarojs/redux: 1.3.4 => 1.3.4
@tarojs/router: 1.3.4 => 1.3.4
@tarojs/taro: 1.3.4 => 1.3.4
@tarojs/taro-alipay: 1.3.4 => 1.3.4
@tarojs/taro-h5: 1.3.4 => 1.3.4
@tarojs/taro-swan: 1.3.4 => 1.3.4
@tarojs/taro-tt: 1.3.4 => 1.3.4
@tarojs/taro-weapp: 1.3.4 => 1.3.4
@tarojs/webpack-runner: 1.3.4 => 1.3.4
eslint-config-taro: 1.3.4 => 1.3.4
eslint-plugin-taro: 1.3.4 => 1.3.4
nerv-devtools: ^1.4.3 => 1.4.3
nervjs: ^1.4.3 => 1.4.3
The text was updated successfully, but these errors were encountered: