diff --git a/package.json b/package.json index ceffe5ed..7670fcf5 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,6 @@ "jetlinks-store": "^0.0.3", "jetlinks-ui-components": "^1.0.21", "js-cookie": "^3.0.1", - "jsencrypt": "^3.3.2", "less": "^4.1.3", "less-loader": "^11.1.0", "lodash-es": "^4.17.21", diff --git a/src/api/login.ts b/src/api/login.ts index 3ab39842..b5511f80 100644 --- a/src/api/login.ts +++ b/src/api/login.ts @@ -61,10 +61,3 @@ export const loginout_api = () => server.get('/user-token/reset') export const getOAuth2 = (params: any) => server.get('/oauth2/authorize', params) export const initApplication = (clientId: string | number) => server.get<{name: string}>(`/application/${clientId}/info`) - - -/** - * 登录加密信息 - * @returns - */ -export const authLoginConfig = () => server.get(`/authorize/login/configs`) \ No newline at end of file diff --git a/src/components/Metadata/ConfigParam/index.vue b/src/components/Metadata/ConfigParam/index.vue index 50c0e453..64b8157e 100644 --- a/src/components/Metadata/ConfigParam/index.vue +++ b/src/components/Metadata/ConfigParam/index.vue @@ -8,32 +8,18 @@ - {{ config.name || '存储配置' }} + {{ config.name || 存储配置 }} diff --git a/src/components/ValueItem/index.vue b/src/components/ValueItem/index.vue index cef5feda..a580808d 100644 --- a/src/components/ValueItem/index.vue +++ b/src/components/ValueItem/index.vue @@ -3,7 +3,6 @@
, default: () => [], }, - // 多选框 - mode: { - type: String as PropType<'multiple' | 'tags' | 'combobox' | ''>, - default: '' - } }); // type Props = { // itemData?: Object; diff --git a/src/utils/encrypt.ts b/src/utils/encrypt.ts deleted file mode 100644 index 53cd39ca..00000000 --- a/src/utils/encrypt.ts +++ /dev/null @@ -1,7 +0,0 @@ -import JSEncrypt from "jsencrypt"; - -export const encrypt =(txt:string,publicKey:string)=>{ - const encryptor = new JSEncrypt() - encryptor.setPublicKey(publicKey) - return encryptor.encrypt(txt) -} \ No newline at end of file diff --git a/src/views/user/Login/index.vue b/src/views/user/Login/index.vue index 01652071..e4f80051 100644 --- a/src/views/user/Login/index.vue +++ b/src/views/user/Login/index.vue @@ -169,15 +169,13 @@ import { getInitSet, systemVersion, bindInfo, - settingDetail, userDetail, - authLoginConfig + settingDetail, userDetail } from '@/api/login' import { useUserInfo } from '@/store/userInfo'; import { useSystem } from '@/store/system' import { LocalStore } from '@/utils/comm'; import { BASE_API_PATH, TOKEN_KEY, Version_Code } from '@/utils/variable'; import { SystemConst } from '@/utils/consts'; -import {encrypt} from '@/utils/encrypt' const store = useUserInfo(); const systemStore = useSystem(); @@ -201,12 +199,6 @@ const form = reactive({ verifyKey: '', }); -const RsaConfig = reactive({ - enabled:false, //是否加密 - publicKey:'', //rsa公钥,使用此公钥对密码进行加密 - id:'' //密钥ID -}) - const rules = { username: [ { @@ -257,14 +249,7 @@ iconMap.set('third-party', getImage('/apply/provider5.png')); const onFinish = async () => { try { loading.value = true; - - const data = { - ...form, - password:RsaConfig.enabled?encrypt(form.password,RsaConfig.publicKey):form.password, - encryptId:RsaConfig.enabled?RsaConfig.id:undefined - } - - const res: any = await authLogin(data); + const res: any = await authLogin(form); loading.value = false; if (res.success) { LocalStore.set(TOKEN_KEY, res?.result.token); @@ -298,7 +283,6 @@ const onFinish = async () => { form.verifyCode = ''; getCode(); loading.value = false; - getRsa() } }; @@ -333,18 +317,6 @@ const getOpen = () => { systemStore.getFront() }; -//获取加密信息 -const getRsa =async () =>{ - const res:any = await authLoginConfig() - if(res.status === 200){ - if(res.result?.encrypt){ - RsaConfig.enabled = res.result?.encrypt.enabled - RsaConfig.publicKey = res.result?.encrypt.publicKey - RsaConfig.id = res.result?.encrypt.id - } - } -} - const basis = computed(() => { return systemStore.configInfo['front'] || {} }) @@ -380,11 +352,6 @@ watch( getOpen(); getCode(); screenRotation(screenWidth.value, screenHeight.value); - -onMounted(()=>{ - getRsa() -}) -