修改工作台开户建筑必填和优化报错信息,账单支持峰谷

This commit is contained in:
2025-04-22 18:00:12 +08:00
parent 721937fa5b
commit fb9e727efd
9 changed files with 360 additions and 65 deletions

View File

@@ -1,5 +1,5 @@
import { getBillList } from "../../service/accounting"
import { alertInfo } from "../../utils/index";
import { alertInfo, loadingFunc } from "../../utils/index";
import request from '../../utils/request'
const { OK } = request;
@@ -17,11 +17,19 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.init();
const that = this;
loadingFunc(async () => {
await that.init();
})
},
async init() {
const { page, list } = this.data;
const { code, data, message } = await getBillList(page)
if (code !== OK) {
alertInfo(message)
return;
}
if (!data?.length) {
alertInfo("没有更多了")
return;

View File

@@ -14,7 +14,7 @@ Component({
},
lifetimes: {
attached() {
loadingFunc(() => this.init())
loadingFunc(async () => await this.init())
}
},
/**
@@ -42,7 +42,7 @@ Component({
this.setData({ list: data, selectList: new Array(data?.length).map(() => false), allChecked: false, })
},
onRefresh() {
loadingFunc(() => this.init())
loadingFunc(async () => await this.init())
},
onChange(e) {
const { id, index } = e.currentTarget.dataset;

View File

@@ -69,6 +69,7 @@
use-button-slot
readonly
title-width="120rpx"
required
>
<van-button slot="button" size="small" type="info" bind:click="onBuildingFocus">
选择