更新
This commit is contained in:
parent
003056192e
commit
07755e81b3
10
CHANGELOG.md
10
CHANGELOG.md
@ -4,6 +4,16 @@
|
||||
|
||||
# CHANGE
|
||||
|
||||
## 0.8.8
|
||||
|
||||
2023年04月17日
|
||||
|
||||
### 添加
|
||||
|
||||
- 新菜单
|
||||
- 快速锻炼
|
||||
- 一键起飞
|
||||
|
||||
## 0.8.7
|
||||
|
||||
2023年04月10日
|
||||
|
||||
2241
package-lock.json
generated
2241
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
10
package.json
10
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "wuhu-torn-helper",
|
||||
"version": "0.8.7",
|
||||
"version": "0.8.8",
|
||||
"description": "芜湖助手",
|
||||
"scripts": {
|
||||
"release": "cross-env NODE_ENV=production rollup -c && node build.mjs",
|
||||
@ -8,7 +8,9 @@
|
||||
"rollup": "cross-env NODE_ENV=development rollup -c"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@element-plus/icons-vue": "^2.1.0",
|
||||
"@rollup/plugin-alias": "^4.0.3",
|
||||
"@rollup/plugin-commonjs": "^24.0.1",
|
||||
"@rollup/plugin-json": "^4.1.0",
|
||||
"@rollup/plugin-node-resolve": "^15.0.1",
|
||||
"@rollup/plugin-replace": "^5.0.2",
|
||||
@ -19,6 +21,7 @@
|
||||
"@vitejs/plugin-vue": "^4.0.0",
|
||||
"@vue/tsconfig": "^0.1.3",
|
||||
"cross-env": "^7.0.3",
|
||||
"element-plus": "^2.3.3",
|
||||
"just-clone": "^6.2.0",
|
||||
"npm": "^8.19.2",
|
||||
"reflect-metadata": "^0.1.13",
|
||||
@ -29,6 +32,11 @@
|
||||
"rollup-plugin-typescript2": "^0.34.1",
|
||||
"tslib": "^2.4.0",
|
||||
"typescript": "^4.8.3",
|
||||
"unplugin-auto-import": "^0.15.2",
|
||||
"unplugin-element-plus": "^0.7.0",
|
||||
"unplugin-icons": "^0.16.1",
|
||||
"unplugin-vue-components": "^0.24.1",
|
||||
"vant": "^4.1.2",
|
||||
"vue": "^3.2.47"
|
||||
},
|
||||
"type": "module"
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -15,6 +15,14 @@ import styles from "rollup-plugin-styles";
|
||||
import { customInjector } from "./custom-injector.js";
|
||||
import terser from "@rollup/plugin-terser";
|
||||
import clone from "just-clone";
|
||||
import commonjs from '@rollup/plugin-commonjs';
|
||||
import AutoImport from 'unplugin-auto-import/vite'
|
||||
import Components from 'unplugin-vue-components/vite'
|
||||
// import { VantResolver } from 'unplugin-vue-components/resolvers';
|
||||
import { ElementPlusResolver } from "unplugin-vue-components/resolvers";
|
||||
import IconsResolver from 'unplugin-icons/resolver';
|
||||
import Icons from 'unplugin-icons/vite'
|
||||
import ElementPlus from 'unplugin-element-plus/rollup'
|
||||
|
||||
let node_env = process.env.NODE_ENV;
|
||||
let vuePath = node_env === 'production' ?
|
||||
@ -65,7 +73,27 @@ const devConfig = {
|
||||
browser: true,
|
||||
preferBuiltins: false,
|
||||
}),
|
||||
commonjs(),
|
||||
vue({ isProduction: node_env === 'production' }),
|
||||
AutoImport({
|
||||
resolvers: [
|
||||
ElementPlusResolver(),
|
||||
IconsResolver({
|
||||
prefix: 'Icon',
|
||||
}),
|
||||
],
|
||||
}),
|
||||
Components({
|
||||
resolvers: [
|
||||
IconsResolver({
|
||||
enabledCollections: ['ep'],
|
||||
}),
|
||||
ElementPlusResolver()
|
||||
],
|
||||
// resolvers: [VantResolver()],
|
||||
}),
|
||||
Icons(),
|
||||
ElementPlus(),
|
||||
// 自定义注入器注入vue部分css
|
||||
styles({
|
||||
// modules: true,
|
||||
|
||||
2
src/shims-vue.d.ts
vendored
2
src/shims-vue.d.ts
vendored
@ -1,5 +1,7 @@
|
||||
/* eslint-disable */
|
||||
declare module '*.vue' {
|
||||
import type { DefineComponent } from 'vue'
|
||||
const component: DefineComponent<{}, {}, any>
|
||||
export default component
|
||||
}
|
||||
/* eslint-enable */
|
||||
|
||||
@ -1,69 +1,62 @@
|
||||
<div class="acc-title">
|
||||
<span class="item-desc tt-buy" style="display: inline-block;">
|
||||
<span aria-labelledby="180-name 180-price 180-stock" class="item Alcohol" itemid="180" loaded="0" tabindex="0">
|
||||
<span class="item-plate">
|
||||
<img alt="Bottle of Beer" class="torn-item large" src="/images/items/180/large.png">
|
||||
</span>
|
||||
<span class="item-hover">
|
||||
<button aria-label="Show info: Bottle of Beer" class="view-h wai-btn" value="100"></button>
|
||||
<button aria-label="Buy: Bottle of Beer" class="buy-h wai-btn" i-data="i_661_346_51_52" value="100"></button>
|
||||
</span>
|
||||
</span>
|
||||
<span class="desc">
|
||||
<span id="180-name" class="name t-overflow bold">一瓶啤酒</span>
|
||||
<span id="180-price" class="price t-gray-6" data-sell="$5">$10</span>
|
||||
<span id="180-stock" class="stock t-gray-6 t-overflow">Alcohol (<span class="instock">600</span> in stock)</span>
|
||||
</span>
|
||||
<span class="buy-act-wrap">
|
||||
<button aria-label="Close" class="close-icon p0 wai-btn" value="100"></button>
|
||||
<label class="wai" for="180">Amount
|
||||
of Bottle of Beer</label>
|
||||
<input id="180" autocomplete="new-amount" maxlength="3" name="buyAmount[]" type="text" value="100">
|
||||
<span class="buy-act bold">
|
||||
<button class="wai-support t-blue h" i-data="i_815_375_53_34" value="100">Buy<br><span
|
||||
class="tt-max-buy">fill max</span></button>
|
||||
<div class="tt-max-buy-overlay"></div></span>
|
||||
</span>
|
||||
<span class="item-desc" style="display: inline-block;">
|
||||
<span class="item Alcohol" itemid="180" loaded="0">
|
||||
<span class="item-plate">
|
||||
<img alt="Bottle of Beer" class="torn-item large" src="/images/items/180/large.png">
|
||||
</span>
|
||||
<span class="item-hover">
|
||||
<button aria-labelledby="Show info: 180-name 180-price 180-stock" class="view-info wai-btn" i-data="i_871_346_51_52"
|
||||
value="100"></button>
|
||||
<button aria-label="Buy: Bottle of Beer" class="buy-info wai-btn" i-data="i_922_346_51_52" value="100"></button>
|
||||
</span>
|
||||
</span>
|
||||
<span class="desc">
|
||||
<span id="180-name" class="name t-overflow bold">Bottle of Beer</span>
|
||||
<span id="180-price" class="price t-gray-6" data-sell="$5">$10</span>
|
||||
<span id="180-stock" class="stock t-gray-6 t-overflow">Alcohol (<span class="instock">800</span> in stock)</span>
|
||||
</span>
|
||||
<span class="buy-act-wrap">
|
||||
<button aria-label="Close" class="close-icon p0 wai-btn" value="100"></button>
|
||||
<label class="wai" for="180">Amount
|
||||
of Bottle of Beer</label>
|
||||
<input id="180" autocomplete="new-amount" maxlength="3" name="buyAmount[]" type="text" value="100">
|
||||
<span class="buy-act bold">
|
||||
<button class="wai-support t-blue h" i-data="i_1076_375_53_34" value="100">Buy<br></button>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
<div class="torn-divider divider-right"></div>
|
||||
<div class="confirm-wrap" style="display: none;">
|
||||
<span class="confirm">
|
||||
<span>
|
||||
确定购买
|
||||
</span>
|
||||
<span>
|
||||
<span class="count">100</span>
|
||||
x Bottle of Beer for
|
||||
$<span class="total">1,000</span>
|
||||
</span>
|
||||
<span class="confirm-act m-top5">
|
||||
<a class="wai-support yes m-right10 bold t-blue h" data-id="180" href="#" i-data="i_705_379_24_14">
|
||||
Yes
|
||||
</a>
|
||||
<span class="no bold">
|
||||
<a class="wai-support t-blue h" href="#" i-data="i_740_379_16_14">
|
||||
No
|
||||
</a>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
<div class="confirm-wrap" style="display: none;" tabindex="0">
|
||||
<span class="confirm">
|
||||
<span>
|
||||
Are you sure you would like to buy
|
||||
</span>
|
||||
<span>
|
||||
<span class="count">100</span>
|
||||
x Bottle of Beer for
|
||||
$<span class="total">1,000</span>
|
||||
</span>
|
||||
<span class="confirm-act m-top5">
|
||||
<a class="wai-support yes m-right10 bold t-blue h" data-id="180" href="#" i-data="i_966_379_24_14">
|
||||
Yes
|
||||
</a>
|
||||
<span class="no bold">
|
||||
<a class="wai-support t-blue h" href="#" i-data="i_1001_379_16_14">
|
||||
No
|
||||
</a>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="success-wrap" style="display: none;">
|
||||
<span class="success"><span class="t-red bold">
|
||||
There is not enough stock left to buy <b>100</b> of this item.
|
||||
</span>
|
||||
<span class="confirm-act m-top5">
|
||||
|
||||
<a class="items m-right10 bold t-blue h" href="item.php">Your Items</a>
|
||||
|
||||
|
||||
</span></span>
|
||||
<button aria-label="Close" class="close-icon p0 wai-btn" i-data="i_840_344_10_11" value="100"></button>
|
||||
<span class="success"><span class="t-green bold"></span>
|
||||
<span class="confirm-act m-top5"></span></span>
|
||||
<button aria-label="Close" class="close-icon p0 wai-btn" i-data="i_1101_344_10_11" value="100"></button>
|
||||
</div>
|
||||
<div class="msg-wrap">
|
||||
<span class="t-green bold">
|
||||
<span class="ajax-preloader"></span>
|
||||
</span>
|
||||
<span class="t-green bold">
|
||||
<span class="ajax-preloader"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="view-item-info">
|
||||
|
||||
@ -19,6 +19,7 @@ import BuyBeerHelper from "./action/BuyBeerHelper";
|
||||
import ModuleLoader from "./ModuleLoader";
|
||||
import TornPDAUtils from "./utils/TornPDAUtils";
|
||||
import TravelItem from "./action/TravelItem";
|
||||
import IconHelper from "./IconHelper";
|
||||
|
||||
/**
|
||||
* 脚本不区分页面的通用功能入口
|
||||
@ -108,7 +109,7 @@ export class Common {
|
||||
this.moduleLoader.push(CompanyHelper);
|
||||
|
||||
// TODO 新菜单
|
||||
// this.moduleLoader.push(IconHelper);
|
||||
this.moduleLoader.push(IconHelper);
|
||||
|
||||
this.moduleLoader.load().then();
|
||||
|
||||
|
||||
@ -1,18 +1,17 @@
|
||||
import Logger from "./Logger";
|
||||
import Logger, { LoggerKey } from "./Logger";
|
||||
import ClassName from "../container/ClassName";
|
||||
import { Injectable } from "../container/Injectable";
|
||||
import CommonUtils from "./utils/CommonUtils";
|
||||
import LocalConfigWrapper from "./LocalConfigWrapper";
|
||||
import CommonUtils, { CommonUtilsKey } from "./utils/CommonUtils";
|
||||
import LocalConfigWrapper, { LocalConfigWrapperKey } from "./LocalConfigWrapper";
|
||||
import NNB from "./handler/NNB";
|
||||
import ItemPriceWatcherHandler from "./handler/ItemPriceWatcherHandler";
|
||||
import { createApp, InjectionKey } from "vue";
|
||||
import { createApp } from "vue";
|
||||
import FloatMenu from "../../vue/FloatMenu.vue";
|
||||
import PopupWrapper, { PopupWrapperKey } from "./utils/PopupWrapper";
|
||||
import InfoUtils from "./utils/InfoUtils";
|
||||
|
||||
// export const MenuItemListKey = Symbol() as InjectionKey<MenuItem[]>;
|
||||
// export const GlobalKey = Symbol() as InjectionKey<Global>;
|
||||
export const LoggerKey = Symbol() as InjectionKey<Logger>;
|
||||
import TravelItem, { TravelItemKey } from "./action/TravelItem";
|
||||
import QuickGymTrain, { QuickGymTrainKey } from "./action/QuickGymTrain";
|
||||
import QuickFlyBtnHandler, { QuickFlyBtnHandlerKey } from "./handler/QuickFlyBtnHandler";
|
||||
|
||||
@ClassName("IconHelper")
|
||||
@Injectable()
|
||||
@ -28,6 +27,9 @@ export default class IconHelper {
|
||||
private readonly itemPriceWatcherHandler: ItemPriceWatcherHandler,
|
||||
private readonly popupWrapper: PopupWrapper,
|
||||
private readonly infoUtils: InfoUtils,
|
||||
private readonly travelItem: TravelItem,
|
||||
private readonly quickGymTrain: QuickGymTrain,
|
||||
private readonly quickFlyBtnHandler: QuickFlyBtnHandler,
|
||||
) {
|
||||
this._element = document.createElement('div');
|
||||
}
|
||||
@ -40,201 +42,16 @@ export default class IconHelper {
|
||||
this._element.id = 'WHMenu2023';
|
||||
document.body.append(this._element);
|
||||
let app = createApp(FloatMenu);
|
||||
app.config.errorHandler = (err) => this.logger.error('vue错误', err);
|
||||
// app.provide(menuItemList, this.items);
|
||||
// app.provide(GlobalKey, this.global);
|
||||
app.config.errorHandler = (err) => this.logger.error('[VUE错误]', err);
|
||||
app.config.warnHandler = (err) => this.logger.warn('[VUE警告]', err);
|
||||
app.provide(LoggerKey, this.logger);
|
||||
app.provide(CommonUtilsKey, this.commonUtils);
|
||||
app.provide(TravelItemKey, this.travelItem);
|
||||
app.provide(PopupWrapperKey, this.popupWrapper);
|
||||
app.provide(LocalConfigWrapperKey, this.localConfigWrapper);
|
||||
app.provide(QuickGymTrainKey, this.quickGymTrain);
|
||||
app.provide(QuickFlyBtnHandlerKey, this.quickFlyBtnHandler);
|
||||
app.mount(this._element);
|
||||
}
|
||||
|
||||
// get items(): MenuItem[] {
|
||||
// let rt: MenuItem[] = [];
|
||||
// let playerInfo = this.infoUtils.getPlayerInfo();
|
||||
//
|
||||
// // 欢迎 显示玩家id
|
||||
// if (playerInfo.userID !== 0) {
|
||||
// rt.push({
|
||||
// domType: MENU_ITEM_TYPE.PLAIN,
|
||||
// domHTML:
|
||||
// `<a href="/profiles.php?XID=${ playerInfo.userID }" target="_blank">${ playerInfo.playername }</a>[${ playerInfo.userID }]`,
|
||||
// });
|
||||
// }
|
||||
// // 节日
|
||||
// let festDateHtml = '<button>节日</button>: ';
|
||||
// {
|
||||
// // 节日字典
|
||||
// const festData = FEST.val;
|
||||
// const formatMMDD = (m, d) => {
|
||||
// const MM = m < 10 ? `0${ m }` : m.toString();
|
||||
// const DD = d < 10 ? `0${ d }` : d.toString();
|
||||
// return MM + DD;
|
||||
// };
|
||||
// const newDate = new Date();
|
||||
// const festKey = formatMMDD(newDate.getUTCMonth(), newDate.getUTCDate());
|
||||
// if (festData[festKey]) festDateHtml += `今天 - ${ festData[festKey]['name'] }(<button title="${ festData[festKey]['eff'] }">效果</button>)`;
|
||||
// else {
|
||||
// // 月日列表
|
||||
// let MMDDList = Object.keys(festData);
|
||||
// MMDDList.push(festKey);
|
||||
// // 下个节日的位置
|
||||
// const nextFestIndex = MMDDList.sort().indexOf(festKey) + 1;
|
||||
// // 下个节日obj
|
||||
// const nextFestDate = festData[MMDDList[nextFestIndex] || MMDDList[0]];
|
||||
// // 下个节日的时间
|
||||
// let next = new Date(
|
||||
// nextFestIndex !== MMDDList.length ? newDate.getUTCFullYear() : newDate.getUTCFullYear() + 1,
|
||||
// (MMDDList[nextFestIndex !== MMDDList.length ? nextFestIndex : 0] as any).slice(0, 2) | 0,
|
||||
// (MMDDList[nextFestIndex !== MMDDList.length ? nextFestIndex : 0] as any).slice(2) | 0,
|
||||
// 8
|
||||
// ).getTime();
|
||||
// // 剩余天数
|
||||
// const left = (next - newDate.getTime()) / 86400000 | 0;
|
||||
// festDateHtml += `${ left }天后 - ${ nextFestDate.name }(<button title="${ nextFestDate.eff }">效果</button>)`;
|
||||
// }
|
||||
// }
|
||||
// rt.push({
|
||||
// domType: MENU_ITEM_TYPE.PLAIN,
|
||||
// domHTML: festDateHtml,
|
||||
// });
|
||||
// // 活动
|
||||
// let eventObj: EventWrapper = {
|
||||
// onEv: false,
|
||||
// daysLeft: Infinity,
|
||||
// events: EVENTS.default,
|
||||
// };
|
||||
// rt.events = EVENTS.default;
|
||||
// eventObj.events.forEach((obj, index) => {
|
||||
// if (eventObj.onEv) return;
|
||||
// // 当前年份
|
||||
// const nowYear = date.getFullYear();
|
||||
// // 当前遍历的活动开始时间
|
||||
// const start = new Date(nowYear, obj.start[0], obj.start[1], obj.start[2]);
|
||||
// // 当前遍历的活动结束时间
|
||||
// const end = new Date(nowYear, obj.end[0], obj.end[1], obj.end[2]);
|
||||
// // 当前处于活动中
|
||||
// if (start < date && date < end) {
|
||||
// eventObj.onEv = true;
|
||||
// eventObj.daysLeft = (end.getTime() - date.getTime()) / 86400000 | 0;
|
||||
// eventObj.current = obj;
|
||||
// }
|
||||
// // 当前没有活动
|
||||
// else {
|
||||
// // 当前遍历的活动如果已经经过了,那么下次活动就是遍历的下一个活动对象,否则为当前活动。
|
||||
// // 如果本年度活动都经过了,那么下次活动是列表的第一个活动对象
|
||||
// const next = end < date ? eventObj.events[index + 1] || eventObj.events[0] : obj;
|
||||
// // 经过了最后一个活动所以下次活动开始时间是第二年
|
||||
// const start = new Date(next !== obj && index === eventObj.events.length - 1 ? nowYear + 1 : nowYear, next.start[0], next.start[1], next.start[2]);
|
||||
// const daysLeft = (start.getTime() - date.getTime()) / 86400000 | 0;
|
||||
// if (0 <= daysLeft && daysLeft < eventObj.daysLeft) {
|
||||
// eventObj.daysLeft = daysLeft;
|
||||
// eventObj.next = next;
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// eventObj.html = '<button>活动</button>: ';
|
||||
// eventObj.onEv
|
||||
// ? eventObj.html += `${ eventObj.current.name }(<button title="${ eventObj.current.eff }">详情</button>) - 剩余${ eventObj.daysLeft }天`
|
||||
// : eventObj.html += `${ eventObj.daysLeft }天后 - ${ eventObj.next.name }(<button title="${ eventObj.next.eff }">详情</button>)`;
|
||||
// rt.push({
|
||||
// domType: 'plain',
|
||||
// domId: 'wh-trans-event-cont',
|
||||
// domHTML: eventObj.html,
|
||||
// });
|
||||
// // 一键起飞
|
||||
// rt.push({
|
||||
// domType: 'button',
|
||||
// domId: 'wh-quick-fly-btn',
|
||||
// domText: '✈️ 一键起飞',
|
||||
// clickFunc: () => Container.factory(QuickFlyBtnHandler).handle(),
|
||||
// });
|
||||
// // 飞花库存
|
||||
// rt.push({
|
||||
// domType: 'button',
|
||||
// domId: 'wh-foreign-stock-btn',
|
||||
// domText: '🌸 飞花库存',
|
||||
// clickFunc: () => Container.factory(TravelItem).clickHandler().then(),
|
||||
// });
|
||||
// // NPC LOOT
|
||||
// rt.push({
|
||||
// domType: 'button',
|
||||
// domId: 'wh-npc-loot-btn',
|
||||
// domText: '🔫 LOOT',
|
||||
// clickFunc: () => {
|
||||
// const insert = ZHONG_LOOT_HTML.replace('{{}}', performance.now().toString());
|
||||
// new Popup(insert, 'NPC LOOT');
|
||||
// },
|
||||
// tip: '显示5个可击杀NPC的开打时间',
|
||||
// });
|
||||
// // 查看NNB
|
||||
// rt.push({
|
||||
// domType: 'button',
|
||||
// domId: 'wh-nnb-info',
|
||||
// domText: '👮 查看NNB',
|
||||
// clickFunc: () => this.nnb.handle(),
|
||||
// });
|
||||
// // 常用链接
|
||||
// rt.push({
|
||||
// domType: 'button',
|
||||
// domId: 'wh-link-collection',
|
||||
// domText: '🔗 常用链接',
|
||||
// clickFunc: () => Container.factory(QuickLinksHandler).handle()
|
||||
// });
|
||||
// // 飞贼
|
||||
// // rt.push({
|
||||
// // domType: 'button',
|
||||
// // domId: 'wh-gs-btn',
|
||||
// // domText: '🐏 飞贼小助手',
|
||||
// // clickFunc: () => loadGS(CommonUtils.getScriptEngine()),
|
||||
// // tip: '加载从PC端移植的伞佬的油猴版飞贼小助手',
|
||||
// // });
|
||||
//
|
||||
// // 物品价格监视
|
||||
// rt.push({
|
||||
// domType: 'button',
|
||||
// domId: 'wh-price-watcher-btn',
|
||||
// domText: '💊 价格监视',
|
||||
// clickFunc: () => this.itemPriceWatcherHandler.handle()
|
||||
// });
|
||||
// // 全屏
|
||||
// if (!this.tornPDAUtils.isPDA()) rt.push({
|
||||
// domType: 'button', domId: '', domText: '🖥️ 进入全屏', clickFunc() {
|
||||
// document.documentElement.requestFullscreen().then();
|
||||
// }
|
||||
// });
|
||||
// // 传单助手
|
||||
// rt.push({
|
||||
// domType: 'button',
|
||||
// domId: '',
|
||||
// domText: '📜️ 传单助手',
|
||||
// clickFunc: adHelper
|
||||
// });
|
||||
// // 守望者
|
||||
// rt.push({
|
||||
// domType: 'button',
|
||||
// domId: '',
|
||||
// domText: '🛡️ 守望者',
|
||||
// clickFunc: function () {
|
||||
// safeKeeper();
|
||||
// },
|
||||
// });
|
||||
// // 寻找木桩
|
||||
// rt.push({
|
||||
// domType: 'button',
|
||||
// domId: '',
|
||||
// domText: '🌲 寻找木桩',
|
||||
// clickFunc() {
|
||||
// window.location.replace('https://www.torn.com/item.php?temp=4#xunzhaomuzhuang')
|
||||
// }
|
||||
// });
|
||||
// // 物品查价
|
||||
// rt.push(ItemPriceHandler);
|
||||
// // 更新历史
|
||||
// rt.push(ChangeLogHandler);
|
||||
// // 助手设置
|
||||
// rt.push(SettingsHandler);
|
||||
// // 测试
|
||||
// if (this.logger.debug()) rt.push(Test);
|
||||
// return rt;
|
||||
// }
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ import ClassName from "../container/ClassName";
|
||||
import Logger from "./Logger";
|
||||
import defaultConfig, { Config, isNotified } from "./config/defaultConfig";
|
||||
import MsgWrapper from "./utils/MsgWrapper";
|
||||
import { InjectionKey } from "vue";
|
||||
|
||||
@Injectable()
|
||||
@ClassName('LocalConfigWrapper')
|
||||
@ -57,3 +58,5 @@ export default class LocalConfigWrapper {
|
||||
localStorage.setItem('wh_trans_settings', JSON.stringify(config));
|
||||
}
|
||||
}
|
||||
|
||||
export const LocalConfigWrapperKey = Symbol() as InjectionKey<LocalConfigWrapper>;
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import ClassName from "../container/ClassName";
|
||||
import { Injectable } from "../container/Injectable";
|
||||
import Log from "./Log";
|
||||
import { InjectionKey } from "vue";
|
||||
|
||||
@Injectable()
|
||||
@ClassName('Logger')
|
||||
@ -20,4 +21,14 @@ export default class Logger {
|
||||
debug() {
|
||||
return Log.debug()
|
||||
}
|
||||
|
||||
getCounter() {
|
||||
return Log.getCounter()
|
||||
}
|
||||
|
||||
getTime() {
|
||||
return Log.getTime()
|
||||
}
|
||||
}
|
||||
|
||||
export const LoggerKey = Symbol() as InjectionKey<Logger>;
|
||||
|
||||
@ -2,7 +2,6 @@ import cityFinder from "../func/module/cityFinder";
|
||||
import { missionDict } from "../dictionary/translation";
|
||||
import getTaskHint from "../func/translate/getTaskHint";
|
||||
import CommonUtils from "./utils/CommonUtils";
|
||||
import Log from "./Log";
|
||||
import SHOP_BEER_STATIC_ITEM_HTML from "../../static/html/buyBeer/shop_beer_static_item.html";
|
||||
import ADD_BEER_HEAD_HTML from "../../static/html/buyBeer/add_beer_head.html";
|
||||
import QUICK_CRIMES_HTML from "../../static/html/quick_crimes.html";
|
||||
@ -23,6 +22,7 @@ import { Injectable } from "../container/Injectable";
|
||||
import ClassName from "../container/ClassName";
|
||||
import LocalConfigWrapper from "./LocalConfigWrapper";
|
||||
import { Container } from "../container/Container";
|
||||
import Logger from "./Logger";
|
||||
|
||||
/**
|
||||
* 脚本区分页面的功能入口
|
||||
@ -38,6 +38,7 @@ export default class UrlRouter {
|
||||
private readonly searchHelper: SearchHelper,
|
||||
private readonly lotteryHelper: LotteryHelper,
|
||||
private readonly slotsHelper: SlotsHelper,
|
||||
private readonly logger: Logger,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -90,12 +91,12 @@ export default class UrlRouter {
|
||||
let node = document.querySelector('ul.items-list');
|
||||
if (!node) {
|
||||
msg_node.innerHTML = '❌ 商品未加载完';
|
||||
Log.error('商品未加载完');
|
||||
this.logger.error('商品未加载完');
|
||||
return;
|
||||
}
|
||||
if (node.querySelector('span[id="180-name"]')) {
|
||||
msg_node.innerHTML = '❌ 页面已经有啤酒了';
|
||||
Log.warn('商店页面已有啤酒');
|
||||
this.logger.warn('商店页面已有啤酒');
|
||||
return;
|
||||
}
|
||||
const clear_node = node.querySelector('li.clear');
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import Log from "../Log";
|
||||
import InfoUtils from "../utils/InfoUtils";
|
||||
import Alert from "../utils/Alert";
|
||||
import MathUtils from "../utils/MathUtils";
|
||||
@ -9,6 +8,7 @@ import ResponseInject from "../../interface/ResponseInject";
|
||||
import LocalConfigWrapper from "../LocalConfigWrapper";
|
||||
import ClassName from "../../container/ClassName";
|
||||
import { Injectable } from "../../container/Injectable";
|
||||
import Logger from "../Logger";
|
||||
|
||||
@ClassName('BuyBeerHelper')
|
||||
@Injectable()
|
||||
@ -24,15 +24,16 @@ export default class BuyBeerHelper implements BeerMonitorLoop, ResponseInject {
|
||||
private readonly commonUtils: CommonUtils,
|
||||
private readonly infoUtils: InfoUtils,
|
||||
private readonly mathUtils: MathUtils,
|
||||
private readonly logger: Logger,
|
||||
) {
|
||||
this.time = this.localConfigWrapper.config._15AlarmTime || 30;
|
||||
}
|
||||
|
||||
public start(): void {
|
||||
if (this.loopId) {
|
||||
Log.info('啤酒助手已在运行');
|
||||
this.logger.info('啤酒助手已在运行');
|
||||
} else {
|
||||
Log.info('啤酒助手启动');
|
||||
this.logger.info('啤酒助手启动');
|
||||
this.loopId = window.setInterval(async () => {
|
||||
// 海外取消提醒
|
||||
let { isTravelling, isAbroad } = await this.infoUtils.getUserState();
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import Log from "../Log";
|
||||
import InfoUtils from "../utils/InfoUtils";
|
||||
import MathUtils from "../utils/MathUtils";
|
||||
import CommonUtils from "../utils/CommonUtils";
|
||||
@ -7,6 +6,7 @@ import Timer from "../utils/Timer";
|
||||
import FetchUtils from "../utils/FetchUtils";
|
||||
import { Injectable } from "../../container/Injectable";
|
||||
import ClassName from "../../container/ClassName";
|
||||
import Logger from "../Logger";
|
||||
|
||||
/**
|
||||
* 彩票助手
|
||||
@ -31,12 +31,13 @@ export default class LotteryHelper {
|
||||
private readonly commonUtils: CommonUtils,
|
||||
private readonly fetchUtils: FetchUtils,
|
||||
private readonly infoUtils: InfoUtils,
|
||||
private readonly logger: Logger,
|
||||
) {
|
||||
}
|
||||
|
||||
public init() {
|
||||
let startTime = new Timer();
|
||||
Log.info('彩票助手初始化开始');
|
||||
this.logger.info('彩票助手初始化开始');
|
||||
|
||||
let radioLabelDaily = document.createElement('label');
|
||||
let radioLabelWeekly = document.createElement('label');
|
||||
@ -112,7 +113,7 @@ export default class LotteryHelper {
|
||||
progressBarBg, progressBar, status, desc).insert2Dom();
|
||||
// document.querySelector('#websocketConnectionData').after(container);
|
||||
|
||||
Log.info('彩票助手初始化结束,耗时:' + startTime.getTimeMs());
|
||||
this.logger.info('彩票助手初始化结束,耗时:' + startTime.getTimeMs());
|
||||
}
|
||||
|
||||
private async start() {
|
||||
@ -158,7 +159,7 @@ export default class LotteryHelper {
|
||||
if (this.loopFlag) rsMsg = '批量购买完成';
|
||||
} else {
|
||||
rsMsg = '代币或现金不足';
|
||||
Log.warn({ totalCost, inputNumber });
|
||||
this.logger.warn({ totalCost, inputNumber });
|
||||
}
|
||||
} else {
|
||||
rsMsg = '输入有误';
|
||||
|
||||
@ -2,7 +2,8 @@ import ClassName from "../../container/ClassName";
|
||||
import { Injectable } from "../../container/Injectable";
|
||||
import Logger from "../Logger";
|
||||
import NetHighLvlWrapper, { BATTLE_STAT } from "../utils/NetHighLvlWrapper";
|
||||
import Alert from "../utils/Alert";
|
||||
import { InjectionKey } from "vue";
|
||||
import MsgWrapper from "../utils/MsgWrapper";
|
||||
|
||||
type GymResponse = {
|
||||
success: boolean,
|
||||
@ -19,21 +20,27 @@ export default class QuickGymTrain {
|
||||
constructor(
|
||||
private readonly logger: Logger,
|
||||
private readonly netHighLvlWrapper: NetHighLvlWrapper,
|
||||
private readonly msgWrapper: MsgWrapper,
|
||||
) {
|
||||
}
|
||||
|
||||
doTrain() {
|
||||
doTrain(type = BATTLE_STAT.STR, count = 199) {
|
||||
window.setTimeout(async () => {
|
||||
let resObj: GymResponse;
|
||||
try {
|
||||
resObj = JSON.parse(await this.netHighLvlWrapper.doGymTrain(BATTLE_STAT.STR, 199))
|
||||
resObj = JSON.parse(await this.netHighLvlWrapper.doGymTrain(type, count))
|
||||
} catch (e) {
|
||||
resObj = { success: false, message: '解析失败' };
|
||||
this.logger.error(e.stack || e.message || e);
|
||||
}
|
||||
let msgRs = resObj.success ? '成功' : '失败';
|
||||
let msgMsg = resObj.message || resObj.text || resObj.error;
|
||||
new Alert('锻炼结果: ' + msgRs + '<br/>提示: ' + (resObj.gainMessage || msgMsg));
|
||||
this.msgWrapper.create(
|
||||
'锻炼结果: ' + msgRs + '<br/>提示: ' + (resObj.gainMessage || msgMsg),
|
||||
{}, resObj.success ? 'success' : 'error'
|
||||
);
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
|
||||
export const QuickGymTrainKey = Symbol('QuickGymTrainKey') as InjectionKey<QuickGymTrain>;
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
import CommonUtils from "../utils/CommonUtils";
|
||||
import Global from "../Global";
|
||||
import Device from "../../enum/Device";
|
||||
import Log from "../Log";
|
||||
import ClassName from "../../container/ClassName";
|
||||
import { Injectable } from "../../container/Injectable";
|
||||
import LocalConfigWrapper from "../LocalConfigWrapper";
|
||||
import Logger from "../Logger";
|
||||
|
||||
/**
|
||||
* ### 边栏助手
|
||||
@ -22,6 +22,7 @@ export default class SidebarHelper {
|
||||
constructor(
|
||||
private readonly localConfigWrapper: LocalConfigWrapper,
|
||||
private readonly global: Global,
|
||||
private readonly logger: Logger,
|
||||
) {
|
||||
this.sidebarRootNode = document.querySelector('#sidebarroot');
|
||||
this.toggleBtn = document.createElement('button');
|
||||
@ -34,7 +35,7 @@ export default class SidebarHelper {
|
||||
this.initToggleBtn();
|
||||
this.barRedirect();
|
||||
} else {
|
||||
Log.warn('[SidebarHelper] 页面未开启边栏,边栏助手退出');
|
||||
this.logger.warn('[SidebarHelper] 页面未开启边栏,边栏助手退出');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
import TornStyleBlock from "../utils/TornStyleBlock";
|
||||
import InfoUtils from "../utils/InfoUtils";
|
||||
import Log from "../Log";
|
||||
import FetchUtils from "../utils/FetchUtils";
|
||||
import CommonUtils from "../utils/CommonUtils";
|
||||
import MathUtils from "../utils/MathUtils";
|
||||
import ClassName from "../../container/ClassName";
|
||||
import { Injectable } from "../../container/Injectable";
|
||||
import Logger from "../Logger";
|
||||
|
||||
/**
|
||||
* 老虎机批量购买助手
|
||||
@ -19,6 +19,7 @@ export default class SlotsHelper {
|
||||
private readonly commonUtils: CommonUtils,
|
||||
private readonly fetchUtils: FetchUtils,
|
||||
private readonly infoUtils: InfoUtils,
|
||||
private readonly logger: Logger,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -66,7 +67,7 @@ export default class SlotsHelper {
|
||||
try {
|
||||
await this.goBtnHandler(ev, ret)
|
||||
} catch (e) {
|
||||
Log.error(e.stack || e);
|
||||
this.logger.error(e.stack || e);
|
||||
}
|
||||
goBtn.disabled = false;
|
||||
});
|
||||
@ -119,7 +120,7 @@ export default class SlotsHelper {
|
||||
msgBox.innerHTML += '<br/>已停止, ';
|
||||
msgBox.innerHTML += bang ? '血' : '小';
|
||||
msgBox.innerHTML += profit > 0 ? '赚' : '亏';
|
||||
Log.info("[goBtnHandler]结束", { cash, tokens, count, price, wonTotal });
|
||||
this.logger.info("[goBtnHandler]结束", { cash, tokens, count, price, wonTotal });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
import { chatDict, eventsDict, headerDict, propertyDict, sidebarDict } from "../../dictionary/translation";
|
||||
import Log from "../Log";
|
||||
import Timer from "../utils/Timer";
|
||||
|
||||
/**
|
||||
@ -10,7 +9,7 @@ export default class Translate {
|
||||
public translateVer: string = '1.0';
|
||||
|
||||
constructor() {
|
||||
Log.info('翻译开始');
|
||||
// Log.info('翻译开始');
|
||||
let start = new Timer();
|
||||
// 时分秒转换
|
||||
String.prototype.replaceHMS = function replaceHMS() {
|
||||
@ -39,7 +38,7 @@ export default class Translate {
|
||||
this.chatTranslate();
|
||||
this.playerSearchBoxTrans();
|
||||
this.urlMatchPageTranslate(window.location.href);
|
||||
Log.info('翻译结束, 耗时' + start.getTimeMs());
|
||||
// Log.info('翻译结束, 耗时' + start.getTimeMs());
|
||||
}, 0);
|
||||
}
|
||||
|
||||
|
||||
@ -2,11 +2,11 @@ import CommonUtils from "../utils/CommonUtils";
|
||||
import UserScriptEngine from "../../enum/UserScriptEngine";
|
||||
import Popup from "../utils/Popup";
|
||||
import STOCK_IMG_HTML from "../../../static/html/stock_img.html";
|
||||
import * as FILTER from "../../../static/json/for_stock_item_filter.json";
|
||||
import WindowActiveState from "./WindowActiveState";
|
||||
import { Injectable } from "../../container/Injectable";
|
||||
import ClassName from "../../container/ClassName";
|
||||
import Logger from "../Logger";
|
||||
import { InjectionKey } from "vue";
|
||||
|
||||
@Injectable()
|
||||
@ClassName('TravelItem')
|
||||
@ -35,6 +35,101 @@ export default class TravelItem {
|
||||
}, 30 * 1000);
|
||||
}
|
||||
|
||||
public get itemFiler() {
|
||||
return [
|
||||
{
|
||||
"name": "mex",
|
||||
"show": "墨西哥",
|
||||
"stocks": {
|
||||
"Dahlia": "花",
|
||||
"Jaguar Plushie": "偶"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "cay",
|
||||
"show": "开曼",
|
||||
"stocks": {
|
||||
"Banana Orchid": "花",
|
||||
"Stingray Plushie": "偶"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "can",
|
||||
"show": "加拿大",
|
||||
"stocks": {
|
||||
"Crocus": "花",
|
||||
"Wolverine Plushie": "偶"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "haw",
|
||||
"show": "夏威夷",
|
||||
"stocks": {
|
||||
"Orchid": "花",
|
||||
"Large Suitcase": "大箱"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "uni",
|
||||
"show": "嘤国",
|
||||
"stocks": {
|
||||
"Heather": "花",
|
||||
"Red Fox Plushie": "赤狐",
|
||||
"Nessie Plushie": "水怪"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "arg",
|
||||
"show": "阿根廷",
|
||||
"stocks": {
|
||||
"Ceibo Flower": "花",
|
||||
"Monkey Plushie": "偶",
|
||||
"Tear Gas": "催泪弹"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "swi",
|
||||
"show": "瑞士",
|
||||
"stocks": {
|
||||
"Edelweiss": "花",
|
||||
"Chamois Plushie": "偶"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "jap",
|
||||
"show": "日本",
|
||||
"stocks": {
|
||||
"Cherry Blossom": "花"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "chi",
|
||||
"show": "祖国",
|
||||
"stocks": {
|
||||
"Peony": "花",
|
||||
"Panda Plushie": "偶"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "uae",
|
||||
"show": "阿联酋 (UAE)",
|
||||
"stocks": {
|
||||
"Tribulus Omanense": "花",
|
||||
"Camel Plushie": "偶"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "sou",
|
||||
"show": "南非",
|
||||
"stocks": {
|
||||
"African Violet": "花",
|
||||
"Lion Plushie": "偶",
|
||||
"Xanax": "XAN"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
// 呈现内容
|
||||
public async clickHandler(): Promise<void> {
|
||||
if (this.commonUtils.getScriptEngine() === UserScriptEngine.RAW) {
|
||||
@ -42,7 +137,8 @@ export default class TravelItem {
|
||||
} else {
|
||||
const popup = new Popup("请稍后 " + CommonUtils.loading_gif_html(), '飞花库存');
|
||||
let table = `<table><tr><th colspan="2">目的地 - 更新时间</th><th colspan="3">库存</th></tr>`;
|
||||
const dest = FILTER.default;
|
||||
// const dest = FILTER.default;
|
||||
const dest = this.itemFiler;
|
||||
const now = new Date();
|
||||
const res = await this.get();
|
||||
this.logger.info({ res })
|
||||
@ -68,7 +164,7 @@ export default class TravelItem {
|
||||
}
|
||||
}
|
||||
|
||||
private async get() {
|
||||
public async get() {
|
||||
try {
|
||||
return this.foreignStockInfo ||= JSON.parse(await CommonUtils.COFetch(this.apiUrl));
|
||||
} catch (e) {
|
||||
@ -77,3 +173,5 @@ export default class TravelItem {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export const TravelItemKey = Symbol('TravelItemKey') as InjectionKey<TravelItem>
|
||||
|
||||
@ -1,18 +1,19 @@
|
||||
import Popup from "../utils/Popup";
|
||||
import CommonUtils from "../utils/CommonUtils";
|
||||
import MDUtils from "../utils/MDUtils";
|
||||
import Log from "../Log";
|
||||
import { MENU_ITEM_TYPE } from "../../interface/MenuItem";
|
||||
import Provider from "../provider/Provider";
|
||||
import ClassName from "../../container/ClassName";
|
||||
import { Injectable } from "../../container/Injectable";
|
||||
import { Container } from "../../container/Container";
|
||||
import Logger from "../Logger";
|
||||
|
||||
@ClassName('ChangeLogHandler')
|
||||
@Injectable()
|
||||
class ChangeLogHandler extends Provider {
|
||||
constructor(
|
||||
private readonly mdUtils: MDUtils,
|
||||
private readonly logger: Logger,
|
||||
) {
|
||||
super();
|
||||
}
|
||||
@ -51,7 +52,7 @@ class ChangeLogHandler extends Provider {
|
||||
}, 3000);
|
||||
})
|
||||
.catch(e => {
|
||||
Log.error(e);
|
||||
this.logger.error(e);
|
||||
progressBar.remove();
|
||||
progressText.innerText = '无法加载';
|
||||
});
|
||||
|
||||
@ -6,6 +6,9 @@ import TravelItem from "../action/TravelItem";
|
||||
import ClassName from "../../container/ClassName";
|
||||
import { Injectable } from "../../container/Injectable";
|
||||
import Logger from "../Logger";
|
||||
import MsgWrapper from "../utils/MsgWrapper";
|
||||
import { InjectionKey } from "vue";
|
||||
import NetHighLvlWrapper from "../utils/NetHighLvlWrapper";
|
||||
|
||||
@ClassName('QuickFlyBtnHandler')
|
||||
@Injectable()
|
||||
@ -16,6 +19,9 @@ export default class QuickFlyBtnHandler {
|
||||
private readonly logger: Logger,
|
||||
private readonly travelItem: TravelItem,
|
||||
private readonly commonUtils: CommonUtils,
|
||||
// private readonly infoUtils: InfoUtils,
|
||||
private readonly msgWrapper: MsgWrapper,
|
||||
private readonly netHighLvlWrapper: NetHighLvlWrapper,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -114,4 +120,28 @@ export default class QuickFlyBtnHandler {
|
||||
showTime();
|
||||
yaoCD.innerHTML = `药CD剩余:${ CommonUtils.getYaoCD() }`;
|
||||
}
|
||||
|
||||
public async directFly(destIndex, typeIndex) {
|
||||
// 获取key
|
||||
let key;
|
||||
try {
|
||||
const resp = await (await fetch('/travelagency.php')).text();
|
||||
key = resp.match(/data-key="([0-9]+)"/)[1];
|
||||
} catch (e) {
|
||||
this.msgWrapper.create('起飞参数获取失败', {}, 'error');
|
||||
this.logger.error(e.stack);
|
||||
throw new Error('起飞参数获取失败');
|
||||
}
|
||||
let msg;
|
||||
try {
|
||||
msg = this.netHighLvlWrapper.doTravelFly(QuickFlyBtnHandler.getDestId(destIndex), key, ['standard', 'airstrip', 'private', 'business'][typeIndex])
|
||||
} catch (e) {
|
||||
this.msgWrapper.create(msg, {}, 'error');
|
||||
this.logger.error(e.stack);
|
||||
throw new Error('起飞时出现错误');
|
||||
}
|
||||
this.msgWrapper.create('已起飞', {}, 'success');
|
||||
}
|
||||
}
|
||||
|
||||
export const QuickFlyBtnHandlerKey = Symbol('QuickFlyBtnHandlerKey') as InjectionKey<QuickFlyBtnHandler>
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
import { MenuItemConfig } from "../ZhongIcon";
|
||||
import Log from "../Log";
|
||||
import Timer from "../utils/Timer";
|
||||
import BuyBeerHelper from "../action/BuyBeerHelper";
|
||||
import UpdateTranslateDict from "./UpdateTranslateDict";
|
||||
@ -15,6 +14,7 @@ import { MENU_ITEM_TYPE } from "../../interface/MenuItem";
|
||||
import ClassName from "../../container/ClassName";
|
||||
import { Injectable } from "../../container/Injectable";
|
||||
import { Container } from "../../container/Container";
|
||||
import Logger from "../Logger";
|
||||
|
||||
@ClassName('SettingsHandler')
|
||||
@Injectable()
|
||||
@ -30,6 +30,7 @@ class SettingsHandler extends Provider {
|
||||
private readonly customCssHandler: CustomCssHandler,
|
||||
private readonly viewLogsHandler: ViewLogsHandler,
|
||||
private readonly additionalSettingsHandler: AdditionalSettingsHandler,
|
||||
private readonly logger: Logger,
|
||||
) {
|
||||
super();
|
||||
this.constructWuhuSettingList();
|
||||
@ -37,7 +38,7 @@ class SettingsHandler extends Provider {
|
||||
|
||||
public show(): void {
|
||||
let startTime = new Timer();
|
||||
Log.info('构造设置开始');
|
||||
this.logger.info('构造设置开始');
|
||||
let pop = new Popup(CommonUtils.loading_gif_html(), '芜湖助手设置');
|
||||
window.setTimeout(() => {
|
||||
let tmp = document.createElement('div');
|
||||
@ -49,14 +50,14 @@ class SettingsHandler extends Provider {
|
||||
pop.getElement().innerHTML = '';
|
||||
pop.getElement().appendChild(tmp);
|
||||
(window.initializeTooltip) && (window.initializeTooltip('#wh-popup-cont', 'white-tooltip'));
|
||||
Log.info('构造设置结束 ' + startTime.getTimeMs());
|
||||
this.logger.info('构造设置结束 ' + startTime.getTimeMs());
|
||||
}, 0)
|
||||
}
|
||||
|
||||
// 设置
|
||||
private constructWuhuSettingList(): SettingsHandler {
|
||||
let timer = new Timer();
|
||||
Log.info('构造设置列表开始');
|
||||
this.logger.info('构造设置列表开始');
|
||||
const date = new Date();
|
||||
|
||||
let beer = this.buyBeerHelper;
|
||||
@ -572,7 +573,7 @@ class SettingsHandler extends Provider {
|
||||
clickFunc: () => this.additionalSettingsHandler.show()
|
||||
});
|
||||
|
||||
Log.info('构造设置列表结束' + timer.getTimeMs());
|
||||
this.logger.info('构造设置列表结束' + timer.getTimeMs());
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@ import CommonUtils from "../utils/CommonUtils";
|
||||
import VIEW_LOGS_HANDLER_HTML from "../../../static/html/view_logs_handler.html";
|
||||
import ClassName from "../../container/ClassName";
|
||||
import { Injectable } from "../../container/Injectable";
|
||||
import Logger from "../Logger";
|
||||
|
||||
@ClassName('ViewLogsHandler')
|
||||
@Injectable()
|
||||
@ -11,11 +12,12 @@ export default class ViewLogsHandler {
|
||||
|
||||
constructor(
|
||||
private readonly commonUtils: CommonUtils,
|
||||
private readonly logger: Logger,
|
||||
) {
|
||||
}
|
||||
|
||||
public handle(): void {
|
||||
let logCounter = Log.getCounter();
|
||||
let logCounter = this.logger.getCounter();
|
||||
let pop = new Popup(VIEW_LOGS_HANDLER_HTML
|
||||
.replace('{{}}', logCounter.info.toString())
|
||||
.replace('{{}}', logCounter.warning.toString())
|
||||
|
||||
@ -1,12 +1,14 @@
|
||||
import "reflect-metadata";
|
||||
import Log from "../Log";
|
||||
import ZhongIcon from "../ZhongIcon";
|
||||
import { Container } from "../../container/Container";
|
||||
import Logger from "../Logger";
|
||||
|
||||
export default function EntryPoint(T: { main: () => void }) {
|
||||
if (window.WHTRANS) {
|
||||
console.log('退出, 已运行次数' + window.WHTRANS)
|
||||
} else {
|
||||
window.WHTRANS = window.WHTRANS === undefined ? 1 : window.WHTRANS++;
|
||||
const logger = Container.factory(Logger);
|
||||
|
||||
let started = false;
|
||||
const starter = () => {
|
||||
@ -15,10 +17,10 @@ export default function EntryPoint(T: { main: () => void }) {
|
||||
try {
|
||||
T.main();
|
||||
} catch (e) {
|
||||
Log.error('[Starter]加载出错信息: ' + e.stack || e.message);
|
||||
logger.error('[Starter]加载出错信息: ' + e.stack || e.message);
|
||||
}
|
||||
let runTime: number = (performance.now() - started) | 0;
|
||||
Log.info(`芜湖脚本完成加载, 耗时${ runTime }ms`);
|
||||
logger.info(`芜湖脚本完成加载, 耗时${ runTime }ms`);
|
||||
if (ZhongIcon.ZhongNode && ZhongIcon.ZhongNode.initTimer)
|
||||
ZhongIcon.ZhongNode.initTimer.innerHTML = `加载时间 ${ runTime }ms`;
|
||||
};
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
import Log from "../Log";
|
||||
import Timer from "../utils/Timer";
|
||||
import ClassWithName from "../../interface/ClassWithName";
|
||||
|
||||
/**
|
||||
@ -7,32 +5,32 @@ import ClassWithName from "../../interface/ClassWithName";
|
||||
*/
|
||||
export default class Provider implements ClassWithName {
|
||||
readonly className: string = 'Provider';
|
||||
private static _instance;
|
||||
|
||||
private static readonly pool = {};
|
||||
|
||||
constructor(...args: unknown[]) {
|
||||
}
|
||||
// private static _instance;
|
||||
//
|
||||
// private static readonly pool = {};
|
||||
//
|
||||
// constructor(...args: unknown[]) {
|
||||
// }
|
||||
|
||||
// 返回继承类的实例
|
||||
public static getInstance<T extends typeof Provider>(this: T, ...args: unknown[]): InstanceType<T> {
|
||||
if (!this._instance) {
|
||||
let startTime = new Timer();
|
||||
this._instance = new this(...args);
|
||||
let thatName = this._instance.getClassName() || this.name;
|
||||
Log.info('实例已创建,', thatName, this._instance, '耗时' + startTime.getTimeMs());
|
||||
Provider.pool[thatName] = this._instance;
|
||||
}
|
||||
return this._instance;
|
||||
}
|
||||
// public static getInstance<T extends typeof Provider>(this: T, ...args: unknown[]): InstanceType<T> {
|
||||
// if (!this._instance) {
|
||||
// let startTime = new Timer();
|
||||
// this._instance = new this(...args);
|
||||
// let thatName = this._instance.getClassName() || this.name;
|
||||
// Log.info('实例已创建,', thatName, this._instance, '耗时' + startTime.getTimeMs());
|
||||
// Provider.pool[thatName] = this._instance;
|
||||
// }
|
||||
// return this._instance;
|
||||
// }
|
||||
|
||||
public static getPool() {
|
||||
return {
|
||||
pool: Provider.pool,
|
||||
}
|
||||
}
|
||||
|
||||
public getClassName() {
|
||||
return this.className;
|
||||
}
|
||||
// public static getPool() {
|
||||
// return {
|
||||
// pool: Provider.pool,
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// public getClassName() {
|
||||
// return this.className;
|
||||
// }
|
||||
}
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
import UserScriptEngine from "../../enum/UserScriptEngine";
|
||||
import Log from "../Log";
|
||||
import Device from "../../enum/Device";
|
||||
import LOADING_IMG_HTML from "../../../static/html/loading_img.html";
|
||||
import Timer from "./Timer";
|
||||
@ -15,6 +14,7 @@ import Logger from "../Logger";
|
||||
import Global from "../Global";
|
||||
import { Container } from "../../container/Container";
|
||||
import TornPDAUtils from "./TornPDAUtils";
|
||||
import { InjectionKey } from "vue";
|
||||
|
||||
@Injectable()
|
||||
@ClassName('CommonUtils')
|
||||
@ -40,13 +40,14 @@ export default class CommonUtils {
|
||||
}
|
||||
|
||||
static COFetch(url: URL | string, method: 'get' | 'post' | string = 'get', body: any = null): Promise<string> {
|
||||
let logger = Container.factory(Logger);
|
||||
let start = new Timer();
|
||||
const engine = this.getScriptEngine();
|
||||
Log.info('跨域获取数据开始, 脚本引擎: ' + engine);
|
||||
logger.info('跨域获取数据开始, 脚本引擎: ' + engine);
|
||||
return new Promise<string>((resolve, reject) => {
|
||||
switch (engine) {
|
||||
case UserScriptEngine.RAW: {
|
||||
Log.error(`跨域请求错误:${ UserScriptEngine.RAW }环境下无法进行跨域请求`);
|
||||
logger.error(`跨域请求错误:${ UserScriptEngine.RAW }环境下无法进行跨域请求`);
|
||||
reject(`错误:${ UserScriptEngine.RAW }环境下无法进行跨域请求`);
|
||||
break;
|
||||
}
|
||||
@ -55,29 +56,29 @@ export default class CommonUtils {
|
||||
// get
|
||||
if (method === 'get') {
|
||||
if (typeof PDA_httpGet !== 'function') {
|
||||
Log.error('COFetch网络错误:PDA版本不支持');
|
||||
logger.error('COFetch网络错误:PDA版本不支持');
|
||||
reject('COFetch网络错误:PDA版本不支持');
|
||||
}
|
||||
PDA_httpGet(url)
|
||||
.then(res => {
|
||||
Log.info('跨域获取数据成功, 耗时' + start.getTimeMs());
|
||||
logger.info('跨域获取数据成功, 耗时' + start.getTimeMs());
|
||||
resolve(res.responseText);
|
||||
})
|
||||
.catch(e => {
|
||||
Log.error('COFetch网络错误', e);
|
||||
logger.error('COFetch网络错误', e);
|
||||
reject(`COFetch网络错误 ${ e }`);
|
||||
})
|
||||
}
|
||||
// post
|
||||
else {
|
||||
if (typeof PDA_httpPost !== 'function') {
|
||||
Log.error('COFetch网络错误:PDA版本不支持');
|
||||
logger.error('COFetch网络错误:PDA版本不支持');
|
||||
reject('COFetch网络错误:PDA版本不支持');
|
||||
}
|
||||
PDA_httpPost(url, { 'content-type': 'application/json' }, body)
|
||||
.then(res => resolve(res.responseText))
|
||||
.catch(e => {
|
||||
Log.error('COFetch网络错误', e);
|
||||
logger.error('COFetch网络错误', e);
|
||||
reject(`COFetch网络错误 ${ e }`);
|
||||
});
|
||||
}
|
||||
@ -86,7 +87,7 @@ export default class CommonUtils {
|
||||
case UserScriptEngine.GM: {
|
||||
let { GM_xmlhttpRequest } = Container.factory(Global);
|
||||
if (typeof GM_xmlhttpRequest !== 'function') {
|
||||
Log.error('COFetch网络错误:用户脚本扩展API错误');
|
||||
logger.error('COFetch网络错误:用户脚本扩展API错误');
|
||||
reject('错误:用户脚本扩展API错误');
|
||||
}
|
||||
GM_xmlhttpRequest({
|
||||
@ -95,7 +96,7 @@ export default class CommonUtils {
|
||||
data: method === 'get' ? null : body,
|
||||
headers: method === 'get' ? null : { 'content-type': 'application/json' },
|
||||
onload: res => {
|
||||
Log.info('跨域获取数据成功,耗时' + start.getTimeMs());
|
||||
logger.info('跨域获取数据成功,耗时' + start.getTimeMs());
|
||||
resolve(res.response);
|
||||
},
|
||||
onerror: res => reject(`连接错误 ${ JSON.stringify(res) }`),
|
||||
@ -174,26 +175,27 @@ export default class CommonUtils {
|
||||
* @returns {Promise<HTMLElement|null>}
|
||||
*/
|
||||
public static elementReady(selectors: string, content: Document = document, timeout: number = 30000): Promise<HTMLElement> {
|
||||
Log.info('等待元素:' + selectors);
|
||||
const logger = Container.factory(Logger);
|
||||
logger.info('等待元素:' + selectors);
|
||||
let timer = new Timer();
|
||||
return new Promise((resolve, reject) => {
|
||||
let el = content.querySelector(selectors) as HTMLElement;
|
||||
if (el) {
|
||||
Log.info('已获取元素, 耗时' + timer.getTimeMs(), el);
|
||||
logger.info('已获取元素, 耗时' + timer.getTimeMs(), el);
|
||||
resolve(el);
|
||||
return;
|
||||
}
|
||||
let observer = new MutationObserver((_, observer) => {
|
||||
content.querySelectorAll(selectors).forEach((element) => {
|
||||
Log.info({ innerHTML: element.innerHTML, element });
|
||||
logger.info({ innerHTML: element.innerHTML, element });
|
||||
observer.disconnect();
|
||||
Log.info('已获取元素, 耗时' + timer.getTimeMs(), element);
|
||||
logger.info('已获取元素, 耗时' + timer.getTimeMs(), element);
|
||||
resolve(element as HTMLElement);
|
||||
});
|
||||
});
|
||||
window.setTimeout(() => {
|
||||
observer.disconnect();
|
||||
Log.error(`等待元素超时! [${ selectors }]\n${ content.documentElement.tagName }, 耗时` + timer.getTimeMs());
|
||||
logger.error(`等待元素超时! [${ selectors }]\n${ content.documentElement.tagName }, 耗时` + timer.getTimeMs());
|
||||
reject(`等待元素超时! [${ selectors }]\n${ content.documentElement.tagName }, 耗时` + timer.getTimeMs());
|
||||
}, timeout);
|
||||
observer.observe(content.documentElement, { childList: true, subtree: true });
|
||||
@ -211,6 +213,7 @@ export default class CommonUtils {
|
||||
}
|
||||
|
||||
public static addStyle(rules: string): void {
|
||||
const logger = Container.factory(Logger);
|
||||
let element = document.querySelector('style#wh-trans-gStyle');
|
||||
if (element) {
|
||||
element.innerHTML += rules;
|
||||
@ -220,7 +223,7 @@ export default class CommonUtils {
|
||||
element.innerHTML = rules;
|
||||
document.head.appendChild(element);
|
||||
}
|
||||
Log.info('CSS规则已添加', element);
|
||||
logger.info('CSS规则已添加', element);
|
||||
}
|
||||
|
||||
public styleInject(rules: string): void {
|
||||
@ -438,7 +441,11 @@ export default class CommonUtils {
|
||||
* @param m1 id->name map
|
||||
* @param m2 name->item map
|
||||
*/
|
||||
public getItemByIdOrName(key: string, m1, m2: { [k: string]: Partial<InventoryItemInfo> }): Partial<InventoryItemInfo> {
|
||||
public getItemByIdOrName(key: string, m1, m2: {
|
||||
[k: string]: Partial<InventoryItemInfo>
|
||||
}): Partial<InventoryItemInfo> {
|
||||
return m1[key] ? m2[m1[key]] : m2[key];
|
||||
}
|
||||
}
|
||||
|
||||
export const CommonUtilsKey = Symbol('CommonUtilsKey') as InjectionKey<CommonUtils>;
|
||||
|
||||
@ -1,19 +1,21 @@
|
||||
import Log from "../Log";
|
||||
import DIALOG_MSG_BOX_HTML from "../../../static/html/dialog_msg_box.html";
|
||||
import Logger from "../Logger";
|
||||
import { Container } from "../../container/Container";
|
||||
|
||||
export default class DialogMsgBox {
|
||||
private static existed = false;
|
||||
private readonly container: HTMLElement;
|
||||
|
||||
constructor(msg: string, opt: DialogMsgBoxOptions) {
|
||||
Log.info('创建DialogMsgBox', { msg, opt });
|
||||
constructor(msg: string, opt: DialogMsgBoxOptions,
|
||||
private readonly logger: Logger = Container.factory(Logger)) {
|
||||
logger.info('创建DialogMsgBox', { msg, opt });
|
||||
let { title = '提示', callback, cancel } = opt;
|
||||
if (!callback) {
|
||||
Log.error('无callback');
|
||||
logger.error('无callback');
|
||||
throw new Error('无callback');
|
||||
}
|
||||
if (DialogMsgBox.existed) {
|
||||
Log.error('无法创建DialogMsgBox:已存在');
|
||||
logger.error('无法创建DialogMsgBox:已存在');
|
||||
throw new Error('无法创建DialogMsgBox:已存在');
|
||||
}
|
||||
this.container = document.createElement('div');
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
import Alert from "./Alert";
|
||||
import ISidebarData from "../../interface/ISidebarData";
|
||||
import Log from "../Log";
|
||||
import FetchUtils from "./FetchUtils";
|
||||
import ClassName from "../../container/ClassName";
|
||||
import { Injectable } from "../../container/Injectable";
|
||||
@ -56,7 +55,7 @@ export default class InfoUtils {
|
||||
ret = {};
|
||||
}
|
||||
} else {
|
||||
Log.info('无法从sessionStorage获取数据')
|
||||
this.logger.info('无法从sessionStorage获取数据')
|
||||
ret = await (await this.fetchUtils.ajaxFetch({
|
||||
url: window.addRFC('/sidebarAjaxAction.php?q=getSidebarData'),
|
||||
method: 'POST',
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
import InventoryItemInfo from "../../interface/responseType/InventoryItemInfo";
|
||||
import FetchUtils from "./FetchUtils";
|
||||
import CommonUtils from "./CommonUtils";
|
||||
import Log from "../Log";
|
||||
import PriceData from "../../interface/PriceData";
|
||||
import Asyncable from "../../interface/Asyncable";
|
||||
import ClassName from "../../container/ClassName";
|
||||
import { Injectable } from "../../container/Injectable";
|
||||
import Logger from "../Logger";
|
||||
|
||||
@ClassName('ItemHelper')
|
||||
@Injectable()
|
||||
@ -13,6 +13,7 @@ export default class ItemHelper {
|
||||
|
||||
constructor(
|
||||
private readonly fetchUtils: FetchUtils,
|
||||
private readonly logger: Logger,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -99,7 +100,7 @@ export default class ItemHelper {
|
||||
try {
|
||||
data = JSON.parse(localStore);
|
||||
} catch (e) {
|
||||
Log.error(e.stack || e.message || e);
|
||||
this.logger.error(e.stack || e.message || e);
|
||||
throw new Error('JSON解析错误');
|
||||
}
|
||||
// 缓存超时
|
||||
@ -139,7 +140,7 @@ export default class ItemHelper {
|
||||
else {
|
||||
ret.promise = new Promise(async resolve => {
|
||||
let response = await localData.promise;
|
||||
Log.info({ response });
|
||||
this.logger.info({ response });
|
||||
let promiseRet = {};
|
||||
Object.keys(response).forEach(k => {
|
||||
promiseRet[response[k].name] = k;
|
||||
@ -161,7 +162,7 @@ export default class ItemHelper {
|
||||
try {
|
||||
res = JSON.parse(await CommonUtils.COFetch('https://jjins.github.io/item_price_raw.json'))
|
||||
} catch (err) {
|
||||
Log.error(err.stack || err.message || err);
|
||||
this.logger.error(err.stack || err.message || err);
|
||||
throw new Error('获取在线价格时出错');
|
||||
}
|
||||
// 更新缓存
|
||||
|
||||
@ -1,14 +1,28 @@
|
||||
import ClassName from "../../container/ClassName";
|
||||
import { Injectable } from "../../container/Injectable";
|
||||
import Alert from "./Alert";
|
||||
import IWHNotify from "../../interface/IWHNotify";
|
||||
import { InjectionKey } from "vue";
|
||||
import { ElMessage } from "element-plus";
|
||||
import NotificationUtils from "./NotificationUtils";
|
||||
|
||||
@ClassName('MsgWrapper')
|
||||
@Injectable()
|
||||
export default class MsgWrapper {
|
||||
create(msg: string, options: IWHNotify = {},): Alert {
|
||||
return new Alert(msg, options);
|
||||
constructor(
|
||||
private readonly notificationUtils: NotificationUtils,
|
||||
) {
|
||||
}
|
||||
|
||||
create(msg: string, options: IWHNotify = {}, type: 'info' | 'warning' | 'error' | 'success' = 'info') {
|
||||
if (options.sysNotify) {
|
||||
this.notificationUtils.push(msg);
|
||||
}
|
||||
return ElMessage({
|
||||
message: msg,
|
||||
type,
|
||||
showClose: true,
|
||||
dangerouslyUseHTMLString: true,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -34,6 +34,26 @@ export default class NetHighLvlWrapper {
|
||||
}
|
||||
return rs;
|
||||
}
|
||||
|
||||
public async doTravelFly(destId, key, type): Promise<string> {
|
||||
return await (await fetch(window.addRFC("https://www.torn.com/travelagency.php"), {
|
||||
"headers": {
|
||||
"accept": "*/*",
|
||||
"accept-language": "zh-CN,zh;q=0.9",
|
||||
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
|
||||
"sec-fetch-dest": "empty",
|
||||
"sec-fetch-mode": "cors",
|
||||
"sec-fetch-site": "same-origin",
|
||||
"x-requested-with": "XMLHttpRequest"
|
||||
},
|
||||
"referrer": "https://www.torn.com/travelagency.php",
|
||||
"referrerPolicy": "strict-origin-when-cross-origin",
|
||||
"body": `step=travel&id=${ destId }&key=${ key }&type=${ type }`,
|
||||
"method": "POST",
|
||||
"mode": "cors",
|
||||
"credentials": "include"
|
||||
})).text()
|
||||
}
|
||||
}
|
||||
|
||||
export enum BATTLE_STAT {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import IWHNotify from "../../interface/IWHNotify";
|
||||
import Log from "../Log";
|
||||
import ClassName from "../../container/ClassName";
|
||||
import { Injectable } from "../../container/Injectable";
|
||||
import Logger from "../Logger";
|
||||
|
||||
@ClassName('NotificationUtils')
|
||||
@Injectable()
|
||||
@ -9,6 +9,7 @@ export default class NotificationUtils {
|
||||
constructor(
|
||||
// TODO 循环依赖
|
||||
// private readonly global: Global,
|
||||
private readonly logger: Logger,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -21,7 +22,7 @@ export default class NotificationUtils {
|
||||
let tmpNode = document.createElement('p');
|
||||
tmpNode.innerHTML = msg;
|
||||
let notify = new Notification('芜湖助手', {
|
||||
body: Log.getTime() + '\r\n' + tmpNode.innerText,
|
||||
body: this.logger.getTime() + '\r\n' + tmpNode.innerText,
|
||||
// requireInteraction: true,
|
||||
// renotify: true,
|
||||
// tag: '芜湖助手' + Utils.getRandomInt(0, 99),
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
import CommonUtils from "../../class/utils/CommonUtils";
|
||||
import Log from "../../class/Log";
|
||||
import Alert from "../../class/utils/Alert";
|
||||
import ActionButtonUtils from "../../class/utils/ActionButtonUtils";
|
||||
import FetchUtils from "../../class/utils/FetchUtils";
|
||||
@ -7,10 +6,12 @@ import DEPO_CSS from "../../../static/css/depo.module.css";
|
||||
import TornStyleBlock from "../../class/utils/TornStyleBlock";
|
||||
import { Container } from "../../container/Container";
|
||||
import LocalConfigWrapper from "../../class/LocalConfigWrapper";
|
||||
import Logger from "../../class/Logger";
|
||||
|
||||
const fetchUtils = Container.factory(FetchUtils);
|
||||
|
||||
export default function depoHelper() {
|
||||
let logger: Logger = Container.factory(Logger);
|
||||
let actionButtonUtils: ActionButtonUtils = Container.factory(ActionButtonUtils);
|
||||
let localConfigWrapper: LocalConfigWrapper = Container.factory(LocalConfigWrapper);
|
||||
let commonUtils: CommonUtils = Container.factory(CommonUtils);
|
||||
@ -25,7 +26,7 @@ export default function depoHelper() {
|
||||
const btn = document.getElementById('ui-id-9');
|
||||
if (btn) {
|
||||
btn.click();
|
||||
Log.info('已自动打开存钱页面');
|
||||
logger.info('已自动打开存钱页面');
|
||||
}
|
||||
}
|
||||
// 收起冰蛙表格
|
||||
@ -80,14 +81,14 @@ export default function depoHelper() {
|
||||
}
|
||||
return;
|
||||
}
|
||||
Log.info('已添加GT助手');
|
||||
logger.info('已添加GT助手');
|
||||
// 获取交易id
|
||||
let query_params = location.hash.slice(1);
|
||||
let traceId = id;
|
||||
if (!traceId) query_params.split('&').forEach(param =>
|
||||
(param.startsWith('ID=')) && (traceId = param.slice(3))
|
||||
);
|
||||
Log.info('交易id为', traceId);
|
||||
logger.info('交易id为', traceId);
|
||||
|
||||
// 获取全部的钱数
|
||||
let getTraceMoney = async () => {
|
||||
@ -101,7 +102,7 @@ export default function depoHelper() {
|
||||
}
|
||||
};
|
||||
// 监听jquery ajax请求
|
||||
if (Log.debug()) $(document).ajaxComplete((_, xhr, settings) => Log.info({ xhr, settings }));
|
||||
if (logger.debug()) $(document).ajaxComplete((_, xhr, settings) => logger.info({ xhr, settings }));
|
||||
// react 加载完成后将节点加入视图中
|
||||
CommonUtils.elementReady('#trade-container').then(() =>
|
||||
document.querySelector('#trade-container').before(_node.getBase())
|
||||
@ -197,7 +198,7 @@ export default function depoHelper() {
|
||||
} else {
|
||||
if (node_link) node_link.remove();
|
||||
node_link = null;
|
||||
Log.info('已移除GT助手');
|
||||
logger.info('已移除GT助手');
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -262,7 +263,7 @@ async function factionDeposit() {
|
||||
|
||||
// 所有页面公司一键存钱
|
||||
async function companyDepositAnywhere() {
|
||||
// let fetchUtils: FetchUtils = FetchUtils.getInstance();
|
||||
const logger: Logger = Container.factory(Logger);
|
||||
let { addRFC } = window;
|
||||
if (typeof addRFC !== 'function') return;
|
||||
let url = addRFC('https://www.torn.com/inputMoneyAction.php?step=generalAction');
|
||||
@ -274,7 +275,7 @@ async function companyDepositAnywhere() {
|
||||
body: 'deposit=' + money,
|
||||
headers: { 'X-Requested-With': 'XMLHttpRequest', 'Content-Type': 'application/x-www-form-urlencoded' }
|
||||
})).text();
|
||||
Log.info(res);
|
||||
logger.info(res);
|
||||
let node = document.createElement('div');
|
||||
node.innerHTML = res;
|
||||
let success = node.querySelector('.success-message');
|
||||
|
||||
@ -1,12 +1,13 @@
|
||||
import Alert from "../../class/utils/Alert";
|
||||
import InfoUtils from "../../class/utils/InfoUtils";
|
||||
import Log from "../../class/Log";
|
||||
import Popup from "../../class/utils/Popup";
|
||||
import { Container } from "../../container/Container";
|
||||
import Logger from "../../class/Logger";
|
||||
|
||||
// 守望者
|
||||
export default function safeKeeper() {
|
||||
let infoUtils = Container.factory(InfoUtils);
|
||||
let logger = Container.factory(Logger);
|
||||
|
||||
let url = `https://www.torn.com/loader.php?sid=attackData&mode=json&step=poll&user2ID=`;
|
||||
let popup = new Popup('<p>监测目标ID玩家的防御状态,找出隐身攻击者</p>', '守望者 (测试中)');
|
||||
@ -51,13 +52,13 @@ export default function safeKeeper() {
|
||||
} else new Alert('守望者运行中,请先停止', { timeout: 2 });
|
||||
}
|
||||
|
||||
popup.getElement().appendChild(p);
|
||||
popup.getElement().appendChild(uid);
|
||||
popup.getElement().appendChild(start);
|
||||
popup.getElement().appendChild(stop);
|
||||
popup.getElement().appendChild(self_target);
|
||||
popup.getElement().appendChild(attackers);
|
||||
popup.getElement().appendChild(records);
|
||||
popup.element.appendChild(p);
|
||||
popup.element.appendChild(uid);
|
||||
popup.element.appendChild(start);
|
||||
popup.element.appendChild(stop);
|
||||
popup.element.appendChild(self_target);
|
||||
popup.element.appendChild(attackers);
|
||||
popup.element.appendChild(records);
|
||||
|
||||
start.addEventListener('click', () => {
|
||||
if (loop_id !== null || !uid.value) return;
|
||||
@ -75,7 +76,7 @@ export default function safeKeeper() {
|
||||
})).text();
|
||||
if (loop_id !== that_id) return;
|
||||
let data = JSON.parse(res.split('<div')[0]);
|
||||
Log.info(count++, data);
|
||||
logger.info(count++, data);
|
||||
let { DB, currentFightStatistics, histLog } = data;
|
||||
// 攻击人
|
||||
// 格式:currentFightStatistics = {uid: {...}, uid2: {...}}
|
||||
|
||||
@ -10,6 +10,7 @@ import NetHighLvlWrapper from "../class/utils/NetHighLvlWrapper";
|
||||
import Logger from "../class/Logger";
|
||||
import QuickGymTrain from "../class/action/QuickGymTrain";
|
||||
import LocalConfigWrapper from "../class/LocalConfigWrapper";
|
||||
import { ElMessage } from "element-plus";
|
||||
|
||||
@ButtonHandler
|
||||
@ClassName('Test')
|
||||
@ -61,5 +62,8 @@ class Test {
|
||||
export default {
|
||||
domType: MENU_ITEM_TYPE.BUTTON,
|
||||
domText: '🐞 测试2',
|
||||
clickFunc: () => Container.factory(Test).show(),
|
||||
clickFunc: () => {
|
||||
Container.factory(Test).show()
|
||||
ElMessage('test');
|
||||
},
|
||||
}
|
||||
|
||||
21
src/ts/useEventListener.ts
Normal file
21
src/ts/useEventListener.ts
Normal file
@ -0,0 +1,21 @@
|
||||
import { isRef, onMounted, onUnmounted, Ref } from 'vue'
|
||||
|
||||
// https://cn.vuejs.org/guide/reusability/composables.html#mouse-tracker-example
|
||||
export function useEventListener(target: HTMLElement | Ref<HTMLElement>, event: string, callback: (ev: Event) => void) {
|
||||
// 如果你想的话,
|
||||
// 也可以用字符串形式的 CSS 选择器来寻找目标 DOM 元素
|
||||
onMounted(() => {
|
||||
if (isRef(target)) {
|
||||
target.value.addEventListener(event, callback)
|
||||
} else {
|
||||
target.addEventListener(event, callback)
|
||||
}
|
||||
})
|
||||
onUnmounted(() => {
|
||||
if (isRef(target)) {
|
||||
target.value.removeEventListener(event, callback)
|
||||
} else {
|
||||
target.removeEventListener(event, callback)
|
||||
}
|
||||
})
|
||||
}
|
||||
60
src/vue/Config.vue
Normal file
60
src/vue/Config.vue
Normal file
@ -0,0 +1,60 @@
|
||||
<template>
|
||||
<el-form label-position="left" label-width="auto">
|
||||
<div>
|
||||
<el-text size="large" type="primary">翻译</el-text>
|
||||
</div>
|
||||
<el-form-item label="开启翻译">
|
||||
<!-- <el-col :span="22"></el-col>-->
|
||||
<el-col :offset="22" :span="2">
|
||||
<el-switch v-model="config.transEnable" size="small"/>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-form-item label="新翻译">
|
||||
<el-col :span="22">
|
||||
<el-text size="small" type="info">改进后的翻译,更好的性能</el-text>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<el-switch v-model="config.transNew" size="small"/>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<div>
|
||||
<el-text size="large" type="primary">战斗</el-text>
|
||||
</div>
|
||||
<el-form-item label="光速拔刀">
|
||||
<el-col :offset="18" :span="6">
|
||||
<el-select>
|
||||
<el-option>主手</el-option>
|
||||
<el-option>副手</el-option>
|
||||
<el-option>近战</el-option>
|
||||
<el-option>手雷</el-option>
|
||||
<el-option>拳头</el-option>
|
||||
<el-option>脚踢</el-option>
|
||||
<el-option>关闭</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-form-item label="攻击界面转跳">
|
||||
<el-col :offset="22" :span="2">
|
||||
<el-switch v-model="config.attRelocate" size="small"/>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { inject, ref } from "vue";
|
||||
import { LocalConfigWrapperKey } from "../ts/class/LocalConfigWrapper";
|
||||
|
||||
const localConfigWrapper = inject(LocalConfigWrapperKey);
|
||||
const config = ref(localConfigWrapper.config);
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
export default {
|
||||
name: "Config"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@ -1,59 +1,181 @@
|
||||
<template>
|
||||
<el-config-provider :size="'default'" :z-index="1000000">
|
||||
<el-dropdown :hide-on-click="false" size="small" style="z-index: 1000000" trigger="click">
|
||||
<el-button circle class="wh-menu-button">
|
||||
<el-icon>
|
||||
<MoonNight/>
|
||||
</el-icon>
|
||||
</el-button>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item>芜湖助手</el-dropdown-item>
|
||||
<el-dropdown-item divided>
|
||||
<el-dropdown placement="bottom-end" size="small" style="width: 100%" trigger="click">
|
||||
<div style="width: 100%">💪 快速锻炼
|
||||
<el-icon class="-icon--right">
|
||||
<ArrowRight/>
|
||||
</el-icon>
|
||||
</div>
|
||||
<template #dropdown>
|
||||
<el-dropdown-item @click="quickGymTrain.doTrain(BATTLE_STAT.STR)">力量
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item @click="quickGymTrain.doTrain(BATTLE_STAT.DEF)">防御
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item @click="quickGymTrain.doTrain(BATTLE_STAT.SPD)">速度
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item @click="quickGymTrain.doTrain(BATTLE_STAT.DEX)">闪避
|
||||
</el-dropdown-item>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item>
|
||||
<el-dropdown placement="bottom-end" size="small" style="width: 100%" trigger="click">
|
||||
<div style="width: 100%">✈️ 一键起飞
|
||||
<el-icon class="-icon--right">
|
||||
<ArrowRight/>
|
||||
</el-icon>
|
||||
</div>
|
||||
<template #dropdown>
|
||||
<template v-for="travel in travelData">
|
||||
<el-dropdown-item>
|
||||
<el-dropdown placement="bottom-end" size="small" style="width: 100%"
|
||||
trigger="click">
|
||||
<div style="width: 100%">{{ travel.cName }}
|
||||
<el-icon>
|
||||
<ArrowRight/>
|
||||
</el-icon>
|
||||
</div>
|
||||
<template #dropdown>
|
||||
<el-dropdown-item @click="travelConfirm(travel.index,0)">
|
||||
普通飞机
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item @click="travelConfirm(travel.index,1)">
|
||||
PI飞机
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item @click="travelConfirm(travel.index,2)">
|
||||
股票飞机
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item @click="travelConfirm(travel.index,3)">
|
||||
商务飞机(机票或内衣店)
|
||||
</el-dropdown-item>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
</el-dropdown-item>
|
||||
</template>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item v-for="item in menuItemList" @click="menuClick(item)">
|
||||
{{ item.title }}
|
||||
</el-dropdown-item>
|
||||
<!-- <el-dropdown-item divided>当前版本: {{ globVars.version }}-->
|
||||
<!-- <el-button @click="">更新</el-button>-->
|
||||
<!-- </el-dropdown-item>-->
|
||||
<!-- <el-dropdown-item>最新版本: <span id="wh-latest-version"></span></el-dropdown-item>-->
|
||||
<!-- <el-dropdown-item id="WHLoadTime">加载时间</el-dropdown-item>-->
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
<el-dialog
|
||||
v-model="drawer"
|
||||
:destroy-on-close="true"
|
||||
:title="drawerTitle"
|
||||
>
|
||||
<component :is="drawerContent"/>
|
||||
</el-dialog>
|
||||
</el-config-provider>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { inject, ref } from 'vue';
|
||||
import { LoggerKey } from "../ts/class/IconHelper";
|
||||
import globVars from "../ts/globVars";
|
||||
import Test from "./Test.vue";
|
||||
import PopupWindow from "./PopupWindow.vue";
|
||||
import { inject, ref, shallowRef } from 'vue';
|
||||
import { LoggerKey } from "../ts/class/Logger";
|
||||
import ForeignStock from "./ForeignStock.vue";
|
||||
import { ArrowRight, MoonNight } from "@element-plus/icons-vue";
|
||||
import Config from "./Config.vue";
|
||||
import { QuickGymTrainKey } from "../ts/class/action/QuickGymTrain";
|
||||
import { BATTLE_STAT } from "../ts/class/utils/NetHighLvlWrapper";
|
||||
import { QuickFlyBtnHandlerKey } from "../ts/class/handler/QuickFlyBtnHandler";
|
||||
import { ElMessageBox } from "element-plus";
|
||||
|
||||
const logger = inject(LoggerKey);
|
||||
// const menuItemList = inject(MenuItemListKey);
|
||||
const menuItemList = [];
|
||||
const version = globVars.version;
|
||||
const quickGymTrain = inject(QuickGymTrainKey);
|
||||
const quickFlyBtnHandler = inject(QuickFlyBtnHandlerKey);
|
||||
const menuItemList = [
|
||||
{
|
||||
title: '🌸 飞花库存',
|
||||
template: ForeignStock,
|
||||
},
|
||||
// {
|
||||
// title: '🔫 LOOT',
|
||||
// template: Test,
|
||||
// },
|
||||
// {
|
||||
// title: '👮 NNB',
|
||||
// template: ForeignStock,
|
||||
// },
|
||||
// {
|
||||
// title: '🖥 全屏',
|
||||
// template: () => ElMessage('this is a message.'),
|
||||
// },
|
||||
{
|
||||
title: '⚙️ 插件配置',
|
||||
template: Config,
|
||||
},
|
||||
];
|
||||
const drawer = ref(false);
|
||||
const drawerTitle = ref('');
|
||||
const drawerContent = shallowRef(null);
|
||||
|
||||
const itemHandle = (id) => logger.info(id);
|
||||
const updateHandle = () => {
|
||||
// fast travel
|
||||
const travelData = [
|
||||
{ cName: "墨西哥", index: "0" },
|
||||
{ cName: "开曼", index: "1" },
|
||||
{ cName: "加拿大", index: "2" },
|
||||
{ cName: "夏威夷", index: "3" },
|
||||
{ cName: "嘤国", index: "4" },
|
||||
{ cName: "阿根廷", index: "5" },
|
||||
{ cName: "瑞士 (解毒)", index: "6" },
|
||||
{ cName: "立本", index: "7" },
|
||||
{ cName: "祖国", index: "8" },
|
||||
{ cName: "阿联酋 (UAE)", index: "9" },
|
||||
{ cName: "南非", index: "10" },
|
||||
];
|
||||
|
||||
const menuClick = (menuItem) => {
|
||||
logger.info(menuItem);
|
||||
if (typeof menuItem.template === 'function') {
|
||||
menuItem.template();
|
||||
} else {
|
||||
drawer.value = true;
|
||||
drawerTitle.value = menuItem.title;
|
||||
drawerContent.value = menuItem.template;
|
||||
}
|
||||
};
|
||||
const currentPopupContent = ref({
|
||||
has: false,
|
||||
title: null,
|
||||
content: null,
|
||||
});
|
||||
const menuClick = (id) => {
|
||||
currentPopupContent.value.has = true;
|
||||
currentPopupContent.value.title = 'test';
|
||||
currentPopupContent.value.content = Test;
|
||||
|
||||
const travelConfirm = (destIndex, typeIndex) => {
|
||||
ElMessageBox.confirm(
|
||||
'即将使用[' + ['普通飞机', 'PI飞机', '股票飞机', '商务飞机(机票或内衣店)'][typeIndex] + ']飞往[' + travelData[destIndex].cName + ']',
|
||||
'确认',
|
||||
{
|
||||
confirmButtonText: '好',
|
||||
cancelButtonText: '算了',
|
||||
type: 'info',
|
||||
}
|
||||
)
|
||||
.then(async () => {
|
||||
await quickFlyBtnHandler.directFly(destIndex, typeIndex);
|
||||
ElMessageBox.confirm('是否转跳页面?', '确认', {
|
||||
confirmButtonText: '好',
|
||||
cancelButtonText: '算了',
|
||||
type: 'info'
|
||||
}
|
||||
).then(() => window.location.href = 'https://www.torn.com')
|
||||
.catch(() => null);
|
||||
})
|
||||
.catch(() => null);
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<button @click=""></button>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="main">
|
||||
<div><b>芜湖助手</b></div>
|
||||
<div id="itemList">
|
||||
<!-- <div v-for="item in menuItemList">-->
|
||||
<!-- <button v-if="item.domType === 'button'" @click="itemHandle(item.domId)">{{ item.domText }}</button>-->
|
||||
<!-- <div v-if="item.domType === 'plain'" v-html="item.domHTML"></div>-->
|
||||
<!-- </div>-->
|
||||
<button @click="menuClick">菜单</button>
|
||||
</div>
|
||||
<div>
|
||||
<p>当前版本: {{ version }}
|
||||
<button @click="">更新</button>
|
||||
</p>
|
||||
</div>
|
||||
<div><p>最新版本: <span id="wh-latest-version"></span></p></div>
|
||||
<div><p id="loadTime"></p></div>
|
||||
</div>
|
||||
</div>
|
||||
<PopupWindow v-if="currentPopupContent.has" title="{{ currentPopupContent.title }}">
|
||||
<component :is="currentPopupContent.content"/>
|
||||
</PopupWindow>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
export default {
|
||||
name: 'FloatMenu',
|
||||
@ -61,5 +183,9 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
.wh-menu-button {
|
||||
position: fixed;
|
||||
top: 32px;
|
||||
left: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
59
src/vue/ForeignStock.vue
Normal file
59
src/vue/ForeignStock.vue
Normal file
@ -0,0 +1,59 @@
|
||||
<template>
|
||||
<div v-if="commonUtils.getScriptEngine() === UserScriptEngine.RAW" class="wh-f-item">
|
||||
<el-image :src="staticImageSrc"/>
|
||||
</div>
|
||||
<el-table v-else v-loading="loading" :data="tableData" style="width: 100%">
|
||||
<el-table-column label="区域" prop="area"/>
|
||||
<el-table-column label="更新时间" prop="updateTime"/>
|
||||
<el-table-column label="库存" prop="stock"/>
|
||||
</el-table>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { CommonUtilsKey } from "../ts/class/utils/CommonUtils";
|
||||
import { inject, onMounted, ref } from "vue";
|
||||
import UserScriptEngine from "../ts/enum/UserScriptEngine.js";
|
||||
import { TravelItemKey } from "../ts/class/action/TravelItem";
|
||||
import { LoggerKey } from "../ts/class/Logger";
|
||||
|
||||
const commonUtils = inject(CommonUtilsKey);
|
||||
const travelItem = inject(TravelItemKey);
|
||||
const logger = inject(LoggerKey);
|
||||
const loading = ref(true);
|
||||
const staticImageSrc = 'https://jjins.github.io/t2i/stock.png?' + Date.now();
|
||||
const tableData = ref([]);
|
||||
let travelItemData = null;
|
||||
|
||||
onMounted(async () => {
|
||||
travelItemData = await travelItem.get();
|
||||
loading.value = false;
|
||||
travelItem.itemFiler.forEach(item => {
|
||||
const update = (new Date().getTime() - new Date(travelItemData.stocks[item.name]['update'] * 1000).getTime()) / 1000 | 0;
|
||||
const tableItem = {
|
||||
area: item.show,
|
||||
updateTime: `${ update / 60 | 0 }分${ update % 60 | 0 }秒前`,
|
||||
stock: [],
|
||||
};
|
||||
travelItemData.stocks[item.name]['stocks'].forEach(stock => {
|
||||
if (item.stocks[stock.name]) {
|
||||
tableItem.stock.push(`${ item.stocks[stock.name] }(${ stock['quantity'] })`);
|
||||
// table += `<td${ stock['quantity'] === 0 ? ' style="background-color:#f44336;color:white;border-color:#000;"' : '' }>${ el.stocks[stock.name] } (${ stock['quantity'] })</td>`;
|
||||
}
|
||||
});
|
||||
tableData.value.push(tableItem);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
export default {
|
||||
name: "Test2"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.wh-f-item .el-image {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
@ -46,7 +46,6 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Log from "../ts/class/Log";
|
||||
import ItemHelper from "../ts/class/utils/ItemHelper";
|
||||
import toThousands from "../ts/func/utils/toThousands";
|
||||
import FetchUtils from "../ts/class/utils/FetchUtils";
|
||||
@ -57,6 +56,7 @@ import { ItemPrice } from "../ts/interface/PriceData";
|
||||
import { itemNameDict } from "../ts/dictionary/translation";
|
||||
import { Container } from "../ts/container/Container";
|
||||
import TornPDAUtils from "../ts/class/utils/TornPDAUtils";
|
||||
import Logger from "../ts/class/Logger";
|
||||
|
||||
export default defineComponent({
|
||||
name: "ItemPrice",
|
||||
@ -111,7 +111,7 @@ export default defineComponent({
|
||||
.fetchText(`//api.torn.com/market/${ this.itemNameMap[itemName] }?selections=bazaar&key=${ apiKey }`)
|
||||
).bazaar.slice(0, 5);
|
||||
} catch (e) {
|
||||
Log.error(e.stack || e.message || e);
|
||||
Container.factory(Logger).error(e.stack || e.message || e);
|
||||
new Alert(e.message || e.toString());
|
||||
ev.target.disabled = false;
|
||||
}
|
||||
|
||||
@ -1,12 +1,30 @@
|
||||
<script lang="ts" setup>
|
||||
defineProps(['title', 'html', 'temp']);
|
||||
import { useEventListener } from "../ts/useEventListener";
|
||||
import { inject, shallowRef } from "vue";
|
||||
import { LoggerKey } from "../ts/class/Logger";
|
||||
|
||||
const logger = inject(LoggerKey);
|
||||
|
||||
const props = defineProps<{
|
||||
curPopupTitle: { title: string, },
|
||||
}>();
|
||||
|
||||
// 虚拟dom容器
|
||||
const container = shallowRef();
|
||||
|
||||
useEventListener(container, 'click', (ev) => {
|
||||
ev.preventDefault();
|
||||
if (ev.target === container.value) {
|
||||
props.curPopupTitle.title = null;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="popup-container">
|
||||
<div v-show="curPopupTitle.title" ref="container" class="popup-container">
|
||||
<div class="border-round">
|
||||
<div class="title-black top-round">
|
||||
<p>{{ title || '芜湖助手' }}</p>
|
||||
<p>{{ curPopupTitle.title || '芜湖助手' }}</p>
|
||||
</div>
|
||||
<div class="bottom-round cont-gray scroll-area scrollbar-transparent">
|
||||
<slot></slot>
|
||||
@ -22,5 +40,14 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
.popup-container {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: #00000080;
|
||||
z-index: 110001;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -1,5 +1,41 @@
|
||||
<template>
|
||||
<p>1</p>
|
||||
<p>1</p>
|
||||
<p>1</p>
|
||||
<p>1</p>
|
||||
<p>1</p>
|
||||
<p>1</p>
|
||||
<p>1</p>
|
||||
<p>1</p>
|
||||
<p>1</p>
|
||||
<p>1</p>
|
||||
<p>1</p>
|
||||
<p>1</p>
|
||||
<p>1</p>
|
||||
<p>1</p>
|
||||
<p>1</p>
|
||||
<p>1</p>
|
||||
<p>1</p>
|
||||
<p>1</p>
|
||||
<p>1</p>
|
||||
<p>1</p>
|
||||
<p>1</p>
|
||||
<p>1</p>
|
||||
<p>1</p>
|
||||
<p>1</p>
|
||||
<p>1</p>
|
||||
<p>1</p>
|
||||
<p>1</p>
|
||||
<p>1</p>
|
||||
<p>1</p>
|
||||
<p>1</p>
|
||||
<p>1</p>
|
||||
<p>1</p>
|
||||
<p>1</p>
|
||||
<p>1</p>
|
||||
<p>1</p>
|
||||
<p>1</p>
|
||||
<p>1</p>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user