Browse Source

bug处理 & 个人中心联调部分

main
kola-web 9 months ago
parent
commit
96fcbe4980
  1. 16
      src/components/doctorAvatar/index.wxml
  2. 2
      src/echart/components/homeLevel1/index.scss
  3. 2
      src/echart/components/homeLevel2/index.scss
  4. 2
      src/echart/components/homeLevel3/index.scss
  5. 2
      src/echart/components/homeLevel4/index.scss
  6. 11
      src/module1/pages/casesDetail/index.scss
  7. 12
      src/module1/pages/casesDetail/index.ts
  8. 11
      src/module1/pages/casesDetail/index.wxml
  9. 6
      src/module1/pages/casesFeedback/index.ts
  10. 78
      src/module1/pages/changePhone/index.ts
  11. 25
      src/module1/pages/entryCases/index.ts
  12. 2
      src/module1/pages/entryCasesResult/index.wxml
  13. 5
      src/module1/pages/invite/index.json
  14. 7
      src/module1/pages/invite/index.scss
  15. 51
      src/module1/pages/invite/index.ts
  16. 26
      src/module1/pages/invite/index.wxml
  17. 12
      src/module1/pages/login/index.ts
  18. 12
      src/module1/pages/loginProtool/index.ts
  19. 5
      src/module1/pages/loginProtool/index.wxml
  20. 10
      src/module1/pages/setCaseDoctor/index.ts
  21. 66
      src/module1/pages/userInfo/index.scss
  22. 145
      src/module1/pages/userInfo/index.ts
  23. 88
      src/module1/pages/userInfo/index.wxml
  24. 3
      src/pages/cases/index.scss
  25. 2
      src/pages/cases/index.wxml
  26. 2
      src/pages/my/index.scss
  27. 29
      src/pages/my/index.ts
  28. 34
      src/pages/my/index.wxml

16
src/components/doctorAvatar/index.wxml

@ -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>

2
src/echart/components/homeLevel1/index.scss

