This commit is contained in:
Gdpao 2020-08-17 16:57:23 +08:00
parent 9029e3c8ba
commit b1a705e0f8
8 changed files with 95 additions and 31 deletions

View File

@ -18,8 +18,14 @@
})
// token
if (this.hasLogin) {
this.refreshToken_function();
this.refreshToken_function();
}
// #ifdef APP-PLUS
//app 6s
setTimeout(()=>{
plus.navigator.closeSplashscreen();
},3000)
// #endif
},
methods: {
...mapMutations(['loginIn']),

View File

@ -242,7 +242,9 @@ export default {
if(res.errCode == 0) {
this.$u.toast(res.message);
this.$emit("updateList");
}
} else {
this.$u.toast(res.message);
}
})
},
toDetailsPage(id,type) {

View File

@ -11,8 +11,8 @@
"nvueCompiler" : "uni-app",
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"alwaysShowBeforeRender" : false,
"waiting" : false,
"autoclose" : true,
"delay" : 0
},

View File

@ -9,7 +9,7 @@
</view>
<view class="labales flex-inp">
<input type="number" maxlength="6" placeholder="请输入验证码" v-model="sms_code" />
<button class="identifying" :class="is_sendcode ? 'sended' : ''" @click="getCode" :disabled="is_sendcode">{{ is_sendcode ? time_count + "后可以重新发送" : "发送验证码" }}</button>
<u-button id="btn" class="identifying" :hair-line="false" hover-class="none" :class="is_sendcode ? 'sended' : ''" @click="getCode" :disabled="is_sendcode">{{ is_sendcode ? time_count + "后可以重新发送" : "发送验证码" }}</u-button>
</view>
<!-- 服务协议 -->
<view class="pact">

View File

@ -1,7 +1,7 @@
<template>
<view class="userinfo" @click="stopClick()">
<view class="userhead">
<image class="avatar" :src="item.member_avatar"></image>
<image class="avatar" :src="item.member_avatar" @click="gotoInfo(item.member_id)"></image>
<!-- <text class="follow" @click="following(item.member_id)">{{ is_follow ? "" : "+" }}</text> -->
<image class="follow" :src=" !is_follow ? '../../static/image/userinfo/follow.png' : '../../static/image/userinfo/followed.png' " mode="" @click="following(item.member_id)"></image>
</view>
@ -238,6 +238,12 @@
cart: this.is_cart
});
},
gotoInfo(id) {
console.log(id);
uni.navigateTo({
url: "/pageB/details/index?id=" + id
})
},
//
stopClick() {
}

View File

@ -20,6 +20,7 @@
<videoItem v-for="item in listInfo" :key="item.article_id" :item="item"
@getArticlelist="getArticlelist"></videoItem>
<view class="no-data" v-show="!listInfo && page">暂无数据</view>
<u-loadmore class="load-size" color="#999999" :status="status" icon-type="iconType" margin-top="50" margin-bottom="50" :load-text="loadText" />
</view>
</scroll-view>
</view>
@ -75,6 +76,13 @@ export default {
listInfo: [], //
member_id: 0,
page: 1,
status: 'loadmore',
iconType: 'circle',
loadText: {
loadmore: '轻轻上拉',
loading: '努力加载中',
nomore: '实在没有了'
},
}
},
onLoad(option) {
@ -84,6 +92,10 @@ export default {
this.getArticlelist();
},
onReachBottom() {
// this.page++;
this.getArticlelist();
},
methods:{
//
getUserInfo(id) {
@ -107,13 +119,27 @@ export default {
}).then(res => {
if (res.errCode == 0) {
// console.log(res);
this.listInfo = res.data.list;
// this.listInfo = res.data.list;
// console.log(this.listInfo);
if (this.page == 1) {
this.listInfo = res.data.list;
this.status = "loadmore";
} else if (res.data.length == 0 && this.page > 1) {
this.status = "nomore";
} else {
this.listInfo = this.listInfo.concat(res.data.list);
console.log(this.listInfo)
}
if (res.data.length == 0 && this.page > 1) {
} else {
this.page++;
}
} else {
console.log(res.message);
}
})
},
dianji(a){
console.log(a);
if(typeof a == "object"){
@ -121,7 +147,13 @@ export default {
}else{
this.num = a
}
this.getArticlelist();
if (a == 0) {
this.page = 1;
this.getArticlelist();
} else if (a == 1) {
this.page = 1;
this.getArticlelist();
}
}
}
}

View File

