优化页面

This commit is contained in:
pengxiaolong
2025-06-09 19:18:38 +08:00
parent d30589fd05
commit c5042d08c3
811 changed files with 2799 additions and 503 deletions

View File

@@ -199,10 +199,14 @@ export default {
this.triggered = false;
if (condition.type === 1) {
this.MakeAppointmentPKlist.push(...res.data);
this.list = this.MakeAppointmentPKlist;
if (condition.type == this.listtype) {
this.list = this.MakeAppointmentPKlist;
}
} else {
this.RealTimePklist.push(...res.data);
this.list = this.RealTimePklist;
if (condition.type == this.listtype) {
this.list = this.RealTimePklist;
}
}
}
}

View File

@@ -6,7 +6,7 @@
<view class="PersonalInformation">
<view class="header">
<image :src="userinfo.headerIcon" mode="scaleToFill" class="headerIcon" />
<image :src="userinfo.headerIcon" style="width: 144.5rpx; height: 144.5rpx; border-radius: 72.25rpx;" mode="scaleToFill" class="headerIcon" />
</view>
<view>
<view class="name">{{ userinfo.nickName }}</view>
@@ -33,7 +33,7 @@
<view class="card">
<view class="cardContent" v-for="(item,index) in pkInformationdata" :key="index">
<view class="cardImg">
<image :src="item.anchorIcon" mode="scaleToFill" />
<image :src="item.anchorIcon" style="width: 80rpx; height: 80rpx; border-radius: 72.25rpx;" mode="scaleToFill" />
</view>
<view class="Time">{{ formatDate(item.pkTime) }}</view>
<view class="gold"> {{item.coin}}K</view>
@@ -56,7 +56,7 @@
<view class="card">
<view class="cardContent"v-for="(item,index) in myPkRecorddata" :key="index">
<view class="cardImg">
<image :src="item.anchorIconA" mode="scaleToFill" />
<image style="width: 80rpx; height: 80rpx;border-radius: 72.25rpx;" :src="item.anchorIconA" mode="scaleToFill" />
</view>
<view class="Failure"v-if="item.winnerAnchorId !== item.anchorIdA">
失败
@@ -116,6 +116,7 @@ import tabBar from "../../components/tabBar/tabBar";
import request from "../../components/request.js";
import formatDate from "../../components/formatDate.js";
import TimeFormatting from "../../components/TimeFormatting.js";
import { TUILogin } from "@tencentcloud/tui-core";
export default {
data() {
@@ -149,7 +150,7 @@ export default {
page:0,
size:4
},
userInfo: false,
userInfo: true,
}).then((res) => {
if (res.code == 200) {
this.pkInformationdata = res.data;
@@ -211,8 +212,9 @@ export default {
});
},
// 退出登录
logout() {
logout(){
uni.clearStorage()
TUILogin.logout;
uni.reLaunch({
url: "/pages/login/login",
});

View File

@@ -20,7 +20,7 @@
>
<uni-card class="card" v-for="(item, index) in pkList" :key="index">
<view class="Profile">
<image style="width: 89.12rpx; height: 89.12rpx" src="" mode="scaleToFill" />
<image :src="item.anchorIcon" style="width: 89.12rpx; height: 89.12rpx;border-radius: 72.25rpx;" mode="scaleToFill" />
</view>
<view class="Individual">
<view class="Name">{{ item.anchorId }}</view>
@@ -63,8 +63,8 @@
</view>
<view class="time">PK时间:{{ formatDate(item.pkTime) }}</view>
</view>
<view class="handle">
<!-- <view class="handle" v-if="item.status === 0"> -->
<!-- <view class="handle"> -->
<view class="handle" v-if="item.inviteStatus === 0">
<view class="recompose" @click="onRecompose(item)">
<image
style="width: 46rpx; height: 46rpx"
@@ -148,7 +148,7 @@ export default {
page: this.page,
size: 10,
},
userInfo: false,
userInfo: true,
}).then((res) => {
if (res.code == 200) {
this.pkList.push(...res.data);
@@ -170,7 +170,7 @@ export default {
data: {
id: item.id,
},
userInfo: false,
userInfo: true,
}).then((res) => {
if (res.code == 200) {
uni.showToast({

View File

@@ -29,7 +29,7 @@
@blur="blur"
/>
<view v-if="nameAnchor === '' && Hint === true" class="Hint"
>填写主播名称</view
>检查主播名称是否正确</view
>
</view>
@@ -207,21 +207,37 @@ export default {
blur(event){
if(this.nameAnchor !== event.target.value){
this.nameAnchor = event.target.value;
uni.showLoading({
title: "正在验证主播",
mask: true,
});
uni.request({
url: "http://47.79.98.113:6600/"+this.nameAnchor,
success:(res)=>{
if (res.data.code === 200) {
uni.hideLoading();
uni.showToast({
title: "查询成功",
icon: "none",
duration: 3000,
})
this.AnchorProfilePicture = res.data.data;
}else {
uni.hideLoading();
uni.showToast({
title: "主播不存在请确认主播名称",
title: "未查询到该主播",
icon: "none",
duration: 2000,
duration: 3000,
})
}
},
fail: function (res) {
console.log("请求失败", res.data);
uni.hideLoading();
uni.showToast({
title: "网络请求失败",
icon: "none",
duration: 3000,
})
},
});
}else{
@@ -236,7 +252,8 @@ export default {
this.numberCoins === "" ||
this.countrys === "" ||
this.datetimesingle === "" ||
this.session === ""
this.session === ""||
this.AnchorProfilePicture === ""
) {
this.Hint = true;
return;
@@ -288,6 +305,7 @@ export default {
this.remarks = "";
this.datetimesingle = "";
this.session = "";
this.AnchorProfilePicture = "";
uni.hideLoading();
uni.showToast({
title: "发布成功",

View File

@@ -134,10 +134,12 @@
</view>
</view>
<view class="button">
<view class="button" v-if="PkIDInfodata.pkStatus === 0">
<button class="accept" @click="operation(1)">接受邀请</button>
<button class="reject" @click="operation(2)">拒绝邀请</button>
</view>
<view v-if="PkIDInfodata.pkStatus === 1" class="button buttontext">已接受邀请</view>
<view v-if="PkIDInfodata.pkStatus === 2" class="button buttontext">已拒绝邀请</view>
</view>
</view>
</template>
@@ -151,14 +153,30 @@ export default {
customData: {},
SenderData: {},
ReceiverData: {},
PkIDInfodata: {},
};
},
onLoad(options) {
this.customData = JSON.parse(options.customData);
this.getPkyourInfo();
this.getPkmineInfo();
this.getPkIDInfo();
},
methods: {
//根据当前消息ID查询pk信息
async getPkIDInfo() {
const res = await request({
url: "pk/singleRecord",
method: "POST",
data: {
id: this.customData.id,
},
userInfo: true
}).then((res) => {
this.PkIDInfodata = res.data;
console.log(this.PkIDInfodata);
});
},
//发布者
async getPkyourInfo() {
const res = await request({
@@ -167,7 +185,7 @@ export default {
data: {
id: this.customData.pkIdA,
},
userInfo: false,
userInfo: true,
}).then((res) => {
this.SenderData = res.data;
console.log(this.SenderData);
@@ -181,7 +199,7 @@ export default {
data: {
id: this.customData.pkIdB,
},
userInfo: false,
userInfo: true,
}).then((res) => {
this.ReceiverData = res.data;
console.log(this.ReceiverData);
@@ -202,19 +220,15 @@ export default {
url: "pk/updatePkStatus",
method: "POST",
data: {
pkIdA: this.customData.pkIdA,
pkIdB: this.customData.pkIdB,
userIdA: this.customData.userIdA,
userIdB: this.customData.userIdB,
pkTime: this.customData.pkTime,
pkNumber: this.customData.pkNumber,
id: this.customData.id,
pkStatus: status,
},
userInfo: false,
userInfo: true,
}).then((res) => {
console.log(res.data);
const Hinttext = status === 1 ? "接受邀请成功" : "拒绝邀请成功";
if (res.code === 200) {
this.getPkIDInfo()
wx.showToast({
title: Hinttext,
icon: "success",
@@ -392,6 +406,12 @@ export default {
align-items: center;
margin-top: 150rpx;
}
.buttontext{
font-size: 40rpx;
color: #666666;
font-weight: bold;
}
.accept {
width: 325.38rpx;
height: 77.29rpx;

View File

@@ -89,7 +89,7 @@ export default {
nickName: this.name,
usersig: this.userSig.userSig,
},
userInfo: false,
userInfo: true,
});
if (res.code === 200) {
uni.showToast({

View File

@@ -103,7 +103,7 @@ export default {
icon: "success",
});
uni.setStorageSync("userinfo", res.data.info);
counter.$patch({ myitem:this.info.data.info })
counter.$patch({ myitem:res.data.info })
uni.hideLoading();
//```````````````````````````````````````````````````````````````````````登录成功后跳转回原页面 或 首页
uni.reLaunch({