|
@@ -22,8 +22,8 @@
|
|
|
required: true,
|
|
required: true,
|
|
|
message: '请输入商户名'
|
|
message: '请输入商户名'
|
|
|
}"
|
|
}"
|
|
|
- name="merchantName">
|
|
|
|
|
- <a-input v-model:value="formState.merchantName" placeholder="商户名">
|
|
|
|
|
|
|
+ name="projectName">
|
|
|
|
|
+ <a-input v-model:value="formState.projectName" placeholder="商户名">
|
|
|
<template #prefix><ShopOutlined style="color: rgba(0, 0, 0, 0.25)" /></template>
|
|
<template #prefix><ShopOutlined style="color: rgba(0, 0, 0, 0.25)" /></template>
|
|
|
</a-input>
|
|
</a-input>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
@@ -33,8 +33,8 @@
|
|
|
required: true,
|
|
required: true,
|
|
|
message: '请输入用户名'
|
|
message: '请输入用户名'
|
|
|
}"
|
|
}"
|
|
|
- name="username">
|
|
|
|
|
- <a-input v-model:value="formState.username" placeholder="用户名">
|
|
|
|
|
|
|
+ name="userName">
|
|
|
|
|
+ <a-input v-model:value="formState.userName" placeholder="用户名">
|
|
|
<template #prefix><UserOutlined style="color: rgba(0, 0, 0, 0.25)" /></template>
|
|
<template #prefix><UserOutlined style="color: rgba(0, 0, 0, 0.25)" /></template>
|
|
|
</a-input>
|
|
</a-input>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
@@ -76,6 +76,7 @@ import router from '@/router'
|
|
|
import { message } from 'ant-design-vue'
|
|
import { message } from 'ant-design-vue'
|
|
|
import Modal from './Modal.vue'
|
|
import Modal from './Modal.vue'
|
|
|
import md5 from 'md5'
|
|
import md5 from 'md5'
|
|
|
|
|
+import { encrypt } from '@/utils'
|
|
|
import { login, logout } from '@/api/login'
|
|
import { login, logout } from '@/api/login'
|
|
|
import { reactive, ref } from 'vue'
|
|
import { reactive, ref } from 'vue'
|
|
|
import { UserOutlined, LockOutlined, MailOutlined, ShopOutlined } from '@ant-design/icons-vue'
|
|
import { UserOutlined, LockOutlined, MailOutlined, ShopOutlined } from '@ant-design/icons-vue'
|
|
@@ -87,14 +88,14 @@ const formRef = ref()
|
|
|
const formState = reactive(
|
|
const formState = reactive(
|
|
|
!import.meta.env.PROD
|
|
!import.meta.env.PROD
|
|
|
? {
|
|
? {
|
|
|
- merchantName: 'zj',
|
|
|
|
|
- password: '123456', // 123456 md5加密
|
|
|
|
|
- username: 'test'
|
|
|
|
|
|
|
+ projectName: 'demo',
|
|
|
|
|
+ userName: 'admin',
|
|
|
|
|
+ password: 'Aa123456'
|
|
|
}
|
|
}
|
|
|
: {
|
|
: {
|
|
|
- merchantName: '',
|
|
|
|
|
|
|
+ projectName: '',
|
|
|
password: '', // 123456 md5加密
|
|
password: '', // 123456 md5加密
|
|
|
- username: ''
|
|
|
|
|
|
|
+ userName: ''
|
|
|
}
|
|
}
|
|
|
)
|
|
)
|
|
|
|
|
|
|
@@ -106,10 +107,9 @@ const state = reactive({
|
|
|
const submitForm = () => {
|
|
const submitForm = () => {
|
|
|
formRef.value.validate()
|
|
formRef.value.validate()
|
|
|
.then(async() => {
|
|
.then(async() => {
|
|
|
- const params = { ...formState, password: md5(formState.password) }
|
|
|
|
|
|
|
+ const params = { ...formState, password: encrypt(formState.password) }
|
|
|
// await logout()
|
|
// await logout()
|
|
|
login(params).then(res => {
|
|
login(params).then(res => {
|
|
|
- console.log(res)
|
|
|
|
|
message.success('登录成功')
|
|
message.success('登录成功')
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|