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

Function getToday

activity/jd_5g.js:161–186  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

159 })
160}
161function getToday() {
162 return new Promise((resolve) => {
163 $.post(taskPostUrl('task/getPresetJingTie', "presentAmt=20"), async (err, resp, data) => {
164 try {
165 if (err) {
166 console.log(`${JSON.stringify(err)}`)
167 console.log(`${$.name} API请求失败,请检查网路重试`)
168 } else {
169 data = JSON.parse(data);
170 if (data && data['code'] === 200) {
171 console.log(data.data.rsMsg)
172 } else {
173 console.log(data.msg)
174 if(data.code===1002){
175 $.risk = true
176 }
177 }
178 }
179 } catch (e) {
180 $.logErr(e, resp);
181 } finally {
182 resolve();
183 }
184 })
185 })
186}
187function getActInfo() {
188 return new Promise((resolve) => {
189 $.get(taskUrl('task/findJingTie', ), async (err, resp, data) => {

Callers 1

jdFiveFunction · 0.85

Calls 4

taskPostUrlFunction · 0.70
postMethod · 0.45
logMethod · 0.45
logErrMethod · 0.45

Tested by

no test coverage detected