فهرست منبع

fix(password): fix typo

gemercheung 1 سال پیش
والد
کامیت
12b1717eac
3فایلهای تغییر یافته به همراه9 افزوده شده و 10 حذف شده
  1. 3 4
      src/request/users.ts
  2. 1 3
      src/view/layout/nav.vue
  3. 5 3
      src/view/users-password-edit.vue

+ 3 - 4
src/request/users.ts

@@ -20,6 +20,7 @@ export type UserType = {
     confirmPwd?: string
     msgAuthCode?: string
     password?: string
+    phoneNum?: string
 }
 
 
@@ -53,10 +54,8 @@ export const updateUserStatusFetch = (params: Pick<UserType, 'userId' | 'status'
         body: JSON.stringify(params),
     });
 
-type changePasswordParam = Pick<UserType, 'confirmPwd' | 'msgAuthCode' | 'password'> & {
-    phoneNum: string
-}
-export const changePassword = (params: changePasswordParam) =>
+export type ChangePasswordParam = Pick<UserType, 'confirmPwd' | 'msgAuthCode' | 'password' | 'phoneNum'>
+export const changePassword = (params: ChangePasswordParam) =>
     sendFetch<ResResult>(URL.changePassword, {
         method: "post",
         body: JSON.stringify({

+ 1 - 3
src/view/layout/nav.vue

@@ -42,10 +42,8 @@ import { errorHook } from "@/request/state";
 import lySlide from "./slide/index.vue";
 import { usersPasswordEdit } from "@/view/quisk";
 import {
-  editUserFetch,
   UserType,
   changePassword,
-
 } from "@/request";
 
 
@@ -77,7 +75,7 @@ const passwordHandler = async () => {
     ...userObj,
     ...user.value,
     phoneNum: user.value.userName,
-  }
+  } as any as UserType;
   console.log('passwordHandler', userinfo)
   await usersPasswordEdit({
     user: userinfo, submit: changePassword

+ 5 - 3
src/view/users-password-edit.vue

@@ -54,7 +54,8 @@ import type { OrganizationType } from '@/request/organization'
 import {
   getOrgListFetch,
   getMsgAuthCode,
-  UserType
+  UserType,
+  ChangePasswordParam
 } from "@/request";
 
 import { ref, reactive, unref, onMounted, watchEffect } from "vue";
@@ -91,7 +92,7 @@ const rules = reactive<FormRules>({
 
 const props = defineProps<{
   user: UserType,
-  submit: (data: UserType) => Promise<any>;
+  submit: (data: ChangePasswordParam) => Promise<any>;
 }>();
 const data = ref<UserType>({
   nickName: "",
@@ -112,7 +113,7 @@ const data = ref<UserType>({
   userId: 0,
   roleNames: ""
 });
-const isDisableMsg = ref(false)
+
 
 let checkCodeBtn = reactive<any>({
   text: '获取验证码',
@@ -135,6 +136,7 @@ onMounted(async () => {
 
 })
 
+
 // const setParentId = () => {
 //   if (user.value) {
 //     const isSuper = user.value.roles.filter(item => item.roleKey === "super_admin").length > 0;