快捷动作【REFILL】修复
This commit is contained in:
parent
2285b3f41e
commit
6234424aa6
@ -1,5 +1,13 @@
|
||||
# CHANGE
|
||||
|
||||
## 1.2.1
|
||||
|
||||
2024年04月03日
|
||||
|
||||
### 修改
|
||||
|
||||
- 快捷动作【REFILL】修复
|
||||
|
||||
## 1.2.0
|
||||
|
||||
2024年03月29日
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "wuhu-torn-helper",
|
||||
"version": "1.2.0",
|
||||
"version": "1.2.1",
|
||||
"description": "芜湖助手",
|
||||
"scripts": {
|
||||
"release": "cross-env NODE_ENV=production rollup -c && node build.mjs",
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -69,11 +69,11 @@
|
||||
<el-icon>♻️</el-icon>
|
||||
<span>REFILL</span>
|
||||
</template>
|
||||
<el-menu-item @click="handleRefil('energyrefill2')">能量E
|
||||
<el-menu-item @click="handleRefil('refillEnergy')">能量E
|
||||
</el-menu-item>
|
||||
<el-menu-item @click="handleRefil('nerverefill2')">犯罪N
|
||||
<el-menu-item @click="handleRefil('refillNerve')">犯罪N
|
||||
</el-menu-item>
|
||||
<el-menu-item @click="handleRefil('casinotokens2')">赌场代币
|
||||
<el-menu-item @click="handleRefil('refillCasinoTokens')">赌场代币
|
||||
</el-menu-item>
|
||||
</el-sub-menu>
|
||||
</el-menu>
|
||||
@ -273,30 +273,39 @@ const editableTabsValue = ref('')
|
||||
const editableTabs = shallowRef([])
|
||||
|
||||
// refil
|
||||
const handleRefil = (method: 'nerverefill2' | 'energyrefill2' | 'casinotokens2') => {
|
||||
fetch(window.addRFC('https://www.torn.com/points.php?step=pointsbuy&action=' + method), {
|
||||
const handleRefil = (method: 'refillEnergy' | 'refillNerve' | 'refillCasinoTokens') => {
|
||||
fetch(window.addRFC("https://www.torn.com/page.php?sid=pointsBuildingExchange"), {
|
||||
"headers": {
|
||||
"accept": "text/plain, */*; q=0.01",
|
||||
"sec-ch-ua-mobile": "?0",
|
||||
"accept": "*/*",
|
||||
"accept-language": "zh-CN,zh;q=0.9",
|
||||
"sec-fetch-dest": "empty",
|
||||
"sec-fetch-mode": "cors",
|
||||
"sec-fetch-site": "same-origin",
|
||||
"x-requested-with": "XMLHttpRequest"
|
||||
},
|
||||
"referrer": "https://www.torn.com/points.php",
|
||||
"referrer": "https://www.torn.com/page.php?sid=points",
|
||||
"referrerPolicy": "strict-origin-when-cross-origin",
|
||||
"body": null,
|
||||
"method": "GET",
|
||||
"body": (() => {
|
||||
const data = new FormData();
|
||||
data.append('key', 'refillNerve');
|
||||
return data;
|
||||
})(),
|
||||
"method": "POST",
|
||||
"mode": "cors",
|
||||
"credentials": "include"
|
||||
})
|
||||
.then(res => res.json())
|
||||
.then(res => ElMessage({
|
||||
message: `<p>${res.msg}</p><p>剩余次数: ${res["refills"]}</p>`,
|
||||
type: res.state === 'done' ? 'success' : 'error',
|
||||
.catch(e => ElMessage.error('REFILL异常: ' + e.toString))
|
||||
.then(res => {
|
||||
ElMessage({
|
||||
message: res.success ?
|
||||
`<p>成功</p><p>剩余次数: ${ res["specialRefills"] } 剩余点数: ${ res['points'] }</p>` :
|
||||
`REFILL异常: ${ res.error }`,
|
||||
type: res.success ? 'success' : 'error',
|
||||
dangerouslyUseHTMLString: true
|
||||
}))
|
||||
.catch(e => ElMessage.error(e.toString))
|
||||
})
|
||||
throw new TypeError('REFILL异常: ' + res.error)
|
||||
})
|
||||
}
|
||||
|
||||
// fast travel
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user