Merge pull request 'xbx' (#156) from xbx into master

Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/156
This commit is contained in:
luyuan 2020-08-11 18:28:08 +08:00
commit 91ca2fdd19
8 changed files with 53 additions and 12 deletions

View File

@ -304,8 +304,8 @@ export default {
return vm.$u.post('Message/informationList', { });
},
// 关注列表
snsfriendList({ }) {
return vm.$u.post('message/snsfriendList', { });
snsfriendList({page}) {
return vm.$u.post('message/snsfriendList', {page});
},
// 关注达人
attentionMember({ member_id }) {

View File

@ -46,7 +46,10 @@
}
</script>
<style scoped lang="scss">
<style lang="scss">
page{
background-color: rgba(0,0,0,0);
}
.u-coupon-popup {
/deep/ .u-mode-center-box {
background-color: transparent;

View File

@ -76,7 +76,7 @@ export default {
},
searchValue() {
uni.navigateTo({
url: '/pageB/search/index?type=2'
url: '/pageB/search/index?type=2&curent=1'
})
},
},

View File

@ -21,6 +21,7 @@ export default {
// type: 1 2:
onLoad(option) {
this.type = option.type;
this.curent = option.curent || 0
this.getWordList();
if(option.type == 1) this.setNavSearchInput('搜索您需要的商品');
else if(option.type == 2) this.setNavSearchInput('请输入搜索内容');
@ -65,7 +66,8 @@ export default {
}
let params = {
value: value,
type: this.type,
type: this.type,
curent:this.curent
}
if(this.type == 2) {
this.$u.route({

View File

@ -78,9 +78,11 @@ export default {
},
onLoad(option) {
this.value = option.value;
this.current = option.curent
this.setViewHeight();
this.ShopSearch()
this.setNavSearchInput(this.value);
},
onNavigationBarSearchInputConfirmed(value) {
this.value = value.text

View File

@ -54,6 +54,8 @@ export default {
this.value = option.value
this.setViewHeight();
this.ShopSearch()
this.setNavSearchInput(this.value);
},
onNavigationBarSearchInputConfirmed(value) {
this.value = value.text
@ -95,7 +97,6 @@ export default {
// goods_salenum evaluation_count goods_price_asc goods_price_desc
async ShopSearch({ load = 'reload' } = {}) {
console.log(this.value);
this.setNavSearchInput(this.value);
const sort = this.setOrderSort();
const res = await this.$u.api.ShopSearch({
keyword: this.value,

View File

@ -1,15 +1,18 @@
<template>
<view class="attention">
<view class="attention_box" v-for="(item,index) in attention" :key="index" @click="navto(item.friend_tomid)">
<view>
<view style="position:relative">
<image :src="item.friend_tomavatar" mode="aspectFill"></image>
<view class="tishi" v-if="item.unread_message"></view>
</view>
<view>{{item.friend_tomname}}</view>
<view>{{item.live_status ? '正在直播' : '未直播'}}</view>
<view class="cur_two" @click="tapClick(index)" v-if = "item.about == 1">已关注</view>
<view class="cur" @click="tapClick(index)" v-else = "item.about == 2">未关注</view>
<view class="cur_two" @click="tapClick(index)">已关注</view>
<!-- <view class="cur" @click="tapClick(index)" v-else = "item.about == 2">未关注</view> -->
</view>
<u-loadmore :status="status" icon-type="iconType" :load-text="loadText" />
</view>
</template>
<script>
@ -19,9 +22,20 @@
return {
rSelect:[],
type : '未关注',
attention: []
attention: [],
page:1,
status:'loadmore'
};
},
onReachBottom(){
if(this.status == 'loading' || this.status == 'nomore'){
return ;
}else{
this.status = "loading"
this.page++
this.snsfriendList()
}
},
onLoad(){
this.snsfriendList()
},
@ -37,8 +51,17 @@
}
},
snsfriendList(){
this.$u.api.snsfriendList({}).then((res)=>{
this.attention = res.data;
this.$u.api.snsfriendList({page:this.page}).then((res)=>{
console.log(res)
if(this.page > 1){
this.attention.push(...res.data.data)
}else{
this.attention = res.data.data;
}
this.status = "loadmore"
if(res.data.data.length < 15){
this.status = "nomore"
}
})
},
navto(id){
@ -58,6 +81,15 @@
</script>
<style lang="scss" scoped>
.tishi{
position: absolute;
top: 5rpx;
left: 80rpx;
background-color: #ff5d00;
width: 12rpx;
height: 12rpx;
border-radius: 50%;
}
.attention {
display: flex;
flex-wrap: wrap;

View File

@ -463,6 +463,7 @@
goSearch() {
this.$u.route("/pageB/search/index", {
type: 2,
curent:2
});
},
//