mirror of
https://github.com/Giu-zhao/ios_rule_script
synced 2024-11-22 08:28:25 +08:00
[TestFlight] 支持自定义storefrontId
This commit is contained in:
parent
c4b66cf934
commit
e232240291
@ -545,6 +545,7 @@
|
|||||||
"tf_loop_count",
|
"tf_loop_count",
|
||||||
"tf_session_info",
|
"tf_session_info",
|
||||||
"tf_joined_app_id",
|
"tf_joined_app_id",
|
||||||
|
"tf_storefront_id",
|
||||||
"tf_invalid_app_id",
|
"tf_invalid_app_id",
|
||||||
"tf_check_account_id",
|
"tf_check_account_id",
|
||||||
"tf_join_concurrency",
|
"tf_join_concurrency",
|
||||||
@ -645,6 +646,13 @@
|
|||||||
"placeholder": "",
|
"placeholder": "",
|
||||||
"autoGrow": true,
|
"autoGrow": true,
|
||||||
"desc": "选择一个账号专门用于检测TF是否可以加入,以保护主号"
|
"desc": "选择一个账号专门用于检测TF是否可以加入,以保护主号"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "tf_storefront_id",
|
||||||
|
"name": "自定义storefrontId",
|
||||||
|
"val": "143441-19,29",
|
||||||
|
"type": "input",
|
||||||
|
"desc": "自定义storefrontId,以解决国区账号TestFlight下载App受限问题"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"icons": [
|
"icons": [
|
||||||
|
@ -6,6 +6,7 @@ const tfSessionInfoKey = "tf_session_info";
|
|||||||
const tfCheckSessionTimeKey = "tf_check_session_time";
|
const tfCheckSessionTimeKey = "tf_check_session_time";
|
||||||
const tfCheckSessionTimeDiffKey = "tf_check_session_time_diff";
|
const tfCheckSessionTimeDiffKey = "tf_check_session_time_diff";
|
||||||
const tfAppUseAccountIdKey = "tf_app_use_account_id";
|
const tfAppUseAccountIdKey = "tf_app_use_account_id";
|
||||||
|
const tfStorefrontId = "tf_storefront_id";
|
||||||
const getSessionRegex = /^https:\/\/testflight\.apple\.com\/v3\/accounts\/(\w{8}-\w{4}-\w{4}-\w{4}-\w{12})\/apps$/;
|
const getSessionRegex = /^https:\/\/testflight\.apple\.com\/v3\/accounts\/(\w{8}-\w{4}-\w{4}-\w{4}-\w{12})\/apps$/;
|
||||||
const getFullAppIdRegex = /^https:\/\/testflight\.apple\.com\/v3\/accounts\/\w{8}-\w{4}-\w{4}-\w{4}-\w{12}\/ru\/([a-zA-Z0-9]{8})$/;
|
const getFullAppIdRegex = /^https:\/\/testflight\.apple\.com\/v3\/accounts\/\w{8}-\w{4}-\w{4}-\w{4}-\w{12}\/ru\/([a-zA-Z0-9]{8})$/;
|
||||||
const modifyTFRequest = /^https:\/\/testflight\.apple\.com\/v\d\/accounts\/\w{8}-\w{4}-\w{4}-\w{4}-\w{12}\/apps\/\d+/
|
const modifyTFRequest = /^https:\/\/testflight\.apple\.com\/v\d\/accounts\/\w{8}-\w{4}-\w{4}-\w{4}-\w{12}\/apps\/\d+/
|
||||||
@ -79,7 +80,7 @@ function modifyRequest() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (/\/install$/.test($.request.url) && Object.keys(body).length > 0) {
|
if (/\/install$/.test($.request.url) && Object.keys(body).length > 0) {
|
||||||
body.storefrontId = "143441-19,29";
|
body.storefrontId = $.data.read(tfStorefrontId, "143441-19,29");
|
||||||
}
|
}
|
||||||
return [url, headers, JSON.stringify(body)];
|
return [url, headers, JSON.stringify(body)];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user