Browse Source

优化图片等信息不显示的问题

master
邓平艺 5 years ago
parent
commit
aacd6c2682
  1. 16
      components/lf-image/lf-image.vue
  2. 2
      pages/index/index.vue
  3. 142
      pages/my/memberDetails.vue
  4. 34
      pages/userList/userList.vue

16
components/lf-image/lf-image.vue

@ -33,14 +33,18 @@
},
data(){
return {
img_src: '',
is_err: false,
loading: true
}
},
watch: {
src(val){
console.log("val", val)
this.img_src = val;
computed: {
img_src(){
if(this.is_err){
return this.errSrc;
}else{
return this.src;
}
}
},
methods: {
@ -49,7 +53,7 @@
},
error(event){
this.loading = false;
this.img_src = this.$props.errSrc;
this.is_err = true;
},
click(event){
this.$emit('click', event);

2
pages/index/index.vue

@ -62,7 +62,7 @@
page: 1,
page_size: 10,
isPage: true,
loading_text: '',
loading_text: '正在加载中',
loading_class: true
}
},

142
pages/my/memberDetails.vue

@ -1,85 +1,88 @@
<template>
<view class="lf-w-100 lf-h-100">
<view class="content lf-bg-white lf-m-b-30" v-if="$isRight(member)">
<swiper class="swiper">
<swiper-item>
<lf-image :src="member.user.avatar"></lf-image>
</swiper-item>
</swiper>
<view class="list lf-p-l-32 lf-p-r-32">
<!-- <lf-image class="avatar" src="@/static/logo.png"></lf-image> -->
<view class="info">
<view class="lf-flex-1">
<text>{{ member.number_nickname }}</text>
<text class="lf-iconfont icon-nv lf-m-l-10 lf-color-primary" v-if="member.gender == '女'"></text>
<text class="lf-iconfont icon-nan lf-m-l-10 color-nan" v-else></text>
<block v-if="$isRight(member)">
<view class="content lf-bg-white lf-m-b-30">
<swiper class="swiper">
<swiper-item>
<lf-image :src="member.user.avatar"></lf-image>
</swiper-item>
</swiper>
<view class="list lf-p-l-32 lf-p-r-32">
<!-- <lf-image class="avatar" src="@/static/logo.png"></lf-image> -->
<view class="info">
<view class="lf-flex-1">
<text>{{ member.number_nickname }}</text>
<text class="lf-iconfont icon-nv lf-m-l-10 lf-color-primary" v-if="member.gender == '女'"></text>
<text class="lf-iconfont icon-nan lf-m-l-10 color-nan" v-else></text>
</view>
<view class="lf-flex-1 lf-m-t-16">{{ member.age }}·{{ member.zodiac }}·{{ member.height }}cm·{{ member.education_id }}·{{ member.marital_status }}</view>
<view class="lf-flex-1 lf-m-t-16">自有公司·金融/证券/保险·50万以上</view>
</view>
<view class="lf-flex-1 lf-m-t-16">{{ member.age }}·{{ member.zodiac }}·{{ member.height }}cm·{{ member.education_id }}·{{ member.marital_status }}</view>
<view class="lf-flex-1 lf-m-t-16">自有公司·金融/证券/保险·50万以上</view>
<!-- <view class="star">
<u-icon name="star-fill lf-font-40" style="color: #D1D1D1;"></u-icon>
</view> -->
</view>
<!-- <view class="star">
<u-icon name="star-fill lf-font-40" style="color: #D1D1D1;"></u-icon>
</view> -->
<!-- <view class="sketch">大家好我是私人订制红娘-笑笑如果你不想在平台上面曝光需要我为你全程服务精准高效速配脱单的加我微信18399999999</view> -->
</view>
<!-- <view class="sketch">大家好我是私人订制红娘-笑笑如果你不想在平台上面曝光需要我为你全程服务精准高效速配脱单的加我微信18399999999</view> -->
</view>
<view class="info-content" v-if="$isRight(member)">
<view class="lf-color-222 lf-font-32 authen-title lf-p-l-20">信息资料</view>
<view class="lf-row-between lf-m-t-30" v-for="(item, index) in list" :key="index">
<view class="lf-color-333 lf-font-28">{{item.title}}</view>
<view class="lf-color-333 lf-font-28">{{item.content}}</view>
</view>
</view>
<view class="lf-p-l-32 lf-p-r-32 info-tag">
<view class="lf-color-222 lf-font-32 lf-m-b-30 authen-title lf-p-l-20">家庭与房车</view>
<view class="lf-color-333 lf-font-28">
了解Ta的购车住房情况和家庭成员资料
</view>
<view class="lf-font-24 lf-m-t-20" style="color: #E21196;" @click="$url('/pages/my/authentication')">
实名认证后可查看>>
<view class="info-content">
<view class="lf-color-222 lf-font-32 authen-title lf-p-l-20">信息资料</view>
<view class="lf-row-between lf-m-t-30" v-for="(item, index) in list" :key="index">
<view class="lf-color-333 lf-font-28">{{item.title}}</view>
<view class="lf-color-333 lf-font-28">{{item.content}}</view>
</view>
</view>
</view>
<view class="lf-p-l-32 lf-p-r-32 info-tag" style="margin-bottom: 130rpx;">
<view class="lf-color-222 lf-font-32 lf-m-b-30 authen-title lf-p-l-20">择偶要求</view>
<view class="lf-color-333 lf-font-28">
了解Ta的婚史身高年龄等各项择偶要求
<view class="lf-p-l-32 lf-p-r-32 info-tag">
<view class="lf-color-222 lf-font-32 lf-m-b-30 authen-title lf-p-l-20">家庭与房车</view>
<view class="lf-color-333 lf-font-28">
了解Ta的购车住房情况和家庭成员资料
</view>
<view class="lf-font-24 lf-m-t-20" style="color: #E21196;" @click="$url('/pages/my/authentication')">
实名认证后可查看>>
</view>
</view>
<view class="lf-font-24 lf-m-t-20" style="color: #E21196;" @click="$url('/pages/my/authentication')">
实名认证后可查看>>
<view class="lf-p-l-32 lf-p-r-32 info-tag" style="margin-bottom: 130rpx;">
<view class="lf-color-222 lf-font-32 lf-m-b-30 authen-title lf-p-l-20">择偶要求</view>
<view class="lf-color-333 lf-font-28">
了解Ta的婚史身高年龄等各项择偶要求
</view>
<view class="lf-font-24 lf-m-t-20" style="color: #E21196;" @click="$url('/pages/my/authentication')">
实名认证后可查看>>
</view>
</view>
</view>
<view class="tabbar-bottom">
<view class="lf-row-between">
<view class="lf-flex-column" style="align-items: center;" @click="$url('/pages/my/service')">
<view>
<u-icon name="kefu-ermai lf-font-32 lf-color-555"></u-icon>
<view class="tabbar-bottom">
<view class="lf-row-between">
<view class="lf-flex-column" style="align-items: center;" @click="$url('/pages/my/service')">
<view>
<u-icon name="kefu-ermai lf-font-32 lf-color-555"></u-icon>
</view>
<view class="lf-color-555 lf-font-24">
客服
</view>
</view>
<view class="lf-color-555 lf-font-24">
客服
<view class="lf-flex-column" style="align-items: center;margin-left: 50rpx;" @click="share">
<view>
<u-icon name="share lf-font-32 lf-color-555"></u-icon>
</view>
<view class="lf-color-555 lf-font-24">
分享
</view>
</view>
<!-- 暂时隐藏部分 -->
<!-- <view class="lf-flex-column" style="align-items: center;margin-left: 50rpx;">
<view>
<u-icon name="more-dot-fill lf-font-32 lf-color-555"></u-icon>
</view>
<view class="lf-color-555 lf-font-24">
更多
</view>
</view> -->
</view>
<view class="lf-flex-column" style="align-items: center;margin-left: 50rpx;" @click="share">
<view>
<u-icon name="share lf-font-32 lf-color-555"></u-icon>
</view>
<view class="lf-color-555 lf-font-24">
分享
</view>
<view>
<button class="tabbar-btn" @click="$url('/pages/my/exclusiveMatch')">联系Ta</button>
</view>
<!-- 暂时隐藏部分 -->
<!-- <view class="lf-flex-column" style="align-items: center;margin-left: 50rpx;">
<view>
<u-icon name="more-dot-fill lf-font-32 lf-color-555"></u-icon>
</view>
<view class="lf-color-555 lf-font-24">
更多
</view>
</view> -->
</view>
<view>
<button class="tabbar-btn" @click="$url('/pages/my/exclusiveMatch')">联系Ta</button>
</view>
</view>
</block>
<!-- #ifdef H5 -->
<view style="height: 10rpx;"></view>
<!-- #endif -->
@ -111,7 +114,6 @@
this.member = member;
for(let i in member){
console.log("i", i, member[i])
if(i == 'number_nickname' && member[i]){
list.push({title: '编号', content: member[i]});
}

34
pages/userList/userList.vue

@ -1,6 +1,6 @@
<template>
<view>
<view class="head">
<view class="head" v-if="$isRight(filter)">
<!-- <button class="sign-in-btn">最新</button> -->
<!-- tabs -->
<view class="filter-item" v-for="(value, key) in filter" :key="key" @click="switchFilter(key)">
@ -43,10 +43,10 @@
</view>
<!-- head end -->
<view style="height: 104rpx;"></view>
<lf-user-list></lf-user-list>
<lf-user-list :list="members"></lf-user-list>
<!-- 加载 -->
<view class="loading-more">
<text>没有更多数据啦~</text>
<text :class="{'loading-more-text': loading_class}">{{ loading_text }}</text>
</view>
<!-- 回到顶部 -->
<u-back-top :scrollTop="pageScrollTop"></u-back-top>
@ -66,7 +66,13 @@
filter_key: '',
name: '最新',
on_focus: false,
filterObj: {}
filterObj: {},
page: 1,
page_size: 10,
isPage: true,
loading_class: true,
loading_text: '正在加载中',
members: []
}
},
onLoad(options){
@ -78,6 +84,7 @@
this.on_focus = true;
}
this.getMemberParams();
this.getMembers();
},
methods: {
//
@ -88,6 +95,22 @@
this.filter = this.productionObj();
})
},
//
getMembers(){
this.$http(this.API.API_MEMBERS_ALL, {
page: this.page,
pagesize: this.page_size
}).then(res => {
let members = res.data.members.data || [];
let isPage = this.$isRight(res.data.members.next_page_url);
this.isPage = isPage;
if(!isPage){
this.loading_class = false;
this.loading_text = '已加载全部数据~';
}
this.members = members;
})
},
//
productionObj(){
return JSON.parse( JSON.stringify(this.filterObj) );
@ -183,7 +206,8 @@
.filter-content{
position: absolute;
width: 100%;
height: 300rpx;
height: max-content;
max-height: 806rpx;
background-color: #FFFFFF;
left: 0;
z-index: 14;

Loading…
Cancel
Save