精简搜索函数, 添加页面
This commit is contained in:
@@ -8,6 +8,7 @@ Page({
|
||||
data: {
|
||||
process: [] as any[],
|
||||
isFirstEnter: true,
|
||||
isLogin: false,
|
||||
},
|
||||
navDetail(e: any) {
|
||||
const index = getDataSet(e).index.split(',');
|
||||
@@ -31,9 +32,13 @@ Page({
|
||||
this.getList();
|
||||
},
|
||||
getList() {
|
||||
post('CompanyProcessV2/getAllProcessNum').then((res: any) => {
|
||||
this.setData({ process: toArray(res.data) });
|
||||
});
|
||||
post('CompanyProcessV2/getAllProcessNum')
|
||||
.then((res: any) => {
|
||||
this.setData({ process: toArray(res.data) });
|
||||
})
|
||||
.finally(() => {
|
||||
wx.stopPullDownRefresh();
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
@@ -78,7 +83,11 @@ Page({
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {},
|
||||
onPullDownRefresh() {
|
||||
if (this.data.isLogin) {
|
||||
this.getList();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
|
||||
Reference in New Issue
Block a user