| | |
| | | Object.assign(cb, fun); |
| | | |
| | | $f.post(cb); |
| | | }, |
| | | |
| | | // 获取当前用户的实操事务 |
| | | getOperations(fun) { |
| | | let cb = { |
| | | url: `/operation/get?userId=${app.globalData.accessToken.userId}`, |
| | | }; |
| | | Object.assign(cb, fun); |
| | | |
| | | $f.get(cb); |
| | | }, |
| | | |
| | | // 获取当前用户的实操事务和操作记录 |
| | | getOperationRecords(fun) { |
| | | let cb = { |
| | | url: `/operation/get/record?userId=${app.globalData.accessToken.userId}`, |
| | | }; |
| | | Object.assign(cb, fun); |
| | | |
| | | $f.get(cb); |
| | | }, |
| | | |
| | | // 执行实操事务 |
| | | doOperations({operationId, stateId}, fun) { |
| | | let cb = { |
| | | url: `/operation/execute`, |
| | | params: { |
| | | userId: app.globalData.accessToken.userId, |
| | | operationId, |
| | | stateId |
| | | }, |
| | | }; |
| | | Object.assign(cb, fun); |
| | | |
| | | $f.post(cb); |
| | | } |
| | | }; |