This commit is contained in:
pengxiaolong
2025-07-14 13:30:18 +08:00
parent f324bf3bc7
commit 6dec463705
24 changed files with 193 additions and 147 deletions

View File

@@ -8,7 +8,8 @@ const _sfc_main = {
title: "Hello",
item: {},
coinNumlist: [],
triggered: false
triggered: false,
iconNumber: 123457
};
},
onLoad(options) {
@@ -19,6 +20,26 @@ const _sfc_main = {
});
},
methods: {
//金币数量格式化
formatCoinNum(coin) {
if (coin === null || coin === void 0) {
return "";
}
if (coin < 1e3) {
return String(coin);
}
if (coin >= 1e6) {
return "1M+";
}
const kValue = coin / 1e3;
const formattedString = kValue.toFixed(2);
const matchResult = formattedString.match(/^\d+\.\d{0,2}/);
if (matchResult === null) {
return kValue.toFixed(2) + "k";
}
const formatted = matchResult[0];
return `${formatted}k`;
},
// 下拉刷新
onRefresherRefresh() {
this.triggered = true;
@@ -39,7 +60,7 @@ const _sfc_main = {
this.coinNumlist = res.data;
this.triggered = false;
} else {
common_vendor.index.__f__("log", "at pages/Mine/minecomponents/DetailsPKRecords/DetailsPKRecords.vue:141", "获取金币数量失败");
common_vendor.index.__f__("log", "at pages/Mine/minecomponents/DetailsPKRecords/DetailsPKRecords.vue:180", "获取金币数量失败");
}
});
},
@@ -64,31 +85,28 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
}, $data.item.winnerAnchorId == $data.item.anchorIdA ? {} : {}, {
d: common_vendor.t($data.item.anchorIdA),
e: common_vendor.t($options.formatDate($data.item.pkTime)),
f: $data.item.userACoins !== null
}, $data.item.userACoins !== null ? {
g: common_vendor.t($data.item.userACoins)
} : {}, {
h: $data.item.anchorIconB,
i: $data.item.winnerAnchorId == $data.item.anchorIdB
f: common_vendor.t($options.formatCoinNum($data.iconNumber)),
g: $data.item.anchorIconB,
h: $data.item.winnerAnchorId == $data.item.anchorIdB
}, $data.item.winnerAnchorId == $data.item.anchorIdB ? {} : {}, {
j: common_vendor.t($data.item.anchorIdB),
k: common_vendor.t($options.formatDate($data.item.pkTime)),
l: $data.item.userBCoins !== null
i: common_vendor.t($data.item.anchorIdB),
j: common_vendor.t($options.formatDate($data.item.pkTime)),
k: $data.item.userBCoins !== null
}, $data.item.userBCoins !== null ? {
m: common_vendor.t($data.item.userBCoins)
l: common_vendor.t($options.formatCoinNum($data.item.userBCoins))
} : {}, {
n: common_vendor.f($data.coinNumlist, (items, index, i0) => {
m: common_vendor.f($data.coinNumlist, (items, index, i0) => {
return {
a: common_vendor.t(items.anchorCoinA),
a: common_vendor.t($options.formatCoinNum(items.anchorCoinA)),
b: items.anchorIdA == items.winnerAnchorId ? "#00fbff21" : "#ff000011",
c: common_vendor.t(items.anchorCoinB),
c: common_vendor.t($options.formatCoinNum(items.anchorCoinB)),
d: items.anchorIdB == items.winnerAnchorId ? "#00fbff21" : "#ff000011",
e: index,
f: "414631de-0-" + i0
};
}),
o: common_vendor.o$1((...args) => $options.onRefresherRefresh && $options.onRefresherRefresh(...args)),
p: $data.triggered
n: common_vendor.o$1((...args) => $options.onRefresherRefresh && $options.onRefresherRefresh(...args)),
o: $data.triggered
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-414631de"]]);

View File

@@ -1 +1 @@
<view class="details-pkrecords data-v-414631de"><view class="bg data-v-414631de"><image class="bgImg data-v-414631de" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/HomeBackground.png" mode="scaleToFill"/></view><view class="Return data-v-414631de" bindtap="{{a}}"><image class="ReturnImg data-v-414631de" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Return.png" mode="scaleToFill"/></view><view class="title data-v-414631de">PK记录详情</view><view class="pkrecords data-v-414631de"><view class="card data-v-414631de"><view class="AnchorA data-v-414631de"><view class="Anchor data-v-414631de"><view class="AnchorAImg data-v-414631de"><image class="AnchorAImgcss data-v-414631de" src="{{b}}" mode="scaleToFill"/></view><image wx:if="{{c}}" class="Crown data-v-414631de" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Crown.png" mode="scaleToFill"/></view><view class="AnchorAinfo data-v-414631de"><view class="AnchorAname data-v-414631de">{{d}}</view><view class="AnchorATime data-v-414631de">{{e}}</view><view wx:if="{{f}}" class="AnchorAICon data-v-414631de"><view class="AnchorAIContext data-v-414631de">实际打金币:</view><view class="AnchorAIConNum data-v-414631de">{{g}}K</view></view></view></view><view class="vstext data-v-414631de"><view class="Vtext data-v-414631de">V</view><view class="Stext data-v-414631de">S</view></view><view class="AnchorB data-v-414631de"><view class="Anchor data-v-414631de"><view class="AnchorAImg data-v-414631de"><image class="AnchorBImgcss data-v-414631de" src="{{h}}" mode="scaleToFill"/></view><image wx:if="{{i}}" class="Crown data-v-414631de" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Crown.png" mode="scaleToFill"/></view><view class="AnchorBinfo data-v-414631de"><view class="AnchorAname data-v-414631de">{{j}}</view><view class="AnchorATime data-v-414631de">{{k}}</view><view wx:if="{{l}}" class="AnchorAICon data-v-414631de"><view class="AnchorAIContext data-v-414631de">实际打金币:</view><view class="AnchorAIConNum data-v-414631de">{{m}}K</view></view></view></view></view><view class="pkrecords-content data-v-414631de"><scroll-view show-scrollbar="false" scroll-y="true" class="scroll data-v-414631de" refresher-enabled="true" refresher-threshold="40" bindrefresherrefresh="{{o}}" refresher-triggered="{{p}}"><uni-card wx:for="{{n}}" wx:for-item="items" wx:key="e" class="data-v-414631de" u-s="{{['d']}}" u-i="{{items.f}}" bind:__l="__l"><view class="contentcard data-v-414631de"><view class="contentcard-titleA data-v-414631de" style="{{'background-color:' + items.b}}"><view class="ciontext data-v-414631de">金币数量</view><view class="cion data-v-414631de">{{items.a}}K</view></view><view class="contentcard-titleB data-v-414631de" style="{{'background-color:' + items.d}}"><view class="ciontext data-v-414631de">金币数量</view><view class="cion data-v-414631de">{{items.c}}K</view></view></view></uni-card></scroll-view></view></view></view>
<view class="details-pkrecords data-v-414631de"><view class="bg data-v-414631de"><image class="bgImg data-v-414631de" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/HomeBackground.png" mode="scaleToFill"/></view><view class="Return data-v-414631de" bindtap="{{a}}"><image class="ReturnImg data-v-414631de" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Return.png" mode="scaleToFill"/></view><view class="title data-v-414631de">PK记录详情</view><view class="pkrecords data-v-414631de"><view class="card data-v-414631de"><view class="AnchorA data-v-414631de"><view class="Anchor data-v-414631de"><view class="AnchorAImg data-v-414631de"><image class="AnchorAImgcss data-v-414631de" src="{{b}}" mode="scaleToFill"/></view><image wx:if="{{c}}" class="Crown data-v-414631de" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Crown.png" mode="scaleToFill"/></view><view class="AnchorAinfo data-v-414631de"><view class="AnchorAname data-v-414631de">{{d}}</view><view class="AnchorATime data-v-414631de">{{e}}</view><view class="AnchorAICon data-v-414631de"><view class="AnchorAIContext data-v-414631de">实际打金币:</view><view class="AnchorAIConNum data-v-414631de">{{f}}</view></view></view></view><view class="vstext data-v-414631de"><view class="Vtext data-v-414631de">V</view><view class="Stext data-v-414631de">S</view></view><view class="AnchorB data-v-414631de"><view class="Anchor data-v-414631de"><view class="AnchorAImg data-v-414631de"><image class="AnchorBImgcss data-v-414631de" src="{{g}}" mode="scaleToFill"/></view><image wx:if="{{h}}" class="Crown data-v-414631de" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Crown.png" mode="scaleToFill"/></view><view class="AnchorBinfo data-v-414631de"><view class="AnchorAname data-v-414631de">{{i}}</view><view class="AnchorATime data-v-414631de">{{j}}</view><view wx:if="{{k}}" class="AnchorAICon data-v-414631de"><view class="AnchorAIContext data-v-414631de">实际打金币:</view><view class="AnchorAIConNum data-v-414631de">{{l}}</view></view></view></view></view><view class="pkrecords-content data-v-414631de"><scroll-view show-scrollbar="false" scroll-y="true" class="scroll data-v-414631de" refresher-enabled="true" refresher-threshold="40" bindrefresherrefresh="{{n}}" refresher-triggered="{{o}}"><uni-card wx:for="{{m}}" wx:for-item="items" wx:key="e" class="data-v-414631de" u-s="{{['d']}}" u-i="{{items.f}}" bind:__l="__l"><view class="contentcard data-v-414631de"><view class="contentcard-titleA data-v-414631de" style="{{'background-color:' + items.b}}"><view class="ciontext data-v-414631de">金币数量</view><view class="cion data-v-414631de">{{items.a}}</view></view><view class="contentcard-titleB data-v-414631de" style="{{'background-color:' + items.d}}"><view class="ciontext data-v-414631de">金币数量</view><view class="cion data-v-414631de">{{items.c}}</view></view></view></uni-card></scroll-view></view></view></view>

View File

@@ -58,7 +58,7 @@
align-items: center;
margin-right: 30rpx;
}
.Anchor.data-v-414631de{
.Anchor.data-v-414631de {
display: flex;
align-items: center;
}
@@ -162,21 +162,21 @@
flex-direction: column;
align-items: center;
}
.scroll.data-v-414631de{
.scroll.data-v-414631de {
width: 750rpx;
height: 1100rpx;
}
.contentcard.data-v-414631de{
.contentcard.data-v-414631de {
width: 694.66rpx;
height: 161.26rpx;
border-radius: 15rpx;
background-color: #ffffff;
display: flex;
margin-left:28.55rpx;
margin-left: 28.55rpx;
margin-top: 25rpx;
border: #5ed8db solid 1rpx;
}
.contentcard-titleA.data-v-414631de{
.contentcard-titleA.data-v-414631de {
width: 50%;
height: 100%;
display: flex;
@@ -187,7 +187,7 @@
border-top-left-radius: 15rpx;
border-bottom-left-radius: 15rpx;
}
.contentcard-titleB.data-v-414631de{
.contentcard-titleB.data-v-414631de {
width: 50%;
height: 100%;
display: flex;
@@ -197,11 +197,11 @@
border-top-right-radius: 15rpx;
border-bottom-right-radius: 15rpx;
}
.ciontext.data-v-414631de{
.ciontext.data-v-414631de {
font-size: 28rpx;
color: #a2a2a2;
}
.cion.data-v-414631de{
.cion.data-v-414631de {
font-size: 36rpx;
color: #100e0f;
font-weight: bold;