@ -1,28 +1,28 @@
<template>
<view class="container">
<video id="videoId" :style="videoSize" :src="src" autoplay="true" :show-fullscreen-btn="false" @play="playing"
@pause="pausing" @ended="videoEnd" @timeupdate="timeupdate" :show-play-btn="false" controls="false" @click="stoping"
@pause="pausing" @ended="videoEnd" @timeupdate="timeupdate" :show-play-btn="false" :controls="false" @click="stoping"
:enable-progress-gesture="false" :show-center-play-btn="false"></video>
<!-- 用户操作 -->
<userinfo class="user-info" :style="{ top: fixTop }" :list="list" :cart="cart_type" :comment="is_comment" :num="comment_num"
@openCart="openPopup"></userinfo>
<!-- 视频信息 -->
<cover-view class="info-box" @click="stopClick">
<cover-view class="info-box">
<view class="video-info-box" :style="{ width: time_count > 99 ? '180rpx' : '160rpx' }">
<image class="image-play" src="../../static/videoIcon.png" mode=""></image>
<text class="video-slip">视频</text>
<text class="time">{{ time_count }}s</text>
</view>
<view>
<text class="name">@{{ list.member_nickname }}</text>
<text class="name" @click="gotoInfo(list)">@{{ list.member_nickname }}</text>
</view>
<view>
<view @click="stopClick">
<text class="title">{{ list.article_title }}</text>
</view>
<view>
<view @click="stopClick">
<text class="centent">{{ list.article_content }}</text>
</view>
<view class="label-box">
<view class="label-box" @click="stopClick">
<block v-for="(item,index) in list.label" :key="index">
<text class="label" :style="{ width: labelLen[index] * 40 + 'rpx' }">{{ item.name }}</text>
</block>
@ -344,11 +344,7 @@
width: "750rpx",
height: res.screenHeight + "px",
}
this.fixTop = "400rpx";
this.fixTop = res.screenHeight / 3;
// #ifdef H5
this.fixTop = 400 + 'rpx'
// #endif
}
})
},
@ -460,6 +456,9 @@
url: "/pageB/sdetails/index?id=" + id + "&type=" + 1,
})
},
gotoInfo(id) {
console.log(id);
},
// 收起键盘
hideEdit() {},
// stop
@ -476,8 +475,10 @@
</script>
<style>
.container {
position: relative;
background-color: #FF0000 !important;
}
/* 关闭 */
@ -497,6 +498,9 @@
left: 330rpx;
width: 100rpx;
height: 100rpx;
/* #ifdef H5 */
top: 500rpx;
/* #endif */
}
.pause-img {
@ -507,7 +511,10 @@
/* 用户操作 */
.user-info {
position: fixed;
right: 30rpx;
right: 26rpx;
/* #ifdef H5 */
top: 400rpx;
/* #endif */
}
/* 底部信息 */
@ -839,13 +846,16 @@
}
.title {
width: 700rpx;
color: #fff;
font-size: 26rpx;
margin-bottom: 20rpx;
lines: 1;
text-overflow: ellipsis;
}
.centent {
width: 500rpx;
width: 600rpx;
color: #fff;
font-size: 28rpx;
margin-bottom: 20rpx;

View File

@ -240,6 +240,7 @@
num: 0,
page: 1, // 0
follow_page: 0, //
live_page: 1, //
articleList: [],
recommendList: [], //
indexImageSwiper: [],
@ -314,24 +315,27 @@
uni.showLoading({
title: "loading..."
})
this.$u.api.tabLiveList({page:this.page}).then((res) => {
this.$u.api.tabLiveList({page:this.live_page}).then((res) => {
// uni.stopPullDownRefresh();
this.status = "loading";
console.log(res)
if (res.errCode == 0) {
uni.hideLoading();
if (this.page == 1) {
if (this.live_page == 1) {
this.tabLiveLists = res.data.data;
this.status = "loadmore";
} else if (res.data.data.length == 0 && this.page > 1) {
if (res.data.data.length < 6) {
this.status = "nomore";
}
} else if (res.data.data.length == 0 && this.live_page > 1) {
this.status = "nomore";
} else {
this.tabLiveLists = this.tabLiveLists.concat(res.data.data);
console.log(this.tabLiveLists)
}
if (res.data.data.length == 0 && this.page > 1) {
if (res.data.data.length == 0 && this.live_page > 1) {
} else {
this.page++;
this.live_page++;
}
} else {
this.status = "nomore"
@ -384,7 +388,7 @@
this.getArticlelist();
this.getSwiper();
} else if (this.num == 1) {
this.page = 1;
this.live_page = 1;
this.getZhiBoSwiper(); //
this.tabLiveList();
} else if (this.num == 2) {
@ -412,15 +416,20 @@
this.status = "loading";
if (res.errCode == 0) {
uni.hideLoading();
console.log(this.page,res.data.list.length);
if (this.page == 1) {
this.articleList = res.data.list;
this.status = "loadmore";
if (res.data.list.length < 4) {
this.status = "nomore";
}
} else if (res.data.length == 0 && this.page > 1) {
this.status = "nomore";
} else {
this.articleList = this.articleList.concat(res.data.list);
}
if (res.data.length == 0 && this.page > 1) {
console.log(111);
} else {
this.page++;
}
@ -432,17 +441,16 @@
//
updateList() {
this.page = 1;
this.articleList = [];
this.getArticlelist();
this.tabLiveList()
this.tabLiveList();
},
//
swiperBottom(e) {
if(this.num == 0 ){
if(this.num == 0){
this.getArticlelist();
}else if(this.num == 1){
console.log(123)
this.tabLiveList()
this.tabLiveList();
}
// console.log(e);
},