快捷动作【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
@ -3,14 +3,14 @@
|
|||||||
<el-button-group class="wh-menu-button" style="z-index: 1000000;">
|
<el-button-group class="wh-menu-button" style="z-index: 1000000;">
|
||||||
<el-button circle @click="expanded = !expanded">
|
<el-button circle @click="expanded = !expanded">
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<MoonNight />
|
<MoonNight/>
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-for="item in globVars.buttons" @click="item.func">{{ item.txt }}</el-button>
|
<el-button v-for="item in globVars.buttons" @click="item.func">{{ item.txt }}</el-button>
|
||||||
<el-button v-if="editableTabs.length > 0" circle @click="showDrawer">
|
<el-button v-if="editableTabs.length > 0" circle @click="showDrawer">
|
||||||
<el-badge :value="editableTabs.length" type="primary">
|
<el-badge :value="editableTabs.length" type="primary">
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<CopyDocument />
|
<CopyDocument/>
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</el-badge>
|
</el-badge>
|
||||||
</el-button>
|
</el-button>
|
||||||
@ -18,12 +18,12 @@
|
|||||||
<el-dialog v-model="drawer" :fullscreen="isMobilePhone" :lock-scroll="true" width="65%">
|
<el-dialog v-model="drawer" :fullscreen="isMobilePhone" :lock-scroll="true" width="65%">
|
||||||
<el-tabs v-model="editableTabsValue" closable style="margin-top: -1em" type="border-card" @tab-remove="removeTab">
|
<el-tabs v-model="editableTabsValue" closable style="margin-top: -1em" type="border-card" @tab-remove="removeTab">
|
||||||
<el-tab-pane v-for="item in editableTabs" :key="item.name" :label="item.title" :name="item.name">
|
<el-tab-pane v-for="item in editableTabs" :key="item.name" :label="item.title" :name="item.name">
|
||||||
<component :is="item.content" />
|
<component :is="item.content"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-drawer v-model="expanded" :show-close="false" :size="isMobilePhone ? '85%' : '30%'" class="whDrawer"
|
<el-drawer v-model="expanded" :show-close="false" :size="isMobilePhone ? '85%' : '30%'" class="whDrawer"
|
||||||
:with-header="false" direction="rtl">
|
:with-header="false" direction="rtl">
|
||||||
<el-card :body-style="{ 'padding': '0' }" class="innerCard" style="margin-bottom: 0.5em">
|
<el-card :body-style="{ 'padding': '0' }" class="innerCard" style="margin-bottom: 0.5em">
|
||||||
<template #header>
|
<template #header>
|
||||||
<div>快捷动作</div>
|
<div>快捷动作</div>
|
||||||
@ -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>
|
||||||
@ -101,13 +101,13 @@
|
|||||||
<el-tooltip content="更新?" placement="bottom-start">
|
<el-tooltip content="更新?" placement="bottom-start">
|
||||||
<el-button link @click="menuClick({ title: '关于助手', template: UpdateDate })">芜湖助手
|
<el-button link @click="menuClick({ title: '关于助手', template: UpdateDate })">芜湖助手
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<Refresh />
|
<Refresh/>
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tag size="small" type="info">{{
|
<el-tag size="small" type="info">{{
|
||||||
globVars.version.startsWith('$') ? 'dev' : 'v' + globVars.version
|
globVars.version.startsWith('$') ? 'dev' : 'v' + globVars.version
|
||||||
}}
|
}}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -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({
|
||||||
dangerouslyUseHTMLString: true
|
message: res.success ?
|
||||||
}))
|
`<p>成功</p><p>剩余次数: ${ res["specialRefills"] } 剩余点数: ${ res['points'] }</p>` :
|
||||||
.catch(e => ElMessage.error(e.toString))
|
`REFILL异常: ${ res.error }`,
|
||||||
|
type: res.success ? 'success' : 'error',
|
||||||
|
dangerouslyUseHTMLString: true
|
||||||
|
})
|
||||||
|
throw new TypeError('REFILL异常: ' + res.error)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// fast travel
|
// fast travel
|
||||||
@ -383,25 +392,25 @@ const travelConfirm = (destIndex: number, typeIndex: number) => {
|
|||||||
const destName = travelData[destIndex].cName;
|
const destName = travelData[destIndex].cName;
|
||||||
const typeName = ['普通飞机', 'PI飞机', '股票飞机', '商务飞机(机票或内衣店)'][typeIndex];
|
const typeName = ['普通飞机', 'PI飞机', '股票飞机', '商务飞机(机票或内衣店)'][typeIndex];
|
||||||
ElMessageBox.confirm(
|
ElMessageBox.confirm(
|
||||||
'即将使用「' + typeName + '」飞往「' + destName + '」',
|
'即将使用「' + typeName + '」飞往「' + destName + '」',
|
||||||
'确认',
|
'确认',
|
||||||
{
|
{
|
||||||
confirmButtonText: '好',
|
|
||||||
cancelButtonText: '算了',
|
|
||||||
type: 'info',
|
|
||||||
}
|
|
||||||
)
|
|
||||||
.then(async () => {
|
|
||||||
await quickFlyBtnHandler.directFly(destIndex, typeIndex);
|
|
||||||
ElMessageBox.confirm('是否转跳页面?', '确认', {
|
|
||||||
confirmButtonText: '好',
|
confirmButtonText: '好',
|
||||||
cancelButtonText: '算了',
|
cancelButtonText: '算了',
|
||||||
type: 'info'
|
type: 'info',
|
||||||
}
|
}
|
||||||
).then(() => window.location.href = 'https://www.torn.com')
|
)
|
||||||
.catch(() => null);
|
.then(async () => {
|
||||||
})
|
await quickFlyBtnHandler.directFly(destIndex, typeIndex);
|
||||||
.catch(() => null);
|
ElMessageBox.confirm('是否转跳页面?', '确认', {
|
||||||
|
confirmButtonText: '好',
|
||||||
|
cancelButtonText: '算了',
|
||||||
|
type: 'info'
|
||||||
|
}
|
||||||
|
).then(() => window.location.href = 'https://www.torn.com')
|
||||||
|
.catch(() => null);
|
||||||
|
})
|
||||||
|
.catch(() => null);
|
||||||
};
|
};
|
||||||
|
|
||||||
const bazaarControl = {
|
const bazaarControl = {
|
||||||
@ -411,23 +420,23 @@ const bazaarControl = {
|
|||||||
let response;
|
let response;
|
||||||
try {
|
try {
|
||||||
response = await (await fetch(
|
response = await (await fetch(
|
||||||
"https://www.torn.com/bazaar.php?sid=bazaarData&step=" + (isClose ? "closeBazaar" : "openBazaar"),
|
"https://www.torn.com/bazaar.php?sid=bazaarData&step=" + (isClose ? "closeBazaar" : "openBazaar"),
|
||||||
{
|
{
|
||||||
"headers": {
|
"headers": {
|
||||||
"accept": "*/*",
|
"accept": "*/*",
|
||||||
"sec-ch-ua-mobile": "?0",
|
"sec-ch-ua-mobile": "?0",
|
||||||
"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/bazaar.php",
|
"referrer": "https://www.torn.com/bazaar.php",
|
||||||
"referrerPolicy": "strict-origin-when-cross-origin",
|
"referrerPolicy": "strict-origin-when-cross-origin",
|
||||||
"body": null,
|
"body": null,
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"mode": "cors",
|
"mode": "cors",
|
||||||
"credentials": "include"
|
"credentials": "include"
|
||||||
}
|
}
|
||||||
)).json();
|
)).json();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
logger.error(e.stack);
|
logger.error(e.stack);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user