账单优化暂存

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