* 帖子列表 *
()
| 506 | * |
| 507 | */ |
| 508 | async art_list() { |
| 509 | try { |
| 510 | let bodydata = { queryPostType: "NEWEST", pageNo: 1, pageSize: 20 }; |
| 511 | let options = { |
| 512 | url: `https://gw.nevapp.gtmc.com.cn/main/api/community/post/page`, |
| 513 | headers: this.getHeadersPost_h5(), |
| 514 | body: JSON.stringify(bodydata), |
| 515 | }, |
| 516 | result = await httpRequest(options); |
| 517 | //console.log(options); |
| 518 | //console.log(result); |
| 519 | if (result.header.code == "10000000") { |
| 520 | for (let i = 0; i < 10; i++) { |
| 521 | DoubleLog(`账号[${this.index}] 文章 [${result.body.list[i].id}]`); |
| 522 | let artId = result.body.list[i].id; |
| 523 | //DoubleLog('开始浏览') |
| 524 | await $.wait(5000); |
| 525 | await this.task_read(artId); |
| 526 | //DoubleLog('开始点赞') |
| 527 | await $.wait(5000); |
| 528 | await this.task_like(artId); |
| 529 | //DoubleLog('开始分享') |
| 530 | await $.wait(5000); |
| 531 | await this.task_share(artId); |
| 532 | } |
| 533 | } else { |
| 534 | DoubleLog(`账号[${this.index}] 获取帖子列表:失败 ❌ 了呢,原因未知!`); |
| 535 | console.log(result); |
| 536 | } |
| 537 | } catch (e) { |
| 538 | console.log(e); |
| 539 | } |
| 540 | } |
| 541 | async refresh_token() { |
| 542 | let headers = this.getHeadersPost_android() |
| 543 | headers['DeviceId'] = '417d0945-b207-44ea-b185-c5673d268b81' |
no test coverage detected