From 1b2826068097d8f1fcfb061ba6a2c1eb1ded7268 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Mon, 25 Nov 2024 11:59:46 +0800 Subject: [PATCH 1/4] =?UTF-8?q?feat:=20=E7=B3=BB=E7=BB=9F=E5=85=8D?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E5=8F=82=E6=95=B0=E8=B7=AF=E7=94=B1=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.ts | 7 ++++++- src/store/modules/app.ts | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/router/index.ts b/src/router/index.ts index 4ac48d3f..b16ea27c 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -182,7 +182,12 @@ router.beforeEach(async (to, from, next) => { next({ name: 'Index' }); } - const token = getToken(); + let token = getToken(); + + // 免用户登录认证 + if (!appStore.loginAuth) { + token = '== Not Login Auth =='; + } // 没有token if (!token) { diff --git a/src/store/modules/app.ts b/src/store/modules/app.ts index f44eae2f..fe11126c 100644 --- a/src/store/modules/app.ts +++ b/src/store/modules/app.ts @@ -20,6 +20,8 @@ type AppStore = { buildTime: string; /**系统引导使用 */ bootloader: boolean; + // 用户登录认证 + loginAuth: boolean; // 序列号 serialNum: string; /**应用版权声明 */ @@ -52,6 +54,7 @@ const useAppStore = defineStore('app', { version: `-`, buildTime: `-`, bootloader: false, + loginAuth: false, serialNum: `-`, copyright: `Copyright ©2023 For ${import.meta.env.VITE_APP_NAME}`, logoType: 'icon', @@ -85,6 +88,7 @@ const useAppStore = defineStore('app', { if (this.bootloader) { removeToken(); } + this.loginAuth = res.data.loginAuth === 'true'; this.serialNum = res.data.serialNum; this.appName = res.data.title; this.copyright = res.data.copyright; From 5d4a04ecf2fbf63130300e7a3fef53a1a1437350 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Mon, 25 Nov 2024 18:55:16 +0800 Subject: [PATCH 2/4] =?UTF-8?q?feat:=20=E5=8E=BB=E9=99=A4=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E5=85=8D=E7=99=BB=E5=BD=95=E5=8A=A0=E5=AF=86=E5=8F=82?= =?UTF-8?q?=E6=95=B0data?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugins/http-fetch.ts | 2 +- src/router/index.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/http-fetch.ts b/src/plugins/http-fetch.ts index df9da37b..c4f33e56 100644 --- a/src/plugins/http-fetch.ts +++ b/src/plugins/http-fetch.ts @@ -186,7 +186,7 @@ function beforeRequest(options: OptionsType): OptionsType | Promise { if (paramStr) { const separator = options.url.includes('?') ? '&' : '?'; // 请求加密 - if (options.crypto) { + if (options.crypto && token !== '== Not Login Auth ==') { const data = encryptAES(JSON.stringify(paramStr), APP_DATA_API_KEY); options.url += `${separator}data=${encodeURIComponent(data)}`; } else { diff --git a/src/router/index.ts b/src/router/index.ts index b16ea27c..a2f467e0 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -8,7 +8,7 @@ import NProgress from 'nprogress'; import 'nprogress/nprogress.css'; import BasicLayout from '../layouts/BasicLayout.vue'; import BlankLayout from '../layouts/BlankLayout.vue'; -import { getToken } from '@/plugins/auth-token'; +import { getToken, setToken } from '@/plugins/auth-token'; import { validHttp } from '@/utils/regular-utils'; import useUserStore from '@/store/modules/user'; import useAppStore from '@/store/modules/app'; @@ -187,6 +187,7 @@ router.beforeEach(async (to, from, next) => { // 免用户登录认证 if (!appStore.loginAuth) { token = '== Not Login Auth =='; + setToken('== Not Login Auth =='); } // 没有token From a9a094d04adb1713f0d2e16c8bd40078908ff105 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Mon, 25 Nov 2024 20:02:16 +0800 Subject: [PATCH 3/4] =?UTF-8?q?revet:=20=E5=8E=BB=E9=99=A4=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E5=85=8D=E7=99=BB=E5=BD=95=E5=8A=A0=E5=AF=86=E5=8F=82?= =?UTF-8?q?=E6=95=B0data?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugins/http-fetch.ts | 4 ++-- src/router/index.ts | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/plugins/http-fetch.ts b/src/plugins/http-fetch.ts index c4f33e56..7a4a8849 100644 --- a/src/plugins/http-fetch.ts +++ b/src/plugins/http-fetch.ts @@ -186,7 +186,7 @@ function beforeRequest(options: OptionsType): OptionsType | Promise { if (paramStr) { const separator = options.url.includes('?') ? '&' : '?'; // 请求加密 - if (options.crypto && token !== '== Not Login Auth ==') { + if (options.crypto) { const data = encryptAES(JSON.stringify(paramStr), APP_DATA_API_KEY); options.url += `${separator}data=${encodeURIComponent(data)}`; } else { @@ -198,7 +198,7 @@ function beforeRequest(options: OptionsType): OptionsType | Promise { if (options.method === 'get') return options; // 非get参数提交 - let body = options.data + let body = options.data; if (body instanceof FormData) { options.body = body; } else if (body) { diff --git a/src/router/index.ts b/src/router/index.ts index a2f467e0..b16ea27c 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -8,7 +8,7 @@ import NProgress from 'nprogress'; import 'nprogress/nprogress.css'; import BasicLayout from '../layouts/BasicLayout.vue'; import BlankLayout from '../layouts/BlankLayout.vue'; -import { getToken, setToken } from '@/plugins/auth-token'; +import { getToken } from '@/plugins/auth-token'; import { validHttp } from '@/utils/regular-utils'; import useUserStore from '@/store/modules/user'; import useAppStore from '@/store/modules/app'; @@ -187,7 +187,6 @@ router.beforeEach(async (to, from, next) => { // 免用户登录认证 if (!appStore.loginAuth) { token = '== Not Login Auth =='; - setToken('== Not Login Auth =='); } // 没有token From 6620ac7279e46865d102288b5c3693cdac8ab750 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Thu, 28 Nov 2024 15:49:23 +0800 Subject: [PATCH 4/4] =?UTF-8?q?fix:=20Para5G=E5=8F=82=E6=95=B0UPF=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E7=BD=91=E5=8D=A1=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ne/neQuickSetup/components/Para5GForm.vue | 227 +++++++++++------- 1 file changed, 141 insertions(+), 86 deletions(-) diff --git a/src/views/ne/neQuickSetup/components/Para5GForm.vue b/src/views/ne/neQuickSetup/components/Para5GForm.vue index b4528fb7..84032680 100644 --- a/src/views/ne/neQuickSetup/components/Para5GForm.vue +++ b/src/views/ne/neQuickSetup/components/Para5GForm.vue @@ -50,9 +50,10 @@ let fromState = ref({ ims_sip_ip: '192.168.8.110', upf_type: 'LightUPF', upf_driver_type: 'vmxnet3', - upf_card_name: 'eth0', + upfn3_card_name: 'eth0', upfn3_pci: '0000:00:00.0', upfn3_mac: '00:00:00:00:00:00', + upfn6_card_name: 'eth0', upfn6_pci: '0000:00:00.0', upfn6_mac: '00:00:00:00:00:00', }, @@ -243,7 +244,12 @@ watch( - + + + + + vmxnet3 + dpdk + host + + + - + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + -