1 Commits

Author SHA1 Message Date
pikachu1995@126.com
869975b3c3 fix(merchant): 商家工作台账号密码登录提交前先进行MD5加密 2026-11-09 20:28:15 +08:00

View File

@@ -130,6 +130,7 @@
import { ref, reactive, onBeforeUnmount, nextTick } from 'vue' import { ref, reactive, onBeforeUnmount, nextTick } from 'vue'
import { onLoad } from '@dcloudio/uni-app' import { onLoad } from '@dcloudio/uni-app'
import storage from '@/utils/storage.js' import storage from '@/utils/storage.js'
import { md5 } from '@/utils/md5.js'
import myVerification from '@/components/verification/verification.vue' import myVerification from '@/components/verification/verification.vue'
import { import {
userLogin, userLogin,
@@ -250,7 +251,7 @@ const handleVerificationSuccess = () => {
} }
} }
// 执行账号密码登录 // 执行账号密码登录(密码需先做 MD5 摘要以匹配后端 BCrypt(md5(明文)) 校验口径)
const doAccountLogin = async () => { const doAccountLogin = async () => {
submitting.value = true submitting.value = true
uni.showLoading({ title: '正在登录...' }) uni.showLoading({ title: '正在登录...' })
@@ -258,7 +259,7 @@ const doAccountLogin = async () => {
try { try {
const res: any = await userLogin({ const res: any = await userLogin({
username: accountForm.username.trim(), username: accountForm.username.trim(),
password: accountForm.password, password: md5(accountForm.password),
}) })
uni.hideLoading() uni.hideLoading()