28 changed files with 493 additions and 173 deletions
@ -1,5 +1,15 @@ |
|||||||
<view class="avatar"> |
<view class="avatar"> |
||||||
<image class="a-img" src="{{src}}"></image> |
<image class="a-img" mode="aspectFill" src="{{src}}"></image> |
||||||
<image class="mask" wx:if="{{level==3}}" src="{{imageUrl}}doctor-level3.png?t={{Timestamp}}"></image> |
<image |
||||||
<image class="mask" wx:elif="{{level==2}}" src="{{imageUrl}}doctor-level2.png?t={{Timestamp}}"></image> |
class="mask" |
||||||
|
mode="aspectFill" |
||||||
|
wx:if="{{level==3}}" |
||||||
|
src="{{imageUrl}}doctor-level3.png?t={{Timestamp}}" |
||||||
|
></image> |
||||||
|
<image |
||||||
|
class="mask" |
||||||
|
mode="aspectFill" |
||||||
|
wx:elif="{{level==2}}" |
||||||
|
src="{{imageUrl}}doctor-level2.png?t={{Timestamp}}" |
||||||
|
></image> |
||||||
</view> |
</view> |
||||||
|
@ -1,77 +1,73 @@ |
|||||||
const app = getApp<IAppOption>() |
const app = getApp<IAppOption>(); |
||||||
let timer = null as null | number |
let timer = null as null | number; |
||||||
|
|
||||||
Page({ |
Page({ |
||||||
data: { |
data: { |
||||||
mobile: '', |
mobile: "", |
||||||
code: '', |
code: "", |
||||||
|
|
||||||
codeText: '发送验证码', |
codeText: "发送验证码", |
||||||
}, |
}, |
||||||
onLoad() {}, |
onLoad() {}, |
||||||
getCode() { |
getCode() { |
||||||
if (timer) return |
if (timer) return; |
||||||
const mobile = this.data.mobile |
const mobile = this.data.mobile; |
||||||
if (!mobile) { |
if (!mobile) { |
||||||
wx.showToast({ |
wx.showToast({ |
||||||
title: '手机号不能为空', |
title: "手机号不能为空", |
||||||
icon: 'none', |
icon: "none", |
||||||
}) |
}); |
||||||
return |
return; |
||||||
} |
} |
||||||
// 验证手机号
|
// 验证手机号
|
||||||
if (!/^(13\d|14[579]|15[0-3,5-9]|166|17[0135-8]|18\d|19[89])\d{8}$/.test(mobile)) { |
if (!/^(13\d|14[579]|15[0-3,5-9]|166|17[0135-8]|18\d|19[89])\d{8}$/.test(mobile)) { |
||||||
wx.showToast({ |
wx.showToast({ |
||||||
title: '手机号格式不正确', |
title: "手机号格式不正确", |
||||||
icon: 'none', |
icon: "none", |
||||||
}) |
}); |
||||||
return |
return; |
||||||
} |
} |
||||||
wx.ajax({ |
wx.ajax({ |
||||||
method: 'POST', |
method: "POST", |
||||||
url: '?r=zd/login/send-verify-code', |
url: "?r=takeda/login/send-verify-code", |
||||||
data: { |
data: { |
||||||
mobile, |
mobile, |
||||||
}, |
}, |
||||||
}).then((res) => { |
}).then(() => { |
||||||
wx.showToast({ |
wx.showToast({ |
||||||
icon: 'none', |
icon: "none", |
||||||
title: '验证码已发送~', |
title: "验证码已发送~", |
||||||
}) |
}); |
||||||
let time = 60 |
let time = 60; |
||||||
timer = setInterval(() => { |
timer = setInterval(() => { |
||||||
time-- |
time--; |
||||||
this.setData({ |
this.setData({ |
||||||
codeText: `${time}s后重新发送`, |
codeText: `${time}s后重新发送`, |
||||||
}) |
}); |
||||||
if (time <= 0) { |
if (time <= 0) { |
||||||
clearInterval(timer as number) |
clearInterval(timer as number); |
||||||
timer = null |
timer = null; |
||||||
this.setData({ |
this.setData({ |
||||||
codeText: '发送验证码', |
codeText: "发送验证码", |
||||||
}) |
}); |
||||||
} |
} |
||||||
}, 1000) |
}, 1000); |
||||||
}) |
}); |
||||||
}, |
}, |
||||||
handleSubmit() { |
handleSubmit() { |
||||||
const { mobile, code } = this.data |
const { mobile, code } = this.data; |
||||||
const { registrationSource, registChannel, regBusinessId } = app.globalData |
|
||||||
wx.ajax({ |
wx.ajax({ |
||||||
method: 'POST', |
method: "POST", |
||||||
url: '?r=zd/account/update-telephone', |
url: "?r=takeda/account/update-telephone", |
||||||
data: { |
data: { |
||||||
mobile, |
mobile, |
||||||
code, |
code, |
||||||
registrationSource, |
|
||||||
registChannel, |
|
||||||
regBusinessId, |
|
||||||
}, |
}, |
||||||
}).then((_res) => { |
}).then((_res) => { |
||||||
wx.navigateBack() |
wx.navigateBack(); |
||||||
}) |
}); |
||||||
}, |
}, |
||||||
handleBack() { |
handleBack() { |
||||||
wx.navigateBack() |
wx.navigateBack(); |
||||||
}, |
}, |
||||||
}) |
}); |
||||||
|
@ -1,3 +1,6 @@ |
|||||||
{ |
{ |
||||||
"usingComponents": {} |
"usingComponents": { |
||||||
|
"van-nav-bar": "@vant/weapp/nav-bar/index", |
||||||
|
"van-icon": "@vant/weapp/icon/index" |
||||||
|
} |
||||||
} |
} |
||||||
|
@ -1,8 +1,53 @@ |
|||||||
const app = getApp<IAppOption>() |
const app = getApp<IAppOption>(); |
||||||
|
|
||||||
Page({ |
Page({ |
||||||
data: { |
data: { |
||||||
menuButtonInfo: {}, |
menuButtonInfo: {}, |
||||||
|
userInfo: {}, |
||||||
|
DoctorTitleType: {}, |
||||||
|
codeUrl: "", |
||||||
}, |
}, |
||||||
onLoad() {}, |
onLoad() { |
||||||
}) |
app.waitLogin().then(() => { |
||||||
|
app.getUserInfo(this); |
||||||
|
this.getDoctorDict(); |
||||||
|
const { url, loginState } = app.globalData; |
||||||
|
this.setData({ |
||||||
|
codeUrl: `${url}?r=takeda/account/mp-info&loginState=${loginState}`, |
||||||
|
}); |
||||||
|
}); |
||||||
|
}, |
||||||
|
getDoctorDict() { |
||||||
|
wx.ajax({ |
||||||
|
method: "GET", |
||||||
|
url: "?r=takeda/reg/doctor-dict", |
||||||
|
data: {}, |
||||||
|
}).then((res) => { |
||||||
|
this.setData({ |
||||||
|
DoctorTitleType: res.DoctorTitleType, |
||||||
|
}); |
||||||
|
}); |
||||||
|
}, |
||||||
|
handleSave() { |
||||||
|
const { codeUrl } = this.data; |
||||||
|
wx.downloadFile({ |
||||||
|
url: codeUrl, |
||||||
|
success: (res) => { |
||||||
|
wx.showShareImageMenu({ |
||||||
|
path: res.tempFilePath, |
||||||
|
}); |
||||||
|
}, |
||||||
|
}); |
||||||
|
}, |
||||||
|
handleShare(){ |
||||||
|
wx.showToast({ |
||||||
|
icon:"none", |
||||||
|
title:"请长按图片转发给好友", |
||||||
|
}) |
||||||
|
}, |
||||||
|
handleBack(){ |
||||||
|
wx.navigateBack() |
||||||
|
} |
||||||
|
}); |
||||||
|
|
||||||
|
export {}; |
||||||
|
@ -1,88 +1,106 @@ |
|||||||
|
<wxs src="/utils/util.wxs" module="tools" /> |
||||||
<view class="page"> |
<view class="page"> |
||||||
<uploadFile class="upload" chooseAvatar> |
<uploadFile class="upload" chooseAvatar bind:file="handleFile"> |
||||||
<image |
<image class="avatar" src="{{userInfo.Img}}"></image> |
||||||
class="avatar" |
|
||||||
src="https://pic1.zhimg.com/50/v2-dcfbab1219ae4f7a7a6db168bb1580a2_720w.jpg?source=2c26e567" |
|
||||||
></image> |
|
||||||
<view class="edit"> |
<view class="edit"> |
||||||
<image class="icon" src="{{imageUrl}}icon-edit.png?t={{Timestamp}}"></image> |
<image class="icon" src="{{imageUrl}}icon-edit.png?t={{Timestamp}}"></image> |
||||||
</view> |
</view> |
||||||
</uploadFile> |
</uploadFile> |
||||||
<view class="row"> |
<view class="row"> |
||||||
<view class="label">姓名</view> |
<view class="label">姓名</view> |
||||||
<view class="content">刘大庆</view> |
<view class="content">{{userInfo.Name}}</view> |
||||||
</view> |
</view> |
||||||
<view class="row"> |
<view class="row"> |
||||||
<view class="label">电话</view> |
<view class="label">电话</view> |
||||||
<view class="content" bind:tap="changePhone">139****6754</view> |
<view class="content" bind:tap="changePhone">{{userInfo.encryptionTel}}</view> |
||||||
</view> |
</view> |
||||||
<view class="row"> |
<view class="row"> |
||||||
<view class="label">医院</view> |
<view class="label">医院</view> |
||||||
<view class="content">北京天坛医院</view> |
<view class="content">{{userInfo.HospitalName}}</view> |
||||||
</view> |
</view> |
||||||
<view class="row"> |
<view class="row"> |
||||||
<view class="label">科室</view> |
<view class="label">科室</view> |
||||||
<picker class="picker"> |
<view class="picker" bind:tap="handleShowDept"> |
||||||
<view class="picker-content"> |
<view class="picker-content"> |
||||||
消化科 |
{{DepartmentName || '无'}} |
||||||
<van-icon name="arrow" /> |
<van-icon name="arrow" /> |
||||||
</view> |
</view> |
||||||
</picker> |
</view> |
||||||
</view> |
</view> |
||||||
<view class="row"> |
<view class="row"> |
||||||
<view class="label">专长</view> |
<view class="label">专长</view> |
||||||
<view class="content"> |
<view class="content" bind:tap="handleShowDept"> |
||||||
高血压;心脏病 |
{{SpecialtyName || '无'}} |
||||||
<van-icon name="arrow" /> |
<van-icon name="arrow" /> |
||||||
</view> |
</view> |
||||||
</view> |
</view> |
||||||
<view class="row"> |
<view class="row" bind:tap="handleIntroduce"> |
||||||
<view class="label">医生简介</view> |
<view class="label">医生简介</view> |
||||||
<view class="content"> |
<view class="content"> |
||||||
医生简介信息 |
{{userInfo.Introduce || '无'}} |
||||||
<van-icon name="arrow" /> |
<van-icon name="arrow" /> |
||||||
</view> |
</view> |
||||||
</view> |
</view> |
||||||
</view> |
</view> |
||||||
<view class="btn" bind:tap="handleLoginOut">退出登录</view> |
<view class="btn" bind:tap="handleLoginOut">退出登录</view> |
||||||
<view class="btn">更换手机号</view> |
<view class="btn" bind:tap="changePhone">更换手机号</view> |
||||||
<view class="btn">注销账号</view> |
<view class="btn">注销账号</view> |
||||||
|
|
||||||
<van-popup |
<van-popup |
||||||
show="{{ popupBriefShow }}" |
show="{{ show1 }}" |
||||||
style="--popup-close-icon-color: #283031" |
style="--popup-close-icon-color: #283031" |
||||||
position="bottom" |
position="bottom" |
||||||
round |
round |
||||||
closeable |
closeable |
||||||
bind:close="onClose" |
bind:close="onClose" |
||||||
|
z-index="10000" |
||||||
> |
> |
||||||
<view class="popup-brief"> |
<view class="popup1"> |
||||||
<view class="title">医生简介</view> |
<view class="title">选择标签</view> |
||||||
<textarea |
<view class="sub-title">所属科室</view> |
||||||
class="textarea" |
<view class="tags tags1"> |
||||||
placeholder-style="color: rgba(194, 201, 202, 1)" |
<view |
||||||
placeholder="请输入医生简介信息" |
class="tag {{tools.include(item.value,DepartmentId) && 'active'}}" |
||||||
></textarea> |
wx:for="{{deptList}}" |
||||||
<view class="submit">保存</view> |
wx:key="value" |
||||||
|
bind:tap="handleDept" |
||||||
|
data-params="{{item}}" |
||||||
|
> |
||||||
|
{{item.label}} |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
<view class="sub-title" wx:if="{{labelList.length}}">标签</view> |
||||||
|
<view class="tags"> |
||||||
|
<view |
||||||
|
class="tag {{tools.include(item.value,SpecialtyId) && 'active'}}" |
||||||
|
wx:for="{{labelList}}" |
||||||
|
wx:key="value" |
||||||
|
bind:tap="handleLabel" |
||||||
|
data-params="{{item}}" |
||||||
|
> |
||||||
|
{{item.label}} |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
<view class="submit" bind:tap="handleSubmit">确定</view> |
||||||
</view> |
</view> |
||||||
</van-popup> |
</van-popup> |
||||||
|
|
||||||
<van-popup |
<van-popup |
||||||
show="{{ popupSpecialtyShow }}" |
show="{{ show2 }}" |
||||||
style="--popup-close-icon-color: #283031" |
style="--popup-close-icon-color: #283031" |
||||||
position="bottom" |
position="bottom" |
||||||
round |
round |
||||||
closeable |
closeable |
||||||
bind:close="onClose" |
bind:close="onClose" |
||||||
> |
> |
||||||
<view class="popup-brief"> |
<view class="popup2"> |
||||||
<view class="title">医生专长</view> |
<view class="title">医生简介</view> |
||||||
<view class="tags"> |
<textarea |
||||||
<view class="tag active">瓣膜病</view> |
class="textarea" |
||||||
<view class="tag">心律失常</view> |
model:value="{{Introduce}}" |
||||||
<view class="tag">心衰</view> |
placeholder-style="color: rgba(194, 201, 202, 1)" |
||||||
<view class="tag">心肌病</view> |
placeholder="请输入医生简介信息" |
||||||
</view> |
></textarea> |
||||||
<view class="submit">保存</view> |
<view class="submit" bind:tap="handleSubmit">保存</view> |
||||||
</view> |
</view> |
||||||
</van-popup> |
</van-popup> |
||||||
|
Loading…
Reference in new issue