This commit is contained in:
abu 2025-03-15 10:09:26 +08:00
parent aeb1ab829b
commit fc1fd22662
6 changed files with 34 additions and 94 deletions

View File

@ -84,11 +84,6 @@
// //
let myUserInfo = null let myUserInfo = null
if (myUserInfo == null) { if (myUserInfo == null) {
uni.showToast({
duration: 3000,
title: "请登录~",
icon: "none",
});
uni.navigateTo({ uni.navigateTo({
// url: "../loginRegist/loginRegist", // url: "../loginRegist/loginRegist",
url: '/pages/passport/login', url: '/pages/passport/login',
@ -264,6 +259,7 @@
} }
.activate-line { .activate-line {
background-color: #ffffff; background-color: #ffffff;
transition-duration: 300ms; transition-duration: 300ms;
} }
</style> </style>

View File

@ -10,7 +10,7 @@
:style="{ height: screenHeight + 'px' }"> :style="{ height: screenHeight + 'px' }">
<!-- <uni-video :src="item.url" :playStatus="playStatus" :screenHeight="screenHeight" v-if="playerCur === index" @play="onplay"></uni-video> --> <!-- <uni-video :src="item.url" :playStatus="playStatus" :screenHeight="screenHeight" v-if="playerCur === index" @play="onplay"></uni-video> -->
<video ref="myVideo" id="myVideo" :object-fit="item.width >= item.height ? 'contain' : 'fill'" <video ref="myVideo" id="myVideo" :object-fit="item.width >= item.height ? 'contain' : 'fill'"
:src="item.url" :controls="false" :enable-progress-gesture="false" v-if="playerCur === index" loop :src="item.url" :controls="false" :enable-progress-gesture="false" :show-progress="true" v-if="playerCur === index" loop
autoplay show-loading="true" style="width: 750rpx" :style="{ height: screenHeight + 'px' }" autoplay show-loading="true" style="width: 750rpx" :style="{ height: screenHeight + 'px' }"
@click="playOrPause" @play="onplay" @error="onerror" @timeupdate="timeupdate"></video> @click="playOrPause" @play="onplay" @error="onerror" @timeupdate="timeupdate"></video>
<image :lazy-load="true" :fade-show="false" v-if="!item.play" :src="item.cover" <image :lazy-load="true" :fade-show="false" v-if="!item.play" :src="item.cover"
@ -157,8 +157,10 @@
// //
this.displayVideoPaging(this.page + 1, true); this.displayVideoPaging(this.page + 1, true);
},
var videoContext = uni.createVideoContext("myVideo"); mounted() {
var videoContext = uni.createVideoContext("myVideo",this);
console.log(videoContext)
this.videoContext = videoContext; this.videoContext = videoContext;
}, },
watch: { watch: {
@ -212,17 +214,10 @@
if (isLike == 1) { if (isLike == 1) {
// / // /
if (myUserInfo == null) { if (myUserInfo == null) {
uni.showToast({
duration: 3000,
title: "请登录~",
icon: "none",
});
uni.navigateTo({ uni.navigateTo({
url: "/pages/passport/login", url: "/pages/passport/login",
animationType: "slide-in-bottom", animationType: "slide-in-bottom",
success() {
me.loginWords = "请登录";
},
}); });
return; return;
} }
@ -242,17 +237,11 @@
// / // /
var myUserInfo = storage.getVlogUserInfo() var myUserInfo = storage.getVlogUserInfo()
if (myUserInfo == null) { if (myUserInfo == null) {
uni.showToast({
duration: 3000,
title: "请登录~",
icon: "none",
});
uni.navigateTo({ uni.navigateTo({
url: "../loginRegist/loginRegist", url: "/pages/passport/login",
animationType: "slide-in-bottom", animationType: "slide-in-bottom",
success() {
me.loginWords = "请登录";
},
}); });
return; return;
} }
@ -339,18 +328,12 @@
var myUserInfo = storage.getVlogUserInfo() var myUserInfo = storage.getVlogUserInfo()
var userId = myUserInfo.id; var userId = myUserInfo.id;
if (myUserInfo == null) { if (myUserInfo == null) {
uni.showToast({
duration: 3000,
title: "请登录~",
icon: "none",
});
uni.navigateTo({ uni.navigateTo({
url: "../loginRegist/loginRegist", url: "/pages/passport/login",
animationType: "slide-in-bottom", animationType: "slide-in-bottom",
success() {
me.loginWords = "请登录";
},
}); });
return; return;

View File

@ -288,17 +288,11 @@ export default {
// //
let myUserInfo = getApp().getUserInfoSession(); let myUserInfo = getApp().getUserInfoSession();
if (app.isStrEmpty(myUserInfo)) { if (app.isStrEmpty(myUserInfo)) {
uni.showToast({
duration: 3000,
title: "请登录后再进行操作~",
icon: "none",
});
uni.navigateTo({ uni.navigateTo({
url: "../loginRegist/loginRegist", url: "/pages/passport/login",
animationType: "slide-in-bottom", animationType: "slide-in-bottom",
success() {
me.loginWords = "请登录";
},
}); });
return; return;
} }
@ -337,17 +331,11 @@ export default {
} else if (isLike == 0) { } else if (isLike == 0) {
let myUserInfo = getApp().getUserInfoSession(); let myUserInfo = getApp().getUserInfoSession();
if (app.isStrEmpty(myUserInfo)) { if (app.isStrEmpty(myUserInfo)) {
uni.showToast({
duration: 3000,
title: "请登录后再进行操作~",
icon: "none",
});
uni.navigateTo({ uni.navigateTo({
url: "../loginRegist/loginRegist", url: "/pages/passport/login",
animationType: "slide-in-bottom", animationType: "slide-in-bottom",
success() {
me.loginWords = "请登录";
},
}); });
return; return;
} }
@ -416,18 +404,9 @@ export default {
let me = this; let me = this;
let myUserInfo = getApp().getUserInfoSession(); let myUserInfo = getApp().getUserInfoSession();
if (app.isStrEmpty(myUserInfo)) { if (app.isStrEmpty(myUserInfo)) {
uni.showToast({
duration: 3000,
title: "请登录后再进行操作~",
icon: "none",
});
uni.navigateTo({ uni.navigateTo({
url: "../loginRegist/loginRegist", url: "/pages/passport/login",
animationType: "slide-in-bottom", animationType: "slide-in-bottom"
success() {
me.loginWords = "请登录";
},
}); });
return; return;

View File

@ -332,17 +332,11 @@
var myUserInfo = getApp().getUserInfoSession(); var myUserInfo = getApp().getUserInfoSession();
if (myUserInfo == null) { if (myUserInfo == null) {
uni.showToast({
duration: 3000,
title: "请登录~",
icon: "none"
});
uni.navigateTo({ uni.navigateTo({
url: "../loginRegist/loginRegist", url: "/pages/passport/login",
animationType: "slide-in-bottom", animationType: "slide-in-bottom"
success() {
me.loginWords = "请登录"
}
}); });
return; return;
} }
@ -379,17 +373,11 @@
var myUserInfo = getApp().getUserInfoSession(); var myUserInfo = getApp().getUserInfoSession();
if (myUserInfo == null) { if (myUserInfo == null) {
uni.showToast({
duration: 3000,
title: "请登录~",
icon: "none"
});
uni.navigateTo({ uni.navigateTo({
url: "../loginRegist/loginRegist", url: "/pages/passport/login",
animationType: "slide-in-bottom", animationType: "slide-in-bottom",
success() {
me.loginWords = "请登录"
}
}); });
return; return;
} }
@ -489,18 +477,12 @@
var me = this; var me = this;
var myUserInfo = getApp().getUserInfoSession(); var myUserInfo = getApp().getUserInfoSession();
if (myUserInfo == null) { if (myUserInfo == null) {
uni.showToast({
duration: 3000,
title: "请登录~",
icon: "none"
});
uni.navigateTo({ uni.navigateTo({
url: "../loginRegist/loginRegist", url: "/pages/passport/login",
animationType: "slide-in-bottom", animationType: "slide-in-bottom",
success() {
me.loginWords = "请登录"
}
}); });
return; return;

View File

@ -283,7 +283,7 @@
}, },
}, },
onLoad(options) { onLoad(options) {
console.log(JSON.stringify(options)) console.log((options))
if (options && options.state) { if (options && options.state) {
this.stateLogin(options.state); this.stateLogin(options.state);
} }

View File

@ -1,7 +1,7 @@
<template> <template>
<view class="page"> <view class="page">
<!-- 左中右的三个页面切换, 依次是: 附近 - 关注 - 推荐 --> <!-- 左中右的三个页面切换, 依次是: 附近 - 关注 - 推荐 -->
<swiper style="my-swiper" :style="{height: screenHeight + 'px'}" :current="curIndex" @change="changeTopTab"> <swiper style="my-swiper" :style="{height: screenHeight + 'px'}" :current="curIndex" @change="changeTopTab" >
<swiper-item> <swiper-item>
<view class="near-by" :style="{height: screenHeight+'px'}"> <view class="near-by" :style="{height: screenHeight+'px'}">
<text class="warn-info">暂未开放,敬请期待!</text> <text class="warn-info">暂未开放,敬请期待!</text>