var kvDataList = new Array(); kvDataList.push({ key: "score2" , value: "88888" }); wx.setUserCloudStorage({ KVDataList: kvDataList, success: res => { console.log(res) // console.log(res.data) //主域 }, fail: res => { console.log(res); } }) |
wx.getFriendCloudStorage({ KeyList: [ 'score2' ], success: res => { console.log(res.data) //子域 //drawRankList(data) } }) |
Console里面能够显示账号的记录,但KVDataList: Array(0),求解
同问,帮顶
已经解决 尝试这样
var
arr =
new
Array();
arr.push({ key:
"score"
, value:
""
+data.scr });
arr.push({ key:
"coin"
, value:
"100000"
});
wx.setUserCloudStorage(
{
KVDataList: arr,
success:
function
(res) {
console.log(
"-------存储成功-----:"
);
console.log(res);
},
fail:
function
(res) { console.error(res); },
complete(res) { }
});
好的,我去试试,万分感谢!