...
|
...
|
@@ -4,7 +4,8 @@ |
|
|
<view style="background-color: #fff">
|
|
|
<u-cell-group>
|
|
|
<template v-for="(_, index) in mineinfo">
|
|
|
<u-cell :title="_.title" :isLink="![1, 5].includes(index)">
|
|
|
<u-cell :title="_.title" :isLink="![1, 6].includes(index)">
|
|
|
<!-- <u-cell :title="_.title" isLink> -->
|
|
|
<template #value>
|
|
|
<template v-if="_.type === 'jump'">
|
|
|
<text class="info-text" @click="proxy.$h.jumpUrl(`${_.url}?flag=${_.flag}&title=${_.title}&isMyInfo=${_.isMyInfo}`)" :style="{ color: !['请选择', '暂无手机号'].includes(_.text) ? '#000' : '#999' }">{{ _.text }}</text>
|
...
|
...
|
@@ -13,15 +14,18 @@ |
|
|
<text class="info-text" @click="showSelectSex = true" :style="{ color: _.text !== '请选择' ? '#000' : '#999' }">{{ _.text !== '请选择' ? proxy.$h.optObjectValue('sexData', _.text) : _.text }}</text>
|
|
|
</template>
|
|
|
<template v-if="_.type === 'upload'"><image @click="uploadAvatarHandler" class="info-avatar" :src="proxy.$h.downFile(_.imgUrl) || '/static/images/mAvatar.png'" mode="aspectFill" /></template>
|
|
|
<template v-if="_.type === 'input'"><up-input v-model="form[_.keyName]" :disabled="_.disabled" :placeholder="_.text" border="none" inputAlign="right" disabledColor="#fff"></up-input></template>
|
|
|
|
|
|
<template v-if="_.type === 'textarea'"><u-textarea v-model="form[_.keyName]" :placeholder="_.text" border="none" height="30"></u-textarea></template>
|
|
|
<template v-if="['input'].includes(_.type)"><up-input v-model="form[_.keyName]" :disabled="_.disabled" :placeholder="_.text" border="none" inputAlign="right" maxlength="11" disabledColor="#fff"></up-input></template>
|
|
|
</template>
|
|
|
</u-cell>
|
|
|
<view class="grayLine" v-if="index === mineinfo.length - 2"></view>
|
|
|
</template>
|
|
|
</u-cell-group>
|
|
|
</view>
|
|
|
<view style="box-sizing: border-box; padding: 36rpx 30rpx">
|
|
|
<view style="font-size: 15px; color: #303133; margin-bottom: 22rpx">个人介绍</view>
|
|
|
<u-textarea v-model="form['introduction']" :placeholder="`介绍一下自己吧`" border="none" count maxlength="200"></u-textarea>
|
|
|
</view>
|
|
|
|
|
|
<view class="main">
|
|
|
<view class="zhu" style="color: red">*注:昵称可输入1-12个字,一个月只能修改一次</view>
|
|
|
<up-button color="#05B8D2" shape="circle" text="保存" throttleTime="1500" @click="confirmEditUserInfoHandler"></up-button>
|
...
|
...
|
@@ -52,9 +56,9 @@ const mineinfo = ref([ |
|
|
{ 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: 'introduction', title: '个人介绍', text: '介绍一下自己吧', type: 'textarea' },
|
|
|
// { keyName: '', title: '标签', text: '请选择', type: 'jump', url: '/pages2/mineinfo/tag', flag: '' }, // 个人标签暂不可编辑
|
|
|
{ keyName: 'department', title: '科室', text: '请选择', type: 'jump', url: '/pages2/mineinfo/hospitalList', flag: 'KESHI' }
|
|
|
// { keyName: 'introduction', title: '个人介绍', text: '介绍一下自己吧', type: 'textarea' }
|
|
|
])
|
|
|
|
|
|
const form = ref<{
|
...
|
...
|
@@ -74,6 +78,8 @@ const sexList = [ |
|
|
{ title: '女', value: 2 }
|
|
|
]
|
|
|
|
|
|
const textareaHeight = ref<number>(20)
|
|
|
|
|
|
const selectSexHandler = (value: number) => ((mineinfo.value[2].text = value + ''), (showSelectSex.value = false))
|
|
|
|
|
|
const uploadAvatarHandler = () => proxy.$h.upload('/sys/common/upload', (e: { upImg: string }) => (mineinfo.value[0].imgUrl = e.upImg))
|
...
|
...
|
@@ -87,7 +93,7 @@ const getInfoHandler = async () => { |
|
|
|
|
|
mineinfo.value[1].disabled = !Boolean(result?.isCanUpdateNickName)
|
|
|
|
|
|
mineinfo.value[6].text = form.value.department.length ? form.value.department.map((_: { id: string; name: string }) => _.name).join() : '请选择'
|
|
|
mineinfo.value[5].text = form.value.department.length ? form.value.department.map((_: { id: string; name: string }) => _.name).join() : '请选择'
|
|
|
|
|
|
mineinfo.value[4].text = !['', null, undefined].includes(result.hospital) ? result.hospitalName : '请选择'
|
|
|
|
...
|
...
|
@@ -104,6 +110,10 @@ const getInfoHandler = async () => { |
|
|
form.value.introduction = result.introduction
|
|
|
}
|
|
|
|
|
|
const linechangeHandler = e => {
|
|
|
textareaHeight.value = e.detail.height
|
|
|
}
|
|
|
|
|
|
const confirmEditUserInfoHandler = async () => {
|
|
|
await updateChange_userinfo({
|
|
|
...form.value,
|
...
|
...
|
@@ -149,6 +159,21 @@ page { |
|
|
:deep(.u-line) {
|
|
|
display: none !important;
|
|
|
}
|
|
|
:deep(.u-cell__body) {
|
|
|
box-sizing: border-box;
|
|
|
padding: 30rpx 30rpx;
|
|
|
height: fit-content;
|
|
|
}
|
|
|
:deep(.u-textarea__field) {
|
|
|
color: #000;
|
|
|
font-size: 30rpx;
|
|
|
}
|
|
|
:deep(.uni-input-input) {
|
|
|
font-size: 30rpx;
|
|
|
}
|
|
|
:deep(.u-textarea) {
|
|
|
border-radius: 22rpx;
|
|
|
}
|
|
|
.main {
|
|
|
box-sizing: border-box;
|
|
|
padding: 0 24rpx;
|
...
|
...
|
|