|
|
|
@ -70,11 +70,11 @@ const useAccountStore = create((set, get) => ({
|
|
|
|
|
|
|
|
|
|
accountList: [],
|
|
|
|
|
|
|
|
|
|
disableAccount: async (accountId) => {
|
|
|
|
|
disableAccount: async (userId) => {
|
|
|
|
|
|
|
|
|
|
const formData = new FormData()
|
|
|
|
|
formData.append('wu_id', accountId)
|
|
|
|
|
// enable disable
|
|
|
|
|
formData.append('lmi_sn', userId)
|
|
|
|
|
// enable | disable
|
|
|
|
|
formData.append('account_status', 'disable')
|
|
|
|
|
|
|
|
|
|
const result = await postAccountStatus(formData)
|
|
|
|
@ -82,10 +82,10 @@ const useAccountStore = create((set, get) => ({
|
|
|
|
|
console.info(result)
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
resetAccountPassword: async (accountId, password) => {
|
|
|
|
|
resetAccountPassword: async (userId, password) => {
|
|
|
|
|
|
|
|
|
|
const formData = new FormData()
|
|
|
|
|
formData.append('wu_id', accountId)
|
|
|
|
|
formData.append('lmi_sn', userId)
|
|
|
|
|
formData.append('newPassword', password)
|
|
|
|
|
|
|
|
|
|
return postAccountPassword(formData)
|
|
|
|
@ -111,8 +111,8 @@ const useAccountStore = create((set, get) => ({
|
|
|
|
|
saveOrUpdateAccount: async (formValues) => {
|
|
|
|
|
const { userId } = usingStorage()
|
|
|
|
|
const formData = new FormData()
|
|
|
|
|
formData.append('wu_id', formValues.userId)
|
|
|
|
|
formData.append('lmi_sn', formValues.lmi_sn)
|
|
|
|
|
formData.append('wu_id', formValues.accountId)
|
|
|
|
|
formData.append('lmi_sn', formValues.userId)
|
|
|
|
|
formData.append('lmi2_sn', formValues.lmi2_sn)
|
|
|
|
|
formData.append('user_name', formValues.username)
|
|
|
|
|
formData.append('real_name', formValues.realname)
|
|
|
|
@ -138,8 +138,8 @@ const useAccountStore = create((set, get) => ({
|
|
|
|
|
|
|
|
|
|
const mapAccoutList = resultArray.map((r) => {
|
|
|
|
|
return {
|
|
|
|
|
userId: r.wu_id,
|
|
|
|
|
lmi_sn: r.lmi_sn,
|
|
|
|
|
accountId: r.wu_id,
|
|
|
|
|
userId: r.lmi_sn,
|
|
|
|
|
lmi2_sn: r.lmi2_sn,
|
|
|
|
|
username: r.user_name,
|
|
|
|
|
realname: r.real_name,
|
|
|
|
|