MCPcopy Create free account
hub / github.com/chavyleung/scripts / openBackpack

Function openBackpack

zsfc/zsfc.js:589–611  ·  view source on GitHub ↗

* @description 掌飞签到相关函数,浏览背包 * @returns {Promise } 返回空的 Promise 对象。

()

Source from the content-addressed store, hash-verified

587 * @returns {Promise<object>} 返回空的 Promise 对象。
588 */
589async function openBackpack() {
590 // 构建请求体
591 const options = {
592 url: `https://mwegame.qq.com/yoyo/dnf/phpgameproxypass`,
593 body: $.queryStr({
594 uin: $.read(`zsfc_uin`),
595 areaId: $.read(`zsfc_areaId`),
596 userId: $.read(`zsfc_userId`),
597 token: $.read(`zsfc_token`),
598 service: `dnf_getspeedknapsack`,
599 cGameId: `1003` // 必须传入这个参数才可以完成任务
600 })
601 };
602
603 // 返回一个 Promise 对象,用于异步操作
604 return new Promise(resolve => {
605 // 发送 POST 请求
606 $.post(options, (error, response, data) => {
607 // 只需要发送请求即可, 不进行任何处理
608 resolve();
609 });
610 });
611}
612
613/**
614 * @description 掌飞购物相关函数,判断用户是否为会员用户。

Callers 1

zsfc.jsFile · 0.85

Calls 2

queryStrMethod · 0.45
postMethod · 0.45

Tested by

no test coverage detected