File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<template >
22 <view >
33 <page-head title =" cover-view用于覆盖map、video等原生组件" ></page-head >
4- <view class =" cover-content" >
4+ <view class =" cover-content" v-if = " showMap " >
55 <!-- TODO暂时条件编译解决支付宝小程序不能正常显示 cover-x -->
66 <!-- #ifdef APP-PLUS -->
77 <map >
2121<script >
2222 export default {
2323 data () {
24- return {};
25- }
24+ return {
25+ showMap: false
26+ };
27+ },
28+ onLoad () {
29+ setTimeout (()=> {
30+ this .showMap = true
31+ },350 )
32+ }
2633 }
2734 </script >
2835
Original file line number Diff line number Diff line change 11<template >
22 <view >
33 <page-head :title =" title" ></page-head >
4- <view class =" uni-padding-wrap uni-common-mt" >
4+ <view class =" uni-padding-wrap uni-common-mt" v-if = " showVideo " >
55 <view >
66 <video id =" myVideo" src =" https://img.cdn.aliyun.dcloud.net.cn/guide/uniapp/%E7%AC%AC1%E8%AE%B2%EF%BC%88uni-app%E4%BA%A7%E5%93%81%E4%BB%8B%E7%BB%8D%EF%BC%89-%20DCloud%E5%AE%98%E6%96%B9%E8%A7%86%E9%A2%91%E6%95%99%E7%A8%8B@20181126.mp4"
77 @error =" videoErrorCallback" :danmu-list =" danmuList" enable-danmu danmu-btn controls poster =" https://img-cdn-qiniu.dcloud.net.cn/uniapp/doc/poster.png" ></video >
4242 time: 3
4343 }
4444 ],
45- danmuValue: ' '
45+ danmuValue: ' ' ,
46+ showVideo: false
4647 }
4748 },
4849 onReady : function (res ) {
4950 // #ifndef MP-ALIPAY
5051 this .videoContext = uni .createVideoContext (' myVideo' )
51- // #endif
52+ // #endif
53+ setTimeout (()=> {
54+ this .showVideo = true
55+ },350 )
5256 },
5357 methods: {
5458 sendDanmu : function () {
Original file line number Diff line number Diff line change 147147 },
148148 onLoad() {
149149 setTimeout(()=>{
150- this.newsList.push({
151- data: [],
152- isLoading: false,
153- refreshText: "",
154- loadingText: '加载更多...'
155- });
156- this.getList(0);
157- },50)
158- setTimeout(()=>{
159- for (var i = 0; i < this.tabBars.length; i++) {
160- this.newsList.push({
161- data: [],
162- isLoading: false,
163- refreshText: "",
164- loadingText: '加载更多...'
165- });
166- }
167- this.getList(0);
168- },300)
150+ this.tabBars.forEach((tabBar) => {
151+ this.newsList.push({
152+ data: [],
153+ isLoading: false,
154+ refreshText: "",
155+ loadingText: '加载更多...'
156+ });
157+ });
158+ this.getList(0);
159+ },350)
169160 },
170161 methods: {
171162 getList(index) {
You can’t perform that action at this time.
0 commit comments