diff --git a/README.md b/README.md index 4a565ca..357f3a6 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # USTB Wifi Tools 贝壳校园网实用工具 -# ***该项目仍未完成*** - ## 简介 使用 Tauri 构建的跨平台 APP,前端使用 Vue + NaiveUI,后端使用 Rust。 \ @@ -9,9 +7,15 @@ 旨在可以让大家更方便的获取 USTB 校园网每日使用情况,查询流量,解绑 MAC 地址等。 \ 通过调用校园网的 API,并且数据都在本地进行存储。 +## 截图 + +![](pics\image1.png) +![](pics\image2.png) +![](pics\image3.png) + ## 开发 -目前只有 Windows 7 以上支持,需要电脑安装 WebView2(Windows 10 和 11 默认安装)。 \ +目前只有 Windows 7 以上 x86 64 设备支持,需要电脑安装 WebView2(Windows 10 和 11 默认安装)。 \ 首先确保你已经安装了[`Node.js`](https://nodejs.cn/download/),[`pnpm`](https://www.pnpm.cn/)以及[`Rust环境`](https://www.rust-lang.org/zh-CN/tools/install) ```bash diff --git a/components.d.ts b/components.d.ts index b515e12..c2a1db4 100644 --- a/components.d.ts +++ b/components.d.ts @@ -10,14 +10,19 @@ declare module 'vue' { Greet: typeof import('./src/components/Greet.vue')['default'] Menu: typeof import('./src/components/Menu.vue')['default'] NButton: typeof import('naive-ui')['NButton'] + NCard: typeof import('naive-ui')['NCard'] + NCheckbox: typeof import('naive-ui')['NCheckbox'] + NCollapseTransition: typeof import('naive-ui')['NCollapseTransition'] NDataTable: typeof import('naive-ui')['NDataTable'] NDatePicker: typeof import('naive-ui')['NDatePicker'] - NIcon: typeof import('naive-ui')['NIcon'] + NImage: typeof import('naive-ui')['NImage'] NMenu: typeof import('naive-ui')['NMenu'] NMessageProvider: typeof import('naive-ui')['NMessageProvider'] NResult: typeof import('naive-ui')['NResult'] NSelect: typeof import('naive-ui')['NSelect'] + NSpace: typeof import('naive-ui')['NSpace'] NSplit: typeof import('naive-ui')['NSplit'] + NSwitch: typeof import('naive-ui')['NSwitch'] NTable: typeof import('naive-ui')['NTable'] } } diff --git a/package.json b/package.json index b3cdefa..0da8e30 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ustb-wifi-tools", "private": true, - "version": "0.1.0", + "version": "0.2.0", "type": "module", "scripts": { "dev": "vite", diff --git a/pics/image1.png b/pics/image1.png new file mode 100644 index 0000000..e5002a9 Binary files /dev/null and b/pics/image1.png differ diff --git a/pics/image2.png b/pics/image2.png new file mode 100644 index 0000000..36df34b Binary files /dev/null and b/pics/image2.png differ diff --git a/pics/image3.png b/pics/image3.png new file mode 100644 index 0000000..fe82e0b Binary files /dev/null and b/pics/image3.png differ diff --git a/public/4243a50e827cbd72c4213247dd0833bb_720.jpg b/public/4243a50e827cbd72c4213247dd0833bb_720.jpg new file mode 100644 index 0000000..d95154b Binary files /dev/null and b/public/4243a50e827cbd72c4213247dd0833bb_720.jpg differ diff --git "a/public/A250E7A1CDCE4161894E703B177AC0C6_\351\242\221\347\271\201\346\216\211\347\272\277.jpg" "b/public/A250E7A1CDCE4161894E703B177AC0C6_\351\242\221\347\271\201\346\216\211\347\272\277.jpg" new file mode 100644 index 0000000..8ba8e96 Binary files /dev/null and "b/public/A250E7A1CDCE4161894E703B177AC0C6_\351\242\221\347\271\201\346\216\211\347\272\277.jpg" differ diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index b290f7e..a14a127 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -7,7 +7,7 @@ }, "package": { "productName": "ustb-wifi-tools", - "version": "0.1.0" + "version": "0.2.0" }, "tauri": { "allowlist": { diff --git a/src/components/Menu.vue b/src/components/Menu.vue index c11860a..246557b 100644 --- a/src/components/Menu.vue +++ b/src/components/Menu.vue @@ -103,7 +103,7 @@ const menuOptions: MenuOption[] = [ { href: "#/about", }, - "关于作者" + "关于作者以及Tips" ), key: "about", icon: renderIcon(InformationCircleOutline), diff --git a/src/pages/About.vue b/src/pages/About.vue index 9c4c20d..0c709ae 100644 --- a/src/pages/About.vue +++ b/src/pages/About.vue @@ -1,10 +1,65 @@ - + diff --git a/src/pages/UnbindMacs.vue b/src/pages/UnbindMacs.vue index 0021ecb..21da9fe 100644 --- a/src/pages/UnbindMacs.vue +++ b/src/pages/UnbindMacs.vue @@ -11,6 +11,7 @@ interface MacAddress { const pop_message = useMessage(); const this_mac = ref(""); const mac_addrs = ref(null); +const unbind_macs = ref>([]); onMounted(() => { get_current_device_mac(); @@ -28,6 +29,26 @@ const load_mac_address = async () => { pop_message.error(err) ); mac_addrs.value = JSON.parse(res as string); + if (mac_addrs.value !== null) { + for (let i = 0; i < mac_addrs.value.length; i += 1) { + unbind_macs.value.push(false); + } + } +}; + +const unbind = async () => { + // console.log(unbind_macs.value); 传入 false 的 + let macs: string[] = []; + let i: number; + for (i = 0; i < unbind_macs.value.length; i += 1) { + if (unbind_macs.value[i] === false && mac_addrs.value !== null) { + macs.push(mac_addrs.value[i].mac_address); + } + } + // console.log(macs); + await invoke("do_unbind_macs", { + macs: macs, + }).catch((err) => pop_message.error(err)); }; @@ -55,10 +76,15 @@ const load_mac_address = async () => { {{ index + 1 }} {{ mac_addr.device_name }} {{ mac_addr.mac_address }} - 1 + + + + + 确定解绑 +