- 在真机上swiper的几个swiper-item同时显示了,为什么会这样?
[代码]<[代码][代码]swiper[代码] [代码]duration[代码][代码]=[代码][代码]"{{duration}}"[代码] [代码]vertical[代码][代码]=[代码][代码]"{{true}}"[代码] [代码]bindchange[代码][代码]=[代码][代码]"changeSubject"[代码] [代码]current[代码][代码]=[代码][代码]"{{current}}"[代码] [代码]class[代码][代码]=[代码][代码]'swiper-slide-active'[代码] [代码]display-multiple-items[代码][代码]=[代码][代码]"1"[代码] [代码]skip-hidden-item-layout[代码][代码]=[代码][代码]"{{true}}"[代码][代码]>[代码] [代码]<[代码][代码]block[代码] [代码]wx:for[代码][代码]=[代码][代码]"{{subjectList}}"[代码] [代码]wx:key[代码][代码]=[代码][代码]"*this"[代码][代码]>[代码] [代码]<[代码][代码]swiper-item[代码][代码]>[代码] [代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]'video'[代码][代码]>[代码] [代码]<[代码][代码]video[代码] [代码]bindtap[代码][代码]=[代码][代码]'clickVideo'[代码] [代码]id[代码][代码]=[代码][代码]"video_{{item.id}}"[代码] [代码]autoplay[代码][代码]=[代码][代码]"{{item.play}}"[代码] [代码]show-fullscreen-btn[代码][代码]=[代码][代码]"{{false}}"[代码] [代码]show-center-play-btn[代码][代码]=[代码][代码]"{{true}}"[代码] [代码]controls[代码][代码]=[代码][代码]"{{false}}"[代码] [代码]loop[代码][代码]=[代码][代码]"{{true}}"[代码] [代码]src[代码][代码]=[代码][代码]"{{item.coverUrl}}"[代码] [代码]binderror[代码][代码]=[代码][代码]"videoErrorCallback"[代码] [代码]bindplay[代码][代码]=[代码][代码]"bindPlay"[代码] [代码]bindpause[代码][代码]=[代码][代码]"bindpauseFun"[代码] [代码]bindended[代码][代码]=[代码][代码]"videoEndPlay"[代码][代码]></[代码][代码]video[代码][代码]>[代码] [代码]</[代码][代码]view[代码][代码]>[代码] [代码]</[代码][代码]swiper-item[代码][代码]>[代码] [代码]</[代码][代码]block[代码][代码]>[代码] [代码]</[代码][代码]swiper[代码][代码]>[代码]运行的效果就是如果有三个video,那么三个都同时显示出来了,但是在开发工具的模拟器上又是好的。 我的高度设置了225px,video控件跟swiper都是这个高度!为什么呢?
2018-07-02 - 页面上拉为什么会触发onReachBottom
在开发者工具中,下拉为什么会触发onReachBottom事件呢?还有上拉的事件根本不触发...! JS代码: [代码]onReachBottom:[代码][代码]function[代码][代码](){[代码][代码] [代码][代码]wx.showToast({[代码][代码] [代码][代码]title: [代码][代码]'上拉加载'[代码][代码],[代码][代码] [代码][代码]icon: [代码][代码]'succes'[代码][代码],[代码][代码] [代码][代码]duration: 1000,[代码][代码] [代码][代码]mask: [代码][代码]true[代码][代码] [代码][代码]});[代码][代码] [代码][代码]},[代码][代码] [代码][代码]/**[代码][代码] [代码][代码]* 下拉刷新[代码][代码] [代码][代码]*/[代码][代码] [代码][代码]onPullDownRefresh:[代码][代码]function[代码][代码](){[代码][代码] [代码][代码]wx.showToast({[代码][代码] [代码][代码]title: [代码][代码]'333'[代码][代码],[代码][代码] [代码][代码]icon: [代码][代码]'succes'[代码][代码],[代码][代码] [代码][代码]duration: 1000,[代码][代码] [代码][代码]mask: [代码][代码]true[代码][代码] [代码][代码]});[代码][代码] [代码][代码]}[代码]在当前的页面的json中配置如下: [代码]{[代码][代码] [代码][代码]"enablePullDownRefresh"[代码][代码]: [代码][代码]true[代码][代码],[代码][代码] [代码][代码]"onReachBottomDistance"[代码][代码]:50[代码][代码]}[代码]页面上只有view没有用到滑块scroll-view
2018-06-04 - Error:app.json 的 widgets 字段为空
小程序有十几天没打开~一打开就出错了! 这个是什么错误? VM54:1 Error: app.json 的 widgets 字段为空 console.error @ VM54:1 (anonymous) @ search:5 app.json: [代码]{[代码][代码] [代码][代码]"pages"[代码][代码]: [[代码][代码] [代码][代码]"pages/newoff/user/userContent"[代码][代码],[代码][代码] [代码][代码]"pages/index/index"[代码][代码],[代码][代码] [代码] [代码] [代码][代码]"pages/logs/logs"[代码][代码],[代码][代码] [代码][代码]"pages/newoff/video/video"[代码][代码] [代码][代码]],[代码][代码] [代码][代码]"window"[代码][代码]: {[代码][代码] [代码][代码]"backgroundTextStyle"[代码][代码]: [代码][代码]"dark"[代码][代码],[代码][代码] [代码][代码]"navigationBarBackgroundColor"[代码][代码]: [代码][代码]"#fff"[代码][代码],[代码][代码] [代码][代码]"navigationBarTitleText"[代码][代码]: [代码][代码]"NewOffo"[代码][代码],[代码][代码] [代码][代码]"navigationBarTextStyle"[代码][代码]: [代码][代码]"black"[代码][代码] [代码][代码]}[代码][代码]}[代码]求解!
2018-05-30 - video 组件播放结束(bindended)事件无效
控件代码: [代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"video"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]video[代码] [代码]id[代码][代码]=[代码][代码]"myVideo"[代码][代码] [代码][代码]autoplay[代码][代码]=[代码][代码]"true"[代码][代码] [代码][代码]show-fullscreen-btn[代码][代码]=[代码][代码]"false"[代码][代码] [代码][代码]controls [代码][代码]loop[代码][代码]=[代码][代码]"true"[代码][代码] [代码][代码]src[代码][代码]=[代码][代码]"http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400"[代码][代码] [代码][代码]binderror[代码][代码]=[代码][代码]"videoErrorCallback"[代码][代码] [代码][代码]bindplay[代码][代码]=[代码][代码]"bindPlay"[代码][代码] [代码][代码]bindended[代码][代码]=[代码][代码]"funended"[代码][代码]></[代码][代码]video[代码][代码]>[代码][代码]</[代码][代码]view[代码][代码]>[代码]JS代码: [代码]bindPlay: [代码][代码]function[代码] [代码]() {[代码][代码] [代码][代码]console.log([代码][代码]"播放"[代码][代码])[代码][代码] [代码][代码]},[代码][代码] [代码][代码]bindPause: [代码][代码]function[代码] [代码]() {[代码][代码] [代码][代码]this[代码][代码].videoContext.pause()[代码][代码] [代码][代码]},[代码][代码] [代码][代码]videoErrorCallback: [代码][代码]function[代码] [代码](e) {[代码][代码] [代码][代码]console.log([代码][代码]'视频错误信息:'[代码][代码])[代码][代码] [代码][代码]console.log(e.detail.errMsg)[代码][代码] [代码][代码]},[代码][代码] [代码][代码]funended: [代码][代码]function[代码] [代码]() {[代码][代码]//播放结束按钮函数[代码][代码] [代码][代码]console.log([代码][代码]"播放结束"[代码][代码])[代码][代码] [代码][代码]}[代码]bindPlay事件是有效的! 求帮助....
2018-05-19