()
| 118 | |
| 119 | } |
| 120 | async tasklist() { |
| 121 | let options = { |
| 122 | method: 'GET', |
| 123 | url: `https://api.xinc818.com/mini/dailyTask/daily`, |
| 124 | headers: {} |
| 125 | |
| 126 | }; |
| 127 | let { data: result } = await this.request(options); |
| 128 | if (result.code == 0) { |
| 129 | for (let task of result.data) { |
| 130 | await this.getPosts() |
| 131 | if (task.status == false) { |
| 132 | if (task.code == 'BROWSE_PRODUCTS') { |
| 133 | await this.browseGoods() |
| 134 | } |
| 135 | if (task.code == 'COMMENT_POSTS') { |
| 136 | await this.postsComments(this.posts[0].id) |
| 137 | } |
| 138 | if (task.code == 'LIKE_POSTS') { |
| 139 | await this.likePosts(this.posts[0].id) |
| 140 | } |
| 141 | if (task.code == 'FOCUS_USER') { |
| 142 | await this.followUser(this.posts[0].publisherId) |
| 143 | } |
| 144 | if (task.code == 'WANT_GOODS') { |
| 145 | await this.likeGoods() |
| 146 | } |
| 147 | if (task.code == 'SHARE') { |
| 148 | await this.share() |
| 149 | } |
| 150 | //未完成 |
| 151 | //finishNum 已完成的数量 |
| 152 | } |
| 153 | } |
| 154 | } else { |
| 155 | $.log(`❌账号[${this.index}] 任务列表【false】`); |
| 156 | } |
| 157 | |
| 158 | } |
| 159 | async browseGoods(postsId = 22) { |
| 160 | let options = { |
| 161 | method: 'GET', |
no test coverage detected