|
|
@@ -152,14 +152,15 @@ const getCaptchaImage = async () => {
|
|
|
const onSignIn = async () => {
|
|
|
state.loading.signIn = true
|
|
|
const params = JSON.parse(JSON.stringify(state.form))
|
|
|
+ const encryptedPassword = encryptWithBackendConfig(params.password);
|
|
|
+ params.saltValue = encryptedPassword; // 后端AES IV常量
|
|
|
params.password = sm3(params.password)
|
|
|
params.openId = openId.value
|
|
|
params.unionId = unionId.value
|
|
|
// params.password = (params.password)
|
|
|
// sm3
|
|
|
// 使用与后端完全匹配的加密函数加密密码
|
|
|
- const encryptedPassword = encryptWithBackendConfig(params.password);
|
|
|
- params.saltValue = encryptedPassword; // 后端AES IV常量
|
|
|
+
|
|
|
const post = params.openId ? loginApi.weChatLogin : loginApi.signIn
|
|
|
const [err, res]: ToResponse = await to(post(params))
|
|
|
state.loading.signIn = false
|