优化页面
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="page">
|
||||
<image src="../../static/HomeBackground.png" class="HomeBackground"></image>
|
||||
<image src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/HomeBackground.png" class="HomeBackground"></image>
|
||||
</view>
|
||||
<view class="top-navigation-container">
|
||||
<top-navigation
|
||||
@@ -22,7 +22,7 @@
|
||||
@scrolltolower="onScrollToLower"
|
||||
:refresher-triggered="triggered"
|
||||
>
|
||||
<uni-card v-for="(item, index) in list">
|
||||
<uni-card v-if="list.length !== 0" v-for="(item, index) in list">
|
||||
<view class="content-list" @click="goDetail(item)">
|
||||
<!-- `````````````````````````` -->
|
||||
<image class="headShot" :src="item.anchorIcon" mode="scaleToFill" />
|
||||
@@ -36,13 +36,13 @@
|
||||
<image
|
||||
v-if="item.sex === '2'"
|
||||
class="Genderimg"
|
||||
src="../../static/female.png"
|
||||
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/female.png"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
<image
|
||||
v-else
|
||||
class="Genderimg"
|
||||
src="../../static/male.png"
|
||||
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/male.png"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
<view class="age">{{ item.sex === "1" ? "男" : "女" }}</view>
|
||||
@@ -55,6 +55,7 @@
|
||||
<!-- `````````````````````````````````````````````````````` -->
|
||||
</view>
|
||||
</uni-card>
|
||||
<view v-if="list.length === 0" class="no-content">暂无内容</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="tabBar">
|
||||
@@ -90,8 +91,8 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
// 页面加载完成后请求数据
|
||||
this.pkList({type:2});
|
||||
this.pkList({type:1});
|
||||
this.pkList({ type: 2 });
|
||||
this.pkList({ type: 1 });
|
||||
},
|
||||
onLoad() {
|
||||
uni.getStorage({
|
||||
@@ -114,6 +115,9 @@ export default {
|
||||
});
|
||||
},
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.switchTab({ url: "/pages/Home/Home" });
|
||||
}, 1000);
|
||||
},
|
||||
methods: {
|
||||
goMakeAppointmentPK() {
|
||||
@@ -121,8 +125,8 @@ export default {
|
||||
this.list = this.MakeAppointmentPKlist;
|
||||
},
|
||||
goRealTimePk() {
|
||||
this.listtype = 2;
|
||||
this.list = this.RealTimePklist;
|
||||
this.listtype = 2;
|
||||
this.list = this.RealTimePklist;
|
||||
},
|
||||
goAdvertisement() {
|
||||
// this.$global.lastPage = getCurrentPages().router;
|
||||
@@ -131,13 +135,13 @@ export default {
|
||||
onRefresherRefresh() {
|
||||
this.page = 0;
|
||||
this.list = [];
|
||||
if(this.listtype === 1){
|
||||
if (this.listtype === 1) {
|
||||
this.MakeAppointmentPKlist = [];
|
||||
}else{
|
||||
} else {
|
||||
this.RealTimePklist = [];
|
||||
}
|
||||
this.triggered = true;
|
||||
this.pkList({type:this.listtype});
|
||||
this.pkList({ type: this.listtype });
|
||||
},
|
||||
async goDetail(item) {
|
||||
uni.showLoading({
|
||||
@@ -190,7 +194,7 @@ export default {
|
||||
status: 0,
|
||||
page: this.page,
|
||||
size: this.size,
|
||||
condition:condition
|
||||
condition: condition,
|
||||
},
|
||||
userInfo: false,
|
||||
});
|
||||
@@ -208,13 +212,13 @@ export default {
|
||||
this.list = this.RealTimePklist;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
onScrollToLower() {
|
||||
this.page++;
|
||||
this.pkList({type:this.listtype});
|
||||
},
|
||||
},
|
||||
onScrollToLower() {
|
||||
this.page++;
|
||||
this.pkList({ type: this.listtype });
|
||||
},
|
||||
components: {
|
||||
topNavigation,
|
||||
Advertisement,
|
||||
@@ -306,7 +310,7 @@ export default {
|
||||
}
|
||||
|
||||
.Gendermale {
|
||||
background: url(../../static/maleimg.png) no-repeat center;
|
||||
background: url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/maleimg.png) no-repeat center;
|
||||
width: 56.3rpx;
|
||||
height: 29.58rpx;
|
||||
background-size: 100% 100%;
|
||||
@@ -315,7 +319,7 @@ export default {
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
.Genderfemale {
|
||||
background: url(../../static/femaleimg.png) no-repeat center;
|
||||
background: url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/femaleimg.png) no-repeat center;
|
||||
width: 56.3rpx;
|
||||
height: 29.58rpx;
|
||||
background-size: 100% 100%;
|
||||
@@ -341,4 +345,14 @@ export default {
|
||||
line-height: 38rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
.no-content{
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
font-size: 28rpx;
|
||||
color: #a3a3a3;
|
||||
line-height: 40rpx;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user