优化页面

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,210 +0,0 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const components_TUILogin = require("../../components/TUILogin.js");
const components_request = require("../../components/request.js");
const components_formatDate = require("../../components/formatDate.js");
const stores_counter = require("../../stores/counter.js");
const common_assets = require("../../common/assets.js");
const topNavigation = () => "../../components/topNavigation/topNavigation.js";
const Advertisement = () => "../../components/Advertisement/Advertisement.js";
const tabBar = () => "../../components/tabBar/tabBar.js";
const counter = stores_counter.useCounterStore();
const _sfc_main = {
inject: ["$global"],
data() {
return {
info: {},
myuserSig: "",
chatInfo: {},
page: 0,
//页码
size: 10,
//每页条数
list: [],
// 列表数据
detailsdata: {},
//详情数据
triggered: false,
//下拉刷新标识
RealTimePklist: [],
// PK大厅列表数据
MakeAppointmentPKlist: [],
// 今日PK列表数据
listtype: 1
// 列表类型 1 当天 2 大于当天
};
},
mounted() {
this.pkList({ type: 2 });
this.pkList({ type: 1 });
},
onLoad() {
common_vendor.index.getStorage({
key: "userinfo",
success: (res) => {
this.info = res.data;
counter.$patch({ myitem: this.info });
common_vendor.index.getStorage({
key: "myuserSig",
success: (res2) => {
this.myuserSig = res2.data;
common_vendor.index.getStorage({
key: "chatInfo",
success: (res3) => {
this.chatInfo = res3.data;
components_TUILogin.TUIlogin(this.chatInfo.appId, this.info.id, this.myuserSig.userSig);
}
});
}
});
}
});
},
methods: {
goMakeAppointmentPK() {
this.listtype = 1;
this.list = this.MakeAppointmentPKlist;
},
goRealTimePk() {
this.listtype = 2;
this.list = this.RealTimePklist;
},
goAdvertisement() {
common_vendor.index.navigateTo({ url: "/pages/pkDetail/pkDetail" });
},
onRefresherRefresh() {
this.page = 0;
this.list = [];
if (this.listtype === 1) {
this.MakeAppointmentPKlist = [];
} else {
this.RealTimePklist = [];
}
this.triggered = true;
this.pkList({ type: this.listtype });
},
async goDetail(item) {
common_vendor.index.showLoading({
title: "加载中...",
mask: true
});
common_vendor.index.__f__("log", "at pages/Home/Home.vue:147", "id", item.id);
const res = await components_request.request({
url: "pk/pkInfoDetail",
method: "POST",
data: {
id: item.id
},
userInfo: true
});
common_vendor.index.__f__("log", "at pages/Home/Home.vue:156", "res", res);
this.detailsdata = res.data;
if (res.code === 200) {
if (res.data.length !== 0) {
common_vendor.index.hideLoading();
common_vendor.index.__f__("log", "at pages/Home/Home.vue:161", "res.data", res.data);
common_vendor.index.navigateTo({
url: "/pages/pkDetail/pkDetail",
success: (res2) => {
res2.eventChannel.emit("itemDetail", {
item: this.detailsdata
});
}
});
} else {
common_vendor.index.hideLoading();
this.openPopupQuantity();
}
} else {
common_vendor.index.hideLoading();
common_vendor.index.showToast({
title: "加载失败",
icon: "none",
duration: 2e3
});
}
},
formatDate: components_formatDate.formatDate,
async pkList(condition) {
const res = await components_request.request({
url: "pk/pkList",
method: "POST",
data: {
status: 0,
page: this.page,
size: this.size,
condition
},
userInfo: false
});
common_vendor.index.__f__("log", "at pages/Home/Home.vue:197", res);
if (res.code === 200) {
this.triggered = false;
if (condition.type === 1) {
this.MakeAppointmentPKlist.push(...res.data);
if (condition.type == this.listtype) {
this.list = this.MakeAppointmentPKlist;
}
} else {
this.RealTimePklist.push(...res.data);
if (condition.type == this.listtype) {
this.list = this.RealTimePklist;
}
}
}
}
},
onScrollToLower() {
this.page++;
this.pkList({ type: this.listtype });
},
components: {
topNavigation,
Advertisement,
tabBar
}
};
if (!Array) {
const _component_top_navigation = common_vendor.resolveComponent("top-navigation");
const _component_advertisement = common_vendor.resolveComponent("advertisement");
const _component_uni_card = common_vendor.resolveComponent("uni-card");
const _easycom_tabBar2 = common_vendor.resolveComponent("tabBar");
(_component_top_navigation + _component_advertisement + _component_uni_card + _easycom_tabBar2)();
}
const _easycom_tabBar = () => "../../components/tabBar/tabBar.js";
if (!Math) {
_easycom_tabBar();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_assets._imports_0$1,
b: common_vendor.o$1($options.goRealTimePk),
c: common_vendor.o$1($options.goMakeAppointmentPK),
d: common_vendor.o$1((...args) => $options.goAdvertisement && $options.goAdvertisement(...args)),
e: common_vendor.f($data.list, (item, index, i0) => {
return common_vendor.e({
a: item.anchorIcon,
b: common_vendor.t(item.anchorId),
c: item.sex === "2"
}, item.sex === "2" ? {
d: common_assets._imports_3
} : {
e: common_assets._imports_2
}, {
f: common_vendor.t(item.sex === "1" ? "男" : "女"),
g: item.sex === "1" ? 1 : "",
h: item.sex === "2" ? 1 : "",
i: common_vendor.t($options.formatDate(item.pkTime)),
j: common_vendor.t(item.coin + "K"),
k: common_vendor.o$1(($event) => $options.goDetail(item)),
l: "7ffebbf4-2-" + i0
});
}),
f: common_vendor.o$1((...args) => $options.onRefresherRefresh && $options.onRefresherRefresh(...args)),
g: common_vendor.o$1((...args) => _ctx.onScrollToLower && _ctx.onScrollToLower(...args)),
h: $data.triggered
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-7ffebbf4"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/Home/Home.js.map

View File

@@ -1,8 +0,0 @@
{
"navigationBarTitleText": "首页",
"usingComponents": {
"top-navigation": "../../components/topNavigation/topNavigation",
"advertisement": "../../components/Advertisement/Advertisement",
"tab-bar": "../../components/tabBar/tabBar"
}
}

View File

@@ -1 +0,0 @@
<view class="page data-v-7ffebbf4"><image src="{{a}}" class="HomeBackground data-v-7ffebbf4"></image></view><view class="top-navigation-container data-v-7ffebbf4"><top-navigation class="data-v-7ffebbf4" bindRealTimePk="{{b}}" bindMakeAppointmentPK="{{c}}" u-i="7ffebbf4-0" bind:__l="__l"></top-navigation></view><view class="Advertisement data-v-7ffebbf4" bindtap="{{d}}"><advertisement class="data-v-7ffebbf4" u-i="7ffebbf4-1" bind:__l="__l"></advertisement></view><view class="contentList data-v-7ffebbf4"><scroll-view scroll-y="true" class="scroll data-v-7ffebbf4" refresher-enabled="true" refresher-threshold="40" bindrefresherrefresh="{{f}}" lower-threshold="100" bindscrolltolower="{{g}}" refresher-triggered="{{h}}"><uni-card wx:for="{{e}}" wx:for-item="item" class="data-v-7ffebbf4" u-s="{{['d']}}" u-i="{{item.l}}" bind:__l="__l"><view class="content-list data-v-7ffebbf4" bindtap="{{item.k}}"><image class="headShot data-v-7ffebbf4" src="{{item.a}}" mode="scaleToFill"/><view class="content-list-title data-v-7ffebbf4"><view class="cardname data-v-7ffebbf4">{{item.b}}</view><view class="content-list-info data-v-7ffebbf4"><view class="{{['data-v-7ffebbf4', item.g && 'Gendermale', item.h && 'Genderfemale']}}"><image wx:if="{{item.c}}" class="Genderimg data-v-7ffebbf4" src="{{item.d}}" mode="scaleToFill"/><image wx:else class="Genderimg data-v-7ffebbf4" src="{{item.e}}" mode="scaleToFill"/><view class="age data-v-7ffebbf4">{{item.f}}</view></view><view class="RoomID data-v-7ffebbf4">PK时间: {{item.i}}</view><view class="Charm data-v-7ffebbf4">金币:</view><view class="charmValue data-v-7ffebbf4">{{item.j}}</view></view></view></view></uni-card></scroll-view></view><view class="tabBar data-v-7ffebbf4"><tab-bar class="data-v-7ffebbf4" u-i="7ffebbf4-3" bind:__l="__l"></tab-bar></view>

View File

@@ -1,116 +0,0 @@
.page.data-v-7ffebbf4 {
position: relative;
width: 750rpx;
height: 1620rpx;
}
.HomeBackground.data-v-7ffebbf4 {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
}
.top-navigation-container.data-v-7ffebbf4 {
position: fixed;
top: 160rpx;
left: 0;
width: 100%;
height: 114.5rpx;
}
.Advertisement.data-v-7ffebbf4 {
position: fixed;
top: 300rpx;
left: 0;
width: 100%;
height: 100rpx;
z-index: 100;
}
.contentList.data-v-7ffebbf4 {
position: fixed;
top: 412rpx;
left: 0;
bottom: 114.5rpx;
width: 100%;
/* height: 1300rpx; */
}
.scroll.data-v-7ffebbf4 {
height: 90%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.content-list.data-v-7ffebbf4 {
display: flex;
align-items: center;
width: 712rpx;
height: 161rpx;
background: #ffffff;
border-radius: 15rpx;
margin-bottom: 12rpx;
margin-left: 20rpx;
}
.headShot.data-v-7ffebbf4 {
width: 101rpx;
height: 101rpx;
border-radius: 50rpx;
margin-left: 30rpx;
margin-right: 33rpx;
}
.content-list-info.data-v-7ffebbf4 {
display: flex;
align-items: center;
}
.cardname.data-v-7ffebbf4 {
font-size: 31rpx;
color: #161616;
line-height: 38rpx;
}
.Genderimg.data-v-7ffebbf4 {
width: 15rpx;
height: 15rpx;
margin-left: 10rpx;
margin-right: 10rpx;
}
.age.data-v-7ffebbf4 {
color: #ffffff;
font-size: 14rpx;
}
.Gendermale.data-v-7ffebbf4 {
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADsAAAAfCAYAAABZGLWTAAAAAXNSR0IArs4c6QAAAilJREFUWEftWTtPFFEU/r6ZJUuJiSQujwKRCfQkttJobJRY6Ax/ABNNKGiBAmwtTNZk9w+40BCtiDZYSmI/kxmFAmGNkIgdhFmPuUPW7C6vWVZ3ZhimnfP6zr3ncc8hQnz3PS/b5eOuAPcAGQV5EyLXSGZCsP9TEhHxQf6EyDrAz2Dlwy9df78yNHRwniKeRTC+sdHVeXA4TfApgOvnCYvw/65ACvvZjpdvBwb2TrPjVLCPbdfSyFcEuiME0ZRqAXYoMlUaMUonMR4De2d1NZPL9eYBTjalKVbEUiyXt55/HBvza82qA6uA3ujpX6LIo1jZfgFjhFz+vr35pBZwHVjLdgtgkk+00StSLA0bKt8E31+wKkZ18s0FnBhvFpGJagwHYI+yru8mKRmF9bBKWvvZjKGydADWdL7MEzIbVkDS6ETjwqJxa45Bw1DBt5jX0Vb9u7uno4+m4zwg9HetSos7v6DykKbt5Uk8i7uxrdongtcK7CcSt1sVFnt+wRpNx/txGbPwsYqrWknT8Q4JtP310u6bIIBPy/Gk3Yqj0peuk01XzKYkG0uQjVNVZ9PUQaWqNz569bgLBGeiKgn/W69AXiwOG7Ppe88qz1q2a+EyTio0baJkDAbTxvoZlOMWkj1VDDmDUmSpmi5WAedy/XlAEjw3ZrFc3jx7blx7CSz7qyX8nayNALFDalPVGG281Fe7nkaP1G/xMAoiui0exAfUFg/rAJra4v0Bqcv8upqc0XEAAAAASUVORK5CYII=) no-repeat center;
width: 56.3rpx;
height: 29.58rpx;
background-size: 100% 100%;
display: flex;
align-items: center;
margin-right: 10rpx;
}
.Genderfemale.data-v-7ffebbf4 {
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADsAAAAfCAYAAABZGLWTAAAAAXNSR0IArs4c6QAAAi1JREFUWEflWU1rE1EUPaeGFGEiCShIdVXQrZuCW1e6U3BT2j9gwSYTcZVi5WFlZlVMTIXkDyhuBJe66rKCm24rdCV+NIWUZEBb41yZ0ZYk9mMyETLPN9u5575z7nv3fdxLRPg+5PPjExdw3fd5Q8ApUiYB5gCkIsD/tUkHkKYINwl5L/Dffv3MN5eq1d2TBuJxBqKKWS8t90HMATh7krMR/t+GoGbtcZmqvHMUjyPFem5+RjBWAXBuhCIGHbpB+LZVqr44DPiXWFHXUl76ygqIO4OOlBh7Qd3aW5+nWu10c+oRK0qlvHTzJYjbiSEelwjxyvqem6ZSB4J7xLYcu0adZ7QvMCKon1moBPtN+B2I/ZOjz+MGMqk4wp/dz+FQbFMVs6lx2dBsM4oa30Znl5dzqrwTim27hUcAF6Oi9bOTpUzp6UMGF4bzE2MfE36ODhvf7S+f/ItsOfM3yVOvh/WWdLzIz1tsO4UVkHeTTnZofiLP2HLsNRJXh3aWcAcE3gUzuwVSpyth3LA22HbtHyN6vcQlHRfXCcRKXLRuONNmtrAFGJKzLddeI8zZjU06Zw26QRl1Nw5fPY69BOKBbkdJZL6Cx5mFyqJ579kgQv9vpYKzVqkcVht7alBtx65pXVXsX9eCeuawGlRgZ1R18bdgQ+rG3avAc4szAtGwI0B7P0f7V/XxvZ4nxaz3TaNez2ku816MXk93VLq7eCSnBJgEMMIuHpoENkUG6+L9AlWo7Kxo5cagAAAAAElFTkSuQmCC) no-repeat center;
width: 56.3rpx;
height: 29.58rpx;
background-size: 100% 100%;
display: flex;
align-items: center;
margin-right: 10rpx;
}
.RoomID.data-v-7ffebbf4 {
font-size: 23rpx;
color: #a3a3a3;
line-height: 38rpx;
}
.Charm.data-v-7ffebbf4 {
font-size: 23rpx;
color: #a3a3a3;
line-height: 38rpx;
margin-right: 12rpx;
margin-left: 20rpx;
}
.charmValue.data-v-7ffebbf4 {
font-size: 23rpx;
color: #161616;
line-height: 38rpx;
font-weight: 600;
}