- scroll-view无法使用列表渲染
[代码]<[代码][代码]scroll-view[代码] [代码]scroll-y [代码][代码]class[代码][代码]=[代码][代码]"list-view"[代码][代码] [代码][代码]bindscrolltolower[代码][代码]=[代码][代码]""[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]wx:for[代码][代码]=[代码][代码]"{{roomList}}"[代码] [代码]wx:for-item[代码][代码]=[代码][代码]"item"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]data-id[代码][代码]=[代码][代码]"{{item.id}}"[代码] [代码]data-themeid[代码][代码]=[代码][代码]"{{item.themeId}}"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]open-type[代码][代码]=[代码][代码]"getUserInfo"[代码] [代码]style[代码][代码]=[代码][代码]"background-image:url({{item.coverUrl}})"[代码][代码]></[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码]</[代码][代码]scroll-view[代码][代码]>[代码] 这个地方,我的roomList是根据异步请求加载的,设置了setData,页面中可以看到roomList数组有数据,但是渲染失败,撤掉scroll-view,正常循环出结果
2018-05-17 - canvas在编辑器可以显示,真机不显示
这是HTML代码 [代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"canvas-wrap"[代码][代码]> [代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"top"[代码][代码]> [代码][代码] [代码][代码]<[代码][代码]canvas[代码] [代码]class[代码][代码]=[代码][代码]"cir"[代码] [代码]style[代码][代码]=[代码][代码]"width:110rpx; height:110rpx; z-index: 1"[代码] [代码]canvas-id[代码][代码]=[代码][代码]"canvasArc"[代码][代码]> </[代码][代码]canvas[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]canvas[代码] [代码]class[代码][代码]=[代码][代码]"cir"[代码] [代码]style[代码][代码]=[代码][代码]"width:110rpx; height:110rpx; z-index: 2"[代码] [代码]canvas-id[代码][代码]=[代码][代码]"canvasProcess"[代码][代码]></[代码][代码]canvas[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码]这是js代码 [代码]data: {[代码][代码] [代码][代码]countState: 0[代码][代码] [代码][代码]},[代码][代码]ready: [代码][代码]function[代码][代码]() {[代码][代码] [代码][代码]let cxt_arc = wx.createCanvasContext([代码][代码]'canvasArc'[代码][代码]);[代码][代码] [代码][代码]cxt_arc.setLineWidth(6);[代码][代码] [代码][代码]cxt_arc.setStrokeStyle([代码][代码]'#E8E8E8'[代码][代码]);[代码][代码] [代码][代码]cxt_arc.setLineCap([代码][代码]'round'[代码][代码])[代码][代码] [代码][代码]cxt_arc.beginPath();[代码][代码] [代码][代码]cxt_arc.arc(27, 27, 24, 0, 23 * 23 * Math.PI, [代码][代码]false[代码][代码]);[代码][代码] [代码][代码]cxt_arc.stroke();[代码][代码] [代码][代码]cxt_arc.draw(); [代码][代码] [代码][代码]this[代码][代码].countDown(); [代码][代码]}[代码][代码]/**[代码][代码] [代码][代码]* 组件的方法列表[代码][代码] [代码][代码]*/[代码][代码]method: {[代码][代码] [代码][代码]countDown: [代码][代码]function[代码][代码]() {[代码][代码] [代码][代码]let countDown = setInterval(() =>{[代码][代码] [代码][代码]let countNum = [代码][代码]this[代码][代码].data.countState;[代码][代码] [代码][代码]countNum ++;[代码][代码] [代码][代码]this[代码][代码].setData({[代码][代码] [代码][代码]countState: countNum [代码][代码] [代码][代码]})[代码][代码] [代码][代码]let pathEx = countNum * 0.2 + 1.5;[代码][代码] [代码][代码]if[代码][代码](pathEx > 2) {[代码][代码] [代码][代码]pathEx = pathEx - 2;[代码][代码] [代码][代码]} [代码][代码] [代码][代码]if[代码][代码](countNum == 10) {[代码][代码] [代码][代码]clearInterval(countDown);[代码][代码] [代码][代码]}[代码][代码] [代码][代码]let cxt_process = wx.createCanvasContext([代码][代码]'canvasProcess'[代码][代码]);[代码][代码] [代码][代码]cxt_process.setLineWidth(6);[代码][代码] [代码][代码]cxt_process.setStrokeStyle([代码][代码]'#F3C62A'[代码][代码]);[代码][代码] [代码][代码]cxt_process.setLineCap([代码][代码]'round'[代码][代码])[代码][代码] [代码][代码]cxt_process.beginPath();[代码][代码] [代码][代码]cxt_process.arc(27, 27, 24, 1.5 * Math.PI, pathEx * Math.PI, [代码][代码]false[代码][代码]);[代码][代码] [代码][代码]cxt_process.stroke();[代码][代码] [代码][代码]cxt_process.draw();[代码][代码] [代码][代码]}, 1000) [代码][代码] [代码][代码]}[代码][代码]}[代码]在编译器上是正常运行的,但是在真机上是不显示的
2018-01-03 - 微信小程序如何调用底部菜单
近期看到一个微信已经可以调用底部抽屉菜单,就是之前分享那个,请问这个是怎么调用的呢,API中没有找到对应的文档
2017-12-29 - 微信小程序支持提现功能吗?
现在有个需求,返利后可以提现
2017-12-27