VM4800:1 setStorage:fail parameter error: parameter should be Object instead of String;
错误信息如下错误关键代码解决方案注意:Storage和StorageSync的写法是不一样的1、setStorageSync(同步)wx.setStorageSync("uname", that.data.name );getStorageSync(同步)wx.setStorageSync('uname')2、setStoragewx.set...
·
错误信息如下

错误关键代码

解决方案
注意:Storage和StorageSync的写法是不一样的
1、setStorageSync(同步)
wx.setStorageSync("uname", that.data.name );
getStorageSync(同步)
wx.setStorageSync('uname')
2、setStorage
wx.setStorage({
key:"uname",
data:that.data.name
})
getStorage
wx.getStorage({
key: 'uname',
})
更多推荐


所有评论(0)