gdpao
This commit is contained in:
@@ -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() {
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user