| 192 | }) |
| 193 | } |
| 194 | function doubleSign() { |
| 195 | return new Promise((resolve) => { |
| 196 | $.get(taskUrl("double_sign/IssueReward",), async (err, resp, data) => { |
| 197 | try { |
| 198 | if (err) { |
| 199 | console.log(`${JSON.stringify(err)}`) |
| 200 | console.log(`${$.name} API请求失败,请检查网路重试`) |
| 201 | } else { |
| 202 | if (safeGet(data)) { |
| 203 | data = JSON.parse(data); |
| 204 | if(data.retCode ===0){ |
| 205 | console.log(`双签成功,获得金币${data.data.jd_amount / 100}元`) |
| 206 | $.money += data.data.jd_amount / 100 |
| 207 | }else{ |
| 208 | console.log(`任务完成失败,错误信息${data.errMsg}`) |
| 209 | } |
| 210 | } |
| 211 | } |
| 212 | } catch (e) { |
| 213 | $.logErr(e, resp) |
| 214 | } finally { |
| 215 | resolve(data); |
| 216 | } |
| 217 | }) |
| 218 | }) |
| 219 | } |
| 220 | function showMsg() { |
| 221 | message+=`本次运行获得金币${$.coins},现金${$.money}` |
| 222 | return new Promise(resolve => { |