| 240 | } |
| 241 | |
| 242 | async function flushTaskRecords(){ |
| 243 | let headers = { |
| 244 | "Cookie": config.xm_cookie, |
| 245 | 'Content-Type' : `application/json` |
| 246 | } |
| 247 | let body = `{"aid":112}` |
| 248 | let myRequest = { |
| 249 | url: `http://m.ximalaya.com/web-activity/task/v2/taskRecords?tag=pc`, |
| 250 | headers: headers, |
| 251 | body: body |
| 252 | } |
| 253 | return await $.http.post(myRequest).then( |
| 254 | (response) => { |
| 255 | body = JSON.parse(response.body) |
| 256 | if (body.ret == 0) { |
| 257 | $.log("- 刷新列表成功") |
| 258 | return true |
| 259 | } else { |
| 260 | $.log("- !!!刷新列表失败") |
| 261 | return false |
| 262 | } |
| 263 | },(reason) => { |
| 264 | $.log("- !!!刷新列表失败") |
| 265 | return false |
| 266 | } |
| 267 | ) |
| 268 | } |
| 269 | |
| 270 | async function share(){ |
| 271 | let headers = { |