1
This commit is contained in:
parent
aeb1ab829b
commit
fc1fd22662
6
App.vue
6
App.vue
@ -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>
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
@ -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>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user