优化页面

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,199 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const components_formatDate = require("../../components/formatDate.js");
const components_TimeFormatting = require("../../components/TimeFormatting.js");
const components_request = require("../../components/request.js");
const NewAddedPk = () => "../NewAddedPk/NewAddedPk2.js";
const _sfc_main = {
data() {
return {
item: {},
id: 0,
InvitingPartyEventID: null,
list: [],
selectedId: null,
InvitingPartyEventindex: null,
chatInfo: {},
currentConversation: null,
// parentMessage: null,
style: {
backgroundColor: "#ffffff"
}
};
},
onLoad(options) {
const eventChannel = this.getOpenerEventChannel();
eventChannel.on("itemDetail", (data) => {
this.item = data.item;
common_vendor.index.__f__("log", "at pages/pkDetail/pkDetail.vue:170", "接收到的数据:", this.item);
});
common_vendor.index.getStorage({
key: "userinfo",
success: (res) => {
this.id = res.data.id;
}
});
common_vendor.index.getStorage({
key: "chatInfo",
success: (res) => {
this.chatInfo = res.data;
}
});
},
methods: {
//修改信息
// onRecompose(item) {
// this.parentMessage = item;
// this.createModule.open();
// },
formatDate: components_formatDate.formatDate,
TimeFormatting: components_TimeFormatting.TimeFormatting,
Select(id, index) {
if (this.selectedId === id) {
this.selectedId = null;
this.InvitingPartyEventID = null;
this.InvitingPartyEventindex = null;
} else {
this.selectedId = this.selectedId === id ? null : id;
this.InvitingPartyEventID = id;
this.InvitingPartyEventindex = index;
}
},
Returnfunc() {
common_vendor.index.navigateBack({
delta: 1
});
},
open() {
this.$refs.popup.open("center");
this.userlist();
},
invite() {
if (this.item.pkTime !== this.list[this.InvitingPartyEventindex].pkTime) {
common_vendor.index.showToast({
icon: "none",
title: "请保持时间一致"
});
return;
}
const conversationID = `C2C${this.item.senderId}`;
const myitem = JSON.stringify(this.list[this.InvitingPartyEventindex]);
const youritem = JSON.stringify(this.item);
common_vendor.index.redirectTo({
url: `/TUIKit/components/TUIChat/index?conversationID=${conversationID}&myitem=${myitem}&youritem=${youritem}`
});
},
close() {
this.$refs.popup.close();
},
openChat() {
const conversationID = `C2C${this.item.senderId}`;
common_vendor.index.redirectTo({
url: `/TUIKit/components/TUIChat/index?conversationID=${conversationID}`
});
},
async userlist() {
common_vendor.index.showLoading({
title: "加载中...",
mask: true
});
const res = await components_request.request({
url: "pk/queryMyCanUsePkData",
method: "POST",
data: {
userId: this.id
},
userInfo: true
});
if (res.code === 200) {
if (res.data.length !== 0) {
common_vendor.index.hideLoading();
common_vendor.index.__f__("log", "at pages/pkDetail/pkDetail.vue:258", "res.data", res.data);
this.list = res.data;
} else {
common_vendor.index.hideLoading();
this.openPopupQuantity();
}
} else {
common_vendor.index.hideLoading();
common_vendor.index.showToast({
title: "加载失败",
icon: "none",
duration: 2e3
});
}
},
openPopupQuantity() {
this.$refs.createModule.open();
}
},
components: {
NewAddedPk
}
};
if (!Array) {
const _easycom_uni_easyinput2 = common_vendor.resolveComponent("uni-easyinput");
const _component_viewm = common_vendor.resolveComponent("viewm");
const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
const _component_NewAddedPk = common_vendor.resolveComponent("NewAddedPk");
(_easycom_uni_easyinput2 + _component_viewm + _easycom_uni_popup2 + _component_NewAddedPk)();
}
const _easycom_uni_easyinput = () => "../../uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.js";
const _easycom_uni_popup = () => "../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
if (!Math) {
(_easycom_uni_easyinput + _easycom_uni_popup)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: common_vendor.o$1((...args) => $options.Returnfunc && $options.Returnfunc(...args)),
b: $data.item.anchorIcon,
c: common_vendor.t($data.item.disPlayId),
d: $data.item.sex === "1"
}, $data.item.sex === "1" ? {
e: common_vendor.t($data.item.sex === "1" ? "男" : "女")
} : {
f: common_vendor.t($data.item.sex === "2" ? "男" : "女")
}, {
g: common_vendor.t($data.item.country),
h: common_vendor.t($options.formatDate($data.item.pkTime)),
i: common_vendor.t($data.item.coin),
j: common_vendor.t($data.item.pkNumber),
k: common_vendor.s($data.style),
l: common_vendor.o$1(($event) => $data.item.remark = $event),
m: common_vendor.p({
type: "textarea",
placeholder: "备注",
maxlength: "-1",
disabled: "true",
modelValue: $data.item.remark
}),
n: $data.item.senderId !== $data.id
}, $data.item.senderId !== $data.id ? {
o: common_vendor.o$1(($event) => $options.openChat()),
p: common_vendor.o$1(($event) => $options.open())
} : {}, {
q: common_vendor.f($data.list, (item, index, i0) => {
return {
a: item.anchorIcon,
b: common_vendor.t(item.anchorId),
c: common_vendor.t($options.TimeFormatting(item.pkTime)),
d: common_vendor.t(item.coin),
e: "9639f721-2-" + i0 + ",9639f721-1",
f: common_vendor.o$1(($event) => $options.Select(item.id, index), index),
g: $data.selectedId === item.id ? "#f6f6f6" : "#ffffff",
h: index
};
}),
r: common_vendor.o$1(($event) => $options.invite()),
s: common_vendor.o$1(($event) => $options.close()),
t: common_vendor.sr("popup", "9639f721-1"),
v: common_vendor.p({
type: "center",
["border-radius"]: "10px 10px 0 0"
}),
w: common_vendor.sr("createModule", "9639f721-3")
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-9639f721"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/pkDetail/pkDetail.js.map

View File

@@ -0,0 +1,8 @@
{
"navigationBarTitleText": "PK详情",
"usingComponents": {
"new-added-pk": "../NewAddedPk/NewAddedPk",
"uni-easyinput": "../../uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput",
"uni-popup": "../../uni_modules/uni-popup/components/uni-popup/uni-popup"
}
}

View File

@@ -0,0 +1 @@
<view class="container data-v-9639f721"><view class="background data-v-9639f721"><image class="data-v-9639f721" 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-9639f721"><view class="Return data-v-9639f721" bindtap="{{a}}"><image class="Return data-v-9639f721" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Return.png" mode="scaleToFill"/></view></view><view class="Content data-v-9639f721"><view class="sender data-v-9639f721"><view class="sengderIcon data-v-9639f721"><image class="Icon data-v-9639f721" src="{{b}}" mode="scaleToFill"/></view><view class="Individual data-v-9639f721"><view class="name data-v-9639f721">{{c}}</view><view class="GenderAndAge data-v-9639f721"><view wx:if="{{d}}" class="male data-v-9639f721"><view class="data-v-9639f721"><image class="data-v-9639f721" 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-9639f721">{{e}}</view></view><view wx:else class="female data-v-9639f721"><view class="data-v-9639f721"><image class="data-v-9639f721" 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-9639f721">{{f}}</view></view></view><view class="nation data-v-9639f721">{{g}}</view></view><view class="Time data-v-9639f721">PK时间:{{h}}</view><view class="SessionAndGoldCoin data-v-9639f721"><view class="goldCoin data-v-9639f721"><image class="data-v-9639f721" 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-9639f721"><view class="goldnumber data-v-9639f721">{{i}}</view><view class="goldtext data-v-9639f721">金币</view></view></view><view class="Session data-v-9639f721"><image class="data-v-9639f721" 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-9639f721"><view class="goldnumber data-v-9639f721">{{j}}</view><view class="goldtext data-v-9639f721">PK场数</view></view></view></view></view><view class="remark data-v-9639f721"><uni-easyinput wx:if="{{m}}" class="data-v-9639f721" style="{{k}}" u-i="9639f721-0" bind:__l="__l" bindupdateModelValue="{{l}}" u-p="{{m}}"></uni-easyinput></view><view wx:if="{{n}}" class="button data-v-9639f721"><button class="accept data-v-9639f721" bindtap="{{o}}">聊了个天</button><button class="reject data-v-9639f721" bindtap="{{p}}">立即邀请</button></view></view></view><uni-popup wx:if="{{v}}" class="r data-v-9639f721" u-s="{{['d']}}" u-r="popup" u-i="9639f721-1" bind:__l="__l" u-p="{{v}}"><view class="popup-content data-v-9639f721"><view class="popup-title data-v-9639f721"><view class="popup-text data-v-9639f721">请选择您要参与的主播</view><scroll-view scroll-y="true" class="scroll data-v-9639f721"><view wx:for="{{q}}" wx:for-item="item" wx:key="h" class="card data-v-9639f721"><view class="card-content data-v-9639f721" bindtap="{{item.f}}" style="{{'background:' + item.g}}"><view class="Avatarimg data-v-9639f721"><image class="avatar data-v-9639f721" src="{{item.a}}" mode="scaleToFill"/></view><view class="NameMoney data-v-9639f721"><view class="TimeMoney data-v-9639f721"><view class="NameMoney_Name data-v-9639f721">{{item.b}}</view></view><view class="TimeMoney_Time data-v-9639f721"><view class="pkTimeimg data-v-9639f721"></view><view class="data-v-9639f721">{{item.c}}</view><viewm u-s="{{['d']}}" class="goldnb data-v-9639f721" u-i="{{item.e}}" bind:__l="__l"><view class="goldimg data-v-9639f721"></view>{{item.d}}K</viewm></view></view></view></view></scroll-view></view><view class="popup-btn data-v-9639f721"><button class="invite data-v-9639f721" type="primary" bindtap="{{r}}">邀请</button><button class="cancel data-v-9639f721" type="default" bindtap="{{s}}">取消</button></view></view></uni-popup><new-added-pk class="createModule r data-v-9639f721" u-r="createModule" u-i="9639f721-3" bind:__l="__l"></new-added-pk>

View File

@@ -0,0 +1,314 @@
.popup-content.data-v-9639f721 {
width: 600rpx;
height: 700rpx;
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.data-v-9639f721 {
font-size: 30rpx;
margin-top: 50rpx;
text-align: center;
}
.popup-btn.data-v-9639f721 {
display: flex;
justify-content: space-around;
margin-top: 50rpx;
}
.invite.data-v-9639f721 {
width: 225.19rpx;
height: 78.24rpx;
font-size: 28.63rpx;
line-height: 80rpx;
border-top-left-radius: 50rpx;
border-bottom-left-radius: 50rpx;
border-bottom-right-radius: 50rpx;
background-image: linear-gradient(135deg, #4fcacd, #5fdbde);
}
.cancel.data-v-9639f721 {
width: 225.19rpx;
height: 78.24rpx;
font-size: 28.63rpx;
line-height: 80rpx;
margin-left: 30rpx;
color: #03aba8;
border-top-left-radius: 50rpx;
border-bottom-left-radius: 50rpx;
border-bottom-right-radius: 50rpx;
border: 1rpx solid #03aba8;
}
.scroll.data-v-9639f721 {
width: 500rpx;
height: 400rpx;
border-radius: 10px;
/* background-color: #fff; */
}
.popup-text.data-v-9639f721 {
color: #161616;
font-size: 36.26rpx;
font-weight: bold;
margin-bottom: 30rpx;
}
.card-content.data-v-9639f721 {
/* width: 445rpx; */
width: 100%;
height: 100rpx;
background-color: #ffffff;
/* border: 2px solid #afafaf; */
border-radius: 10rpx;
display: flex;
align-items: center;
font-size: 28rpx;
color: rgb(127, 127, 127);
}
.createModule.data-v-9639f721 {
position: fixed;
bottom: 0;
right: 0;
z-index: 998;
width: 100vw;
}
.Avatarimg.data-v-9639f721 {
width: 90rpx;
height: 90rpx;
border-radius: 50%;
background-color: #dddddd;
margin-right: 20rpx;
margin-left: 20rpx;
}
.avatar.data-v-9639f721 {
width: 100%;
height: 100%;
border-radius: 50%;
}
.TimeMoney.data-v-9639f721 {
width: 300rpx;
display: flex;
font-weight: bold;
font-size: 27rpx;
color: #161616;
}
.goldnb.data-v-9639f721 {
display: flex;
margin-left: 40rpx;
}
.TimeMoney_Time.data-v-9639f721 {
display: flex;
margin-top: 13rpx;
}
.pkTimeimg.data-v-9639f721 {
background-image: url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/time.png);
background-size: 100% 100%;
width: 31.49rpx;
height: 31.49rpx;
margin-right: 20rpx;
}
.goldimg.data-v-9639f721 {
background-image: url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/species.png);
background-size: 100% 100%;
width: 31.49rpx;
height: 35rpx;
}
.NameMoney.data-v-9639f721 {
display: flex;
flex-direction: column;
}
.NameMoney_Name.data-v-9639f721 {
width: 400rpx;
text-align: left;
font-weight: bold;
font-size: 27rpx;
color: #161616;
white-space: nowrap; /* 防止换行 */
overflow: hidden; /* 隐藏溢出内容 */
text-overflow: ellipsis; /* 显示省略号 */
}
.background.data-v-9639f721 {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: -1;
}
.Navigation.data-v-9639f721 {
position: fixed;
top: 0;
left: 0;
right: 0;
height: 200rpx;
display: flex;
align-items: center;
padding: 0 60rpx;
z-index: 1;
}
.Return.data-v-9639f721 {
width: 60rpx;
height: 60rpx;
margin-top: 20rpx;
}
.Content.data-v-9639f721 {
position: absolute;
top: 200rpx;
left: 0;
right: 0;
bottom: 0;
display: flex;
flex-direction: column;
align-items: center;
}
.sender.data-v-9639f721 {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
margin-top: 80rpx;
}
.sengderIcon.data-v-9639f721 {
width: 150rpx;
height: 150rpx;
border-radius: 50%;
background-color: #fff;
display: flex;
justify-content: center;
align-items: center;
}
.Icon.data-v-9639f721 {
width: 100%;
height: 100%;
border-radius: 50%;
}
.Individual.data-v-9639f721 {
display: flex;
justify-content: center;
align-items: center;
margin-top: 34.35rpx;
}
.name.data-v-9639f721 {
font-size: 30.53rpx;
color: #161616;
margin-right: 16.22rpx;
}
.nation.data-v-9639f721 {
/* width: 56.3rpx; */
height: 29.58rpx;
white-space: nowrap; /* 防止换行 */
overflow: hidden; /* 隐藏溢出内容 */
text-overflow: ellipsis; /* 显示省略号 */
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-9639f721 {
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-9639f721 {
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-9639f721 {
font-size: 17.18rpx;
color: #fff;
margin-left: 4rpx;
}
.Time.data-v-9639f721 {
color: #666666;
font-size: 26.72rpx;
margin-top: 48.7rpx;
}
.goldCoin.data-v-9639f721 {
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-9639f721 {
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-9639f721 {
display: flex;
justify-content: center;
align-items: center;
margin-top: 60rpx;
display: flex;
justify-content: center;
}
.goldtext.data-v-9639f721 {
font-size: 28.63rpx;
color: #929292;
}
.goldnumber.data-v-9639f721 {
font-size: 34.35rpx;
color: #161616;
font-weight: bold;
}
.goldcard.data-v-9639f721 {
display: flex;
flex-direction: column;
align-items: center;
}
.remark.data-v-9639f721{
margin-top: 60rpx;
width: 90%;
}
.button.data-v-9639f721 {
display: flex;
justify-content: center;
align-items: center;
margin-top: 500rpx;
}
.accept.data-v-9639f721 {
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-9639f721 {
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;
}