setData只对js层有效,对wxml无效
2019-03-15 18:17:35
微信公开课小程序热门讨论关于「setData只对js层有效,对wxml无效」的小程序开发问题
补充:页面中requestUtilrequest(appshopappglobalDatastudioIDproduct,{},function(res){for(variinresdatadata){for(varjinresdatadataitems){leta=r
展开:页面中requestUtilrequest(appshop+appglobalDatastudioID+product,{},function(res){ for(variinresdatadata){ for(varjinresdatadata[i]items){ leta=resdatadata[i]items[j]Imagessplit(,) resdatadata[i]items[j]Icon=a[0] } } consolelog(产品返回数据) consolelog(resdatadata) _thissetData({ items:resdatadata }) _thissetData({ abc:我走这啦 }) consolelog(_thisdataitems) for(leti=0;i<resdatadatalength;i++){ for(letj=0;j<resdatadata[i]itemslength;j++){ _thisdataproducts[resdatadata[i]items[j]ID]=resdatadata[i]items[j] } } })abc那个对无论真机还是开发者布局页面布局是有用的items那个在开发者和真机都能打印的出来结果,但是但是对布局真机是没有用的<viewclass=flexrowpdlitems <scrollviewclass=pdlileftscrolly=true <sidelistitems={{items}}customeIdx={{selectedIdx}}bind:selected=selectedsidelist scrollview <scrollviewclass=pdlirightscrolly=trueid=productsscrollwithanimation=truescrollintoview={{showItem}}bindscroll=onScroll <viewwx:for={{items}}wx:key=Categoryidclass=pdlipanel <textclass=pdlitypeid=type_{{itemCategoryid}}{{itemCategory}}text <viewclass=flexrowpdlionewx:for={{itemitems}}wx:key=id <imageclass=pdliimgsrc={{itemIcon}}bindtap=toDetaildatadetailId={{itemID}}image <viewstyle=width:100% <viewclass=pdlinamebindtap=toDetaildatadetailId={{itemID}}{{itemReName}}view <viewclass=pdlidesbindtap=toDetaildatadetailId={{itemID}}{{itemMoreDescription}}view <viewclass=flexrowflexspacebetweencenter <textclass=pdliprice<textstyle=fontsize:24rpx¥text{{itemRealPrice100}}text <blockwx:if={{itemRemain0}} <countcustomeCount={{selectedProducts[itemID]Count}}dataid={{itemID}}bind:changed=countChangedcount block <blockwx:else<viewstyle=fontsize:30rpx;color:666无货viewblock view view view view <viewwx:if={{!items||itemslength==0}}style=textalign:center;display:flex;flexdirection:column;paddingtop:200rpx;justifycontent:center;alignitems:center <imagesrc=staticic_emptypngstyle=width:200rpx;height:160rpximage <viewstyle=fontsize:30rpx;color:999;margintop:20rpx工作室暂未上架产品view view scrollviewview开发者工具中显示为,而真机中显示是为空的,甚至在布局中设置出来{{itemssize}}的个数都是为0的,但在开发者工具中为1很急,求救啊以下为开发者工具中以下为真机联调即速小程序:{{abc}}在那里,{{itemssize}}在那里,你把对应的截图给我看看
更多有关「setData只对js层有效,对wxml无效」的讨论可以前往微信公开课小程序参与互动哦!
补充:页面中requestUtilrequest(appshopappglobalDatastudioIDproduct,{},function(res){for(variinresdatadata){for(varjinresdatadataitems){leta=r
展开:页面中requestUtilrequest(appshop+appglobalDatastudioID+product,{},function(res){ for(variinresdatadata){ for(varjinresdatadata[i]items){ leta=resdatadata[i]items[j]Imagessplit(,) resdatadata[i]items[j]Icon=a[0] } } consolelog(产品返回数据) consolelog(resdatadata) _thissetData({ items:resdatadata }) _thissetData({ abc:我走这啦 }) consolelog(_thisdataitems) for(leti=0;i<resdatadatalength;i++){ for(letj=0;j<resdatadata[i]itemslength;j++){ _thisdataproducts[resdatadata[i]items[j]ID]=resdatadata[i]items[j] } } })abc那个对无论真机还是开发者布局页面布局是有用的items那个在开发者和真机都能打印的出来结果,但是但是对布局真机是没有用的<viewclass=flexrowpdlitems <scrollviewclass=pdlileftscrolly=true <sidelistitems={{items}}customeIdx={{selectedIdx}}bind:selected=selectedsidelist scrollview <scrollviewclass=pdlirightscrolly=trueid=productsscrollwithanimation=truescrollintoview={{showItem}}bindscroll=onScroll <viewwx:for={{items}}wx:key=Categoryidclass=pdlipanel <textclass=pdlitypeid=type_{{itemCategoryid}}{{itemCategory}}text <viewclass=flexrowpdlionewx:for={{itemitems}}wx:key=id <imageclass=pdliimgsrc={{itemIcon}}bindtap=toDetaildatadetailId={{itemID}}image <viewstyle=width:100% <viewclass=pdlinamebindtap=toDetaildatadetailId={{itemID}}{{itemReName}}view <viewclass=pdlidesbindtap=toDetaildatadetailId={{itemID}}{{itemMoreDescription}}view <viewclass=flexrowflexspacebetweencenter <textclass=pdliprice<textstyle=fontsize:24rpx¥text{{itemRealPrice100}}text <blockwx:if={{itemRemain0}} <countcustomeCount={{selectedProducts[itemID]Count}}dataid={{itemID}}bind:changed=countChangedcount block <blockwx:else<viewstyle=fontsize:30rpx;color:666无货viewblock view view view view <viewwx:if={{!items||itemslength==0}}style=textalign:center;display:flex;flexdirection:column;paddingtop:200rpx;justifycontent:center;alignitems:center <imagesrc=staticic_emptypngstyle=width:200rpx;height:160rpximage <viewstyle=fontsize:30rpx;color:999;margintop:20rpx工作室暂未上架产品view view scrollviewview开发者工具中显示为,而真机中显示是为空的,甚至在布局中设置出来{{itemssize}}的个数都是为0的,但在开发者工具中为1很急,求救啊以下为开发者工具中以下为真机联调即速小程序:{{abc}}在那里,{{itemssize}}在那里,你把对应的截图给我看看
更多有关「setData只对js层有效,对wxml无效」的讨论可以前往微信公开课小程序参与互动哦!
标签:微信公开课,小程序
「setData只对js层有效,对wxml无效」热门讨论订阅
方法1:微信扫描微信公开课小程序码即可订阅热门讨论「setData只对js层有效,对wxml无效」
方法2:微信搜索微信公开课小程序名称进入,即可订阅热门讨论「setData只对js层有效,对wxml无效」
方法3:微信网页访问即速商店,长按识别微信公开课小程序码即可订阅热门讨论「setData只对js层有效,对wxml无效」
微信公开课小程序热门讨论「setData只对js层有效,对wxml无效」由微信公开课原创摘录于微信小程序商店shop.jisuapp.cn,转载请注明出处。
微信公开课热门讨论「setData只对js层有效,对wxml无效」由微信公开课开发者向微信用户提供,并对本服务内容、数据资料及其运营行为等真实性、合法性及有效性承担全部责任。
微信公开课小程序
更新时间:2019-03-15 18:17:35
>
__methodCallerx27;ofundefined
>-404011cloudfunctionexecutionerror
>,请补充选择商家自营-预付卡销售-发行方类目,并在基础信息处申请该类目,通过
>:host在模拟器中显示无效
>:请在小程序服务页面上架正式(非测试)内容或商品后重新提交审核
>.net 微信小程序 上传图片
>'setTimeout'的问题
>‘三朵里熙SPA主题减压空间’为什么搜索关键词‘三朵里‘搜不到
>‘扫普通链接二维码打开小程序‘中设置为体验版,扫码打开是线上版本
>“cloudfunctions**indexjs”gitignore
>“NO ULINK DEVICE FOUND”是怎么回事
>“万马掌上校园”的类目审核
>“上线了”公司开发的微信小程序怎么样?
>“产品是否一定需要条形码”
>