| 200 | } |
| 201 | } |
| 202 | async likePosts() { |
| 203 | //找到posts里面liked为false的 |
| 204 | let posts = this.posts.filter(item => item.liked == false) |
| 205 | |
| 206 | let options = { |
| 207 | method: 'PUT', |
| 208 | url: `https://api.xinc818.com/mini/posts/like`, |
| 209 | headers: { |
| 210 | "Content-Type": "application/json", |
| 211 | }, |
| 212 | data: { "postsId": posts, "decision": true } |
| 213 | |
| 214 | }; |
| 215 | |
| 216 | let { data: result } = await this.request(options); |
| 217 | if (result.code == 0) { |
| 218 | console.log(result); |
| 219 | |
| 220 | $.log(`✅账号[${this.index}] 【点赞帖子】成功 获得积分【${result.data.singleReward}】🎉`) |
| 221 | } |
| 222 | } |
| 223 | |
| 224 | async followUser(postsId) { |
| 225 | let options = { |