Merge pull request 'feature-nxdev' (#28) from feature-nxdev into main
Reviewed-on: #28
This commit is contained in:
commit
4cc1d20b7f
@ -17,6 +17,10 @@ namespace IM_API.Dtos
|
|||||||
/// 用户昵称
|
/// 用户昵称
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string NickName { get; set; }
|
public string NickName { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 用户头像
|
||||||
|
/// </summary>
|
||||||
|
public string? Avatar { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 用户在线状态
|
/// 用户在线状态
|
||||||
|
|||||||
@ -140,8 +140,6 @@ const password = ref('');
|
|||||||
| `placeholder` | `String` | — | `''` | 输入框的占位符文本。 |
|
| `placeholder` | `String` | — | `''` | 输入框的占位符文本。 |
|
||||||
| `type` | `String` | `text`, `password`, `email` 等原生类型 | `'text'` | 设置输入框的 `type` 属性。 |
|
| `type` | `String` | `text`, `password`, `email` 等原生类型 | `'text'` | 设置输入框的 `type` 属性。 |
|
||||||
| `iconName` | `String` | 任何有效的 [Feather Icon] 名称(例如 `'mail'`, `'user'`, `'lock'`)。 | **无** | **必填项**,用于指定显示在输入框左侧的图标。 |
|
| `iconName` | `String` | 任何有效的 [Feather Icon] 名称(例如 `'mail'`, `'user'`, `'lock'`)。 | **无** | **必填项**,用于指定显示在输入框左侧的图标。 |
|
||||||
| max | String | 字符串 | 无 | 输入最大字符数 |
|
|
||||||
| regex | String | 字符串 | 无 | 输入框正则表达式验证 |
|
|
||||||
|
|
||||||
## ⚡ 4. 事件说明 (Events)
|
## ⚡ 4. 事件说明 (Events)
|
||||||
|
|
||||||
|
|||||||
@ -51,11 +51,13 @@ import { authService } from '@/services/auth'
|
|||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import feather from 'feather-icons'
|
import feather from 'feather-icons'
|
||||||
import IconInput from '@/components/IconInput.vue'
|
import IconInput from '@/components/IconInput.vue'
|
||||||
import { required, email, maxLength, minLength, helpers } from '@vuelidate/validators'
|
import { required, maxLength, helpers } from '@vuelidate/validators'
|
||||||
import useVuelidate from '@vuelidate/core'
|
import useVuelidate from '@vuelidate/core'
|
||||||
|
import { useAuthStore } from '@/stores/auth'
|
||||||
|
|
||||||
const message = useMessage()
|
const message = useMessage();
|
||||||
const router = useRouter()
|
const router = useRouter();
|
||||||
|
const authStore = useAuthStore();
|
||||||
|
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const form = reactive({
|
const form = reactive({
|
||||||
@ -85,6 +87,7 @@ const handleLogin = async () => {
|
|||||||
const res = await authService.login(form);
|
const res = await authService.login(form);
|
||||||
if(res.code === 0){
|
if(res.code === 0){
|
||||||
message.success('登陆成功。')
|
message.success('登陆成功。')
|
||||||
|
authStore.setLoginInfo(res.data.token, res.data.userInfo);
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
router.push('/index')
|
router.push('/index')
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user