|
|
@@ -10,7 +10,6 @@
|
|
|
object-fit="contain"
|
|
|
controls
|
|
|
show-center-play-btn
|
|
|
- @loadedmetadata="playOpenVideo"
|
|
|
></video>
|
|
|
</view>
|
|
|
<view class="tip-text">开通零售商城前,请先观看上面视频</view>
|
|
|
@@ -60,25 +59,10 @@ export default {
|
|
|
this.onlyCg = Number(res.data.info.onlyCg);
|
|
|
}
|
|
|
this.loaded = true;
|
|
|
- this.$nextTick(() => {
|
|
|
- this.playOpenVideo();
|
|
|
- });
|
|
|
}).catch(() => {
|
|
|
this.loaded = true;
|
|
|
- this.$nextTick(() => {
|
|
|
- this.playOpenVideo();
|
|
|
- });
|
|
|
});
|
|
|
},
|
|
|
- playOpenVideo() {
|
|
|
- if (Number(this.onlyCg) !== 1 || !this.videoUrl) {
|
|
|
- return;
|
|
|
- }
|
|
|
- const videoContext = uni.createVideoContext("openVideo", this);
|
|
|
- if (videoContext) {
|
|
|
- videoContext.play();
|
|
|
- }
|
|
|
- },
|
|
|
beginChangeCg(num) {
|
|
|
const title = num == 0 ? "开启" : "关闭";
|
|
|
this.$util.confirmModal({ content: "确认" + title + "?", okText: "确认" }, () => {
|
|
|
@@ -149,4 +133,4 @@ export default {
|
|
|
.confirm-btn .admin-button-com {
|
|
|
width: 100%;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|