这个问题已经解决了。 下面是我用来解决问题的代码。 [代码]this[代码][代码].data.menu[groupindex].items[index].count = countly +1[代码][代码]var[代码] [代码]count = [代码][代码]this[代码][代码].data.menu[groupindex].items[index].count [代码][代码]e.target.dataset.item.count = [代码][代码]this[代码][代码].data.menu[groupindex].items[index].count[代码] [代码]let menu = [代码][代码]this[代码][代码].data.menu;[代码] [代码]this[代码][代码].setData({[代码][代码] [代码][代码][foodCountMsg]: foodCount +1,[代码][代码] [代码][代码]menu: menu[代码][代码]});[代码]
this.setData 在 Object 中,怎么用?菜单小程序使用云开发的功能 [图片] 参数通道配置 [代码]let countMsg = [代码][代码]"menu["[代码] [代码]+ groupindex + [代码][代码]"].items["[代码] [代码]+ index + [代码][代码]"].count"[代码][代码];[代码][代码]let countly = [代码][代码]this[代码][代码].data.menu[groupindex].items[index].count;[代码][代码] [代码] [代码]let foodCountMsg = [代码][代码]"menu["[代码] [代码]+ groupindex + [代码][代码]"].foodCount"[代码][代码];[代码] [代码]let foodCount = [代码][代码]this[代码][代码].data.menu[groupindex].foodCount;[代码] this.setData 功能 [代码]this[代码][代码].setData({[代码][代码]this[代码][代码].data.menu[groupindex].items[index].count,[代码][代码] [代码][代码][countMsg]: countly +1,[代码][代码] [代码][代码][foodCountMsg]: foodCount +1,[代码][代码] [代码][代码]});[代码] 结果,foodCountMsg 没有问题。但是 countMsg 在 item Object 数据被删除 [图片]
2019-11-25@光 thank you for your help! I found the solution and post it here in case anyone faces the same error message. My cloud folder didn't contain the "config.json" files which include permissions. After i created those files and redeployed them to the cloud the error was gone. [图片]
EACCES: permission denied / code -504002你好大家, I cannot find a solution to the error below. Can anybody help with that? [代码]VM1437:1 [云函数] [login] 调用失败 Error: errCode: -404011 cloud function execution error | errMsg: cloud.callFunction:fail cloud function service error code -504002, error message EACCES: permission denied, open '/var/user/index.js'; at cloud.callFunction api; [代码][代码] [代码][代码]at new t (WAService.js:22)[代码][代码] [代码][代码]at o (WAService.js:22)[代码][代码] [代码][代码]at Object.i [as returnAsFinalCloudSDKError] (WAService.js:22)[代码][代码] [代码][代码]at Function.success (WAService.js:21)[代码][代码] [代码][代码]at Object.success (WAService.js:4)[代码][代码] [代码][代码]at L.<[代码][代码]anonymous[代码][代码]> (WAService.js:7)[代码][代码] [代码][代码]at L.emit (WAService.js:8)[代码][代码] [代码][代码]at Function.<[代码][代码]anonymous[代码][代码]> (WAService.js:12)[代码][代码] [代码][代码]at WAService.js:6[代码][代码] [代码][代码]at e (appservice?t=1557377240982:1375)[代码] Best George 乔治
2019-05-12