Files
FreeERP.Applet/miniprogram/pages/base/processChildConfig/processChildConfig.ts

78 lines
1.5 KiB
TypeScript
Raw Normal View History

2026-02-13 12:38:48 +08:00
import { loginStatusPage, post } from '@/utils/https';
import { getAuthInfo, toArray } from '@/utils/util';
Page({
/**
*
*/
data: {
process_id: '',
list: [] as any[],
authInfo: {} as any,
},
handleLogin(e: any) {
this.setData({ isLogin: e.detail });
if (e.detail) {
this.init();
}
},
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) });
},
);
},
/**
* --
*/
onLoad(options) {
const { process_id = '', title } = options || {};
if (title) {
wx.setNavigationBarTitle({ title: decodeURIComponent(title) });
}
this.data.process_id = process_id;
loginStatusPage(this);
},
/**
* --
*/
onReady() {},
/**
* --
*/
onShow() {},
/**
* --
*/
onHide() {},
/**
* --
*/
onUnload() {},
/**
* --
*/
onPullDownRefresh() {},
/**
*
*/
onReachBottom() {},
/**
*
*/
onShareAppMessage() {},
});