优化页面

This commit is contained in:
pengxiaolong
2025-06-11 22:16:44 +08:00
parent 3c2d7e5959
commit 931d867c09
806 changed files with 87462 additions and 331 deletions

View File

@@ -0,0 +1,152 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const components_request = require("../../components/request.js");
const components_formatDate = require("../../components/formatDate.js");
const _sfc_main = {
data() {
return {
customData: {},
SenderData: {},
ReceiverData: {},
PkIDInfodata: {},
id: ""
};
},
onLoad(options) {
common_vendor.index.getStorage({
key: "userinfo",
success: (res) => {
this.id = res.data.id;
}
});
this.customData = JSON.parse(options.customData);
this.getPkyourInfo();
this.getPkmineInfo();
this.getPkIDInfo();
},
methods: {
//根据当前消息ID查询pk信息
async getPkIDInfo() {
await components_request.request({
url: "pk/singleRecord",
method: "POST",
data: {
id: this.customData.id
},
userInfo: true
}).then((res) => {
this.PkIDInfodata = res.data;
common_vendor.index.__f__("log", "at pages/PKMessageprocessing/PKMessageprocessing.vue:185", this.PkIDInfodata);
});
},
//发布者
async getPkyourInfo() {
await components_request.request({
url: "pk/pkInfoDetail",
method: "POST",
data: {
id: this.customData.pkIdA
},
userInfo: true
}).then((res) => {
this.SenderData = res.data;
common_vendor.index.__f__("log", "at pages/PKMessageprocessing/PKMessageprocessing.vue:199", this.SenderData);
});
},
//被邀请者
async getPkmineInfo() {
await components_request.request({
url: "pk/pkInfoDetail",
method: "POST",
data: {
id: this.customData.pkIdB
},
userInfo: true
}).then((res) => {
this.ReceiverData = res.data;
common_vendor.index.__f__("log", "at pages/PKMessageprocessing/PKMessageprocessing.vue:213", this.ReceiverData);
});
},
goBack() {
common_vendor.wx$1.navigateBack({
delta: 1
});
},
formatDate: components_formatDate.formatDate,
async operation(status) {
common_vendor.index.__f__("log", "at pages/PKMessageprocessing/PKMessageprocessing.vue:224", "``````", this.customData);
common_vendor.index.__f__("log", "at pages/PKMessageprocessing/PKMessageprocessing.vue:225", status);
await components_request.request({
url: "pk/updatePkStatus",
method: "POST",
data: {
id: this.customData.id,
pkStatus: status
},
userInfo: true
}).then((res) => {
common_vendor.index.__f__("log", "at pages/PKMessageprocessing/PKMessageprocessing.vue:236", res.data);
const Hinttext = status === 1 ? "接受邀请成功" : "拒绝邀请成功";
if (res.code === 200) {
this.getPkIDInfo();
common_vendor.wx$1.showToast({
title: Hinttext,
icon: "success",
duration: 2e3
});
common_vendor.wx$1.navigateBack({
delta: 1
});
} else {
common_vendor.wx$1.showToast({
title: "操作失败",
icon: "none",
duration: 2e3
});
}
});
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: common_vendor.o$1((...args) => $options.goBack && $options.goBack(...args)),
b: $data.SenderData.anchorIcon,
c: common_vendor.t($data.SenderData.anchorId),
d: $data.SenderData.sex === "1"
}, $data.SenderData.sex === "1" ? {
e: common_vendor.t($data.SenderData.sex == 1 ? "男" : "女")
} : {
f: common_vendor.t($data.SenderData.sex == 1 ? "男" : "女")
}, {
g: common_vendor.t($data.SenderData.country),
h: common_vendor.t($options.formatDate($data.SenderData.pkTime)),
i: common_vendor.t($data.SenderData.coin),
j: common_vendor.t($data.SenderData.pkNumber),
k: $data.ReceiverData.anchorIcon,
l: common_vendor.t($data.ReceiverData.anchorId),
m: $data.ReceiverData.sex === "1"
}, $data.ReceiverData.sex === "1" ? {
n: common_vendor.t($data.ReceiverData.sex == 1 ? "男" : "女")
} : {
o: common_vendor.t($data.ReceiverData.sex == 1 ? "男" : "女")
}, {
p: common_vendor.t($data.ReceiverData.country),
q: common_vendor.t($options.formatDate($data.ReceiverData.pkTime)),
r: common_vendor.t($data.ReceiverData.coin),
s: common_vendor.t($data.ReceiverData.pkNumber),
t: $data.PkIDInfodata.pkStatus === 0 && $data.ReceiverData.senderId !== $data.id
}, $data.PkIDInfodata.pkStatus === 0 && $data.ReceiverData.senderId !== $data.id ? {
v: common_vendor.o$1(($event) => $options.operation(1)),
w: common_vendor.o$1(($event) => $options.operation(2))
} : {}, {
x: $data.ReceiverData.senderId === $data.id && $data.PkIDInfodata.pkStatus === 0
}, $data.ReceiverData.senderId === $data.id && $data.PkIDInfodata.pkStatus === 0 ? {} : {}, {
y: $data.PkIDInfodata.pkStatus === 1
}, $data.PkIDInfodata.pkStatus === 1 ? {} : {}, {
z: $data.PkIDInfodata.pkStatus === 2
}, $data.PkIDInfodata.pkStatus === 2 ? {} : {});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-cadadfe7"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/PKMessageprocessing/PKMessageprocessing.js.map

View File

@@ -0,0 +1,4 @@
{
"navigationBarTitleText": "PK信息处理",
"usingComponents": {}
}

View File

@@ -0,0 +1 @@
<view class="container data-v-cadadfe7"><view class="background data-v-cadadfe7"><image class="data-v-cadadfe7" style="width:100%;height:100%" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/HomeBackground.png" mode="scaleToFill"/></view><view class="Navigation data-v-cadadfe7"><view class="Return data-v-cadadfe7" bindtap="{{a}}"><image class="Return data-v-cadadfe7" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Return.png" mode="scaleToFill"/></view></view><view class="Content data-v-cadadfe7"><view class="sender data-v-cadadfe7"><view class="sengderIcon data-v-cadadfe7"><image class="Icon data-v-cadadfe7" src="{{b}}" mode="scaleToFill"/></view><view class="Individual data-v-cadadfe7"><view class="name data-v-cadadfe7">{{c}}</view><view class="GenderAndAge data-v-cadadfe7"><view wx:if="{{d}}" class="male data-v-cadadfe7"><view class="data-v-cadadfe7"><image class="data-v-cadadfe7" style="width:20rpx;height:20rpx" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/male.png" mode="scaleToFill"/></view><view class="age data-v-cadadfe7">{{e}}</view></view><view wx:else class="female data-v-cadadfe7"><view class="data-v-cadadfe7"><image class="data-v-cadadfe7" style="width:20rpx;height:20rpx" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/female.png" mode="scaleToFill"/></view><view class="age data-v-cadadfe7">{{f}}</view></view></view><view class="nation data-v-cadadfe7">{{g}}</view></view><view class="Time data-v-cadadfe7">PK时间:{{h}}</view><view class="SessionAndGoldCoin data-v-cadadfe7"><view class="goldCoin data-v-cadadfe7"><image class="data-v-cadadfe7" style="width:72rpx;height:72rpx;margin-left:36rpx;margin-right:32rpx" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/gold.png" mode="scaleToFill"/><view class="goldcard data-v-cadadfe7"><view class="goldnumber data-v-cadadfe7">{{i}}</view><view class="goldtext data-v-cadadfe7">金币</view></view></view><view class="Session data-v-cadadfe7"><image class="data-v-cadadfe7" style="width:72rpx;height:72rpx;margin-left:36rpx;margin-right:32rpx" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/session.png" mode="scaleToFill"/><view class="goldcard data-v-cadadfe7"><view class="goldnumber data-v-cadadfe7">{{j}}</view><view class="goldtext data-v-cadadfe7">PK场数</view></view></view></view></view><view class="sender data-v-cadadfe7"><view class="sengderIcon data-v-cadadfe7"><image class="Icon data-v-cadadfe7" src="{{k}}" mode="scaleToFill"/></view><view class="Individual data-v-cadadfe7"><view class="name data-v-cadadfe7">{{l}}</view><view class="GenderAndAge data-v-cadadfe7"><view wx:if="{{m}}" class="male data-v-cadadfe7"><view class="data-v-cadadfe7"><image class="data-v-cadadfe7" style="width:20rpx;height:20rpx" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/male.png" mode="scaleToFill"/></view><view class="age data-v-cadadfe7">{{n}}</view></view><view wx:else class="female data-v-cadadfe7"><view class="data-v-cadadfe7"><image class="data-v-cadadfe7" style="width:20rpx;height:20rpx" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/female.png" mode="scaleToFill"/></view><view class="age data-v-cadadfe7">{{o}}</view></view></view><view class="nation data-v-cadadfe7">{{p}}</view></view><view class="Time data-v-cadadfe7">PK时间:{{q}}</view><view class="SessionAndGoldCoin data-v-cadadfe7"><view class="goldCoin data-v-cadadfe7"><image class="data-v-cadadfe7" style="width:72rpx;height:72rpx;margin-left:36rpx;margin-right:32rpx" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/gold.png" mode="scaleToFill"/><view class="data-v-cadadfe7"><view class="goldnumber data-v-cadadfe7">{{r}}</view><view class="goldtext data-v-cadadfe7">金币</view></view></view><view class="Session data-v-cadadfe7"><image class="data-v-cadadfe7" style="width:72rpx;height:72rpx;margin-left:36rpx;margin-right:32rpx" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/session.png" mode="scaleToFill"/><view class="data-v-cadadfe7"><view class="goldnumber data-v-cadadfe7">{{s}}</view><view class="goldtext data-v-cadadfe7">PK场数</view></view></view></view></view><view wx:if="{{t}}" class="button data-v-cadadfe7"><button class="accept data-v-cadadfe7" bindtap="{{v}}">接受邀请</button><button class="reject data-v-cadadfe7" bindtap="{{w}}">拒绝邀请</button></view><view wx:if="{{x}}" class="button buttontext data-v-cadadfe7">等待对方接受邀请</view><view wx:if="{{y}}" class="button buttontext data-v-cadadfe7">已接受邀请</view><view wx:if="{{z}}" class="button buttontext data-v-cadadfe7">已拒绝邀请</view></view></view>

View File

@@ -0,0 +1,182 @@
.background.data-v-cadadfe7 {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: -1;
}
.Navigation.data-v-cadadfe7 {
position: fixed;
top: 0;
left: 0;
right: 0;
height: 200rpx;
display: flex;
align-items: center;
padding: 0 60rpx;
z-index: 1;
}
.Return.data-v-cadadfe7 {
width: 60rpx;
height: 60rpx;
margin-top: 20rpx;
}
.Content.data-v-cadadfe7 {
position: absolute;
top: 200rpx;
left: 0;
right: 0;
bottom: 0;
display: flex;
flex-direction: column;
align-items: center;
}
.sender.data-v-cadadfe7 {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
margin-top: 80rpx;
}
.sengderIcon.data-v-cadadfe7 {
width: 150rpx;
height: 150rpx;
border-radius: 50%;
background-color: #fff;
display: flex;
justify-content: center;
align-items: center;
}
.Icon.data-v-cadadfe7 {
width: 100%;
height: 100%;
border-radius: 50%;
}
.Individual.data-v-cadadfe7 {
display: flex;
justify-content: center;
align-items: center;
margin-top: 34.35rpx;
}
.name.data-v-cadadfe7 {
font-size: 30.53rpx;
color: #161616;
margin-right: 16.22rpx;
}
.nation.data-v-cadadfe7 {
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.data-v-cadadfe7 {
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.data-v-cadadfe7 {
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.data-v-cadadfe7 {
font-size: 17.18rpx;
color: #fff;
margin-left: 4rpx;
}
.Time.data-v-cadadfe7 {
color: #666666;
font-size: 26.72rpx;
margin-top: 48.7rpx;
}
.goldCoin.data-v-cadadfe7 {
background-image: url("https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Backgroundofgoldcoins.png");
width: 334.83rpx;
height: 124.05rpx;
margin-right: 21rpx;
display: flex;
align-items: center;
}
.Session.data-v-cadadfe7 {
background-image: url("https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Fieldnumberbackground.png");
width: 334.83rpx;
height: 124.05rpx;
display: flex;
align-items: center;
}
.SessionAndGoldCoin.data-v-cadadfe7 {
display: flex;
justify-content: center;
align-items: center;
margin-top: 60rpx;
display: flex;
justify-content: center;
}
.goldtext.data-v-cadadfe7 {
font-size: 28.63rpx;
color: #929292;
}
.goldnumber.data-v-cadadfe7 {
font-size: 34.35rpx;
color: #161616;
font-weight: bold;
}
.goldcard.data-v-cadadfe7 {
display: flex;
flex-direction: column;
align-items: center;
}
.button.data-v-cadadfe7 {
display: flex;
justify-content: center;
align-items: center;
margin-top: 150rpx;
}
.buttontext.data-v-cadadfe7{
font-size: 40rpx;
color: #666666;
font-weight: bold;
}
.accept.data-v-cadadfe7 {
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.data-v-cadadfe7 {
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;
}