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

Function throwDice

jd_jump.js:241–260  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

239}
240
241async function throwDice() {
242 console.log('丢骰子');
243 const myRequest = getGetRequest('throwDice', `activityId=${$.jumpId}&fp=&eid=`);
244 return new Promise(async resolve => {
245 $.get(myRequest, (err, resp, data) => {
246 try {
247 //console.log(data);
248 if (data) {
249 data = JSON.parse(data);
250 $.gridType = data.data.gridInfo && data.data.gridInfo.gridType;
251 console.log(`丢骰子结果:${$.gridType}`);
252 }
253 } catch (e) {
254 $.logErr(e, resp)
255 } finally {
256 resolve($.gridType);
257 }
258 })
259 })
260}
261
262async function getBeanRewards() {
263 const myRequest = getGetRequest('getBeanRewards', `activityId=${$.jumpId}`);

Callers 1

jumpFunction · 0.85

Calls 4

getGetRequestFunction · 0.70
logMethod · 0.45
getMethod · 0.45
logErrMethod · 0.45

Tested by

no test coverage detected