优化页面

This commit is contained in:
pengxiaolong
2025-06-03 22:12:34 +08:00
parent 050ceedd59
commit a40b5b88c9
48 changed files with 1656 additions and 624 deletions

View File

@@ -1,39 +1,83 @@
<template>
<view class="Navigation">
<image
src="../../static/Navigationimg.png"
mode="scaleToFill"
class="Navigationimg"
/>
<image
@click="Returnfunc"
src="../../static/Return.png"
mode="scaleToFill"
class="Return"
/>
</view>
<view class="container">
<view class="individual">
<view class="anchor">
<!-- <image
src="{{item.anchorIcon}}"
mode="scaleToFill"
/> -->
</view>
<view>
<view>主播名称{{ item.anchorId }}</view>
<view>主播性别{{ item.sex === 1 ? "男" : "女" }}</view>
<view> 国家{{ item.country }}</view>
<view class="background">
<image
style="width: 100%; height: 100%"
src="../../static/HomeBackground.png"
mode="scaleToFill"
/>
</view>
<view class="Navigation">
<view class="Return" @click="Returnfunc">
<image class="Return" src="../../static/Return.png" mode="scaleToFill" />
</view>
</view>
<view>pk场数:3</view>
<view>金币{{ item.coin }}</view>
<view>PK时间{{ formatDate(item.pkTime) }}</view>
<view>pk场数</view>
<view class="Content">
<!-- 发布者 -->
<view class="sender">
<view class="sengderIcon">
<image class="Icon" :src="item.anchorIcon" mode="scaleToFill" />
</view>
<view>主播备注{{ item.remark }}</view>
<button @click="openChat()">聊了个天</button>
<button @click="open()">立即邀请PK</button>
<view class="Individual">
<view class="name">{{ item.anchorId }}</view>
<view class="GenderAndAge">
<view class="male" v-if="item.sex === '1'">
<view>
<image
style="width: 20rpx; height: 20rpx"
src="../../static/male.png"
mode="scaleToFill"
/>
</view>
<view class="age"> 21 </view>
</view>
<view class="female" v-else>
<view>
<image
style="width: 20rpx; height: 20rpx"
src="../../static/female.png"
mode="scaleToFill"
/>
</view>
<view class="age"> 21 </view>
</view>
</view>
<view class="nation">{{ item.country }}</view>
</view>
<view class="Time">PK时间:{{ formatDate(item.pkTime) }}</view>
<view class="SessionAndGoldCoin">
<view class="goldCoin">
<image
style="width: 72rpx; height: 72rpx; margin-left: 36rpx; margin-right: 32rpx"
src="../../static/gold.png"
mode="scaleToFill"
/>
<view class="goldcard">
<view class="goldnumber">{{ item.coin }}</view>
<view class="goldtext">金币</view>
</view>
</view>
<view class="Session">
<image
style="width: 72rpx; height: 72rpx; margin-left: 36rpx; margin-right: 32rpx"
src="../../static/session.png"
mode="scaleToFill"
/>
<view class="goldcard">
<view class="goldnumber">{{ item.pkNumber }}</view>
<view class="goldtext">PK场数</view>
</view>
</view>
</view>
</view>
<view class="button">
<button class="accept" @click="openChat()">聊了个天</button>
<button class="reject" @click="open()">立即邀请</button>
</view>
</view>
</view>
<!-- 弹窗 -->
<uni-popup ref="popup" type="center" border-radius="10px 10px 0 0">
@@ -145,7 +189,6 @@ export default {
this.userlist();
},
invite() {
// if (this.item.pkTime !== this.list[this.InvitingPartyEventindex].pkTime) {
// uni.showToast({
// icon: "none",
@@ -216,43 +259,6 @@ export default {
</script>
<style scoped>
/* 样式定义 */
.Navigation {
position: fixed;
top: 0;
left: 0;
right: 0;
height: 200rpx;
}
.Navigationimg {
width: 100%;
height: 100%;
}
.Return {
position: absolute;
left: 60rpx;
bottom: 40rpx;
width: 60rpx;
height: 60rpx;
}
.container {
position: absolute;
top: 200rpx;
left: 0;
right: 0;
bottom: 0;
}
.individual {
display: flex;
/* justify-content: center; */
margin-top: 50rpx;
}
.anchor {
width: 200rpx;
height: 200rpx;
background-color: rgba(0, 0, 255, 0.369);
border-radius: 50%;
}
.popup-content {
width: 500rpx;
height: 700rpx;
@@ -332,4 +338,180 @@ export default {
.NameMoney_Name {
text-align: left;
}
.background {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: -1;
}
.Navigation {
position: fixed;
top: 0;
left: 0;
right: 0;
height: 200rpx;
display: flex;
align-items: center;
padding: 0 60rpx;
z-index: 1;
}
.Return {
width: 60rpx;
height: 60rpx;
margin-top: 20rpx;
}
.Content {
position: absolute;
top: 200rpx;
left: 0;
right: 0;
bottom: 0;
display: flex;
flex-direction: column;
align-items: center;
}
.sender {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
margin-top: 80rpx;
}
.sengderIcon {
width: 150rpx;
height: 150rpx;
border-radius: 50%;
background-color: #fff;
display: flex;
justify-content: center;
align-items: center;
}
.Icon {
width: 100%;
height: 100%;
border-radius: 50%;
}
.Individual {
display: flex;
justify-content: center;
align-items: center;
margin-top: 34.35rpx;
}
.name {
font-size: 30.53rpx;
color: #161616;
margin-right: 16.22rpx;
}
.nation {
width: 56.3rpx;
height: 29.58rpx;
font-size: 17.18rpx;
color: #666666;
text-align: center;
line-height: 29.58rpx;
background-color: #fff;
border-radius: 50rpx;
padding: 6rpx 12rpx;
display: flex;
justify-content: center;
align-items: center;
}
.male {
width: 56.3rpx;
height: 29.58rpx;
background-color: #5bced1;
border-radius: 50rpx;
display: flex;
justify-content: center;
align-items: center;
padding: 6rpx 12rpx;
margin-right: 12rpx;
}
.female {
width: 56.3rpx;
height: 29.58rpx;
background-color: #f3876f;
border-radius: 50rpx;
display: flex;
justify-content: center;
align-items: center;
padding: 6rpx 12rpx;
margin-right: 12rpx;
}
.age {
font-size: 17.18rpx;
color: #fff;
margin-left: 4rpx;
}
.Time {
color: #666666;
font-size: 26.72rpx;
margin-top: 48.7rpx;
}
.goldCoin {
background-image: url("../../static/Backgroundofgoldcoins.png");
width: 334.83rpx;
height: 124.05rpx;
margin-right: 21rpx;
display: flex;
align-items: center;
}
.Session {
background-image: url("../../static/Fieldnumberbackground.png");
width: 334.83rpx;
height: 124.05rpx;
display: flex;
align-items: center;
}
.SessionAndGoldCoin {
display: flex;
justify-content: center;
align-items: center;
margin-top: 60rpx;
display: flex;
justify-content: center;
}
.goldtext {
font-size: 28.63rpx;
color: #929292;
}
.goldnumber {
font-size: 34.35rpx;
color: #161616;
font-weight: bold;
}
.goldcard {
display: flex;
flex-direction: column;
align-items: center;
}
.button {
display: flex;
justify-content: center;
align-items: center;
margin-top: 645rpx;
}
.accept {
width: 325.38rpx;
height: 77.29rpx;
margin-right: 35.5rpx;
border-radius: 50rpx;
background-color: #fff;
border: 1rpx solid #03aba8;
color: #03aba8;
font-size: 28.63rpx;
line-height: 77.29rpx;
}
.reject {
width: 325.38rpx;
height: 77.29rpx;
border-radius: 50rpx;
background-color: #03aba8;
border: 1rpx solid #03aba8;
color: #fff;
font-size: 28.63rpx;
line-height: 77.29rpx;
}
</style>