- 开通了免广告,还是有广告
<!-- 整个视频 --> <txv-video showCenterPlayBtn="{{false}}" id="vids" vid="{{vid}}" playerid="{{vid}}" isHiddenStop="{{true}}" width="100%" controls bindtimeupdate="onVideoTimeUpdate" bindended="onVideoEnded" bindplay="onVideoPlay"> <view wx:if="{{!videoPlaying}}" catchtap="playVideo"> <image class="play" src="../../../images/play.png" mode="widthFix"></image> </view> <!-- 题目区域 --> <view wx:if="{{currQuestion}}" class="question"> <!-- 题目标题和选项 --> <view class="q-title">Q:{{currQuestion.title}}</view> <view class="q-options"> <view wx:for="{{currQuestion.options}}" wx:key="id" class="option" bindtap="userAnswer" data-id="{{item.id}}" data-index="{{currQuestion.index}}"> {{item.id}}:{{item.text}} <!-- 答对错的小勾 --> <image wx:if="{{ currCorrect && item.id === currUserAnswer }}" class="curr-correct-icon" mode="widthFix" src="../../../images/camp/correct.png"></image> </view> </view> <!-- 答完后提示 --> <image wx:if="{{currWrong}}" class="curr-wrong" mode="widthFix" src="https://public.shengshizhuoge.com/basf_microapp/img/camp/2/video-q-wrong.png"></image> <image wx:if="{{currCorrect}}" class="curr-correct" mode="widthFix" src="https://public.shengshizhuoge.com/basf_microapp/img/camp/2/video-q-correct.png"></image> </view> </txv-video> JS playVideo(){ const TxvContext = requirePlugin("tencentvideo") let txvContext = TxvContext.getTxvContext(this.data.vid) txvContext.play() this.setData({ videoPlaying: true }) },
2021-08-09 - H5跳转小程序问题,按钮不显示?
Vue代码,main.js已经配置过 <wx-open-launch-weapp id="launch-btn" username="gh_d11889f4cf09" path="pages/home/index" class="bb"> <script type="text/wxtag-template"> <style>.btn {width: 200px; height: 100px;}</style> <button class="btn">打开测试小程序</button> </script> </wx-open-launch-weapp> 开发者工具中报这个错误 VM2284:1 [WXTAG] [JSCORE] The slot <template> or <script type="text/wxtag-template"> of <wx-open-launch-weapp> is missing r然后手机里面 按钮都不出现,请问为啥啊
2021-05-31 - 瀑布流问题,好奇image组件在onload的时候是不是做了什么?
因为第一次页面加载的时候显示不正常,之后切换页面就显示的跟预期一样 wxml <!-- js高度计算瀑布流 --> <view class="left" id="left-box"> <view wx:for="{{leftList}}" class="item" wx:key="text"> <image class="item-nail" src="{{item.nail}}" mode="widthFix"></image> <view class="item-text">推文{{item.text}}</view> </view> </view> <view class="right" id="right-box"> <view wx:for="{{rightList}}" class="item" wx:key="text"> <image class="item-nail" src="{{item.nail}}" mode="widthFix"></image> <view class="item-text">推文{{item.text}}</view> </view> </view> </view> js waterfall(arr, index = 0) { if (arr.length <= index) { return } const query = wx.createSelectorQuery().in(this) query.select('#left-box').boundingClientRect() query.select('#right-box').boundingClientRect() query.exec(rects => { console.log('eee', rects) if ( rects[0].height <= rects[1].height ) { this.setData({ leftList: this.data.leftList.concat([arr[index]]) }) } else { this.setData({ rightList: this.data.rightList.concat([arr[index]]) }) } wx.nextTick(() => { this.waterfall(arr, ++index) }) }) }, [图片] 第一次 1,2 ,4,3.. 之后1,2,3,4...正常了 [图片] 为什么呀?,怎么规避第一次即第一次onload 进入出现的问题呢?
2021-05-14