账单优化暂存

This commit is contained in:
dragon
2024-12-04 18:39:43 +08:00
parent b71fe59bff
commit d5c4817631
2 changed files with 42 additions and 36 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -42,17 +42,19 @@
index="1" index="1"
v-if="thinkTime(index, item)" v-if="thinkTime(index, item)"
> >
<span class="time">{{ relDate(item.date) }}</span> <!-- <span class="time">{{ relDate(item.date) }}</span> -->
<span>{{ <span>
tab === 11 {{
? $t("diamondLog.共收入") tab === 11
: tab == 1 ? $t("diamondLog.共收入")
? $t("diamondLog.共獲得價值") : tab == 1
: $t("diamondLog.共支出") ? $t("diamondLog.共獲得價值")
}}</span> : $t("diamondLog.共支出")
<span class="total">{{ }}
tab === 1 ? item.totalGiftGoldNumDailySum : item.total </span>
}}</span> <span class="total">
{{ tab === 1 ? item.totalGiftGoldNumDailySum : item.total }}
</span>
<span>{{ <span>{{
tab === 11 tab === 11
? $t("diamondLog.金幣") ? $t("diamondLog.金幣")
@@ -336,13 +338,18 @@
</p> </p>
<!-- <p v-else-if="tab === 1 && item1.objType === 39">房間紅包-發生在{{ item1.roomTitle }}</p> --> <!-- <p v-else-if="tab === 1 && item1.objType === 39">房間紅包-發生在{{ item1.roomTitle }}</p> -->
<div class="diamond"> <div class="diamond">
<img src="@/assets/img/gold.png" alt />
<span>{{ <span>{{
tab == 1 ? item1.giftTotalGoldNum : item1.amount tab == 1 ? item1.giftTotalGoldNum : item1.amount
}}</span> }}</span>
<img src="@/assets/img/gold.png" alt />
</div> </div>
</div> </div>
<p class="in-all-price">{{ relDate(item1.recordTime, 1) }}</p> <p class="in-all-price">
<span v-if="tab === 11 || tab === 12">Balance:12300->30073</span>
<b :style="tab == 1 ? 'text-align: right;width:100%;' : ''">{{
relDate(item1.recordTime, 1)
}}</b>
</p>
</div> </div>
</div> </div>
</van-list> </van-list>
@@ -397,7 +404,6 @@ export default {
}, },
onLoad() { onLoad() {
this.page++; this.page++;
this.finished = true;
diamondLog({ diamondLog({
uid: window.sessionStorage.getItem("uid"), uid: window.sessionStorage.getItem("uid"),
// uid: 935006, // uid: 935006,
@@ -406,7 +412,6 @@ export default {
pageNo: this.page, pageNo: this.page,
pageSize: 100, pageSize: 100,
}).then((res) => { }).then((res) => {
console.log(res.data);
if (res.data.code === 200) { if (res.data.code === 200) {
if (this.page === 1) { if (this.page === 1) {
this.list = res.data.data.billList; this.list = res.data.data.billList;
@@ -414,12 +419,12 @@ export default {
this.list.push(...res.data.data.billList); this.list.push(...res.data.data.billList);
} }
if (res.data.data.billList.length > 0) { if (res.data.data.billList.length > 0) {
this.finished = false; this.finished = true; // 停止监听到底部事件
} }
this.loading = false; this.loading = false;
} else { } else {
Toast(res.data.message); Toast(res.data.message);
this.finished = true; this.finished = true; // 如果出错也停止加载,防止死循环
} }
}); });
}, },
@@ -449,12 +454,12 @@ export default {
// }, // },
//判斷是否相同時間 //判斷是否相同時間
thinkTime(index, item) { thinkTime(index, item) {
let { list } = this; // let { list } = this;
if (!index) return true; // if (!index) return true;
if (list[index].date === list[index - 1].date) { // if (list[index].date === list[index - 1].date) {
return false; // return false;
} // }
return true; return index == 0 ? true : false;
}, },
relDate(value, think) { relDate(value, think) {
return formatDate(value, think); return formatDate(value, think);
@@ -504,12 +509,7 @@ export default {
border-radius: 3px; border-radius: 3px;
&.active { &.active {
// background: #FFA936; // background: #FFA936;
background: linear-gradient( background: linear-gradient(270deg, #e29030 0%, #fcc074 100%);
255deg,
#cc66ff 1%,
#9cb3ff 52%,
#13e2f5 100%
);
} }
} }
} }
@@ -551,16 +551,18 @@ export default {
height: 21px; height: 21px;
margin-top: 14px; margin-top: 14px;
p { p {
font-size: 15px; font-size: 16px;
color: #333333; color: #313131;
width: 7rem; width: 7rem;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
font-weight: 600;
} }
.diamond { .diamond {
display: flex; display: flex;
align-items: center; line-height: 25px;
height: 24px;
img { img {
width: 21px; width: 21px;
height: 21px; height: 21px;
@@ -569,16 +571,20 @@ export default {
color: #ffa936; color: #ffa936;
font-size: 15px; font-size: 15px;
font-weight: bold; font-weight: bold;
margin-left: 5px; margin-right: 5px;
} }
} }
} }
.in-all-price { .in-all-price {
margin-top: 8px; margin-top: 8px;
font-size: 11px; font-size: 13px;
color: #999; color: #7b7b7d;
display: flex;
justify-content: space-between;
span { span {
color: #333; // color: #313131;
// font-size: 16px;
// font-weight: 600;
} }
} }
} }