@ -43,7 +43,7 @@ @@ -43,7 +43,7 @@
.site {
display: inline-block;
padding: 0 8rpx;
font-size: 28rpx;
font-size: 24rpx;
line-height: 32rpx;
color: rgba(148, 87, 30, 1);
border-radius: 4rpx;

2
src/echart/components/homeLevel2/index.scss

@ -63,7 +63,7 @@ @@ -63,7 +63,7 @@
.site {
display: inline-block;
padding: 0 8rpx;
font-size: 28rpx;
font-size: 24rpx;
line-height: 32rpx;
color: rgba(148, 87, 30, 1);
border-radius: 4rpx;

2
src/echart/components/homeLevel3/index.scss

@ -63,7 +63,7 @@ @@ -63,7 +63,7 @@
.site {
display: inline-block;
padding: 0 8rpx;
font-size: 28rpx;
font-size: 24rpx;
line-height: 32rpx;
color: rgba(148, 87, 30, 1);
border-radius: 4rpx;

2
src/echart/components/homeLevel4/index.scss

@ -63,7 +63,7 @@ @@ -63,7 +63,7 @@
.site {
display: inline-block;
padding: 0 8rpx;
font-size: 28rpx;
font-size: 24rpx;
line-height: 32rpx;
color: rgba(148, 87, 30, 1);
border-radius: 4rpx;

11
src/module1/pages/casesDetail/index.scss

@ -55,6 +55,9 @@ page { @@ -55,6 +55,9 @@ page {
&.status3 {
color: rgba(153, 153, 153, 1);
}
&.status4 {
color: #54e2b4;
}
}
}
.fold {
@ -162,7 +165,7 @@ page { @@ -162,7 +165,7 @@ page {
.site {
display: inline-block;
padding: 0 8rpx;
font-size: 28rpx;
font-size: 24rpx;
line-height: 32rpx;
color: rgba(148, 87, 30, 1);
border-radius: 4rpx;
@ -331,7 +334,7 @@ page { @@ -331,7 +334,7 @@ page {
position: relative;
border-radius: 16rpx 16rpx 16rpx 16rpx;
border: 2rpx solid #ffffff;
background-color: #fffdfd;
background:#fffdfd linear-gradient(to bottom, #e5f5f7 0%, #ffffff 100%) no-repeat top center/100% 200rpx;
.li-options {
margin-bottom: -32rpx;
display: flex;
@ -496,13 +499,13 @@ page { @@ -496,13 +499,13 @@ page {
.site {
display: inline-block;
padding: 0 8rpx;
font-size: 28rpx;
font-size: 24rpx;
line-height: 32rpx;
color: rgba(148, 87, 30, 1);
border-radius: 4rpx;
background-color: rgba(250, 229, 206, 1);
}
.specialty{
.specialty {
margin-top: 14rpx;
display: flex;
gap: 12rpx;

12
src/module1/pages/casesDetail/index.ts

@ -45,12 +45,6 @@ Page({ @@ -45,12 +45,6 @@ Page({
fold: false,
},
onLoad(options) {
if (options.feedback === "1") {
wx.showToast({
icon: "none",
title: "病历反馈成功!",
});
}
this.setData({
id: options.id,
beforeClose1: (e: any) => {
@ -202,6 +196,7 @@ Page({ @@ -202,6 +196,7 @@ Page({
handleShowRejectReason() {
this.setData({
showRejectReason: !this.data.showRejectReason,
moreShow: false,
});
},
@ -241,7 +236,7 @@ Page({ @@ -241,7 +236,7 @@ Page({
const labelIds = this.data.labelIds;
const newLabelId = labelIds.includes(params.value)
? labelIds.filter((item: any) => item !== params.value)
: [...labelIds, ...params.value];
: [...labelIds, params.value];
this.setData({
labelIds: newLabelId,
});
@ -346,6 +341,7 @@ Page({ @@ -346,6 +341,7 @@ Page({
handleToggleMore() {
this.setData({
moreShow: !this.data.moreShow,
showRejectReason: false,
});
},
@ -540,7 +536,7 @@ Page({ @@ -540,7 +536,7 @@ Page({
},
handleRoom() {
wx.navigateTo({
url: `/module1/pages/chatRoom/index?id=${this.data.id}`,
url: `/module1/pages/chatRoom/index?id=${this.data.detail.roomId}`,
});
},
handleCreateRoomInvite() {

11
src/module1/pages/casesDetail/index.wxml

@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
<view class="status status3" wx:if="{{detail.caseStatus==='1'}}">{{detail.caseStatusName}}</view>
<view class="status status2" wx:elif="{{detail.caseStatus==='2'}}">{{detail.caseStatusName}}</view>
<view class="status status1" wx:elif="{{detail.caseStatus==='3'}}">{{detail.caseStatusName}}</view>
<view class="status status1" wx:elif="{{detail.caseStatus==='4'}}">{{detail.caseStatusName}}</view>
<view class="status status4" wx:elif="{{detail.caseStatus==='4'}}">{{detail.caseStatusName}}</view>
<view class="status status3" wx:if="{{detail.isOpen==='1'}}">已公开</view>
</view>
<view class="fold" bind:tap="handleFold">
@ -149,7 +149,7 @@ @@ -149,7 +149,7 @@
<view class="site" wx:if="{{item.createDoctorInfo.cityName}}">
{{item.createDoctorInfo.cityName}}{{item.createDoctorInfo.countyName?'/':''}}{{item.createDoctorInfo.countyName}}
</view>
<view class="specialty">
<view class="specialty" wx:if="{{item.createDoctorInfo.doctorSpecialty.length}}">
<image class="wf-label" src="{{imageUrl}}text-specialty.png?t={{Timestamp}}" mode="aspectFit"></image>
<view
class="wf-tag"
@ -242,7 +242,7 @@ @@ -242,7 +242,7 @@
{{dealDoctorInfo.cityName}}{{dealDoctorInfo.countyName?'/':''}}{{dealDoctorInfo.countyName}}
</view>
</view>
<view class="w-footer">
<view class="w-footer" wx:if="{{dealDoctorInfo.doctorSpecialty.length}}">
<image class="wf-label" src="{{imageUrl}}text-specialty.png?t={{Timestamp}}" mode="aspectFit"></image>
<view class="wf-tag" wx:for="{{dealDoctorInfo.doctorSpecialty}}" wx:key="SpecialtyId">
{{item.SpecialtyName}}
@ -466,19 +466,18 @@ @@ -466,19 +466,18 @@
use-slot
title=""
show="{{ show6 }}"
bind:close="onClose"
show-confirm-button="{{false}}"
confirm-button-color="rgba(0, 180, 197, 1)"
>
<view class="dialog6">
<van-icon name="cross" class="close" />
<van-icon name="cross" class="close" bind:tap="onClose"/>
<view class="title">确认创建聊天室</view>
<view class="btn1" wx:if="{{auth.canCreateChatRoomInvite}}" bind:tap="handleCreateRoomInvite">
邀约并创建
<view class="content">您可邀约一位您的合作医生讨论病历</view>
</view>
<view class="btn2" bind:tap="handleCreateRoom">直接创建</view>
<view class="btn3">取消</view>
<view class="btn3" bind:tap="onClose">取消</view>
</view>
</van-dialog>

6
src/module1/pages/casesFeedback/index.ts

@ -213,9 +213,9 @@ Page({ @@ -213,9 +213,9 @@ Page({
caseId,
isOpen,
},
}).then(() => {
wx.redirectTo({
url: `/module1/pages/casesDetail/index?id=${caseId}&feedback=1`,
}).then((res) => {
wx.reLaunch({
url: `/module1/pages/entryCasesResult/index?isf=${res.isSubscribe}&wxi=${encodeURIComponent(res.wxImg)}&cid=${res.caseId || caseId}`,
});
});
},

78
src/module1/pages/changePhone/index.ts

@ -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();
},
})
});

25
src/module1/pages/entryCases/index.ts

@ -25,15 +25,15 @@ Page({ @@ -25,15 +25,15 @@ Page({
edit: true,
},
onLoad(options) {
app.waitLogin().then(() => {
app.waitLogin().then(async () => {
this.getVisit();
this.getDoctorDict();
this.getInviteDoctorList();
app.getUserInfo(this, (res) => {
this.setData({
DoctorLevel: res.DoctorLevel,
});
});
await this.getDoctorDict();
if (options.id) {
this.setData({
caseId: options.id,
@ -75,19 +75,22 @@ Page({ @@ -75,19 +75,22 @@ Page({
files: res.caseFiles,
deptId: res.caseDeptId[0] || "",
labelIds: res.caseLabels.map((item) => item.labelId),
labelList: this.data.deptList.find((item) => item.value === res.caseDeptId[0])?.options || [],
});
});
},
getDoctorDict() {
wx.ajax({
method: "GET",
url: "?r=takeda/reg/doctor-dict",
data: {},
}).then((res) => {
this.setData({
deptList: res.DoctorSpecialtyLabel,
return wx
.ajax({
method: "GET",
url: "?r=takeda/reg/doctor-dict",
data: {},
})
.then((res) => {
this.setData({
deptList: res.DoctorSpecialtyLabel,
});
});
});
},
getInviteDoctorList() {
wx.ajax({
@ -248,7 +251,7 @@ Page({ @@ -248,7 +251,7 @@ Page({
const labelIds = this.data.labelIds;
const newLabelId = labelIds.includes(params.value)
? labelIds.filter((item: any) => item !== params.value)
: [...labelIds, ...params.value];
: [...labelIds, params.value];
this.setData({
labelIds: newLabelId,
});

2
src/module1/pages/entryCasesResult/index.wxml

@ -4,6 +4,6 @@ @@ -4,6 +4,6 @@
<view class="desc">病历提交后医生将收到消息提醒</view>
<view class="btn1" bind:tap="handleDetail">查看病历详情</view>
<view class="btn2" bind:tap="handleBackCase">返回病历列表</view>
<image class="code" src="{{codeUrl}}" mode="scaleToFill" show-menu-by-longpress></image>
<image wx:if="{{codeUrl}}" class="code" src="{{codeUrl}}" mode="scaleToFill" show-menu-by-longpress></image>
<view class="tip">关注公众号接收病历反馈消息</view>
</view>

5
src/module1/pages/invite/index.json

@ -1,3 +1,6 @@ @@ -1,3 +1,6 @@
{
"usingComponents": {}
"usingComponents": {
"van-nav-bar": "@vant/weapp/nav-bar/index",
"van-icon": "@vant/weapp/icon/index"
}
}

7
src/module1/pages/invite/index.scss

@ -1,3 +1,8 @@ @@ -1,3 +1,8 @@
.van-hairline--bottom {
&::after {
border: none;
}
}
.page {
padding: 0 32rpx 200rpx;
.title {
@ -6,7 +11,7 @@ @@ -6,7 +11,7 @@
height: 250rpx;
}
.container-wrap {
margin: 140rpx 30rpx 0;
margin: 100rpx 30rpx 0;
padding: 12rpx;
border-radius: 48rpx 48rpx 48rpx 48rpx;
border: 2rpx solid #ffffff;

51
src/module1/pages/invite/index.ts

@ -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 {};

26
src/module1/pages/invite/index.wxml

@ -1,3 +1,6 @@ @@ -1,3 +1,6 @@
<van-nav-bar fixed custom-style="background:transparent;color:#000" border="{{false}}">
<van-icon name="arrow-left" slot="left" size="20" color="#fff" bind:tap="handleBack"/>
</van-nav-bar>
<view
class="page"
style="background: url({{imageUrl}}invite-bg.png?r={{Timestamp}}) no-repeat top center/100vw 100%;padding-top:{{menuButtonInfo.bottom}}px;"
@ -6,30 +9,25 @@ @@ -6,30 +9,25 @@
<view class="container-wrap">
<view class="container">
<view class="avatar">
<image
class="a-img"
src="https://pic1.zhimg.com/50/v2-dcfbab1219ae4f7a7a6db168bb1580a2_720w.jpg?source=2c26e567"
></image>
<image class="a-img" src="{{userInfo.Img}}"></image>
</view>
<view class="user">
<view class="name">徐萌</view>
<view class="label">主任医师</view>
<view class="name">{{userInfo.Name}}</view>
<block class="label" wx:if="{{userInfo.TitleType===99}}">{{userInfo.OtherTitle}}</block>
<block class="label" wx:else>{{DoctorTitleType[userInfo.TitleType]}}</block>
</view>
<view class="hostipal">
北京天坛医院
<view class="tag">三甲</view>
{{userInfo.HospitalName}}
<view class="tag">{{userInfo.HospitalClassificationName}}{{userInfo.HospitalName}}</view>
</view>
<view class="code">
<image
class="c-img"
src="https://pic1.zhimg.com/50/v2-dcfbab1219ae4f7a7a6db168bb1580a2_720w.jpg?source=2c26e567"
></image>
<image class="c-img" src="{{codeUrl}}" show-menu-by-longpress></image>
</view>
<view class="btn">扫码进入</view>
</view>
</view>
<view class="footer">
<view class="save">保存到手机</view>
<view class="share">分享给微信好友</view>
<view class="save" bind:tap="handleSave">保存到手机</view>
<view class="share" bind:tap="handleShare">分享给微信好友</view>
</view>
</view>

12
src/module1/pages/login/index.ts

@ -8,8 +8,13 @@ Page({ @@ -8,8 +8,13 @@ Page({
code: "",
protool: false,
codeText: "发送验证码",
isProtocol: false,
},
onLoad() {
if(!this.data.isProtocol){
this.handleNavProtool()
}
},
onLoad() {},
getCode() {
if (timer) return;
const mobile = this.data.mobile;
@ -58,7 +63,10 @@ Page({ @@ -58,7 +63,10 @@ Page({
handleSubmit() {
const { mobile, code, protool } = this.data;
if (!protool) {
this.handleNavProtool()
wx.showToast({
title: "请先勾选协议",
icon: "none",
});
return;
}
if (!mobile) {

12
src/module1/pages/loginProtool/index.ts

@ -2,8 +2,13 @@ Page({ @@ -2,8 +2,13 @@ Page({
data: {
menuButtonInfo: {},
wait: true,
ismy: false,
},
onLoad(options) {
this.setData({
ismy: options.ismy === "1",
});
},
onLoad() {},
handleScrollToLower(e) {
if (e.detail.direction === "bottom") {
this.setData({
@ -16,6 +21,7 @@ Page({ @@ -16,6 +21,7 @@ Page({
const prevPage = pages[pages.length - 2];
prevPage.setData({
protool: false,
isProtocol: true,
});
wx.navigateBack();
},
@ -24,9 +30,13 @@ Page({ @@ -24,9 +30,13 @@ Page({
const prevPage = pages[pages.length - 2];
prevPage.setData({
protool: true,
isProtocol: true,
});
wx.navigateBack();
},
handleBack() {
wx.navigateBack();
},
});
export {};

5
src/module1/pages/loginProtool/index.wxml

@ -48,7 +48,10 @@ @@ -48,7 +48,10 @@
sit vitae, reprehenderit laudantium veniam corporis quisquam quas fugiat. Beatae molestias quos unde neque et,
similique cumque.
</scroll-view>
<view class="footer">
<view class="footer" wx:if="{{ismy}}">
<view class="sure" bind:tap="handleBack">关闭</view>
</view>
<view class="footer" wx:else>
<view class="cancel" bind:tap="handleCancel">不同意</view>
<view wx:if="{{wait}}" class="wait">请上滑阅读完成</view>
<view wx:else class="sure" bind:tap="handleOk">同意</view>

10
src/module1/pages/setCaseDoctor/index.ts

@ -163,7 +163,7 @@ Page({ @@ -163,7 +163,7 @@ Page({
},
handlePopupDetail(e) {
const { index } = e.currentTarget.dataset;
const { list, hospitalClassification } = this.data;
const { list } = this.data;
const item: any = list[index];
this.setData({
showDetail: true,
@ -173,7 +173,7 @@ Page({ @@ -173,7 +173,7 @@ Page({
DoctorName: item.doctorName,
DoctorTitleName: item.doctorTitleName || item.doctorOtherTitle,
HospitalName: item.hospitalName,
HospitalClassificationName: hospitalClassification[item.HospitalClassification],
HospitalClassificationName: item.hospitalClassificationName,
HospitalLevelName: item.hospitalLevelName,
CityName: item.cityName,
CountyName: item.countyName,
@ -260,9 +260,9 @@ Page({ @@ -260,9 +260,9 @@ Page({
dealDoctorId: DoctorId,
...params,
},
}).then(() => {
wx.redirectTo({
url: `/module1/pages/casesDetail/index?id=${caseId}&feedback=1`,
}).then((res) => {
wx.reLaunch({
url: `/module1/pages/entryCasesResult/index?isf=${res.isSubscribe}&wxi=${encodeURIComponent(res.wxImg)}&cid=${res.caseId || caseId}`,
});
});
return;

66
src/module1/pages/userInfo/index.scss

@ -73,7 +73,71 @@ page { @@ -73,7 +73,71 @@ page {
}
}
.popup-brief {
.popup1 {
padding: 32rpx 30rpx 84rpx;
.title {
display: flex;
justify-content: center;
font-size: 36rpx;
color: rgba(40, 48, 49, 1);
font-weight: bold;
}
.textarea {
padding: 30rpx;
margin-top: 32rpx;
width: 100%;
height: 216rpx;
box-sizing: border-box;
background: #f7f8f9;
border-radius: 24rpx 24rpx 24rpx 24rpx;
border: 2rpx solid #f8f9f9;
font-size: 32rx;
}
.sub-title {
padding: 32rpx 0 16rpx;
font-size: 32rpx;
color: #141515;
}
.tags {
display: flex;
flex-wrap: wrap;
gap: 20rpx;
.tag {
padding: 6rpx 44rpx;
font-size: 32rpx;
color: rgba(133, 133, 133, 1);
line-height: 44rpx;
background-color: #fff;
border: 1px solid #f6f6f6;
border-radius: 8rpx;
background: #f6f6f6;
&.active {
background-color: #fff;
border-color: rgba(1, 180, 197, 1);
color: rgba(1, 180, 197, 1);
}
}
&.tags1 {
.tag {
border-radius: 90rpx;
}
}
}
.submit {
margin-top: 32rpx;
height: 84rpx;
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(90deg, #00b4c5 0%, #54e2b4 100%);
font-size: 36rpx;
color: #fff;
border-radius: 64rpx 64rpx 64rpx 64rpx;
}
}
.popup2 {
padding: 32rpx 30rpx 84rpx;
.title {
display: flex;

145
src/module1/pages/userInfo/index.ts

@ -1,11 +1,144 @@ @@ -1,11 +1,144 @@
const _app = getApp<IAppOption>();
const app = getApp<IAppOption>();
Page({
data: {
popupBriefShow: false,
popupSpecialtyShow: false,
show1: false,
show2: false,
userInfo: {},
DepartmentName: "",
deptList: [] as any,
labelList: [] as any,
Img: "",
Name: "",
DepartmentId: [],
SpecialtyId: [],
Introduce: "",
},
onShow() {
app.waitLogin().then(() => {
this.getUserInfo();
this.getDoctorDict();
});
},
getUserInfo() {
app.getUserInfo(this, (userInfo) => {
userInfo.encryptionTel = userInfo.Telephone.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2");
this.setData({
userInfo,
Img: userInfo.Img,
Name: userInfo.Name,
Introduce: userInfo.Introduce,
DepartmentId: userInfo.DepartmentId,
SpecialtyId: userInfo.SpecialtyId,
DepartmentName: userInfo.Department.reduce((pre, cur) => {
return `${pre}${pre ? "," : ""}${cur.DepartmentName}`;
}, ""),
SpecialtyName: userInfo.Specialty.reduce((pre, cur) => {
return `${pre}${pre ? "," : ""}${cur.SpecialtyName}`;
}, ""),
});
});
},
getDoctorDict() {
wx.ajax({
method: "GET",
url: "?r=takeda/reg/doctor-dict",
data: {},
}).then((res) => {
this.setData({
deptList: res.DoctorSpecialtyLabel,
});
});
},
handleFile(e) {
this.setData({
Img: e.detail.imgUrl,
});
this.handleSubmit();
},
handleShowDept() {
this.setData({
show1: true,
});
},
handleDept(e) {
const { params } = e.currentTarget.dataset;
const DepartmentId = this.data.DepartmentId;
const newDeptId: any = DepartmentId.includes(params.value)
? DepartmentId.filter((item) => item !== params.value)
: [...DepartmentId, params.value];
const newDeptName = this.data.deptList
.filter((item) => newDeptId.includes(item.value))
.map((item) => item.label)
.join(",");
const labelList = this.data.deptList
.filter((item) => newDeptId.includes(item.value))
.reduce((pre, cur) => {
return [...pre, ...cur.options];
}, []);
this.setData({
DepartmentId: newDeptId,
deptName: newDeptName || "全部",
labelList,
SpecialtyId: [],
});
},
handleLabel(e) {
const { params } = e.currentTarget.dataset;
const { SpecialtyId, labelList } = this.data;
const newLabelId = SpecialtyId.includes(params.value)
? SpecialtyId.filter((item) => item !== params.value)
: [...SpecialtyId, params.value];
let labelName = "";
labelList.forEach((item) => {
if (newLabelId.includes(item.value)) {
labelName = `${labelName}${labelName ? "," : ""}${item.label}`;
}
});
this.setData({
SpecialtyId: newLabelId,
labelName: labelName || "全部",
});
},
handleIntroduce() {
this.setData({
show2: true,
});
},
onClose() {
this.setData({
show1: false,
show2: false,
});
},
handleSubmit() {
const { Img, Name, Introduce, DepartmentId, SpecialtyId } = this.data;
if (DepartmentId.length && !SpecialtyId.length) {
wx.showToast({
title: "请选择标签",
icon: "none",
});
return;
}
wx.ajax({
method: "POST",
url: "?r=takeda/doctor/update-info",
data: {
Img,
Name,
Introduce,
DepartmentId,
SpecialtyId,
},
}).then(() => {
this.getUserInfo();
});
this.onClose();
},
onLoad() {},
changePhone() {
wx.navigateTo({
url: "/module1/pages/changePhone/index",
@ -26,7 +159,7 @@ Page({ @@ -26,7 +159,7 @@ Page({
wx.ajax({
method: "POST",
url: "?r=takeda/account/reg-logout",
}).then((res) => {
}).then(() => {
wx.reLaunch({
url: "/module1/pages/login/index",
});
@ -36,3 +169,5 @@ Page({ @@ -36,3 +169,5 @@ Page({
});
},
});
export {}

88
src/module1/pages/userInfo/index.wxml

@ -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>

3
src/pages/cases/index.scss

@ -221,6 +221,9 @@ page { @@ -221,6 +221,9 @@ page {
&.status3 {
color: rgba(153, 153, 153, 1);
}
&.status4 {
color: #54E2B4;
}
}
}
.option {

2
src/pages/cases/index.wxml

@ -181,7 +181,7 @@ @@ -181,7 +181,7 @@
<view class="status status3" wx:if="{{item.caseStatus==='1'}}">{{item.statusName}}</view>
<view class="status status2" wx:elif="{{item.caseStatus==='2'}}">{{item.statusName}}</view>
<view class="status status1" wx:elif="{{item.caseStatus==='3'}}">{{item.statusName}}</view>
<view class="status status1" wx:elif="{{item.caseStatus==='4'}}">{{item.statusName}}</view>
<view class="status status4" wx:elif="{{item.caseStatus==='4'}}">{{item.statusName}}</view>
<view class="status status3" wx:if="{{item.isOpen==='1'}}">已公开</view>
</view>
<view wx:if="{{item.canDel===1}}" class="option" catch:tap="handleCatch">

2
src/pages/my/index.scss

@ -58,7 +58,7 @@ page { @@ -58,7 +58,7 @@ page {
.site {
display: inline-block;
padding: 0 8rpx;
font-size: 28rpx;
font-size: 24rpx;
line-height: 32rpx;
color: rgba(148, 87, 30, 1);
border-radius: 4rpx;

29
src/pages/my/index.ts

@ -1,12 +1,16 @@ @@ -1,12 +1,16 @@
const app = getApp<IAppOption>();
Page({
data: {},
data: {
userInfo: {},
DoctorTitleType: {},
},
onLoad() {
this.getTabBar().setData({
active: 4,
});
app.waitLogin().then(() => {
this.getDoctorDict();
app.getUserInfo(this, (userInfo) => {
this.getTabBar().setData({
userInfo,
@ -14,11 +18,32 @@ Page({ @@ -14,11 +18,32 @@ Page({
});
});
},
getDoctorDict() {
wx.ajax({
method: "GET",
url: "?r=takeda/reg/doctor-dict",
data: {},
}).then((res) => {
this.setData({
DoctorTitleType: res.DoctorTitleType,
});
});
},
handleUserInfo() {
wx.navigateTo({
url: "/module1/pages/userInfo/index",
});
},
handleProtocol() {
wx.navigateTo({
url: "/module1/pages/loginProtool/index?ismy=1",
});
},
handleInvite() {
wx.navigateTo({
url: "/module1/pages/invite/index",
});
},
});
export {}
export {};

34
src/pages/my/index.wxml

@ -3,35 +3,31 @@ @@ -3,35 +3,31 @@
style="background: url({{imageUrl}}my-bg.png?r={{Timestamp}}) no-repeat top center/100% 642rpx;padding-top:{{menuButtonInfo.bottom+30}}px;"
>
<view class="user">
<doctorAvatar
class="avatar"
src="https://pic1.zhimg.com/50/v2-dcfbab1219ae4f7a7a6db168bb1580a2_720w.jpg?source=2c26e567"
level="{{1}}"
></doctorAvatar>
<doctorAvatar class="avatar" src="{{userInfo.Img}}" level="{{userInfo.DoctorLevel}}"></doctorAvatar>
<view class="wrap">
<view class="w-header">
<view class="name">徐萌</view>
<view class="name">{{userInfo.Name}}</view>
<view class="desc">
主治医师
<view class="line"></view>
心内科
<block class="label" wx:if="{{userInfo.TitleType===99}}">{{userInfo.OtherTitle}}</block>
<block class="label" wx:else>{{DoctorTitleType[userInfo.TitleType]}}</block>
<block wx:for-item="depart" wx:for="{{params.department}}" wx:key="DepartmentId">
<view class="line"></view>
<view class="label">{{depart.DepartmentName}}</view>
</block>
</view>
</view>
<view class="w-container">
<view class="hostipal">北京天坛医院</view>
<view class="tag">三甲</view>
<view class="site">广州市/番禺区</view>
<view class="hostipal">{{userInfo.HospitalName}}</view>
<view class="tag">{{userInfo.HospitalClassificationName}}{{userInfo.HospitalName}}</view>
<view class="site" wx:if="{{userInfo.CityName}}">{{userInfo.CityName}}{{userInfo.CountyName?'/':''}}{{userInfo.CountyName}}</view>
</view>
<view class="w-footer">
<view class="w-footer" wx:if="{{userInfo.Specialty.length}}">
<image class="wf-label" src="{{imageUrl}}text-specialty.png?t={{Timestamp}}" mode="aspectFit"></image>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag" wx:for="{{userInfo.Specialty}}" wx:key="SpecialtyId">{{item.SpecialtyName}}</view>
</view>
</view>
</view>
<view class="invite">
<view class="invite" wx:if="{{userInfo.DoctorLevel>1}}">
<image class="code" src="{{imageUrl}}icon-code.png?t={{Timestamp}}"></image>
<view class="wrap">
<view class="title">我的专属邀约码</view>
@ -47,7 +43,7 @@ @@ -47,7 +43,7 @@
</view>
<van-icon class="more" name="arrow" />
</view>
<view class="list-item">
<view class="list-item" bind:tap="handleProtocol">
<view class="label">
<image class="icon" src="{{imageUrl}}my-list-icon2.png?t={{Timestamp}}"></image>
隐私与合规协议

Loading…
Cancel
Save