微信公开课
微信公开课小程序热门讨论关于「小程序定制Settingdatafieldquot;itemsquot;toundefined」的小程序开发问题
补充:indexjs获取应用实例varapp=getApp()vartemp_data;Page({data:{items:},onLoad:function(e){consolelog(1)页面初始化后发出新的请求wxrequest({url:http:localhost:8000API
展开:indexjs获取应用实例varapp=getApp()vartemp_data;Page({data:{items:[]},onLoad:function(e){ consolelog(1)页面初始化后发出新的请求wxrequest({url:http:localhost:8000API, data:{},method:GET,header:{contenttype:applicationxwwwformurlencoded},success:function(res){consolelog(resdatadata)if(resdatastatus==1){temp_data=resdatadata}else{wxshowToast({ title:resdatamessage,icon:loading,duration:2000})}}})},onReady:function(){页面渲染完成thissetData({items:temp_data})},})报错,求解答SatMay12201823:22:43GMT+0800(中国标准时间)Settingdatafielditemstoundefinedisinvalid即速小程序:最下面的temp_data没赋值过注意:直接修改thisdata而不调用thissetData是无法改变页面的状态的,还会造成数据不一致单次设置的数据不能超过1024kB,请尽量避免一次设置过多的数据请不要把data中任何一项的value设为undefined,否则这一项将不被设置并可能遗留一些潜在问题
更多有关「小程序定制Settingdatafieldquot;itemsquot;toundefined」的讨论可以前往微信公开课小程序参与互动哦!了解更多
方法1:微信扫描微信公开课小程序码即可订阅热门讨论「小程序定制Settingdatafieldquot;itemsquot;toundefined」
方法2:微信搜索微信公开课小程序名称进入,即可订阅热门讨论「小程序定制Settingdatafieldquot;itemsquot;toundefined」
方法3:微信网页访问即速商店,长按识别微信公开课小程序码即可订阅热门讨论「小程序定制Settingdatafieldquot;itemsquot;toundefined」
微信公开课小程序热门讨论「小程序定制Settingdatafieldquot;itemsquot;toundefined」由微信公开课原创摘录于微信小程序商店shop.jisuapp.cn,转载请注明出处。
微信公开课热门讨论「小程序定制Settingdatafieldquot;itemsquot;toundefined」由微信公开课开发者向微信用户提供,并对本服务内容、数据资料及其运营行为等真实性、合法性及有效性承担全部责任。