Commit 09c6e09e authored by jyx's avatar jyx

代码优化

parent 6c9cb4d5
...@@ -71,10 +71,10 @@ ...@@ -71,10 +71,10 @@
我的订单 我的订单
<view class="item_bd ellipsis" style="margin-left: 58rpx;"></view> <view class="item_bd ellipsis" style="margin-left: 58rpx;"></view>
</view> </view>
<view class="item arrow" @click="handleVedio"> <!-- <view class="item arrow" @click="handleVedio">
我的追剧 我的追剧
<view class="item_bd ellipsis" style="margin-left: 58rpx;"></view> <view class="item_bd ellipsis" style="margin-left: 58rpx;"></view>
</view> </view> -->
<view v-if="os === 'android' " class="item arrow" @click="handleDotRecord"> <view v-if="os === 'android' " class="item arrow" @click="handleDotRecord">
看点记录 看点记录
<view class="item_bd ellipsis" style="margin-left: 58rpx;"></view> <view class="item_bd ellipsis" style="margin-left: 58rpx;"></view>
......
...@@ -48,6 +48,19 @@ ...@@ -48,6 +48,19 @@
</swiper-item> </swiper-item>
</swiper> </swiper>
<view class='fakeTab' :style="
'height:' +
titleBarHeight +
'px;line-height:' +
titleBarHeight +
'px;padding-top:' +
statusBarHeight +
'px;background-color:transparent'
">
<text @click="handleVideoRecord" style="color: #606266;margin-right: 20rpx;">追剧</text>
<text style="color: white;margin-left: 20rpx;border-bottom: 4rpx solid #ffffff;">推荐</text>
</view>
</view> </view>
</template> </template>
...@@ -58,7 +71,7 @@ ...@@ -58,7 +71,7 @@
navigateTo, navigateTo,
} from '@/utils/fun.js'; } from '@/utils/fun.js';
let audo = uni.createInnerAudioContext() const app = getApp();
export default { export default {
name: "recommendVideo", name: "recommendVideo",
...@@ -79,7 +92,10 @@ ...@@ -79,7 +92,10 @@
isqp: false, // 是否全屏 isqp: false, // 是否全屏
urls: "https://xjc.demo.hongcd.com/api/video/videoRecommend?page=1&uid=0", urls: "https://xjc.demo.hongcd.com/api/video/videoRecommend?page=1&uid=0",
isFirstLoad: true, isFirstLoad: true,
videoContext: null videoContext: null,
titleBarHeight: app.globalData.titleBarHeight,
titleButtonWidth: app.globalData.titleButtonWidth,
statusBarHeight: app.globalData.statusBarHeight,
} }
}, },
onLoad(e) { onLoad(e) {
...@@ -135,7 +151,6 @@ ...@@ -135,7 +151,6 @@
} }
}, },
stop() { stop() {
// audo.pause()
this.videoContext?.pause() this.videoContext?.pause()
}, },
queryList() { queryList() {
...@@ -196,7 +211,6 @@ ...@@ -196,7 +211,6 @@
this.oid = this.originList.length - 1 this.oid = this.originList.length - 1
} }
console.log('++++++++++++上一条播放数据 Index:', this.oid) console.log('++++++++++++上一条播放数据 Index:', this.oid)
// audo.pause()
this.videoContext = uni.createVideoContext("" + this.originList[this.oid].vedioId, this) this.videoContext = uni.createVideoContext("" + this.originList[this.oid].vedioId, this)
this.videoContext.pause() this.videoContext.pause()
this.videoContext.stop() this.videoContext.stop()
...@@ -298,6 +312,9 @@ ...@@ -298,6 +312,9 @@
} }
}); });
}, },
handleVideoRecord() {
navigateTo(`/pages/recommend/follow`)
}
} }
} }
</script> </script>
...@@ -419,4 +436,22 @@ ...@@ -419,4 +436,22 @@
opacity: 1; opacity: 1;
} }
} }
.fakeTab {
width: 100%;
position: absolute;
z-index: 100;
display: flex;
align-items: center;
overflow: hidden;
justify-content: center;
text {
text-align: center;
height: 60rpx;
line-height: 60rpx;
font-size: 36rpx;
font-weight: bold;
}
}
</style> </style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment