优化页面

This commit is contained in:
pengxiaolong
2025-06-06 22:36:41 +08:00
parent f4901f1312
commit d30589fd05
99 changed files with 1091 additions and 1310 deletions

View File

@@ -31,7 +31,7 @@
mode="scaleToFill"
/>
</view>
<view class="age"> 21 </view>
<view class="age"> {{ item.sex === '1'? '男' : '女' }} </view>
</view>
<view class="female" v-else>
@@ -42,7 +42,7 @@
mode="scaleToFill"
/>
</view>
<view class="age"> 21 </view>
<view class="age">{{ item.sex === '2' ? '男' : '女' }}</view>
</view>
</view>
<view class="nation">{{ item.country }}</view>
@@ -73,7 +73,7 @@
</view>
</view>
</view>
<view class="button">
<view class="button" v-if="item.senderId !== id">
<button class="accept" @click="openChat()">聊了个天</button>
<button class="reject" @click="open()">立即邀请</button>
</view>
@@ -81,8 +81,15 @@
</view>
<!-- 弹窗 -->
<uni-popup ref="popup" type="center" border-radius="10px 10px 0 0">
<view class="popup-content">
<view
class="popup-content"
style="
background-image: url(../../static/queryMyCanUsePkbg.png);
background-position: center;
"
>
<view class="popup-title">
<view class="popup-text">请选择您要参与的主播</view>
<scroll-view scroll-y="true" class="scroll">
<!-- <uni-card v-for="(item, index) in list"> -->
<view class="card" v-for="(item, index) in list">
@@ -90,16 +97,24 @@
class="card-content"
@click="Select(item.id, index)"
:style="{
border: selectedId === item.id ? '2px solid red' : '2px solid #afafaf',
background:
selectedId === item.id ? '#f6f6f6' : '#ffffff',
}"
>
<image class="avatar" :src="item.anchorIcon" mode="scaleToFill" />
<view class="Avatarimg">
<image class="avatar" :src="item.anchorIcon" mode="scaleToFill" />
</view>
<view class="NameMoney">
<view class="NameMoney_Name">{{ item.anchorId }}</view>
<view class="TimeMoney">
<view>{{ TimeFormatting(item.pkTime) }}</view>
<view>金币:{{ item.coin }}</view>
<view class="NameMoney_Name">{{ item.anchorId }}</view>
<viewm class="goldnb"
><view class="goldimg"></view>{{ item.coin }}K</viewm
>
</view>
<view class="TimeMoney_Time"
><view class="pkTimeimg"></view
><view>{{ TimeFormatting(item.pkTime) }}</view></view
>
</view>
</view>
</view>
@@ -113,18 +128,15 @@
</view>
</uni-popup>
<NewAddedPk class="createModule" ref="createModule"></NewAddedPk>
<!-- <Recompose ref="createModule" class="createModule" :message="parentMessage"></Recompose> -->
</template>
<script>
import formatDate from "../../components/formatDate.js";
import TimeFormatting from "../../components/TimeFormatting.js";
// import VerifyLogin from "../../components/VerifyLogin.js";
import NewAddedPk from "../../pages/NewAddedPk/NewAddedPk.vue";
import request from "../../components/request.js";
// // import { isEnabledMessageReadReceiptGlobal } from "../../TUIKit/components/TUIChat/utils/utils.js";
// const isEnabledMessageReadReceiptGlobal = require('../../TUIKit/components/TUIChat/utils/utils.js');
// // import OfflinePushInfoManager from "../../TUIKit/components/TUIChat/offlinePushInfoManager/index.js";
// const OfflinePushInfoManager = require('../../TUIKit/components/TUIChat/offlinePushInfoManager/index.js');
// import Recompose from "../Mine/minecomponents/recompose/recompose.vue";
import TUIChatEngine, {
TUIStore,
StoreName,
@@ -141,6 +153,7 @@ export default {
InvitingPartyEventindex: null,
chatInfo: {},
currentConversation: null,
// parentMessage: null,
};
},
onLoad(options) {
@@ -166,6 +179,11 @@ export default {
});
},
methods: {
//修改信息
// onRecompose(item) {
// this.parentMessage = item;
// this.createModule.open();
// },
formatDate: formatDate,
TimeFormatting: TimeFormatting,
Select(id, index) {
@@ -189,13 +207,13 @@ export default {
this.userlist();
},
invite() {
// if (this.item.pkTime !== this.list[this.InvitingPartyEventindex].pkTime) {
// uni.showToast({
// icon: "none",
// title: "请保持时间一致",
// });
// return;
// }
if (this.item.pkTime !== this.list[this.InvitingPartyEventindex].pkTime) {
uni.showToast({
icon: "none",
title: "请保持时间一致",
});
return;
}
// 发送邀请消息
const conversationID = `C2C${this.item.senderId}`;
const myitem = JSON.stringify(this.list[this.InvitingPartyEventindex]);
@@ -260,9 +278,9 @@ export default {
<style scoped>
.popup-content {
width: 500rpx;
width: 600rpx;
height: 700rpx;
background-color: #fff;
background-repeat: no-repeat;
border-radius: 10px;
display: flex;
flex-direction: column;
@@ -280,26 +298,38 @@ export default {
margin-top: 50rpx;
}
.invite {
width: 200rpx;
height: 80rpx;
font-size: 30rpx;
width: 225.19rpx;
height: 78.24rpx;
font-size: 28.63rpx;
line-height: 80rpx;
border-radius: 20rpx;
background-color: #1aff0087;
border-top-left-radius: 50rpx;
border-bottom-left-radius: 50rpx;
border-bottom-right-radius: 50rpx;
background-image: linear-gradient(135deg, #4fcacd, #5fdbde);
}
.cancel {
width: 200rpx;
height: 80rpx;
font-size: 30rpx;
width: 225.19rpx;
height: 78.24rpx;
font-size: 28.63rpx;
line-height: 80rpx;
margin-left: 30rpx;
border-radius: 20rpx;
color: #03aba8;
border-top-left-radius: 50rpx;
border-bottom-left-radius: 50rpx;
border-bottom-right-radius: 50rpx;
border: 1rpx solid #03aba8;
}
.scroll {
width: 470rpx;
height: 500rpx;
border: 2px solid #afafaf;
height: 400rpx;
border-radius: 10px;
/* background-color: #fff; */
}
.popup-text {
color: #161616;
font-size: 36.26rpx;
font-weight: bold;
margin-bottom: 30rpx;
}
.card {
margin-top: 10rpx;
@@ -307,10 +337,12 @@ export default {
}
.card-content {
width: 445rpx;
height: 75rpx;
height: 100rpx;
background-color: #ffffff;
/* border: 2px solid #afafaf; */
border-radius: 10px;
border-radius: 10rpx;
display: flex;
align-items: center;
font-size: 28rpx;
color: rgb(127, 127, 127);
}
@@ -321,15 +353,46 @@ export default {
z-index: 998;
width: 100vw;
}
.Avatarimg {
width: 90rpx;
height: 90rpx;
border-radius: 50%;
background-color: #dddddd;
margin-right: 20rpx;
margin-left: 20rpx;
}
.avatar {
width: 60rpx;
height: 60rpx;
width: 100%;
height: 100%;
border-radius: 50%;
}
.TimeMoney {
width: 300rpx;
display: flex;
justify-content: space-between;
font-weight: bold;
font-size: 27rpx;
color: #161616;
}
.goldnb {
display: flex;
margin-left: 40rpx;
}
.TimeMoney_Time {
display: flex;
margin-top: 13rpx;
}
.pkTimeimg {
background-image: url(../../static/time.png);
background-size: 100% 100%;
width: 31.49rpx;
height: 31.49rpx;
margin-right: 20rpx;
}
.goldimg {
background-image: url(../../static/species.png);
background-size: 100% 100%;
width: 31.49rpx;
height: 35rpx;
}
.NameMoney {
display: flex;
@@ -337,6 +400,9 @@ export default {
}
.NameMoney_Name {
text-align: left;
font-weight: bold;
font-size: 27rpx;
color: #161616;
}
.background {
position: fixed;