MCPcopy Create free account
hub / github.com/smallfawn/QLScriptPublic / read_status

Method read_status

xiaosatonglu.js:171–195  ·  view source on GitHub ↗
(articleId)

Source from the content-addressed store, hash-verified

169 }
170 }
171 async read_status(articleId) {
172 try {
173 let options = {
174 fn: "阅读状态",
175 method: "get",
176 url: `https://wxapi.hoolo.tv/event/dtqp/index.php?s=/home/TmApi/getUserRead&accountId=${this.accountId}&articleId=${articleId}&type=jsonp`,
177 headers: this.get_headers(),
178 };
179 let { body: result } = await httpRequest(options);
180 //console.log(options);
181 result = JSON.parse(result);
182 //console.log(result);
183 if (result.read_effective == 1) {
184 this.artReadStatus = true;
185 await this.read_task(articleId)
186 } else if (result.read_effective == 0) {
187 this.artReadStatus = false;
188 } else {
189 console.log(`❌[${options.fn}]失败`);
190 console.log(JSON.stringify(result));
191 }
192 } catch (e) {
193 //console.log(e);
194 }
195 }
196 async read_task(articleId) {
197 try {
198 let options = {

Callers 1

mainMethod · 0.95

Calls 4

get_headersMethod · 0.95
read_taskMethod · 0.95
httpRequestFunction · 0.70
logMethod · 0.45

Tested by

no test coverage detected