This commit is contained in:
Liwanyi 2023-05-04 10:36:33 +08:00
parent a4c2ed2463
commit aa9d6dbaf3
4 changed files with 97 additions and 61 deletions

View File

@ -5,11 +5,20 @@
# CHANGE # CHANGE
## 0.9.1
2023年05月04日
### 添加
- 新菜单中现在可以快速喝啤酒了
- 快速 refill
## 0.9.0 ## 0.9.0
2023年04月28日 2023年04月28日
### 增加 ###
- 新菜单中现在可以快速吃XAN了 - 新菜单中现在可以快速吃XAN了
- 快速犯罪 - 快速犯罪

View File

@ -1,6 +1,6 @@
{ {
"name": "wuhu-torn-helper", "name": "wuhu-torn-helper",
"version": "0.9.0", "version": "0.9.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

View File

@ -11,11 +11,7 @@
<el-dropdown-item>芜湖助手</el-dropdown-item> <el-dropdown-item>芜湖助手</el-dropdown-item>
<el-dropdown-item divided> <el-dropdown-item divided>
<el-dropdown placement="bottom-end" size="small" style="width: 100%" trigger="click"> <el-dropdown placement="bottom-end" size="small" style="width: 100%" trigger="click">
<div style="width: 100%">💪 快速锻炼 <el-button link size="small" style="width: 100%;text-align: left;">💪 快速锻炼 ></el-button>
<el-icon class="-icon--right">
<ArrowRight/>
</el-icon>
</div>
<template #dropdown> <template #dropdown>
<el-dropdown-item @click="quickGymTrain.doTrain(BATTLE_STAT.STR)">力量 <el-dropdown-item @click="quickGymTrain.doTrain(BATTLE_STAT.STR)">力量
</el-dropdown-item> </el-dropdown-item>
@ -30,21 +26,13 @@
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item> <el-dropdown-item>
<el-dropdown placement="bottom-end" size="small" style="width: 100%" trigger="click"> <el-dropdown placement="bottom-end" size="small" style="width: 100%" trigger="click">
<div style="width: 100%"> 一键起飞 <el-button link size="small" style="width: 100%;text-align: left;"> 一键起飞 ></el-button>
<el-icon class="-icon--right">
<ArrowRight/>
</el-icon>
</div>
<template #dropdown> <template #dropdown>
<template v-for="travel in travelData"> <template v-for="travel in travelData">
<el-dropdown-item> <el-dropdown-item>
<el-dropdown placement="bottom-end" size="small" style="width: 100%" <el-dropdown placement="bottom-end" size="small" style="width: 100%"
trigger="click"> trigger="click">
<div style="width: 100%">{{ travel.cName }} <div style="width: 100%">{{ travel.cName }} ></div>
<el-icon>
<ArrowRight/>
</el-icon>
</div>
<template #dropdown> <template #dropdown>
<el-dropdown-item @click="travelConfirm(travel.index,0)"> <el-dropdown-item @click="travelConfirm(travel.index,0)">
普通飞机 普通飞机
@ -65,14 +53,14 @@
</template> </template>
</el-dropdown> </el-dropdown>
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item v-for="item in menuItemList" @click="menuClick(item)"> <template v-for="(item, i) in menuItemList">
{{ item.title }} <el-dropdown-item v-if="i===0" divided @click="menuClick(item)">
</el-dropdown-item> {{ item.title }}
<!-- <el-dropdown-item divided>当前版本: {{ globVars.version }}--> </el-dropdown-item>
<!-- <el-button @click="">更新</el-button>--> <el-dropdown-item v-else @click="menuClick(item)">
<!-- </el-dropdown-item>--> {{ item.title }}
<!-- <el-dropdown-item>最新版本: <span id="wh-latest-version"></span></el-dropdown-item>--> </el-dropdown-item>
<!-- <el-dropdown-item id="WHLoadTime">加载时间</el-dropdown-item>--> </template>
</el-dropdown-menu> </el-dropdown-menu>
</template> </template>
</el-dropdown> </el-dropdown>
@ -90,7 +78,8 @@
import { inject, ref, shallowRef } from 'vue'; import { inject, ref, shallowRef } from 'vue';
import { LoggerKey } from "../ts/class/Logger"; import { LoggerKey } from "../ts/class/Logger";
import ForeignStock from "./ForeignStock.vue"; import ForeignStock from "./ForeignStock.vue";
import { ArrowRight, MoonNight } from "@element-plus/icons-vue"; import { MoonNight } from "@element-plus/icons-vue";
// import { ArrowRight, MoonNight } from "@element-plus/icons-vue";
import Config from "./Config.vue"; import Config from "./Config.vue";
import { QuickGymTrainKey } from "../ts/class/action/QuickGymTrain"; import { QuickGymTrainKey } from "../ts/class/action/QuickGymTrain";
import { BATTLE_STAT } from "../ts/class/utils/NetHighLvlWrapper"; import { BATTLE_STAT } from "../ts/class/utils/NetHighLvlWrapper";
@ -101,38 +90,76 @@ import QuickCrime from "./QuickCrime.vue";
const logger = inject(LoggerKey); const logger = inject(LoggerKey);
const quickGymTrain = inject(QuickGymTrainKey); const quickGymTrain = inject(QuickGymTrainKey);
const quickFlyBtnHandler = inject(QuickFlyBtnHandlerKey); const quickFlyBtnHandler = inject(QuickFlyBtnHandlerKey);
const useItem = (itemId) => {
fetch(window.addRFC("https://www.torn.com/item.php"), {
"headers": {
"accept": "*/*",
"content-type": "application/x-www-form-urlencoded;charset=UTF-8",
"sec-ch-ua-mobile": "?0",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-origin",
"x-requested-with": "XMLHttpRequest"
},
"referrer": "https://www.torn.com/item.php",
"referrerPolicy": "strict-origin-when-cross-origin",
"body": `step=useItem&id=${ itemId }&itemID=${ itemId }`,
"method": "POST",
"mode": "cors",
"credentials": "include"
})
.then(res => res.json())
.then(res => ElMessage({
message: res.text,
type: res.success ? 'success' : 'error',
dangerouslyUseHTMLString: true
}))
.catch(e => ElMessage({
message: e.toString,
type: 'error'
}));
};
const menuItemList = [ const menuItemList = [
{ {
title: '💊 吃 XAN', title: '💊 吃 XAN',
template: () => { template: () => useItem(206),
fetch(window.addRFC("https://www.torn.com/item.php"), { },
"headers": { {
"accept": "*/*", title: '🍺 喝啤酒',
"content-type": "application/x-www-form-urlencoded;charset=UTF-8", template: () => useItem(180),
"sec-ch-ua-mobile": "?0", },
"sec-fetch-dest": "empty", {
"sec-fetch-mode": "cors", title: '♻️ 能量续杯',
"sec-fetch-site": "same-origin", template: () => fetch(window.addRFC("https://www.torn.com/points.php?step=pointsbuy&action=energyrefill2"), {
"x-requested-with": "XMLHttpRequest" "headers": {
}, "accept": "text/plain, */*; q=0.01",
"referrer": "https://www.torn.com/item.php", "accept-language": "zh-CN,zh;q=0.9",
"referrerPolicy": "strict-origin-when-cross-origin", "sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"92\"",
"body": "step=useItem&id=206&itemID=206", "sec-ch-ua-mobile": "?0",
"method": "POST", "sec-fetch-dest": "empty",
"mode": "cors", "sec-fetch-mode": "cors",
"credentials": "include" "sec-fetch-site": "same-origin",
}) "x-requested-with": "XMLHttpRequest"
.then(res => res.json()) },
.then(res => ElMessage({ "referrer": "https://www.torn.com/points.php",
message: res.text, "referrerPolicy": "strict-origin-when-cross-origin",
type: res.success ? 'success' : 'error', "body": null,
dangerouslyUseHTMLString: true "method": "GET",
})) "mode": "cors",
.catch(e => ElMessage({ "credentials": "include"
message: e.toString, })
type: 'error' .then(res => res.json())
})); .then(res => ElMessage({
}, message: res.msg,
type: res.success ? 'success' : 'error',
dangerouslyUseHTMLString: true
}))
.catch(e => ElMessage({
message: e.toString,
type: 'error'
})),
}, },
{ {
title: '🚓 快速犯罪', title: '🚓 快速犯罪',