gdpaoup
This commit is contained in:
@@ -61,7 +61,7 @@
|
||||
<view></view>
|
||||
<text>推荐达人</text>
|
||||
</view>
|
||||
<image class="right" src="/static/image/common/1.png"></image>
|
||||
<u-icon name="arrow-right" color="#666" size="28"></u-icon>
|
||||
</view>
|
||||
<view class="tuijianlist">
|
||||
<!-- <darenItem style="margin-right:23rpx"></darenItem>
|
||||
@@ -69,16 +69,12 @@
|
||||
<darenItem v-for="item in recommendList.slice(0,3)" :key="item.id" :info="item" v-on:pChangeType="changeType"></darenItem>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view>
|
||||
<!-- <videoItem isguanzhu="true" v-for="item in 10"></videoItem> -->
|
||||
<videoItem isguanzhu="true" v-for="item in articleList.filter((_, index) => !(index&1))" :key="item.article_id"
|
||||
:item="item" @getArticlelist="getArticlelist"></videoItem>
|
||||
</view>
|
||||
<view style="margin-left:20rpx">
|
||||
<!-- <videoItem isguanzhu="true" v-for="item in 10"></videoItem> -->
|
||||
<videoItem isguanzhu="true" v-for="item in articleList.filter((_, index) => index&1)" :key="item.article_id"
|
||||
:item="item" @getArticlelist="getArticlelist"></videoItem>
|
||||
<view class="rec-list">
|
||||
<view class="rec-box">
|
||||
<!-- {{ fansList }} -->
|
||||
<videoItem isguanzhu="true" v-for="item in fansList" :key="item.article_id"
|
||||
:item="item"></videoItem>
|
||||
<view class="no-data" v-show="!fansList.length">您还没有关注哦,赶紧去点点关注!</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -181,6 +177,17 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.rec-list {
|
||||
width: 100%;
|
||||
.rec-box {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
.no-data {
|
||||
margin: 200rpx auto 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
@@ -206,7 +213,8 @@
|
||||
recommendList: [], // 推荐达人
|
||||
indexImageSwiper: [],
|
||||
zhiboImageSwiper: [],
|
||||
tabLiveLists: []
|
||||
tabLiveLists: [],
|
||||
fansList: [], // 关注的发现列表
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -221,18 +229,21 @@
|
||||
this.getSwiper();
|
||||
this.getZhiBoSwiper();
|
||||
this.tabLiveList();
|
||||
this.getFollowList();
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.getArticlelist();
|
||||
// this.getManicureList({ load: 'reload' });
|
||||
},
|
||||
methods: {
|
||||
// 列表
|
||||
tabLiveList() {
|
||||
this.$u.api.tabLiveList().then((res) => {
|
||||
console.log(res)
|
||||
this.tabLiveLists = res.data
|
||||
this.tabLiveLists = res.data;
|
||||
})
|
||||
},
|
||||
// 轮播图
|
||||
getSwiper() {
|
||||
this.$u.api.getIndexSwiper().then(res => {
|
||||
if (res.errCode == 0) {
|
||||
@@ -240,14 +251,16 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
// 关注
|
||||
changeType(member_id) {
|
||||
console.log(member_id);
|
||||
this.$emit("pChangeType")
|
||||
// this.$emit("pChangeType");
|
||||
this.$u.api.attentionMember({
|
||||
member_id: member_id
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
this.getRecommendList();
|
||||
this.getFollowList(); // 刷新发现的列表
|
||||
})
|
||||
},
|
||||
getZhiBoSwiper() {
|
||||
@@ -257,26 +270,29 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
// 切换导航
|
||||
dianji(a) {
|
||||
// console.log(a)
|
||||
console.log(a);
|
||||
if (typeof a == "object") {
|
||||
this.num = a.detail.current
|
||||
} else {
|
||||
this.num = a
|
||||
}
|
||||
},
|
||||
// 发现别表
|
||||
getArticlelist() {
|
||||
this.$u.api.getArticlelist({
|
||||
page: this.page,
|
||||
is_video_img: 0, // 查询视频1 图文2 都查0
|
||||
}).then(res => {
|
||||
uni.stopPullDownRefresh();
|
||||
console.log('37647744ghj', res)
|
||||
// uni.stopPullDownRefresh();
|
||||
// console.log('37647744ghj', res)
|
||||
if (res.errCode == 0) {
|
||||
this.articleList = res.data.list;
|
||||
}
|
||||
})
|
||||
},
|
||||
// 达人列表
|
||||
getRecommendList() {
|
||||
this.$u.api.getRecommendList().then(res => {
|
||||
console.log(res)
|
||||
@@ -285,6 +301,17 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
// 关注发现列表
|
||||
getFollowList() {
|
||||
this.$u.post("article/attentionArticleList",{
|
||||
page: 0,
|
||||
}).then(res => {
|
||||
if (res.errCode == 0) {
|
||||
this.fansList = res.data.list;
|
||||
}
|
||||
// console.log(res);
|
||||
})
|
||||
},
|
||||
toSearchPage() {
|
||||
console.log("22");
|
||||
uni.navigateTo({
|
||||
|
||||
Reference in New Issue
Block a user