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