修改工作台开户建筑必填和优化报错信息,账单支持峰谷
This commit is contained in:
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -69,6 +69,7 @@
|
||||
use-button-slot
|
||||
readonly
|
||||
title-width="120rpx"
|
||||
required
|
||||
>
|
||||
<van-button slot="button" size="small" type="info" bind:click="onBuildingFocus">
|
||||
选择
|
||||
|
Reference in New Issue
Block a user