- wxml不知怎么调试, scrollview如何出现多个?
<view class="goods-category custom-class"> <c-sidebar custom-class="custom-sidebar" bindchange="onParentChange" activeKey="{{activeKey}}"> <c-sidebar-item wx:for="{{ category }}" wx:key="index" title="{{ item.name }}" disabled="{{ item.disabled }}" /> </c-sidebar> <view class="goods-category__right"> <c-tabbar wx:if="{{isSlotRight}}" activeKey="{{subActiveKey}}" bindchange="onChildChange" showMore > <slot/> </c-tabbar> <view wx:if="{{!isSlotRight}}" class="goods-category-normal"> <view class="goods-category-normal-item" wx:if="{{category[activeKey].children && category[activeKey].children.length > 0}}"> <block wx:for="{{category[activeKey].children}}" wx:key="index" wx:if="{{level === 3 && item.children && item.children.length > 0}}"> <view class="flex goods-category-normal-item-title"> {{item.name}} </view> <view class="goods-category-normal-item-container"> <view class="goods-category-normal-item-container-item" wx:for="{{item.children}}" wx:for-index="subIndex" wx:key="subIndex" wx:for-item="subItem" bindtap="changCategory" data-item="{{subItem}}" > <t-image src="{{subItem.thumbnail}}" t-class="image" /> <view class="flex goods-category-normal-item-container-item-title"> {{subItem.name}} </view> </view> </view> </block> <view class="goods-category-normal-item-second-container" wx:if="{{level === 2}}"> <block wx:for="{{category[activeKey].children}}" wx:key="index"> <view class="goods-category-normal-item-second-container-item" wx:for-key="index" bindtap="changCategory" data-item="{{item}}" data-index = "{{item.index}}" > <t-image src="{{item.thumbnail}}" t-class="image" /> <view class="flex goods-category-normal-item-container-item-title"> {{item.name}} </view> </view> </block> </view> </view> </view> </view> </view> [图片] 我想请问下,我的wxml如何修改出现如上图的效果啊,读取的是json文件,但是wxml不晓得咋调试,不太熟悉,就是根据多个数据组可以展示如右侧效果。 var json = [ { groupId: '24948', name: '奥特曼', thumbnail: 'https://cdn-we/category-default.png', children: [ { groupId: '249481', name: '构件111', thumbnail: 'https://cdn-we/category-default.png', children: [ { groupId: '249480', name: '1111', thumbnail: 'https://hncdiwtcl-A1%E6%AA%90%E9%93%B8%E9%92%A2%E7%B3%BB%E8%88%B9%E6%9F%B1.jpg', }, { groupId: '249480', name: '1111', thumbnail: 'https://hncdiwtcl-A1%E6%AA%90%E9%93%B8%E9%92%A2%E7%B3%BB%E8%88%B9%E6%9F%B1.jpg', }, { groupId: '249480', name: '1111', thumbnail: 'https://hncdiwtcl-A1%E6%AA%90%E9%93%B8%E9%92%A2%E7%B3%BB%E8%88%B9%E6%9F%B1.jpg', }, ], }, ], children: [ { groupId: '249481', name: '构件222', thumbnail: 'https://cdntegory/category-default.png', children: [ { groupId: '249480', name: '2222', thumbnail: 'https://hncdiwE6%8C%A1%E6%AA%90%E9%93%B8%E9%92%A2%E7%B3%BB%E8%88%B9%E6%9F%B1.jpg', }, { groupId: '249480', name: '2222', thumbnail: 'https://hncdiwE6%8C%A1%E6%AA%90%E9%93%B8%E9%92%A2%E7%B3%BB%E8%88%B9%E6%9F%B1.jpg', }, { groupId: '249480', name: '2222', thumbnail: 'https://hncdiwE6%8C%A1%E6%AA%90%E9%93%B8%E9%92%A2%E7%B3%BB%E8%88%B9%E6%9F%B1.jpg', }, { groupId: '249480', name: '2222', thumbnail: 'https://hncdiwE6%8C%A1%E6%AA%90%E9%93%B8%E9%92%A2%E7%B3%BB%E8%88%B9%E6%9F%B1.jpg', }, ], }, ], children: [ { groupId: '249481', name: '构件333', thumbnail: 'https://cdn-weault.png', children: [ { groupId: '249480', name: '3333', thumbnail: 'https://hn%8C%%BB%E8%88%B9%E6%9F%B1.jpg', }, { groupId: '249480', name: '3333', thumbnail: 'https://hncdiwE6%8C%A1%E6%AA%90%E9%93%B8%E9%92%A2%E7%B3%BB%E8%88%B9%E6%9F%B1.jpg', }, { groupId: '249480', name: '3333', thumbnail: 'https://hncdiwE6%8C%A1%E6%AA%90%E9%93%B8%E9%92%A2%E7%B3%BB%E8%88%B9%E6%9F%B1.jpg', }, ], }, ], },
2022-09-14 - 小程序发布后,threejs读取腾讯COS服务器的glb三维模型,第一次成功,然后再打开就不成功?
var loader = new THREE.GLTFLoader(); loader.load(urlname, function (gltf) { model = gltf.scene; scene.add(model); createGUI(model, gltf.animations) }, undefined, function (e) { console.error(e); }); threejs读取,调试基础包 2.26.0 微信版本:8.0.27 腾讯云COS服务器存储glb文件。 微信小程序发布上线后,第一次可以打开三维模型,显示正常,然后关闭小程序后,就不再显示,请问是什么原因造成的。
2022-09-09 - threejs 加载glb模型,发布后,三维模型加载不出来,谁知道怎么解决?
1.threejs-miniprogram,gltf-loader.js接口加载显示三维模型,加载的是glb格式的。 2.阿里云三维模型链接。 3.调试基础库2.26.0(ps,没有推送) 4.[图片] 可以清楚显示。 但是提交程序代码,审核通过,发布后,在手机上打开,我的三维模型没了!!!这。。。哪位大神知道怎么解决呢?
2022-09-08