()
| 90 | } |
| 91 | |
| 92 | function getUserInfo() { |
| 93 | return new Promise(resolve => { |
| 94 | $.get(taskUrl('userinfo/GetUserInfo'), async (err, resp, data) => { |
| 95 | try { |
| 96 | const { ret, data: { factoryList = [], productionList = [], user = {} } = {}, msg } = JSON.parse(data); |
| 97 | $.log(`\n获取用户信息:${msg}\n${$.showLog ? data : ''}`); |
| 98 | $.info = { |
| 99 | ...$.info, |
| 100 | factoryInfo: factoryList[0], |
| 101 | productionInfo: productionList[0], |
| 102 | user, |
| 103 | }; |
| 104 | resolve({ |
| 105 | factoryInfo: factoryList[0], |
| 106 | productionInfo: productionList[0], |
| 107 | user, |
| 108 | }); |
| 109 | } catch (e) { |
| 110 | $.logErr(e, resp); |
| 111 | } finally { |
| 112 | resolve(); |
| 113 | } |
| 114 | }); |
| 115 | }); |
| 116 | } |
| 117 | |
| 118 | async function getMyComponent() { |
| 119 | let meStatus = [false]; |
no test coverage detected