修改工作台开户建筑必填和优化报错信息,账单支持峰谷
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;
|
||||
|
Reference in New Issue
Block a user