优化页面

This commit is contained in:
pengxiaolong
2025-06-18 22:04:59 +08:00
parent ec9dcb486f
commit b73ddb0370
52 changed files with 268 additions and 140 deletions

View File

@@ -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;

View File

@@ -26,6 +26,7 @@
lower-threshold="100"
@scrolltolower="onScrollToLower"
:refresher-triggered="triggered"
v-if="pointslist.length!= 0"
>
<uni-card class="card" v-for="(item, index) in pointslist" :key="index" >
<view
@@ -40,6 +41,7 @@
</view>
</uni-card>
</scroll-view>
<view v-if="pointslist.length == 0" class="empty">暂无积分记录</view>
</view>
</view>
</template>
@@ -153,6 +155,14 @@ export default {
height: 100%;
width: 750rpx;
}
.empty{
height: 100%;
width: 750rpx;
line-height: 1200rpx;
text-align: center;
font-size: 28rpx;
color: #898989;
}
.card-content {
display: flex;
justify-content: space-between;

View File

@@ -162,7 +162,7 @@
<!-- 弹窗 -->
<uni-popup ref="popup" type="center" border-radius="10px 10px 0 0">
<view class="popup-container">
<view class="popup-title">选择我的主播</view>
<view class="popup-title">点击选择我的主播</view>
<scroll-view
show-scrollbar="false"
scroll-y="true"
@@ -175,7 +175,7 @@
class="card-content"
@click="Select(item.id, item)"
:style="{
background: selectedId === item.id ? '#f6f6f6' : '#ffffff',
background: selectedId === item.id ? '#b8ff8c74' : '#ffffff',
}"
>
<view class="Avatarimg">

View File

@@ -148,7 +148,7 @@
<!-- 弹窗 -->
<uni-popup ref="popup" type="center" border-radius="10px 10px 0 0">
<view class="popup-container">
<view class="popup-title">选择我的主播</view>
<view class="popup-title">点击选择我的主播</view>
<scroll-view show-scrollbar="false" scroll-y="true" class="scroll" v-if="AnchorList.length !== 0">
<!-- -->
<view class="card" v-for="(item, index) in AnchorList" :key="index">
@@ -156,7 +156,7 @@
class="card-content"
@click="Select(item.id, item)"
:style="{
background: selectedId === item.id ? '#f6f6f6' : '#ffffff',
background: selectedId === item.id ? '#b8ff8c74' : '#ffffff',
}"
>
<view class="Avatarimg">
@@ -423,6 +423,7 @@ export default {
icon: "success",
duration: 2000,
});
this.$emit('publishSuccess');
} else {
uni.hideLoading();
uni.showToast({

View File

@@ -96,7 +96,7 @@
<uni-popup ref="popup" type="center" border-radius="10px 10px 0 0">
<view class="popup-content">
<view class="popup-title">
<view class="popup-text">选择您要参与的主播</view>
<view class="popup-text">点击选择您要参与的主播</view>
<view v-if="list.length !== 0">
<scroll-view show-scrollbar="false" scroll-y="true" class="scroll">
@@ -105,7 +105,7 @@
class="card-content"
@click="Select(item.id, index)"
:style="{
background: selectedId === item.id ? '#f6f6f6' : '#ffffff',
background: selectedId === item.id ? '#b8ff8c74' : '#ffffff',
}"
>
<view class="Avatarimg">
@@ -116,11 +116,22 @@
<view class="NameMoney_Name">{{ item.anchorId }}</view>
</view>
<view class="TimeMoney_Time">
<view class="pkTimeimg"></view
><view>{{ TimeFormatting(item.pkTime) }}</view>
<viewm class="goldnb"
><view class="goldimg"></view>{{ item.coin }}K</viewm
>
<view class="pkTimeimg">
<image
style="width:31.49rpx; height:31.49rpx;margin-top:3rpx"
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/time.png"
mode="scaleToFill"
/>
</view>
<view>{{ TimeFormatting(item.pkTime) }}</view>
<view class="goldimg">
<image
style="width:31.49rpx; height:31.49rpx;margin-top:4rpx"
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/species.png"
mode="scaleToFill"
/>
</view>
<view class="goldnb">{{ item.coin }}K</view>
</view>
</view>
</view>
@@ -356,6 +367,7 @@ export default {
align-items: center;
font-size: 28rpx;
color: rgb(127, 127, 127);
margin-top: 20rpx;
}
.createModule {
position: fixed;
@@ -386,24 +398,22 @@ export default {
}
.goldnb {
display: flex;
margin-left: 40rpx;
margin-left: 5rpx;
}
.TimeMoney_Time {
display: flex;
margin-top: 13rpx;
align-items: center;
margin-top: 10rpx;
}
.pkTimeimg {
background-image: url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/time.png);
background-size: 100% 100%;
width: 31.49rpx;
height: 31.49rpx;
margin-right: 20rpx;
margin-right: 10rpx;
}
.goldimg {
background-image: url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/species.png);
background-size: 100% 100%;
width: 31.49rpx;
height: 35rpx;
margin-left: 40rpx;
}
.NameMoney {
display: flex;