优化页面
This commit is contained in:
@@ -12,9 +12,9 @@
|
||||
@screening="goScreening"
|
||||
></top-navigation>
|
||||
</view>
|
||||
<view class="Advertisement" @click="goAdvertisement">
|
||||
<!-- <view class="Advertisement" @click="goAdvertisement">
|
||||
<advertisement></advertisement>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="contentList">
|
||||
<scroll-view
|
||||
show-scrollbar="false"
|
||||
@@ -28,7 +28,13 @@
|
||||
:refresher-triggered="triggered"
|
||||
>
|
||||
<uni-card v-if="list.length !== 0" v-for="(item, index) in list" :key="index">
|
||||
<view class="content-list" @click="goDetail(item)" :style="{ 'border': item.isPin === true ? '2px solid #eeff00' : '2px solid #f5f5f5' }">
|
||||
<view
|
||||
class="content-list"
|
||||
@click="goDetail(item)"
|
||||
:style="{
|
||||
border: item.isPin === true ? '2px solid #eeff00' : '2px solid #f5f5f5',
|
||||
}"
|
||||
>
|
||||
<!-- `````````````````````````` -->
|
||||
<image class="headShot" :src="item.anchorIcon" mode="scaleToFill" />
|
||||
<!-- `````````````````````````````````````` -->
|
||||
@@ -64,7 +70,7 @@
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="tabBar">
|
||||
<tabBar :tabIndex="0"></tabBar>
|
||||
<tabBar :tabIndex="0" @publishSucces="onRefresherRefresh()"></tabBar>
|
||||
</view>
|
||||
<uni-popup ref="popup" position="right">
|
||||
<view class="popup-container">
|
||||
@@ -133,7 +139,7 @@
|
||||
>请填写金币数量</view
|
||||
>
|
||||
</view>
|
||||
<view>_</view>
|
||||
<view class="p-dar">-</view>
|
||||
<view class="p-coin">
|
||||
<view class="p-coin-title">最大金币数</view>
|
||||
<uni-number-box
|
||||
@@ -220,8 +226,12 @@ export default {
|
||||
ConfirmStatus: false, //确认弹窗状态
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
// 页面加载完成后请求数据
|
||||
onShow() {
|
||||
// 页面显示时请求数据
|
||||
this.page = 0;
|
||||
this.list = [];
|
||||
this.MakeAppointmentPKlist = [];
|
||||
this.RealTimePklist = [];
|
||||
this.pkList({ type: 2 });
|
||||
this.pkList({ type: 1 });
|
||||
},
|
||||
@@ -296,29 +306,58 @@ export default {
|
||||
this.list = [];
|
||||
if (this.listtype === 1) {
|
||||
this.MakeAppointmentPKlist = [];
|
||||
this.pkList({
|
||||
let condition = {
|
||||
type: this.listtype,
|
||||
sex: this.genders,
|
||||
coin: {
|
||||
};
|
||||
if (this.genders !== 0) {
|
||||
condition.sex = this.genders;
|
||||
}
|
||||
if (this.minNumberCoins !== "") {
|
||||
condition.coin = {
|
||||
start: this.minNumberCoins,
|
||||
end: this.maxNumberCoins,
|
||||
},
|
||||
country: this.countrys,
|
||||
});
|
||||
};
|
||||
}
|
||||
if (this.maxNumberCoins !== "") {
|
||||
condition.coin.end = this.maxNumberCoins;
|
||||
}
|
||||
if (this.mindatetimesingle !== "") {
|
||||
condition.pkTime = {
|
||||
start: this.mindatetimesingle,
|
||||
};
|
||||
}
|
||||
if (this.maxdatetimesingle !== "") {
|
||||
condition.pkTime.end = this.maxdatetimesingle;
|
||||
}
|
||||
if (this.countrys !== "") {
|
||||
condition.country = this.countrys;
|
||||
}
|
||||
this.pkList(condition);
|
||||
} else {
|
||||
this.RealTimePklist = [];
|
||||
this.pkList({
|
||||
sex: this.genders,
|
||||
coin: {
|
||||
let condition = {};
|
||||
if (this.genders !== 0) {
|
||||
condition.sex = this.genders;
|
||||
}
|
||||
if (this.minNumberCoins !== "") {
|
||||
condition.coin = {
|
||||
start: this.minNumberCoins,
|
||||
end: this.maxNumberCoins,
|
||||
},
|
||||
country: this.countrys,
|
||||
pkTime: {
|
||||
};
|
||||
}
|
||||
if (this.maxNumberCoins !== "") {
|
||||
condition.coin.end = this.maxNumberCoins;
|
||||
}
|
||||
if (this.mindatetimesingle !== "") {
|
||||
condition.pkTime = {
|
||||
start: this.mindatetimesingle,
|
||||
end: this.maxdatetimesingle,
|
||||
},
|
||||
});
|
||||
};
|
||||
}
|
||||
if (this.maxdatetimesingle !== "") {
|
||||
condition.pkTime.end = this.maxdatetimesingle;
|
||||
}
|
||||
if (this.countrys !== "") {
|
||||
condition.country = this.countrys;
|
||||
}
|
||||
this.pkList(condition);
|
||||
}
|
||||
},
|
||||
//清空弹窗
|
||||
@@ -347,16 +386,19 @@ export default {
|
||||
goMakeAppointmentPK() {
|
||||
this.listtype = 1;
|
||||
this.list = this.MakeAppointmentPKlist;
|
||||
this.clear();
|
||||
},
|
||||
//大厅
|
||||
goRealTimePk() {
|
||||
this.listtype = 2;
|
||||
this.list = this.RealTimePklist;
|
||||
this.clear();
|
||||
},
|
||||
goAdvertisement() {
|
||||
// this.$global.lastPage = getCurrentPages().router;
|
||||
uni.navigateTo({ url: "/pages/pkDetail/pkDetail" });
|
||||
},
|
||||
//下拉刷新
|
||||
onRefresherRefresh() {
|
||||
this.page = 0;
|
||||
this.list = [];
|
||||
@@ -440,6 +482,7 @@ export default {
|
||||
formatDate: formatDate,
|
||||
|
||||
async pkList(condition) {
|
||||
console.log(condition);
|
||||
//获取list
|
||||
const res = await request({
|
||||
url: "pk/pkList",
|
||||
@@ -454,6 +497,7 @@ export default {
|
||||
userInfo: false,
|
||||
});
|
||||
if (res.code === 200) {
|
||||
console.log(res.data);
|
||||
this.triggered = false;
|
||||
if (condition.type === 1) {
|
||||
this.MakeAppointmentPKlist.push(...res.data);
|
||||
@@ -513,7 +557,7 @@ export default {
|
||||
}
|
||||
.contentList {
|
||||
position: fixed;
|
||||
top: 412rpx;
|
||||
top: 312rpx;
|
||||
left: 0;
|
||||
bottom: 114.5rpx;
|
||||
width: 100%;
|
||||
@@ -676,6 +720,9 @@ export default {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.p-dar {
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
.p-coin-title {
|
||||
font-size: 20rpx;
|
||||
color: #a3a3a3;
|
||||
|
||||
Reference in New Issue
Block a user