优化页面

This commit is contained in:
pengxiaolong
2025-06-10 23:06:51 +08:00
parent 8c70c2c850
commit 3c2d7e5959
974 changed files with 353 additions and 87597 deletions

View File

@@ -1,191 +0,0 @@
"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 common_assets = require("../../common/assets.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,
};
},
onLoad(options) {
const eventChannel = this.getOpenerEventChannel();
eventChannel.on("itemDetail", (data) => {
this.item = data.item;
common_vendor.index.__f__("log", "at pages/pkDetail/pkDetail.vue:165", "接收到的数据:", 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:253", "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 _component_viewm = common_vendor.resolveComponent("viewm");
const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
const _component_NewAddedPk = common_vendor.resolveComponent("NewAddedPk");
(_component_viewm + _easycom_uni_popup2 + _component_NewAddedPk)();
}
const _easycom_uni_popup = () => "../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
if (!Math) {
_easycom_uni_popup();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: common_assets._imports_0$1,
b: common_assets._imports_1,
c: common_vendor.o$1((...args) => $options.Returnfunc && $options.Returnfunc(...args)),
d: $data.item.anchorIcon,
e: common_vendor.t($data.item.anchorId),
f: $data.item.sex === "1"
}, $data.item.sex === "1" ? {
g: common_assets._imports_2,
h: common_vendor.t($data.item.sex === "1" ? "男" : "女")
} : {
i: common_assets._imports_3,
j: common_vendor.t($data.item.sex === "2" ? "男" : "女")
}, {
k: common_vendor.t($data.item.country),
l: common_vendor.t($options.formatDate($data.item.pkTime)),
m: common_assets._imports_4$2,
n: common_vendor.t($data.item.coin),
o: common_assets._imports_5$2,
p: common_vendor.t($data.item.pkNumber),
q: $data.item.senderId !== $data.id
}, $data.item.senderId !== $data.id ? {
r: common_vendor.o$1(($event) => $options.openChat()),
s: common_vendor.o$1(($event) => $options.open())
} : {}, {
t: common_vendor.f($data.list, (item, index, i0) => {
return {
a: item.anchorIcon,
b: common_vendor.t(item.anchorId),
c: common_vendor.t(item.coin),
d: "9639f721-1-" + i0 + ",9639f721-0",
e: common_vendor.t($options.TimeFormatting(item.pkTime)),
f: common_vendor.o$1(($event) => $options.Select(item.id, index)),
g: $data.selectedId === item.id ? "#f6f6f6" : "#ffffff"
};
}),
v: common_vendor.o$1(($event) => $options.invite()),
w: common_vendor.o$1(($event) => $options.close()),
x: common_vendor.sr("popup", "9639f721-0"),
y: common_vendor.p({
type: "center",
["border-radius"]: "10px 10px 0 0"
}),
z: common_vendor.sr("createModule", "9639f721-2")
});
}
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

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

View File

@@ -1 +0,0 @@
<view class="container data-v-9639f721"><view class="background data-v-9639f721"><image class="data-v-9639f721" style="width:100%;height:100%" src="{{a}}" mode="scaleToFill"/></view><view class="Navigation data-v-9639f721"><view class="Return data-v-9639f721" bindtap="{{c}}"><image class="Return data-v-9639f721" src="{{b}}" 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="{{d}}" mode="scaleToFill"/></view><view class="Individual data-v-9639f721"><view class="name data-v-9639f721">{{e}}</view><view class="GenderAndAge data-v-9639f721"><view wx:if="{{f}}" class="male data-v-9639f721"><view class="data-v-9639f721"><image class="data-v-9639f721" style="width:20rpx;height:20rpx" src="{{g}}" mode="scaleToFill"/></view><view class="age data-v-9639f721">{{h}}</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="{{i}}" mode="scaleToFill"/></view><view class="age data-v-9639f721">{{j}}</view></view></view><view class="nation data-v-9639f721">{{k}}</view></view><view class="Time data-v-9639f721">PK时间:{{l}}</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="{{m}}" mode="scaleToFill"/><view class="goldcard data-v-9639f721"><view class="goldnumber data-v-9639f721">{{n}}</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="{{o}}" mode="scaleToFill"/><view class="goldcard data-v-9639f721"><view class="goldnumber data-v-9639f721">{{p}}</view><view class="goldtext data-v-9639f721">PK场数</view></view></view></view></view><view wx:if="{{q}}" class="button data-v-9639f721"><button class="accept data-v-9639f721" bindtap="{{r}}">聊了个天</button><button class="reject data-v-9639f721" bindtap="{{s}}">立即邀请</button></view></view></view><uni-popup wx:if="{{y}}" class="r data-v-9639f721" u-s="{{['d']}}" u-r="popup" u-i="9639f721-0" bind:__l="__l" u-p="{{y}}"><view class="popup-content data-v-9639f721" style="background-image:url(../../static/queryMyCanUsePkbg.png);background-position:center"><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="{{t}}" wx:for-item="item" 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><viewm u-s="{{['d']}}" class="goldnb data-v-9639f721" u-i="{{item.d}}" bind:__l="__l"><view class="goldimg data-v-9639f721"></view>{{item.c}}K</viewm></view><view class="TimeMoney_Time data-v-9639f721"><view class="pkTimeimg data-v-9639f721"></view><view class="data-v-9639f721">{{item.e}}</view></view></view></view></view></scroll-view></view><view class="popup-btn data-v-9639f721"><button class="invite data-v-9639f721" type="primary" bindtap="{{v}}">邀请</button><button class="cancel data-v-9639f721" type="default" bindtap="{{w}}">取消</button></view></view></uni-popup><new-added-pk class="createModule r data-v-9639f721" u-r="createModule" u-i="9639f721-2" bind:__l="__l"></new-added-pk>

File diff suppressed because one or more lines are too long