更新 Scripts/AddMsGames.js
This commit is contained in:
@@ -62,8 +62,8 @@ const REGION_CONFIGS = {
|
||||
},
|
||||
};
|
||||
|
||||
const REMOTE_BASE_READ = "https://locvps.dragonisheep.com/surge?token=xbox123";
|
||||
const REMOTE_BASE_COMMIT = "https://locvps.dragonisheep.com/surge/commit?token=xbox123";
|
||||
const REMOTE_READ_URL = 'https://xbox-bot.biubiubiu-lalala.workers.dev/surge?token=xbox123';
|
||||
const REMOTE_COMMIT_URL = 'https://xbox-bot.biubiubiu-lalala.workers.dev/surge/commit?token=xbox123';
|
||||
const CLIENT_CONTEXT = { client: "UniversalWebStore.Cart", deviceType: "Pc" };
|
||||
const API_URL = "https://cart.production.store-web.dynamics.com/cart/v1.0/cart/loadCart?cartType=consumer&appId=StoreWeb";
|
||||
|
||||
@@ -353,9 +353,6 @@ function runCart(regionCode) {
|
||||
const MUID = $persistentStore.read(MUID_KEY);
|
||||
const MS_CV = $persistentStore.read(CV_KEY);
|
||||
|
||||
const REMOTE_READ_URL = `${REMOTE_BASE_READ}&market=${MARKET}`;
|
||||
const COMMIT_URL = `${REMOTE_BASE_COMMIT}&market=${MARKET}`;
|
||||
|
||||
const HEADERS = {
|
||||
"content-type": "application/json",
|
||||
"accept": "*/*",
|
||||
@@ -479,7 +476,7 @@ ${failedHtml}
|
||||
}
|
||||
log("info", fc === 0 ? "全部成功,提交 commit(弹出当前组)" : `${fc} 个失败,提交 commit(保留失败部分)`);
|
||||
$httpClient.post({
|
||||
url: COMMIT_URL,
|
||||
url: REMOTE_COMMIT_URL,
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({ remaining: failedProducts })
|
||||
}, (_e, _r, commitData) => {
|
||||
@@ -538,7 +535,7 @@ ${failedHtml}
|
||||
if (productList.length === 0) {
|
||||
$notification.post(`⚠️ Xbox ${label}`, "列表为空,无需执行", `来源: ${sourceLabel}`);
|
||||
if (useRemote) {
|
||||
$httpClient.post({ url: COMMIT_URL, headers: { "Content-Type": "application/json" }, body: JSON.stringify({ remaining: {} }) }, () => $done({}));
|
||||
$httpClient.post({ url: REMOTE_COMMIT_URL, headers: { "Content-Type": "application/json" }, body: JSON.stringify({ remaining: {} }) }, () => $done({}));
|
||||
} else {
|
||||
$done({});
|
||||
}
|
||||
@@ -581,4 +578,4 @@ if (!region) {
|
||||
serveSelector();
|
||||
} else {
|
||||
runCart(region);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user