(body)
| 206 | } |
| 207 | |
| 208 | function doTask(body) { |
| 209 | body = {...body, "encryptProjectId": $.encryptProjectId, "sourceCode": "wh5", "ext": {}} |
| 210 | return new Promise(resolve => { |
| 211 | $.post(taskPostUrl('doInteractiveAssignment', body), (err, resp, data) => { |
| 212 | try { |
| 213 | if (err) { |
| 214 | console.log(`${err},${jsonParse(resp.body)['message']}`) |
| 215 | console.log(`${$.name} API请求失败,请检查网路重试`) |
| 216 | } else { |
| 217 | if (safeGet(data)) { |
| 218 | data = JSON.parse(data) |
| 219 | console.log(data.msg) |
| 220 | if(data.msg==='风险等级未通过') $.risk =1 |
| 221 | } |
| 222 | } |
| 223 | } catch (e) { |
| 224 | $.logErr(e, resp) |
| 225 | } finally { |
| 226 | resolve(data); |
| 227 | } |
| 228 | }) |
| 229 | }) |
| 230 | } |
| 231 | |
| 232 | function showMsg() { |
| 233 | return new Promise(resolve => { |
no test coverage detected