Commit a97364d22167cc1bfbc3a4e3747bbd964b771b6e

Authored by zhiyangdu
1 parent abdb4898

轮播新增视频播放事件

src/components/swiper/swiper.vue
@@ -2,14 +2,14 @@ @@ -2,14 +2,14 @@
2 <div class="swiper-box" :class="{'points-mall-swiper':isPointsMall}" v-if="swipers && swipers.length"> 2 <div class="swiper-box" :class="{'points-mall-swiper':isPointsMall}" v-if="swipers && swipers.length">
3 <swipe class="swipe" :autoplay="5000" :touchable="swipers.length===1 ? false : true" :show-indicators="options && options.showIndicators !== undefined ? options.showIndicators : showIndicators" @change="onChange"> 3 <swipe class="swipe" :autoplay="5000" :touchable="swipers.length===1 ? false : true" :show-indicators="options && options.showIndicators !== undefined ? options.showIndicators : showIndicators" @change="onChange">
4 <swipe-item class="swipe-item" v-for="(item, index) in swipers" :key="index"> 4 <swipe-item class="swipe-item" v-for="(item, index) in swipers" :key="index">
5 - <div class="item" @click="item.type == 22 ? playNow(item.to) : $parent.$parent.gotoDetail(item)"> 5 + <div class="item" @click="$parent.$parent.gotoDetail(item)">
6 <div class="img-box"> 6 <div class="img-box">
7 <img v-if="isPointsMall" v-lazy="item + SIGN.BIG" class="img" mode="widthFix" /> 7 <img v-if="isPointsMall" v-lazy="item + SIGN.BIG" class="img" mode="widthFix" />
8 <img v-else v-lazy="item.simg + SIGN.BIG" class="img" mode="widthFix" /> 8 <img v-else v-lazy="item.simg + SIGN.BIG" class="img" mode="widthFix" />
9 </div> 9 </div>
10 </div> 10 </div>
11 <!-- 展示播放按钮 --> 11 <!-- 展示播放按钮 -->
12 - <div v-if="item.type == 22" class="play-button-box"> 12 + <div @click="playNow(item.to)" v-if="item.type == 22" class="play-button-box">
13 <img src="static/img/play_dark.png" class="play-button-img" /> 13 <img src="static/img/play_dark.png" class="play-button-img" />
14 </div> 14 </div>
15 </swipe-item> 15 </swipe-item>
@@ -53,7 +53,7 @@ export default { @@ -53,7 +53,7 @@ export default {
53 * 播放视频 53 * 播放视频
54 * @param {String} videoUrl [数据对象] 54 * @param {String} videoUrl [数据对象]
55 */ 55 */
56 - playNow(videoUrl) { 56 + playNow(videoUrl) {
57 // 判断App内 57 // 判断App内
58 if (this.isCNLive.value) { 58 if (this.isCNLive.value) {
59 59
@@ -80,7 +80,6 @@ export default { @@ -80,7 +80,6 @@ export default {
80 * 唤起App封装 80 * 唤起App封装
81 */ 81 */
82 openApp() { 82 openApp() {
83 -  
84 this.$nextTick(() => { 83 this.$nextTick(() => {
85 84
86 // 唤起App 85 // 唤起App