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