|
@@ -9,6 +9,7 @@ import {
|
|
getUserAuthInfo,
|
|
getUserAuthInfo,
|
|
updateMemberUserInfo,
|
|
updateMemberUserInfo,
|
|
getUserBasicInfo,
|
|
getUserBasicInfo,
|
|
|
|
+ updateUserAuthInfo,
|
|
} from '../../../core/libs/requests'
|
|
} from '../../../core/libs/requests'
|
|
import { NetImages } from '../../../core/libs/net-images'
|
|
import { NetImages } from '../../../core/libs/net-images'
|
|
import FormMessageBox from '@/components/form-message-box.vue'
|
|
import FormMessageBox from '@/components/form-message-box.vue'
|
|
@@ -98,6 +99,7 @@ const handleSetSex = async () => {
|
|
sex: {
|
|
sex: {
|
|
type: 'Radio',
|
|
type: 'Radio',
|
|
label: '性别',
|
|
label: '性别',
|
|
|
|
+ hiddenLabel: true,
|
|
props: {
|
|
props: {
|
|
columns: [
|
|
columns: [
|
|
{ label: '男', value: '0' },
|
|
{ label: '男', value: '0' },
|
|
@@ -109,10 +111,7 @@ const handleSetSex = async () => {
|
|
confirm({
|
|
confirm({
|
|
title: '修改性别',
|
|
title: '修改性别',
|
|
beforeConfirm: async ({ resolve }) => {
|
|
beforeConfirm: async ({ resolve }) => {
|
|
- const res = await Promise.all([
|
|
|
|
- updateMemberUserInfo(formData.value),
|
|
|
|
- // updateUserBasicInfo({ ...formData.value, userId: userInfo.value.userId }),
|
|
|
|
- ])
|
|
|
|
|
|
+ const res = await Promise.all([updateMemberUserInfo(formData.value)])
|
|
console.log(res)
|
|
console.log(res)
|
|
setUserInfo({
|
|
setUserInfo({
|
|
...userInfo.value,
|
|
...userInfo.value,
|
|
@@ -128,6 +127,41 @@ const handleSetSex = async () => {
|
|
},
|
|
},
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+const handleSetEmployer = async () => {
|
|
|
|
+ formData.value = {
|
|
|
|
+ employer: userAuthInfo.value.employer,
|
|
|
|
+ }
|
|
|
|
+ schema.value = {
|
|
|
|
+ employer: {
|
|
|
|
+ type: 'TextField',
|
|
|
|
+ label: '公司',
|
|
|
|
+ hiddenLabel: true,
|
|
|
|
+ props: {},
|
|
|
|
+ },
|
|
|
|
+ }
|
|
|
|
+ confirm({
|
|
|
|
+ title: '修改公司',
|
|
|
|
+ beforeConfirm: async ({ resolve }) => {
|
|
|
|
+ const { code } = await requestToast(
|
|
|
|
+ () =>
|
|
|
|
+ updateUserAuthInfo({
|
|
|
|
+ ...userAuthInfo.value,
|
|
|
|
+ employer: formData.value.employer,
|
|
|
|
+ }),
|
|
|
|
+ {
|
|
|
|
+ success: true,
|
|
|
|
+ successTitle: '修改成功',
|
|
|
|
+ },
|
|
|
|
+ )
|
|
|
|
+ if (code === 0) {
|
|
|
|
+ resolve(true)
|
|
|
|
+ formData.value = {}
|
|
|
|
+ setUserAuthInfo()
|
|
|
|
+ }
|
|
|
|
+ resolve(false)
|
|
|
|
+ },
|
|
|
|
+ })
|
|
|
|
+}
|
|
const handeleSetBirthday = async () => {
|
|
const handeleSetBirthday = async () => {
|
|
const { code, data } = await requestToast(
|
|
const { code, data } = await requestToast(
|
|
() =>
|
|
() =>
|
|
@@ -209,7 +243,14 @@ onMounted(async () => {
|
|
path="/pages/mine/setting/mobile/index"
|
|
path="/pages/mine/setting/mobile/index"
|
|
></SectionHeading>
|
|
></SectionHeading>
|
|
<template v-if="isDesigner">
|
|
<template v-if="isDesigner">
|
|
- <SectionHeading title="公司" size="sm" :end-text="userAuthInfo?.employer"></SectionHeading>
|
|
|
|
|
|
+ <div @click="handleSetEmployer">
|
|
|
|
+ <SectionHeading
|
|
|
|
+ title="公司"
|
|
|
|
+ size="sm"
|
|
|
|
+ :end-text="userAuthInfo?.employer"
|
|
|
|
+ end-arrow
|
|
|
|
+ ></SectionHeading>
|
|
|
|
+ </div>
|
|
<SectionHeading title="推荐人" size="sm" :end-text="userAuthInfo?.referrer"></SectionHeading>
|
|
<SectionHeading title="推荐人" size="sm" :end-text="userAuthInfo?.referrer"></SectionHeading>
|
|
<SectionHeading
|
|
<SectionHeading
|
|
title="经纪人"
|
|
title="经纪人"
|