...
|
...
|
@@ -4,7 +4,7 @@ |
|
|
<view style="background-color: #fff">
|
|
|
<u-cell-group>
|
|
|
<template v-for="(_, index) in mineinfo">
|
|
|
<u-cell :title="_.title" :isLink="![1, 6].includes(index)">
|
|
|
<u-cell :title="_.title" :isLink="_.isLink">
|
|
|
<!-- <u-cell :title="_.title" isLink> -->
|
|
|
<template #value>
|
|
|
<template v-if="_.type === 'jump'">
|
...
|
...
|
@@ -43,21 +43,21 @@ import { ref, getCurrentInstance, ComponentPublicInstance } from 'vue' |
|
|
import { onShow, onLoad } from '@dcloudio/uni-app'
|
|
|
import { storeToRefs } from 'pinia'
|
|
|
import { useSelectDataStore } from '../../store/selectData'
|
|
|
import { getUserInfo, updateChange_userinfo, getDepartment,getIndex } from '../../api'
|
|
|
import { sUserInfoType, ChangeUserInfoType, IndexListType,IndexType } from '../../types'
|
|
|
import { getUserInfo, updateChange_userinfo, getDepartment, getIndex } from '../../api'
|
|
|
import { sUserInfoType, ChangeUserInfoType, IndexListType, IndexType } from '../../types'
|
|
|
|
|
|
const { proxy } = getCurrentInstance() as { proxy: ComponentPublicInstance }
|
|
|
|
|
|
const { SelectDepartmentList, SelectHospitalList } = storeToRefs(useSelectDataStore())
|
|
|
|
|
|
const mineinfo = ref([
|
|
|
{ keyName: 'avatar', title: '头像', text: '', type: 'upload', imgUrl: '' },
|
|
|
{ keyName: 'nickName', title: '昵称', text: '请输入昵称', type: 'input', disabled: false },
|
|
|
{ keyName: 'sex', title: '性别', text: '请选择', type: 'selectData' },
|
|
|
{ keyName: 'phone', title: '手机号', text: '暂无手机号', type: 'jump', url: '/pages2/mineinfo/phone' },
|
|
|
{ keyName: 'hospital', title: '坐诊医院', text: '请选择', type: 'jump', url: '/pages2/mineinfo/hospitalList', isMyInfo: 1, flag: 'ZUOZHENYIYUAN' },
|
|
|
{ keyName: 'avatar', title: '头像', text: '', type: 'upload', imgUrl: '', isLink: true },
|
|
|
{ keyName: 'nickName', title: '昵称', text: '请输入昵称', type: 'input', disabled: false, isLink: false },
|
|
|
{ keyName: 'sex', title: '性别', text: '请选择', type: 'selectData', isLink: true },
|
|
|
{ keyName: 'phone', title: '手机号', text: '暂无手机号', type: 'jump', url: '/pages2/mineinfo/phone', isLink: true },
|
|
|
{ keyName: 'hospital', title: '坐诊医院', text: '请选择', type: 'jump', url: '/pages2/mineinfo/hospitalList', isMyInfo: 1, flag: 'ZUOZHENYIYUAN', isLink: true },
|
|
|
// { keyName: '', title: '标签', text: '请选择', type: 'jump', url: '/pages2/mineinfo/tag', flag: '' }, // 个人标签暂不可编辑
|
|
|
{ keyName: 'department', title: '科室', text: '请选择', type: 'jump', url: '/pages2/mineinfo/hospitalList', flag: 'KESHI' }
|
|
|
{ keyName: 'department', title: '科室', text: '请选择', type: 'jump', url: '', flag: 'KESHI', isLink: false }
|
|
|
// { keyName: 'introduction', title: '个人介绍', text: '介绍一下自己吧', type: 'textarea' }
|
|
|
])
|
|
|
|
...
|
...
|
@@ -129,7 +129,10 @@ const confirmEditUserInfoHandler = async () => { |
|
|
const getIndexDataHandler = async () => {
|
|
|
const { result }: { result: IndexType } = await getIndex()
|
|
|
|
|
|
if(![20,'20'].includes(result.examineState)) mineinfo.value[5].url = ''
|
|
|
if (![20, '20'].includes(result.examineState)) {
|
|
|
mineinfo.value[5].url = ''
|
|
|
mineinfo.value[5].isLink = false
|
|
|
}
|
|
|
|
|
|
// authState.value = Number(result.examineState)
|
|
|
}
|
...
|
...
|
@@ -139,7 +142,7 @@ onLoad(() => { |
|
|
})
|
|
|
|
|
|
onShow(() => {
|
|
|
getIndexDataHandler()
|
|
|
// getIndexDataHandler()
|
|
|
if (SelectDepartmentList.value.length > 0) {
|
|
|
mineinfo.value[5].text = SelectDepartmentList.value.map((_: { id: string; name: string }) => _.name).join()
|
|
|
|
...
|
...
|
|