优化页面

This commit is contained in:
pengxiaolong
2025-06-20 21:55:09 +08:00
parent 2afc95d531
commit acc81963e9
405 changed files with 1362 additions and 1284 deletions

View File

@@ -98,47 +98,48 @@
<view class="popup-title">
<view class="popup-text">点击选择您要参与的主播</view>
<view v-if="list.length !== 0">
<scroll-view show-scrollbar="false" scroll-y="true" class="scroll">
<view class="card" v-for="(item, index) in list" :key="index">
<view
class="card-content"
@click="Select(item.id, index)"
:style="{
background: selectedId === item.id ? '#b8ff8c74' : '#ffffff',
}"
>
<view class="Avatarimg">
<image class="avatar" :src="item.anchorIcon" mode="scaleToFill" />
</view>
<view class="NameMoney">
<view class="TimeMoney">
<view class="NameMoney_Name">{{ item.anchorId }}</view>
<scroll-view show-scrollbar="false" scroll-y="true" class="scroll">
<view class="card" v-for="(item, index) in list" :key="index">
<view
class="card-content"
@click="Select(item.id, index)"
:style="{
background: selectedId === item.id ? '#b8ff8c74' : '#ffffff',
}"
>
<view class="Avatarimg">
<image class="avatar" :src="item.anchorIcon" mode="scaleToFill" />
</view>
<view class="TimeMoney_Time">
<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 class="NameMoney">
<view class="TimeMoney">
<view class="NameMoney_Name">{{ item.anchorId }}</view>
</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 class="TimeMoney_Time">
<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 class="goldnb">{{ item.coin }}K</view>
</view>
</view>
</view>
</view>
</scroll-view>
</view>
<view class="noData" v-if="list.length === 0">您还没有可参与的主播PK快去新建一个吧</view>
</scroll-view>
</view>
<view class="noData" v-if="list.length === 0"
>您还没有可参与的主播PK快去新建一个吧</view
>
</view>
<view class="popup-btn">
<button class="invite" type="primary" @click="invite()">邀请</button>
@@ -148,6 +149,16 @@
</uni-popup>
<NewAddedPk class="createModule" ref="createModule"></NewAddedPk>
<!-- <Recompose ref="createModule" class="createModule" :message="parentMessage"></Recompose> -->
<uni-popup ref="popups" type="center" border-radius="10px 10px 0 0">
<view class="popup-Hintcontent">
<view class="popup-text">提示</view>
<view class="popup-texts">邀请成功后的pk不可修改不可删除请谨慎操作</view>
<view class="popup-btn">
<button class="invite" type="primary" @click="inviteHint()">确认</button>
<button class="cancel" type="default" @click="closeHint()">取消</button>
</view>
</view>
</uni-popup>
</template>
<script>
@@ -228,22 +239,30 @@ export default {
this.userlist();
},
invite() {
// if (this.item.pkTime !== this.list[this.InvitingPartyEventindex].pkTime) {
// uni.showToast({
// icon: "none",
// title: "请保持时间一致",
// });
// return;
// }
// 发送邀请消息
if (this.InvitingPartyEventindex === null) {
uni.showToast({
title: "请选择您要参与的PK信息",
icon: "none",
duration: 2000,
});
return;
}
this.$refs.popups.open("center");
},
closeHint(){
this.$refs.popups.close();
},
inviteHint(){
this.$refs.popups.close();
// 发送邀请消息
const conversationID = `C2C${this.item.senderId}`;
const myitem = JSON.stringify(this.list[this.InvitingPartyEventindex]);
const youritem = JSON.stringify(this.item);
uni.redirectTo({
url: `/TUIKit/components/TUIChat/index?conversationID=${conversationID}&myitem=${myitem}&youritem=${youritem}`,
});
/////////
},
// 打开邀请弹窗
close() {
this.$refs.popup.close();
},
@@ -312,6 +331,18 @@ export default {
background-image: url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/chard1.png);
background-position: center;
}
.popup-Hintcontent{
width: 600rpx;
height: 500rpx;
background-repeat: no-repeat;
border-radius: 10px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background-image: url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/chard1.png);
background-position: center;
}
.popup-title {
font-size: 30rpx;
margin-top: 50rpx;
@@ -356,6 +387,14 @@ export default {
font-weight: bold;
margin-bottom: 30rpx;
}
.popup-texts{
margin-left: 50rpx;
color: #7e7e7e;
font-size: 26rpx;
margin-right: 50rpx;
margin-top: 70rpx;
margin-bottom: 70rpx;
}
.card-content {
/* width: 445rpx; */
width: 100%;
@@ -612,7 +651,7 @@ export default {
font-size: 28.63rpx;
line-height: 77.29rpx;
}
.noData{
.noData {
width: 500rpx;
height: 400rpx;
border-radius: 10px;