MCPcopy Create free account
hub / github.com/Semporia/Scripts / isFollowed

Function isFollowed

jd_try.js:304–321  ·  view source on GitHub ↗
(good)

Source from the content-addressed store, hash-verified

302}
303
304function isFollowed(good) {
305 return new Promise((resolve, reject) => {
306 $.get(taskurl(`${selfDomain}/isFollowed?id=${good.shopId}`, good.id), (err, resp, data) => {
307 try {
308 if (err) {
309 console.log(`🚫 ${arguments.callee.name.toString()} API请求失败,请检查网路\n${JSON.stringify(err)}`)
310 } else {
311 data = JSON.parse(data)
312 resolve(data.success && data.data)
313 }
314 } catch (e) {
315 reject(`⚠️ ${arguments.callee.name.toString()} API返回结果解析出错\n${e}\n${JSON.stringify(data)}`)
316 } finally {
317 resolve(false)
318 }
319 })
320 })
321}
322
323function followShop(good) {
324 return new Promise((resolve, reject) => {

Callers 1

tryGoodListFunction · 0.85

Calls 3

taskurlFunction · 0.70
getMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected