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

Function queryChannelsList

jd_small_home.js:351–375  ·  view source on GitHub ↗
(taskId)

Source from the content-addressed store, hash-verified

349}
350//获取需要关注的频道列表
351function queryChannelsList(taskId) {
352 return new Promise(resolve => {
353 $.get(taskUrl(`ssjj-task-channels/queryChannelsList/${taskId}`), (err, resp, data) => {
354 try {
355 if (err) {
356 console.log(`${JSON.stringify(err)}`)
357 console.log(`${$.name} API请求失败,请检查网路重试`)
358 } else {
359 if (safeGet(data)) {
360 data = JSON.parse(data);
361 if (data.head.code === 200) {
362 if (data.body) {
363 $.queryChannelsList = data.body;
364 }
365 }
366 }
367 }
368 } catch (e) {
369 $.logErr(e, resp)
370 } finally {
371 resolve(data);
372 }
373 })
374 })
375}
376
377//浏览频道,浏览会场,浏览商品,浏览店铺API
378function browseChannels(functionID ,taskId, browseId) {

Callers 1

doChannelsListTaskFunction · 0.85

Calls 5

taskUrlFunction · 0.70
safeGetFunction · 0.70
getMethod · 0.45
logMethod · 0.45
logErrMethod · 0.45

Tested by

no test coverage detected