添加onPageLoadInitAuth函数判断登录
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { loginStatusPage, post } from '@/utils/https';
|
||||
import { onPageLoadInitAuth, post } from '@/utils/https';
|
||||
import {
|
||||
cloneLite,
|
||||
getAuthInfo,
|
||||
@@ -27,11 +27,11 @@ Page({
|
||||
this.setData({ isLogin: e.detail });
|
||||
if (e.detail) {
|
||||
this.init();
|
||||
this.getList();
|
||||
}
|
||||
},
|
||||
init() {
|
||||
this.setData({ authInfo: getAuthInfo() });
|
||||
this.getList();
|
||||
},
|
||||
searchChange(e: any) {
|
||||
const key = getDataSet(e).key;
|
||||
@@ -62,16 +62,24 @@ Page({
|
||||
this.data.params.curr_page = curr;
|
||||
this.setData({ params: this.data.params });
|
||||
const temp = cloneLite(this.data.params);
|
||||
|
||||
post('ErpAccount/list', temp).then((res: any) => {
|
||||
const list = toArray(res.data?.list);
|
||||
if (list.length == 0 && this.data.params.curr_page > 1) {
|
||||
this.getList(this.data.params.curr_page - 1);
|
||||
}
|
||||
this.setData({
|
||||
count: toNumber(res.data?.count),
|
||||
list: list,
|
||||
});
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
post('ErpAccount/list', temp)
|
||||
.then((res: any) => {
|
||||
const list = toArray(res.data?.list);
|
||||
if (list.length == 0 && this.data.params.curr_page > 1) {
|
||||
this.getList(this.data.params.curr_page - 1);
|
||||
}
|
||||
this.setData({
|
||||
count: toNumber(res.data?.count),
|
||||
list: list,
|
||||
isLogin: true,
|
||||
});
|
||||
resolve(res);
|
||||
})
|
||||
.catch((res) => {
|
||||
this.setData({ isLogin: false });
|
||||
reject(res);
|
||||
});
|
||||
});
|
||||
},
|
||||
onOrderEdit(e: any) {
|
||||
@@ -142,7 +150,7 @@ Page({
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
loginStatusPage(this);
|
||||
onPageLoadInitAuth(this, () => this.getList());
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { loginStatusPage, post } from '@/utils/https';
|
||||
import { onPageLoadInitAuth, post } from '@/utils/https';
|
||||
import {
|
||||
cloneLite,
|
||||
getAuthInfo,
|
||||
@@ -27,11 +27,11 @@ Page({
|
||||
this.setData({ isLogin: e.detail });
|
||||
if (e.detail) {
|
||||
this.init();
|
||||
this.getList();
|
||||
}
|
||||
},
|
||||
init() {
|
||||
this.setData({ authInfo: getAuthInfo() });
|
||||
this.getList();
|
||||
},
|
||||
searchChange(e: any) {
|
||||
const key = getDataSet(e).key;
|
||||
@@ -62,16 +62,24 @@ Page({
|
||||
this.data.params.curr_page = curr;
|
||||
this.setData({ params: this.data.params });
|
||||
const temp = cloneLite(this.data.params);
|
||||
|
||||
post('ErpCrm/list', temp).then((res: any) => {
|
||||
const list = toArray(res.data?.list);
|
||||
if (list.length == 0 && this.data.params.curr_page > 1) {
|
||||
this.getList(this.data.params.curr_page - 1);
|
||||
}
|
||||
this.setData({
|
||||
count: toNumber(res.data?.count),
|
||||
list: list,
|
||||
});
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
post('ErpCrm/list', temp)
|
||||
.then((res: any) => {
|
||||
const list = toArray(res.data?.list);
|
||||
if (list.length == 0 && this.data.params.curr_page > 1) {
|
||||
this.getList(this.data.params.curr_page - 1);
|
||||
}
|
||||
this.setData({
|
||||
count: toNumber(res.data?.count),
|
||||
list: list,
|
||||
isLogin: true,
|
||||
});
|
||||
resolve(res);
|
||||
})
|
||||
.catch((res) => {
|
||||
this.setData({ isLogin: false });
|
||||
reject(res);
|
||||
});
|
||||
});
|
||||
},
|
||||
onOrderEdit(e: any) {
|
||||
@@ -114,7 +122,7 @@ Page({
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
loginStatusPage(this);
|
||||
onPageLoadInitAuth(this, () => this.getList());
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { loginStatusPage, post } from '@/utils/https';
|
||||
import { onPageLoadInitAuth, post } from '@/utils/https';
|
||||
import {
|
||||
cloneLite,
|
||||
getAuthInfo,
|
||||
@@ -27,11 +27,11 @@ Page({
|
||||
this.setData({ isLogin: e.detail });
|
||||
if (e.detail) {
|
||||
this.init();
|
||||
this.getList();
|
||||
}
|
||||
},
|
||||
init() {
|
||||
this.setData({ authInfo: getAuthInfo() });
|
||||
this.getList();
|
||||
},
|
||||
searchChange(e: any) {
|
||||
const key = getDataSet(e).key;
|
||||
@@ -62,16 +62,24 @@ Page({
|
||||
this.data.params.curr_page = curr;
|
||||
this.setData({ params: this.data.params });
|
||||
const temp = cloneLite(this.data.params);
|
||||
|
||||
post('ErpDepot/list', temp).then((res: any) => {
|
||||
const list = toArray(res.data?.list);
|
||||
if (list.length == 0 && this.data.params.curr_page > 1) {
|
||||
this.getList(this.data.params.curr_page - 1);
|
||||
}
|
||||
this.setData({
|
||||
count: toNumber(res.data?.count),
|
||||
list: list,
|
||||
});
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
post('ErpDepot/list', temp)
|
||||
.then((res: any) => {
|
||||
const list = toArray(res.data?.list);
|
||||
if (list.length == 0 && this.data.params.curr_page > 1) {
|
||||
this.getList(this.data.params.curr_page - 1);
|
||||
}
|
||||
this.setData({
|
||||
count: toNumber(res.data?.count),
|
||||
list: list,
|
||||
isLogin: true,
|
||||
});
|
||||
resolve(res);
|
||||
})
|
||||
.catch((res) => {
|
||||
this.setData({ isLogin: false });
|
||||
reject(res);
|
||||
});
|
||||
});
|
||||
},
|
||||
onOrderEdit(e: any) {
|
||||
@@ -129,7 +137,7 @@ Page({
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
loginStatusPage(this);
|
||||
onPageLoadInitAuth(this, () => this.getList());
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { FinanceItemTypeArr, FinanceItemTypeObj } from '@/utils/config';
|
||||
import { loginStatusPage, post } from '@/utils/https';
|
||||
import { onPageLoadInitAuth, post } from '@/utils/https';
|
||||
import {
|
||||
cloneLite,
|
||||
getAuthInfo,
|
||||
@@ -30,11 +30,11 @@ Page({
|
||||
this.setData({ isLogin: e.detail });
|
||||
if (e.detail) {
|
||||
this.init();
|
||||
this.getList();
|
||||
}
|
||||
},
|
||||
init() {
|
||||
this.setData({ authInfo: getAuthInfo() });
|
||||
this.getList();
|
||||
},
|
||||
searchChange(e: any) {
|
||||
const key = getDataSet(e).key;
|
||||
@@ -65,13 +65,20 @@ Page({
|
||||
this.data.params.curr_page = curr;
|
||||
this.setData({ params: this.data.params });
|
||||
const temp = cloneLite(this.data.params);
|
||||
|
||||
post('ErpFinanceItem/list', temp).then((res: any) => {
|
||||
const list = toArray(res.data?.list);
|
||||
// if (list.length == 0 && this.data.params.curr_page > 1) {
|
||||
// this.getList(this.data.params.curr_page - 1);
|
||||
// }
|
||||
this.setData({ count: toNumber(res.data?.count), list: list });
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
post('ErpFinanceItem/list', temp)
|
||||
.then((res: any) => {
|
||||
const list = toArray(res.data?.list);
|
||||
// if (list.length == 0 && this.data.params.curr_page > 1) {
|
||||
// this.getList(this.data.params.curr_page - 1);
|
||||
// }
|
||||
this.setData({ count: toNumber(res.data?.count), list: list, isLogin: true });
|
||||
resolve(res);
|
||||
})
|
||||
.catch((res) => {
|
||||
this.setData({ isLogin: false });
|
||||
reject(res);
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
@@ -130,7 +137,7 @@ Page({
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
loginStatusPage(this);
|
||||
onPageLoadInitAuth(this, () => this.getList());
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { loginStatusPage, post } from '@/utils/https';
|
||||
import { onPageLoadInitAuth, post } from '@/utils/https';
|
||||
import {
|
||||
cloneLite,
|
||||
getAuthInfo,
|
||||
@@ -27,11 +27,11 @@ Page({
|
||||
this.setData({ isLogin: e.detail });
|
||||
if (e.detail) {
|
||||
this.init();
|
||||
this.getList();
|
||||
}
|
||||
},
|
||||
init() {
|
||||
this.setData({ authInfo: getAuthInfo() });
|
||||
this.getList();
|
||||
},
|
||||
searchChange(e: any) {
|
||||
const key = getDataSet(e).key;
|
||||
@@ -62,13 +62,20 @@ Page({
|
||||
this.data.params.curr_page = curr;
|
||||
this.setData({ params: this.data.params });
|
||||
const temp = cloneLite(this.data.params);
|
||||
|
||||
post('OrderCategory/list', temp).then((res: any) => {
|
||||
const list = toArray(res.data);
|
||||
// if (list.length == 0 && this.data.params.curr_page > 1) {
|
||||
// this.getList(this.data.params.curr_page - 1);
|
||||
// }
|
||||
this.setData({ count: toNumber(res.count), list: list });
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
post('OrderCategory/list', temp)
|
||||
.then((res: any) => {
|
||||
const list = toArray(res.data);
|
||||
// if (list.length == 0 && this.data.params.curr_page > 1) {
|
||||
// this.getList(this.data.params.curr_page - 1);
|
||||
// }
|
||||
this.setData({ count: toNumber(res.count), list: list, isLogin: true });
|
||||
resolve(res);
|
||||
})
|
||||
.catch((res) => {
|
||||
this.setData({ isLogin: false });
|
||||
reject(res);
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
@@ -127,7 +134,7 @@ Page({
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
loginStatusPage(this);
|
||||
onPageLoadInitAuth(this, () => this.getList());
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { loginStatusPage, post } from '@/utils/https';
|
||||
import { onPageLoadInitAuth, post } from '@/utils/https';
|
||||
import {
|
||||
cloneLite,
|
||||
getAuthInfo,
|
||||
@@ -27,11 +27,11 @@ Page({
|
||||
this.setData({ isLogin: e.detail });
|
||||
if (e.detail) {
|
||||
this.init();
|
||||
this.getList();
|
||||
}
|
||||
},
|
||||
init() {
|
||||
this.setData({ authInfo: getAuthInfo() });
|
||||
this.getList();
|
||||
},
|
||||
searchChange(e: any) {
|
||||
const key = getDataSet(e).key;
|
||||
@@ -62,16 +62,24 @@ Page({
|
||||
this.data.params.curr_page = curr;
|
||||
this.setData({ params: this.data.params });
|
||||
const temp = cloneLite(this.data.params);
|
||||
|
||||
post('OrderStep/list', temp).then((res: any) => {
|
||||
const list = toArray(res.data);
|
||||
// if (list.length == 0 && this.data.params.curr_page > 1) {
|
||||
// this.getList(this.data.params.curr_page - 1);
|
||||
// }
|
||||
this.setData({
|
||||
count: toNumber(res.count),
|
||||
list: list,
|
||||
});
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
post('OrderStep/list', temp)
|
||||
.then((res: any) => {
|
||||
const list = toArray(res.data);
|
||||
// if (list.length == 0 && this.data.params.curr_page > 1) {
|
||||
// this.getList(this.data.params.curr_page - 1);
|
||||
// }
|
||||
this.setData({
|
||||
count: toNumber(res.count),
|
||||
list: list,
|
||||
isLogin: true,
|
||||
});
|
||||
resolve(res);
|
||||
})
|
||||
.catch((res) => {
|
||||
this.setData({ isLogin: false });
|
||||
reject(res);
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
@@ -128,7 +136,7 @@ Page({
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
loginStatusPage(this);
|
||||
onPageLoadInitAuth(this, () => this.getList());
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { loginStatusPage, post } from '@/utils/https';
|
||||
import { onPageLoadInitAuth, post } from '@/utils/https';
|
||||
import { getAuthInfo, toArray } from '@/utils/util';
|
||||
|
||||
Page({
|
||||
@@ -14,18 +14,24 @@ Page({
|
||||
this.setData({ isLogin: e.detail });
|
||||
if (e.detail) {
|
||||
this.init();
|
||||
this.getList();
|
||||
}
|
||||
},
|
||||
init() {
|
||||
this.setData({ authInfo: getAuthInfo() });
|
||||
this.getList();
|
||||
},
|
||||
getList() {
|
||||
post('CompanyProcessV2/getChildProcess', { process_id: this.data.process_id }).then(
|
||||
(res: any) => {
|
||||
this.setData({ list: toArray(res.data) });
|
||||
},
|
||||
);
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
post('CompanyProcessV2/getChildProcess', { process_id: this.data.process_id })
|
||||
.then((res: any) => {
|
||||
this.setData({ list: toArray(res.data), isLogin: true });
|
||||
resolve(res);
|
||||
})
|
||||
.catch((res) => {
|
||||
this.setData({ isLogin: false });
|
||||
reject(res);
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -37,7 +43,7 @@ Page({
|
||||
wx.setNavigationBarTitle({ title: decodeURIComponent(title) });
|
||||
}
|
||||
this.data.process_id = process_id;
|
||||
loginStatusPage(this);
|
||||
onPageLoadInitAuth(this, () => this.getList());
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<t-cell-group custom-style="margin: 0">
|
||||
<block wx:for="{{list}}" wx:key="index">
|
||||
<t-cell title="{{item.process_name}}" note="{{item.process_code}}" data-index="{{index}}"
|
||||
bind:tap="onChildProcess" description="提成值: {{item.bonus_value || '未配置'}}">
|
||||
description="提成值: {{item.bonus_value || '未配置'}}">
|
||||
<view slot="left-icon" style="color: #999;line-height: 1.5;">
|
||||
{{index + 1}}
|
||||
</view>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { loginStatusPage, post } from '@/utils/https';
|
||||
import { onPageLoadInitAuth, post } from '@/utils/https';
|
||||
import { getAuthInfo, getDataSet, toArray } from '@/utils/util';
|
||||
|
||||
Page({
|
||||
@@ -13,15 +13,23 @@ Page({
|
||||
this.setData({ isLogin: e.detail });
|
||||
if (e.detail) {
|
||||
this.init();
|
||||
this.getList();
|
||||
}
|
||||
},
|
||||
init() {
|
||||
this.setData({ authInfo: getAuthInfo() });
|
||||
this.getList();
|
||||
},
|
||||
getList() {
|
||||
post('CompanyProcessV2/getParentProcess').then((res: any) => {
|
||||
this.setData({ list: toArray(res.data) });
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
post('CompanyProcessV2/getParentProcess')
|
||||
.then((res: any) => {
|
||||
this.setData({ list: toArray(res.data), isLogin: true });
|
||||
resolve(res);
|
||||
})
|
||||
.catch((res) => {
|
||||
this.setData({ isLogin: false });
|
||||
reject(res);
|
||||
});
|
||||
});
|
||||
},
|
||||
onChildProcess(e: any) {
|
||||
@@ -38,7 +46,7 @@ Page({
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(_options) {
|
||||
loginStatusPage(this);
|
||||
onPageLoadInitAuth(this, () => this.getList());
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { loginStatusPage, post } from '@/utils/https';
|
||||
import { onPageLoadInitAuth, post } from '@/utils/https';
|
||||
import {
|
||||
cloneLite,
|
||||
getAuthInfo,
|
||||
@@ -27,11 +27,11 @@ Page({
|
||||
this.setData({ isLogin: e.detail });
|
||||
if (e.detail) {
|
||||
this.init();
|
||||
this.getList();
|
||||
}
|
||||
},
|
||||
init() {
|
||||
this.setData({ authInfo: getAuthInfo() });
|
||||
this.getList();
|
||||
},
|
||||
searchChange(e: any) {
|
||||
const key = getDataSet(e).key;
|
||||
@@ -62,16 +62,24 @@ Page({
|
||||
this.data.params.curr_page = curr;
|
||||
this.setData({ params: this.data.params });
|
||||
const temp = cloneLite(this.data.params);
|
||||
|
||||
post('ProductType/list', temp).then((res: any) => {
|
||||
const list = toArray(res.data);
|
||||
// if (list.length == 0 && this.data.params.curr_page > 1) {
|
||||
// this.getList(this.data.params.curr_page - 1);
|
||||
// }
|
||||
this.setData({
|
||||
count: toNumber(res.count),
|
||||
list: list,
|
||||
});
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
post('ProductType/list', temp)
|
||||
.then((res: any) => {
|
||||
const list = toArray(res.data);
|
||||
// if (list.length == 0 && this.data.params.curr_page > 1) {
|
||||
// this.getList(this.data.params.curr_page - 1);
|
||||
// }
|
||||
this.setData({
|
||||
count: toNumber(res.count),
|
||||
list: list,
|
||||
isLogin: true,
|
||||
});
|
||||
resolve(res);
|
||||
})
|
||||
.catch((res) => {
|
||||
this.setData({ isLogin: false });
|
||||
reject(res);
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
@@ -130,7 +138,7 @@ Page({
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
loginStatusPage(this);
|
||||
onPageLoadInitAuth(this, () => this.getList());
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { loginStatusPage, post } from '@/utils/https';
|
||||
import { onPageLoadInitAuth, post } from '@/utils/https';
|
||||
import {
|
||||
cloneLite,
|
||||
getAuthInfo,
|
||||
@@ -27,11 +27,11 @@ Page({
|
||||
this.setData({ isLogin: e.detail });
|
||||
if (e.detail) {
|
||||
this.init();
|
||||
this.getList();
|
||||
}
|
||||
},
|
||||
init() {
|
||||
this.setData({ authInfo: getAuthInfo() });
|
||||
this.getList();
|
||||
},
|
||||
searchChange(e: any) {
|
||||
const key = getDataSet(e).key;
|
||||
@@ -62,16 +62,24 @@ Page({
|
||||
this.data.params.curr_page = curr;
|
||||
this.setData({ params: this.data.params });
|
||||
const temp = cloneLite(this.data.params);
|
||||
|
||||
post('ErpCrm/list', temp).then((res: any) => {
|
||||
const list = toArray(res.data?.list);
|
||||
if (list.length == 0 && this.data.params.curr_page > 1) {
|
||||
this.getList(this.data.params.curr_page - 1);
|
||||
}
|
||||
this.setData({
|
||||
count: toNumber(res.data?.count),
|
||||
list: list,
|
||||
});
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
post('ErpCrm/list', temp)
|
||||
.then((res: any) => {
|
||||
const list = toArray(res.data?.list);
|
||||
if (list.length == 0 && this.data.params.curr_page > 1) {
|
||||
this.getList(this.data.params.curr_page - 1);
|
||||
}
|
||||
this.setData({
|
||||
count: toNumber(res.data?.count),
|
||||
list: list,
|
||||
isLogin: true,
|
||||
});
|
||||
resolve(res);
|
||||
})
|
||||
.catch((res) => {
|
||||
this.setData({ isLogin: false });
|
||||
reject(res);
|
||||
});
|
||||
});
|
||||
},
|
||||
onOrderEdit(e: any) {
|
||||
@@ -114,7 +122,7 @@ Page({
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
loginStatusPage(this);
|
||||
onPageLoadInitAuth(this, () => this.getList());
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { loginStatusPage, post } from '@/utils/https';
|
||||
import { onPageLoadInitAuth, post } from '@/utils/https';
|
||||
import { toArray, toNumber } from '@/utils/util';
|
||||
|
||||
Page({
|
||||
@@ -14,40 +14,47 @@ Page({
|
||||
this.setData({ isLogin: e.detail });
|
||||
if (e.detail) {
|
||||
this.init();
|
||||
this.getList();
|
||||
}
|
||||
},
|
||||
init() {
|
||||
this.getList();
|
||||
},
|
||||
init() {},
|
||||
|
||||
getList() {
|
||||
post('Index/index')
|
||||
.then((res: any) => {
|
||||
const process_count = toArray(res.process_count).filter((el) => {
|
||||
el.count = toNumber(el.count);
|
||||
return el.count > 0;
|
||||
});
|
||||
const arr = toArray(res.seven_process_count).filter((el) => {
|
||||
el.count = toNumber(el.count);
|
||||
return el.count > 0;
|
||||
});
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
post('Index/index')
|
||||
.then((res: any) => {
|
||||
const process_count = toArray(res.process_count).filter((el) => {
|
||||
el.count = toNumber(el.count);
|
||||
return el.count > 0;
|
||||
});
|
||||
const arr = toArray(res.seven_process_count).filter((el) => {
|
||||
el.count = toNumber(el.count);
|
||||
return el.count > 0;
|
||||
});
|
||||
|
||||
const map = new Map<string, any>();
|
||||
arr.forEach((el) => {
|
||||
if (!map.has(el.date)) {
|
||||
map.set(el.date, []);
|
||||
}
|
||||
map.get(el.date).push(el);
|
||||
const map = new Map<string, any>();
|
||||
arr.forEach((el) => {
|
||||
if (!map.has(el.date)) {
|
||||
map.set(el.date, []);
|
||||
}
|
||||
map.get(el.date).push(el);
|
||||
});
|
||||
// console.log([...map.values()]);
|
||||
this.setData({
|
||||
seven_process_count: [...map.values()],
|
||||
process_count: process_count,
|
||||
isLogin: true,
|
||||
});
|
||||
resolve(res);
|
||||
})
|
||||
.catch((res) => {
|
||||
this.setData({ isLogin: false });
|
||||
reject(res);
|
||||
})
|
||||
.finally(() => {
|
||||
wx.stopPullDownRefresh();
|
||||
});
|
||||
// console.log([...map.values()]);
|
||||
this.setData({
|
||||
seven_process_count: [...map.values()],
|
||||
process_count: process_count,
|
||||
});
|
||||
})
|
||||
.finally(() => {
|
||||
wx.stopPullDownRefresh();
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -64,7 +71,7 @@ Page({
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
loginStatusPage(this);
|
||||
onPageLoadInitAuth(this, () => this.getList());
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user