
這個就是后端傳來的json字串
我知道一個字串的話,直接
that.setData({
userId: res.data.data.user_id, //保存userId
code: res.data.code,
})
這樣子setdata,然后
wx.setStorageSync('userName', res.data.data.user_name);
就可以存在快取內。
但如圖那樣的陣列,怎么使用?
幫幫孩子 學了一下午都不會。看什么好像要用JSON.parse和JSON.stringify。哪位老師幫幫萌新
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/277554.html
標籤:微信開發
上一篇:提交HTTP請求程式崩潰
