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. 9
      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. 13
      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. 49
      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. 32
      src/pages/my/index.wxml

16
src/components/doctorAvatar/index.wxml

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

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

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

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

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

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

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

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

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

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

@ -55,6 +55,9 @@ page {
&.status3 { &.status3 {
color: rgba(153, 153, 153, 1); color: rgba(153, 153, 153, 1);
} }
&.status4 {
color: #54e2b4;
}
} }
} }
.fold { .fold {
@ -162,7 +165,7 @@ page {
.site { .site {
display: inline-block; display: inline-block;
padding: 0 8rpx; padding: 0 8rpx;
font-size: 28rpx; font-size: 24rpx;
line-height: 32rpx; line-height: 32rpx;
color: rgba(148, 87, 30, 1); color: rgba(148, 87, 30, 1);
border-radius: 4rpx; border-radius: 4rpx;
@ -331,7 +334,7 @@ page {
position: relative; position: relative;
border-radius: 16rpx 16rpx 16rpx 16rpx; border-radius: 16rpx 16rpx 16rpx 16rpx;
border: 2rpx solid #ffffff; 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 { .li-options {
margin-bottom: -32rpx; margin-bottom: -32rpx;
display: flex; display: flex;
@ -496,7 +499,7 @@ page {
.site { .site {
display: inline-block; display: inline-block;
padding: 0 8rpx; padding: 0 8rpx;
font-size: 28rpx; font-size: 24rpx;
line-height: 32rpx; line-height: 32rpx;
color: rgba(148, 87, 30, 1); color: rgba(148, 87, 30, 1);
border-radius: 4rpx; border-radius: 4rpx;

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

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

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

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

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

@ -213,9 +213,9 @@ Page({
caseId, caseId,
isOpen, isOpen,
}, },
}).then(() => { }).then((res) => {
wx.redirectTo({ wx.reLaunch({
url: `/module1/pages/casesDetail/index?id=${caseId}&feedback=1`, 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 @@
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();
}, },
}) });

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

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

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

@ -4,6 +4,6 @@
<view class="desc">病历提交后医生将收到消息提醒</view> <view class="desc">病历提交后医生将收到消息提醒</view>
<view class="btn1" bind:tap="handleDetail">查看病历详情</view> <view class="btn1" bind:tap="handleDetail">查看病历详情</view>
<view class="btn2" bind:tap="handleBackCase">返回病历列表</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 class="tip">关注公众号接收病历反馈消息</view>
</view> </view>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -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; padding: 32rpx 30rpx 84rpx;
.title { .title {
display: flex; display: flex;

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

@ -1,11 +1,144 @@
const _app = getApp<IAppOption>(); const app = getApp<IAppOption>();
Page({ Page({
data: { data: {
popupBriefShow: false, show1: false,
popupSpecialtyShow: 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() { changePhone() {
wx.navigateTo({ wx.navigateTo({
url: "/module1/pages/changePhone/index", url: "/module1/pages/changePhone/index",
@ -26,7 +159,7 @@ Page({
wx.ajax({ wx.ajax({
method: "POST", method: "POST",
url: "?r=takeda/account/reg-logout", url: "?r=takeda/account/reg-logout",
}).then((res) => { }).then(() => {
wx.reLaunch({ wx.reLaunch({
url: "/module1/pages/login/index", url: "/module1/pages/login/index",
}); });
@ -36,3 +169,5 @@ Page({
}); });
}, },
}); });
export {}

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

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

3
src/pages/cases/index.scss

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

2
src/pages/cases/index.wxml

@ -181,7 +181,7 @@
<view class="status status3" wx:if="{{item.caseStatus==='1'}}">{{item.statusName}}</view> <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 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==='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 class="status status3" wx:if="{{item.isOpen==='1'}}">已公开</view>
</view> </view>
<view wx:if="{{item.canDel===1}}" class="option" catch:tap="handleCatch"> <view wx:if="{{item.canDel===1}}" class="option" catch:tap="handleCatch">

2
src/pages/my/index.scss

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

29
src/pages/my/index.ts

@ -1,12 +1,16 @@
const app = getApp<IAppOption>(); const app = getApp<IAppOption>();
Page({ Page({
data: {}, data: {
userInfo: {},
DoctorTitleType: {},
},
onLoad() { onLoad() {
this.getTabBar().setData({ this.getTabBar().setData({
active: 4, active: 4,
}); });
app.waitLogin().then(() => { app.waitLogin().then(() => {
this.getDoctorDict();
app.getUserInfo(this, (userInfo) => { app.getUserInfo(this, (userInfo) => {
this.getTabBar().setData({ this.getTabBar().setData({
userInfo, userInfo,
@ -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() { handleUserInfo() {
wx.navigateTo({ wx.navigateTo({
url: "/module1/pages/userInfo/index", 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 {};

32
src/pages/my/index.wxml

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

Loading…
Cancel
Save