Browse Source

1.7 埋点前端逻辑

dev
kola-web 2 months ago
parent
commit
17ca669426
  1. 12
      src/app.ts
  2. 14
      src/components/customAudioText/index.ts
  3. 14
      src/components/doctorAvatar/index.ts
  4. 1
      src/components/popupDoctorDetail/index.ts
  5. 12
      src/echart/components/homeLevel1/index.ts
  6. 2
      src/echart/components/homeLevel1/index.wxml
  7. 19
      src/echart/components/homeLevel2/index.ts
  8. 7
      src/echart/components/homeLevel2/index.wxml
  9. 17
      src/echart/components/homeLevel3/index.ts
  10. 5
      src/echart/components/homeLevel3/index.wxml
  11. 17
      src/echart/components/homeLevel4/index.ts
  12. 8
      src/echart/components/homeLevel4/index.wxml
  13. 1
      src/module1/pages/applicationRecords/index.ts
  14. 2
      src/module1/pages/auditDoctorDetail/index.ts
  15. 1
      src/module1/pages/auditDoctorList/index.ts
  16. 17
      src/module1/pages/casesDetail/index.ts
  17. 8
      src/module1/pages/casesDetail/index.wxml
  18. 12
      src/module1/pages/casesFeedback/index.ts
  19. 15
      src/module1/pages/casesFeedback/index.wxml
  20. 10
      src/module1/pages/chatRoom/index.ts
  21. 2
      src/module1/pages/chatRoom/index.wxml
  22. 11
      src/module1/pages/entryCases/index.ts
  23. 104
      src/module1/pages/entryCases/index.wxml
  24. 12
      src/module1/pages/login/index.ts
  25. 8
      src/module1/pages/loginOut/index.ts
  26. 8
      src/module1/pages/loginProtool/index.ts
  27. 3
      src/module1/pages/setApplicationDoctor/index.ts
  28. 1
      src/module1/pages/setApplicationDoctorResult/index.ts
  29. 4
      src/module1/pages/setInfo/index.ts
  30. 3
      src/module1/pages/setInfoResult/index.ts
  31. 6
      src/module1/pages/userInfo/index.ts
  32. 15
      src/pages/cases/index.ts
  33. 1
      src/pages/cases/index.wxml
  34. 12
      src/pages/chatRoomList/index.ts
  35. 9
      src/pages/home/index.ts
  36. 7
      src/pages/my/index.ts
  37. 1
      typings/index.d.ts

12
src/app.ts

@ -134,4 +134,16 @@ App<IAppOption>({
menuButtonInfo, menuButtonInfo,
}); });
}, },
mpBehavior(data: object) {
console.log(data);
// wx.ajax({
// method: "POST",
// url: "?r=raredcare/mp-behavior/add",
// data,
// loading: false,
// showMsg: false,
// }).then((_res) => {
// // console.log('res: ', _res)
// });
},
}); });

14
src/components/customAudioText/index.ts

@ -9,6 +9,14 @@ Component({
type: String, type: String,
value: "", value: "",
}, },
map1: {
type: String,
value: "",
},
map2: {
type: String,
value: "",
},
}, },
// 组件数据 // 组件数据
data: { data: {
@ -22,6 +30,9 @@ Component({
methods: { methods: {
init() {}, init() {},
handleAudioText() { handleAudioText() {
if (this.data.map1) {
app.mpBehavior({ PageName: this.data.map1 });
}
wx.ajax({ wx.ajax({
method: "GET", method: "GET",
url: "?r=takeda/common/audio-url-to-text", url: "?r=takeda/common/audio-url-to-text",
@ -42,6 +53,9 @@ Component({
}); });
}, },
onCopy() { onCopy() {
if (this.data.map2) {
app.mpBehavior({ PageName: this.data.map2 });
}
this.setData({ this.setData({
show: false, show: false,
}); });

14
src/components/doctorAvatar/index.ts

@ -1,4 +1,4 @@
const _app = getApp<IAppOption>(); const app = getApp<IAppOption>();
// pages/story/a.ts // pages/story/a.ts
Component({ Component({
@ -22,6 +22,11 @@ Component({
optionalTypes: [String, Number], optionalTypes: [String, Number],
value: "", value: "",
}, },
type: {
type: String,
optionalTypes: [String],
value: "",
},
}, },
/** /**
@ -47,7 +52,10 @@ Component({
}); });
}, },
async handleDetail() { async handleDetail() {
const { did, popupDoctorDetail, showDetail } = this.data; const { did, popupDoctorDetail, showDetail, type } = this.data;
if (type) {
app.mpBehavior({ PageName: type });
}
if (!did || showDetail) return; if (!did || showDetail) return;
this.setData({ this.setData({
showDetail: true, showDetail: true,
@ -86,3 +94,5 @@ Component({
}, },
}, },
}); });
export {};

1
src/components/popupDoctorDetail/index.ts

@ -26,6 +26,7 @@ Component({
*/ */
methods: { methods: {
onClose() { onClose() {
app.mpBehavior({ PageName: "BTN_DOCTORINFOWINDOWCLOSE" });
this.triggerEvent("close"); this.triggerEvent("close");
}, },
handleTap() { handleTap() {

12
src/echart/components/homeLevel1/index.ts

@ -60,11 +60,13 @@ Component({
}); });
}, },
toggleFold1() { toggleFold1() {
app.mpBehavior({ PageName: "BTN_MYDOCTORSTOGGLE" });
this.setData({ this.setData({
fold1: !this.data.fold1, fold1: !this.data.fold1,
}); });
}, },
handleEntryCase() { handleEntryCase() {
app.mpBehavior({ PageName: "BTN_SUBMITEMPTYCASE" });
wx.navigateTo({ wx.navigateTo({
url: "/module1/pages/entryCases/index", url: "/module1/pages/entryCases/index",
}); });
@ -104,12 +106,14 @@ Component({
}); });
}, },
handleCaseUpdate() { handleCaseUpdate() {
app.mpBehavior({ PageName: "BTN_CASEUPDATE" });
app.globalData.newFeedback = "1"; app.globalData.newFeedback = "1";
wx.switchTab({ wx.switchTab({
url: "/pages/cases/index", url: "/pages/cases/index",
}); });
}, },
handleChat() { handleChat() {
app.mpBehavior({ PageName: "BTN_LEARNINGMESSAGE" });
wx.switchTab({ wx.switchTab({
url: "/pages/chatRoomList/index", url: "/pages/chatRoomList/index",
}); });
@ -126,6 +130,13 @@ Component({
3: "讨论中", 3: "讨论中",
4: "已归档", 4: "已归档",
}[type]; }[type];
const PageName = {
0: "BTN_MANAGEDCASESALL",
2: "BTN_MANAGEDCASESNEW",
3: "BTN_MANAGEDCASESDISCUSSING",
4: "BTN_MANAGEDCASESCLOSED",
}[type];
app.mpBehavior({ PageName });
app.globalData.caseStatus = type === "0" ? "" : type; app.globalData.caseStatus = type === "0" ? "" : type;
app.globalData.caseStatusName = name; app.globalData.caseStatusName = name;
wx.switchTab({ wx.switchTab({
@ -142,6 +153,7 @@ Component({
}); });
}, },
handleApplicationDoctor() { handleApplicationDoctor() {
app.mpBehavior({ PageName: "BTN_MYDOCTORSBIND" });
wx.navigateTo({ wx.navigateTo({
url: "/module1/pages/setApplicationDoctor/index", url: "/module1/pages/setApplicationDoctor/index",
}); });

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

@ -3,6 +3,7 @@
<doctorAvatar <doctorAvatar
did="{{userInfo.DoctorId}}" did="{{userInfo.DoctorId}}"
class="avatar" class="avatar"
type="BTN_TOPMYCARD"
src="{{userInfo.Img}}" src="{{userInfo.Img}}"
level="{{userInfo.DoctorLevel}}" level="{{userInfo.DoctorLevel}}"
></doctorAvatar> ></doctorAvatar>
@ -137,6 +138,7 @@
id="cooperate{{index}}" id="cooperate{{index}}"
did="{{item.DoctorId}}" did="{{item.DoctorId}}"
class="avatar" class="avatar"
type="BTN_MYDOCTORSDETAIL"
src="{{item.DoctorImg}}" src="{{item.DoctorImg}}"
level="{{item.DoctorLevel}}" level="{{item.DoctorLevel}}"
></doctorAvatar> ></doctorAvatar>

19
src/echart/components/homeLevel2/index.ts

@ -67,11 +67,13 @@ Component({
}); });
}, },
toggleFold1() { toggleFold1() {
app.mpBehavior({ PageName: "BTN_MYDOCTORSTOGGLE" });
this.setData({ this.setData({
fold1: !this.data.fold1, fold1: !this.data.fold1,
}); });
}, },
toggleFold2() { toggleFold2() {
app.mpBehavior({ PageName: "BTN_INVITEDDOCTORSTOGGLE" });
this.setData({ this.setData({
fold2: !this.data.fold2, fold2: !this.data.fold2,
}); });
@ -123,22 +125,27 @@ Component({
}); });
}, },
handleInvite() { handleInvite() {
app.mpBehavior({ PageName: "BTN_QRCODEPOSTER" });
wx.navigateTo({ wx.navigateTo({
url: "/module1/pages/invite/index", url: "/module1/pages/invite/index",
}); });
}, },
handleEntryCase() { handleEntryCase() {
app.mpBehavior({ PageName: "BTN_SUBMITEMPTYCASE" });
wx.navigateTo({ wx.navigateTo({
url: "/module1/pages/entryCases/index", url: "/module1/pages/entryCases/index",
}); });
}, },
handlePendCase() { handlePendCase() {
app.mpBehavior({ PageName: "BTN_PENDINGCASES" });
app.globalData.needDeal = "1"; app.globalData.needDeal = "1";
wx.switchTab({ wx.switchTab({
url: "/pages/cases/index", url: "/pages/cases/index",
}); });
}, },
handleCaseUpdate() { handleCaseUpdate(e) {
const { type } = e.currentTarget.dataset;
app.mpBehavior({ PageName: type });
app.globalData.newFeedback = "1"; app.globalData.newFeedback = "1";
wx.switchTab({ wx.switchTab({
url: "/pages/cases/index", url: "/pages/cases/index",
@ -152,6 +159,13 @@ Component({
3: "讨论中", 3: "讨论中",
4: "已归档", 4: "已归档",
}[type]; }[type];
const PageName = {
0: "BTN_MANAGEDCASESALL",
2: "BTN_MANAGEDCASESNEW",
3: "BTN_MANAGEDCASESDISCUSSING",
4: "BTN_MANAGEDCASESCLOSED",
}[type];
app.mpBehavior({ PageName });
app.globalData.caseStatus = type === "0" ? "" : type; app.globalData.caseStatus = type === "0" ? "" : type;
app.globalData.caseStatusName = name; app.globalData.caseStatusName = name;
wx.switchTab({ wx.switchTab({
@ -159,11 +173,13 @@ Component({
}); });
}, },
handleChat() { handleChat() {
app.mpBehavior({ PageName: "BTN_LEARNINGMESSAGE" });
wx.switchTab({ wx.switchTab({
url: "/pages/chatRoomList/index", url: "/pages/chatRoomList/index",
}); });
}, },
handleAudit() { handleAudit() {
app.mpBehavior({ PageName: "BTN_DOCTORAPPLICATION" });
wx.navigateTo({ wx.navigateTo({
url: "/module1/pages/auditDoctorList/index", url: "/module1/pages/auditDoctorList/index",
}); });
@ -198,6 +214,7 @@ Component({
}); });
}, },
handleApplicationDoctor() { handleApplicationDoctor() {
app.mpBehavior({ PageName: "BTN_MYDOCTORSBIND" });
wx.navigateTo({ wx.navigateTo({
url: "/module1/pages/setApplicationDoctor/index", url: "/module1/pages/setApplicationDoctor/index",
}); });

7
src/echart/components/homeLevel2/index.wxml

@ -3,6 +3,7 @@
<doctorAvatar <doctorAvatar
did="{{userInfo.DoctorId}}" did="{{userInfo.DoctorId}}"
class="avatar" class="avatar"
type="BTN_TOPMYCARD"
src="{{userInfo.Img}}" src="{{userInfo.Img}}"
level="{{userInfo.DoctorLevel}}" level="{{userInfo.DoctorLevel}}"
></doctorAvatar> ></doctorAvatar>
@ -53,7 +54,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="item" bind:tap="handleCaseUpdate"> <view class="item" bind:tap="handleCaseUpdate" data-type="BTN_CASEUPDATE">
<view class="name">病历更新</view> <view class="name">病历更新</view>
<view class="num"> <view class="num">
<view class="num-center"> <view class="num-center">
@ -90,7 +91,7 @@
style="background: url({{imageUrl}}home-stat-bg.png?r={{Timestamp}}) no-repeat top center/100% 100%;" style="background: url({{imageUrl}}home-stat-bg.png?r={{Timestamp}}) no-repeat top center/100% 100%;"
> >
<view class="title">我管理的病历</view> <view class="title">我管理的病历</view>
<view class="more" bind:tap="handleCaseUpdate"> <view class="more" bind:tap="handleCaseUpdate" data-type="BTN_ALLMANAGEDCASES">
查看全部 查看全部
<van-icon name="arrow" /> <van-icon name="arrow" />
</view> </view>
@ -183,6 +184,7 @@
id="cooperate{{index}}" id="cooperate{{index}}"
did="{{item.DoctorId}}" did="{{item.DoctorId}}"
class="avatar" class="avatar"
type="BTN_MYDOCTORSDETAIL"
src="{{item.DoctorImg}}" src="{{item.DoctorImg}}"
level="{{item.DoctorLevel}}" level="{{item.DoctorLevel}}"
></doctorAvatar> ></doctorAvatar>
@ -261,6 +263,7 @@
id="invite{{index}}" id="invite{{index}}"
did="{{item.DoctorId}}" did="{{item.DoctorId}}"
class="avatar" class="avatar"
type="BTN_INVITEDDOCTORSDETAIL"
src="{{item.DoctorImg}}" src="{{item.DoctorImg}}"
level="{{item.DoctorLevel}}" level="{{item.DoctorLevel}}"
></doctorAvatar> ></doctorAvatar>

17
src/echart/components/homeLevel3/index.ts

@ -76,39 +76,47 @@ Component({
}); });
}, },
handleInvite() { handleInvite() {
app.mpBehavior({ PageName: "BTN_QRCODEPOSTER" });
wx.navigateTo({ wx.navigateTo({
url: "/module1/pages/invite/index", url: "/module1/pages/invite/index",
}); });
}, },
handleOrg() { handleOrg() {
app.mpBehavior({ PageName: "BTN_ALLMANAGEDDOCTORS" });
wx.navigateTo({ wx.navigateTo({
url: "/module1/pages/org3/index", url: "/module1/pages/org3/index",
}); });
}, },
handleEntryCase() { handleEntryCase() {
app.mpBehavior({ PageName: "BTN_SUBMITEMPTYCASE" });
wx.navigateTo({ wx.navigateTo({
url: "/module1/pages/entryCases/index", url: "/module1/pages/entryCases/index",
}); });
}, },
handlePendCase() { handlePendCase() {
app.mpBehavior({ PageName: "BTN_PENDINGCASES" });
app.globalData.needDeal = "1"; app.globalData.needDeal = "1";
wx.switchTab({ wx.switchTab({
url: "/pages/cases/index", url: "/pages/cases/index",
}); });
}, },
handleCaseUpdate() { handleCaseUpdate(e) {
const { type } = e.currentTarget.dataset;
app.mpBehavior({ PageName: type });
app.globalData.newFeedback = "1"; app.globalData.newFeedback = "1";
wx.switchTab({ wx.switchTab({
url: "/pages/cases/index", url: "/pages/cases/index",
}); });
}, },
handleChat() { handleChat() {
app.mpBehavior({ PageName: "BTN_LEARNINGMESSAGE" });
wx.switchTab({ wx.switchTab({
url: "/pages/chatRoomList/index", url: "/pages/chatRoomList/index",
}); });
}, },
handleAudit() { handleAudit() {
app.mpBehavior({ PageName: "BTN_DOCTORAPPLICATION" });
wx.navigateTo({ wx.navigateTo({
url: "/module1/pages/auditDoctorList/index", url: "/module1/pages/auditDoctorList/index",
}); });
@ -125,6 +133,13 @@ Component({
3: "讨论中", 3: "讨论中",
4: "已归档", 4: "已归档",
}[type]; }[type];
const PageName = {
0: "BTN_MANAGEDCASESALL",
2: "BTN_MANAGEDCASESNEW",
3: "BTN_MANAGEDCASESDISCUSSING",
4: "BTN_MANAGEDCASESCLOSED",
}[type];
app.mpBehavior({ PageName });
app.globalData.caseStatus = type === "0" ? "" : type; app.globalData.caseStatus = type === "0" ? "" : type;
app.globalData.caseStatusName = name; app.globalData.caseStatusName = name;
wx.switchTab({ wx.switchTab({

5
src/echart/components/homeLevel3/index.wxml

@ -3,6 +3,7 @@
<doctorAvatar <doctorAvatar
did="{{userInfo.DoctorId}}" did="{{userInfo.DoctorId}}"
class="avatar" class="avatar"
type="BTN_TOPMYCARD"
src="{{userInfo.Img}}" src="{{userInfo.Img}}"
level="{{userInfo.DoctorLevel}}" level="{{userInfo.DoctorLevel}}"
></doctorAvatar> ></doctorAvatar>
@ -50,7 +51,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="item" bind:tap="handleCaseUpdate"> <view class="item" bind:tap="handleCaseUpdate" data-type="BTN_CASEUPDATE">
<view class="name">病历更新</view> <view class="name">病历更新</view>
<view class="num"> <view class="num">
<view class="num-center"> <view class="num-center">
@ -86,7 +87,7 @@
style="background: url({{imageUrl}}home-stat-bg.png?r={{Timestamp}}) no-repeat top center/100% 100%;" style="background: url({{imageUrl}}home-stat-bg.png?r={{Timestamp}}) no-repeat top center/100% 100%;"
> >
<view class="title">我管理的病历</view> <view class="title">我管理的病历</view>
<!-- <view class="more" bind:tap="handleCaseUpdate"> <!-- <view class="more" bind:tap="handleCaseUpdate" data-type="BTN_ALLMANAGEDCASES">
查看全部 查看全部
<van-icon name="arrow" /> <van-icon name="arrow" />
</view> --> </view> -->

17
src/echart/components/homeLevel4/index.ts

@ -91,6 +91,7 @@ Component({
}, 30); }, 30);
}, },
handleYear1(e) { handleYear1(e) {
app.mpBehavior({ PageName: "BTN_DEPTSTATUSYEARFILTER" });
this.setData({ this.setData({
year1: e.detail.value, year1: e.detail.value,
}); });
@ -273,6 +274,7 @@ Component({
}); });
}, },
handleYear2(e) { handleYear2(e) {
app.mpBehavior({ PageName: "BTN_CASESTATSYEARFILTER" });
this.setData({ this.setData({
year2: e.detail.value, year2: e.detail.value,
}); });
@ -435,6 +437,7 @@ Component({
}); });
}, },
handleYear3(e) { handleYear3(e) {
app.mpBehavior({ PageName: "BTN_DEPTNEWCASEYEARFILTER" });
this.setData({ this.setData({
year3: e.detail.value, year3: e.detail.value,
}); });
@ -658,11 +661,13 @@ Component({
}); });
}, },
handleRankDetail() { handleRankDetail() {
app.mpBehavior({ PageName: "BTN_HOSPITALRANKAL" });
wx.navigateTo({ wx.navigateTo({
url: "/module1/pages/doctorRankList/index", url: "/module1/pages/doctorRankList/index",
}); });
}, },
handleInvite() { handleInvite() {
app.mpBehavior({ PageName: "BTN_QRCODEPOSTER" });
wx.navigateTo({ wx.navigateTo({
url: "/module1/pages/invite/index", url: "/module1/pages/invite/index",
}); });
@ -674,29 +679,34 @@ Component({
}); });
}, },
handleAllDoctor() { handleAllDoctor() {
app.mpBehavior({ PageName: "BTN_DEPTDOCTORSALL" });
wx.navigateTo({ wx.navigateTo({
url: "/module1/pages/org4/index", url: "/module1/pages/org4/index",
}); });
}, },
handlePendCase() { handlePendCase() {
app.mpBehavior({ PageName: "BTN_PENDINGCASES" });
app.globalData.needDeal = "1"; app.globalData.needDeal = "1";
wx.switchTab({ wx.switchTab({
url: "/pages/cases/index", url: "/pages/cases/index",
}); });
}, },
handleCaseUpdate() { handleCaseUpdate() {
app.mpBehavior({ PageName: "BTN_CASEUPDATE" });
app.globalData.newFeedback = "1"; app.globalData.newFeedback = "1";
wx.switchTab({ wx.switchTab({
url: "/pages/cases/index", url: "/pages/cases/index",
}); });
}, },
handleChat() { handleChat() {
app.mpBehavior({ PageName: "BTN_LEARNINGMESSAGE" });
wx.switchTab({ wx.switchTab({
url: "/pages/chatRoomList/index", url: "/pages/chatRoomList/index",
}); });
}, },
handleAudit() { handleAudit() {
app.mpBehavior({ PageName: "BTN_DOCTORAPPLICATION" });
wx.navigateTo({ wx.navigateTo({
url: "/module1/pages/auditDoctorList/index", url: "/module1/pages/auditDoctorList/index",
}); });
@ -723,6 +733,13 @@ Component({
3: "讨论中", 3: "讨论中",
4: "已归档", 4: "已归档",
}[type]; }[type];
const PageName = {
0: "BTN_MANAGEDCASESALL",
2: "BTN_MANAGEDCASESNEW",
3: "BTN_MANAGEDCASESDISCUSSING",
4: "BTN_MANAGEDCASESCLOSED",
}[type];
app.mpBehavior({ PageName });
app.globalData.caseNav = "3"; app.globalData.caseNav = "3";
app.globalData.caseStatus = type === "0" ? "" : type; app.globalData.caseStatus = type === "0" ? "" : type;
app.globalData.caseStatusName = name; app.globalData.caseStatusName = name;

8
src/echart/components/homeLevel4/index.wxml

@ -1,6 +1,12 @@
<view class="page"> <view class="page">
<view class="user"> <view class="user">
<doctorAvatar did="{{userInfo.DoctorId}}" class="avatar" src="{{userInfo.Img}}" level="4"></doctorAvatar> <doctorAvatar
did="{{userInfo.DoctorId}}"
class="avatar"
type="BTN_TOPMYCARD"
src="{{userInfo.Img}}"
level="4"
></doctorAvatar>
<image class="code" bind:tap="handleInvite" src="{{imageUrl}}icon-code.png?t={{Timestamp}}"></image> <image class="code" bind:tap="handleInvite" src="{{imageUrl}}icon-code.png?t={{Timestamp}}"></image>
<view class="wrap"> <view class="wrap">
<view class="w-header"> <view class="w-header">

1
src/module1/pages/applicationRecords/index.ts

@ -39,6 +39,7 @@ Page({
}, },
onLoad() { onLoad() {
app.waitLogin().then(() => { app.waitLogin().then(() => {
app.mpBehavior({ PageName: "PG_DOCTORBINDRECORD" });
this.getList(); this.getList();
}); });
}, },

2
src/module1/pages/auditDoctorDetail/index.ts

@ -52,6 +52,7 @@ Page({
}); });
}, },
handleReject() { handleReject() {
app.mpBehavior({ PageName: "BTN_DOCTORREJECT" });
this.setData({ this.setData({
showReject: true, showReject: true,
}); });
@ -76,6 +77,7 @@ Page({
}); });
}, },
handleResolve() { handleResolve() {
app.mpBehavior({ PageName: "BTN_DOCTORAPPROVE" });
this.setData({ this.setData({
show: true, show: true,
}); });

1
src/module1/pages/auditDoctorList/index.ts

@ -12,6 +12,7 @@ Page({
}, },
onShow() { onShow() {
app.waitLogin().then(() => { app.waitLogin().then(() => {
app.mpBehavior({ PageName: "PG_DOCTORREVIEW" });
this.getDoctorDict() this.getDoctorDict()
this.getList(); this.getList();
}); });

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

@ -53,6 +53,7 @@ Page({
rid: options.rid, rid: options.rid,
beforeClose1: (e: any) => { beforeClose1: (e: any) => {
if (e === "confirm") { if (e === "confirm") {
app.mpBehavior({ PageName: "BTN_REJECTCASECONFIRM" });
if (!this.data.remark) { if (!this.data.remark) {
wx.showToast({ wx.showToast({
title: "请输入驳回原因", title: "请输入驳回原因",
@ -61,6 +62,8 @@ Page({
return false; return false;
} }
this.handleRejectSubmit(); this.handleRejectSubmit();
} else {
app.mpBehavior({ PageName: "BTN_REJECTCASEBACK" });
} }
return true; return true;
}, },
@ -219,6 +222,7 @@ Page({
}, },
handleShowLable() { handleShowLable() {
app.mpBehavior({ PageName: "BTN_CASEDETAILTAGEDIT" });
const { deptId, deptList } = this.data; const { deptId, deptList } = this.data;
if (deptId) { if (deptId) {
const params = deptList.find((item) => item.value === deptId); const params = deptList.find((item) => item.value === deptId);
@ -260,6 +264,7 @@ Page({
}); });
}, },
handleLableSubmit() { handleLableSubmit() {
app.mpBehavior({ PageName: "BTN_CASEDETAILTAGSUBMIT" });
const { id, deptId, labelIds } = this.data; const { id, deptId, labelIds } = this.data;
if (!deptId) { if (!deptId) {
wx.showToast({ wx.showToast({
@ -290,8 +295,8 @@ Page({
this.handleResoure(); this.handleResoure();
}); });
}, },
handlePreviewFile(e) { handlePreviewFile(e) {
app.mpBehavior({ PageName: "BTN_CASEDETAILFILEPREVIEW" });
const { item } = e.currentTarget.dataset; const { item } = e.currentTarget.dataset;
wx.downloadFile({ wx.downloadFile({
url: item.url, url: item.url,
@ -364,6 +369,7 @@ Page({
}); });
}, },
handleFeedBack() { handleFeedBack() {
app.mpBehavior({ PageName: "BTN_CASEDETAILSUBMITFEEDBACK" });
wx.navigateTo({ wx.navigateTo({
url: `/module1/pages/casesFeedback/index?id=${this.data.id}&rid=${this.data.rid}`, url: `/module1/pages/casesFeedback/index?id=${this.data.id}&rid=${this.data.rid}`,
}); });
@ -376,6 +382,7 @@ Page({
}, },
handleArchive() { handleArchive() {
app.mpBehavior({ PageName: "BTN_CASEDETAILARCHIVE" });
this.setData({ this.setData({
show3: true, show3: true,
}); });
@ -394,6 +401,7 @@ Page({
}, },
handleUnArchive() { handleUnArchive() {
app.mpBehavior({ PageName: "BTN_CASEDETAILUNARCHIVE" });
this.setData({ this.setData({
show5: true, show5: true,
}); });
@ -415,10 +423,12 @@ Page({
const { detail } = this.data; const { detail } = this.data;
const isOpen = detail.isOpen === "1"; const isOpen = detail.isOpen === "1";
if (isOpen) { if (isOpen) {
app.mpBehavior({ PageName: "BTN_CASEDETAILUNPUBLIC" });
this.setData({ this.setData({
show9: true, show9: true,
}); });
} else { } else {
app.mpBehavior({ PageName: "BTN_CASEDETAILPUBLIC" });
this.setData({ this.setData({
show8: true, show8: true,
}); });
@ -453,10 +463,12 @@ Page({
const { detail } = this.data; const { detail } = this.data;
const isHighQuality = detail.isHighQuality === "1"; const isHighQuality = detail.isHighQuality === "1";
if (isHighQuality) { if (isHighQuality) {
app.mpBehavior({ PageName: "BTN_CASEDETAILUNMARKQUALITY" });
this.setData({ this.setData({
show4: true, show4: true,
}); });
} else { } else {
app.mpBehavior({ PageName: "BTN_CASEDETAILMARKQUALITY" });
this.setData({ this.setData({
show2: true, show2: true,
}); });
@ -530,6 +542,7 @@ Page({
}, },
handleReject() { handleReject() {
app.mpBehavior({ PageName: "BTN_CASEDETAILREJECT" });
this.setData({ this.setData({
show1: true, show1: true,
}); });
@ -585,11 +598,13 @@ Page({
}, },
handleCreateRoomShow() { handleCreateRoomShow() {
app.mpBehavior({ PageName: "BTN_CASEDETAILGENERATECHAT" });
this.setData({ this.setData({
show6: true, show6: true,
}); });
}, },
handleRoom() { handleRoom() {
app.mpBehavior({ PageName: "BTN_CASEDETAILCHATROOM" });
wx.navigateTo({ wx.navigateTo({
url: `/module1/pages/chatRoom/index?id=${this.data.detail.roomId}`, url: `/module1/pages/chatRoom/index?id=${this.data.detail.roomId}`,
}); });

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

@ -75,7 +75,9 @@
<view class="audio-row" wx:for="{{detail.caseAudios}}" wx:key="url"> <view class="audio-row" wx:for="{{detail.caseAudios}}" wx:key="url">
<customAudioBar class="audio-bar" url="{{item.url}}" time="{{item.duration}}"></customAudioBar> <customAudioBar class="audio-bar" url="{{item.url}}" time="{{item.duration}}"></customAudioBar>
<view class="options"> <view class="options">
<customAudioText class="trans" url="{{item.url}}">转文字</customAudioText> <customAudioText class="trans" url="{{item.url}}" data-map1="BTN_CASEDETAILVOICETOTEXT">
转文字
</customAudioText>
</view> </view>
</view> </view>
</view> </view>
@ -169,7 +171,9 @@
<view class="audio-row" wx:for="{{item.feedbackAudios}}" wx:key="url" wx:for-item="aItem"> <view class="audio-row" wx:for="{{item.feedbackAudios}}" wx:key="url" wx:for-item="aItem">
<customAudioBar class="audio-bar" url="{{aItem.url}}" time="{{aItem.duration}}"></customAudioBar> <customAudioBar class="audio-bar" url="{{aItem.url}}" time="{{aItem.duration}}"></customAudioBar>
<view class="options"> <view class="options">
<customAudioText class="trans" url="{{aItem.url}}">转文字</customAudioText> <customAudioText class="trans" url="{{aItem.url}}" data-map1="BTN_CASEDETAILVOICETOTEXT">
转文字
</customAudioText>
</view> </view>
</view> </view>
</view> </view>

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

@ -24,6 +24,7 @@ Page({
rid: options.rid, rid: options.rid,
}); });
app.waitLogin().then(() => { app.waitLogin().then(() => {
app.mpBehavior({ PageName: "PG_SUBMITFEEDBACK" });
this.getCache(); this.getCache();
app.getUserInfo(this, (res) => { app.getUserInfo(this, (res) => {
this.setData({ this.setData({
@ -44,6 +45,9 @@ Page({
}); });
}); });
}, },
handleMapPhoto() {
app.mpBehavior({ PageName: "BTN_FEEDBACKSELECTIMAGE" });
},
handlePhoto(e) { handlePhoto(e) {
const detail = e.detail; const detail = e.detail;
const images = this.data.images; const images = this.data.images;
@ -107,6 +111,9 @@ Page({
}); });
}); });
}, },
handleMapAudio() {
app.mpBehavior({ PageName: "BTN_FEEDBACKRECORDLONGPRESS" });
},
handleAudio(e) { handleAudio(e) {
this.setData({ this.setData({
audios: [ audios: [
@ -137,6 +144,9 @@ Page({
}, },
}); });
}, },
handleMapFile() {
app.mpBehavior({ PageName: "BTN_FEEDBACKSELECTFILE" });
},
handleFile(e) { handleFile(e) {
this.setData({ this.setData({
files: [ files: [
@ -263,10 +273,12 @@ Page({
} }
}, },
handleBack() { handleBack() {
app.mpBehavior({ PageName: "BTN_FEEDBACKBACK" });
wx.navigateBack(); wx.navigateBack();
}, },
handleSubmit() { handleSubmit() {
const { caseId, isOpen, rid } = this.data; const { caseId, isOpen, rid } = this.data;
app.mpBehavior({ PageName: "BTN_FEEDBACKSAVE" });
const params = this.formatParams(); const params = this.formatParams();
wx.ajax({ wx.ajax({
method: "POST", method: "POST",

15
src/module1/pages/casesFeedback/index.wxml

@ -23,11 +23,18 @@
data-index="{{index}}" data-index="{{index}}"
></image> ></image>
<view class="options"> <view class="options">
<customAudioText class="trans" url="{{item.url}}">转文字</customAudioText> <customAudioText
class="trans"
url="{{item.url}}"
data-map1="BTN_FEEDBACKVOICETOTEXT"
data-map2="BTN_FEEDBACKCOPYTEXT"
>
转文字
</customAudioText>
</view> </view>
</view> </view>
</view> </view>
<view class="record"> <view class="record" bind:tap="handleMapAudio">
<customRecord class="record-btn" bind:file="handleAudio"></customRecord> <customRecord class="record-btn" bind:file="handleAudio"></customRecord>
<view class="r-title">您也可以长按录入语音</view> <view class="r-title">您也可以长按录入语音</view>
</view> </view>
@ -48,7 +55,7 @@
<view class="r-title">重复图片</view> <view class="r-title">重复图片</view>
</view> </view>
</view> </view>
<uploadFile bind:file="handlePhoto"> <uploadFile bind:file="handlePhoto" bind:tap="handleMapPhoto">
<view class="upload-file"> <view class="upload-file">
<van-icon class="add" name="plus" /> <van-icon class="add" name="plus" />
</view> </view>
@ -58,7 +65,7 @@
<view class="card"> <view class="card">
<view class="card-title"> <view class="card-title">
病历相关文件 病历相关文件
<uploadFile class="message-select-wrap" chooseMessage bind:file="handleFile"> <uploadFile class="message-select-wrap" chooseMessage bind:file="handleFile" bind:tap="handleMapFile">
<view class="message-select">从聊天记录选择文件</view> <view class="message-select">从聊天记录选择文件</view>
</uploadFile> </uploadFile>
</view> </view>

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

@ -148,11 +148,13 @@ Page({
}); });
}, },
handleRoomDetail() { handleRoomDetail() {
app.mpBehavior({ PageName: "BTN_CHATROOMAVATAR" });
wx.navigateTo({ wx.navigateTo({
url: `/module1/pages/chatRoomInfo/index?id=${this.data.id}&cid=${this.data.case.caseId}`, url: `/module1/pages/chatRoomInfo/index?id=${this.data.id}&cid=${this.data.case.caseId}`,
}); });
}, },
handleCaseDetail() { handleCaseDetail() {
app.mpBehavior({ PageName: "BTN_CHATROOMCASEDETAIL" });
wx.navigateTo({ wx.navigateTo({
url: `/module1/pages/casesDetail/index?id=${this.data.case.caseId}&rid=${this.data.id}`, url: `/module1/pages/casesDetail/index?id=${this.data.case.caseId}&rid=${this.data.id}`,
}); });
@ -233,6 +235,9 @@ Page({
}); });
this.WebIMSendMessage(message); this.WebIMSendMessage(message);
}, },
handleSendMapAudio() {
app.mpBehavior({ PageName: "BTN_CHATROOMRECORDLONGPRESS" });
},
handleSendAudio(e) { handleSendAudio(e) {
const { userInfo } = this.data; const { userInfo } = this.data;
const contentStr = JSON.stringify({ const contentStr = JSON.stringify({
@ -254,6 +259,7 @@ Page({
this.WebIMSendMessage(message); this.WebIMSendMessage(message);
}, },
handleSendPhoto(e) { handleSendPhoto(e) {
app.mpBehavior({ PageName: "BTN_CHATROOMSELECTIMAGE" });
const { userInfo } = this.data; const { userInfo } = this.data;
const contentStr = JSON.stringify({ const contentStr = JSON.stringify({
url: e.detail.fileUrl, url: e.detail.fileUrl,
@ -273,6 +279,7 @@ Page({
this.WebIMSendMessage(message); this.WebIMSendMessage(message);
}, },
handleSendVideo(e) { handleSendVideo(e) {
app.mpBehavior({ PageName: "BTN_CHATROOMSELECTVIDEO" });
const { userInfo } = this.data; const { userInfo } = this.data;
const contentStr = JSON.stringify({ const contentStr = JSON.stringify({
url: e.detail.fileUrl, url: e.detail.fileUrl,
@ -307,6 +314,7 @@ Page({
}); });
}, },
handleRecall(e) { handleRecall(e) {
app.mpBehavior({ PageName: "BTN_CHATROOMREVOKE" });
const { index } = e.currentTarget.dataset; const { index } = e.currentTarget.dataset;
const { messageList } = this.data; const { messageList } = this.data;
const message = messageList[index]; const message = messageList[index];
@ -468,6 +476,7 @@ Page({
}); });
}, },
handleFooter() { handleFooter() {
app.mpBehavior({ PageName: "BTN_CHATROOMMOREOPTIONS" });
this.setData({ this.setData({
fold: !this.data.fold, fold: !this.data.fold,
}); });
@ -476,6 +485,7 @@ Page({
} }
}, },
handleAudio(e) { handleAudio(e) {
app.mpBehavior({ PageName: "BTN_CHATROOMVOICE" });
const { index } = e.currentTarget.dataset; const { index } = e.currentTarget.dataset;
const { messageList } = this.data; const { messageList } = this.data;
const messageItem = messageList[index]; const messageItem = messageList[index];

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

@ -165,7 +165,7 @@
/> />
<view class="place" wx:else bind:tap="handleFocus">{{sendMessage}}</view> <view class="place" wx:else bind:tap="handleFocus">{{sendMessage}}</view>
</block> </block>
<customRecord wx:else class="custom-record" bind:file="handleSendAudio" slotIcon doubleConform> <customRecord wx:else class="custom-record" bind:file="handleSendAudio" bind:tap="handleSendMapAudio" slotIcon doubleConform>
按住说话 按住说话
</customRecord> </customRecord>
<image <image

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

@ -106,6 +106,9 @@ Page({
}); });
}); });
}, },
handleMapPhoto() {
app.mpBehavior({ PageName: "BTN_INPUTCASEUPLOADIMAGE" });
},
handlePhoto(e) { handlePhoto(e) {
const detail = e.detail; const detail = e.detail;
const { images, edit } = this.data; const { images, edit } = this.data;
@ -173,6 +176,9 @@ Page({
}); });
}); });
}, },
handleMapAudio() {
app.mpBehavior({ PageName: "BTN_INPUTCASERECORDVOICE" });
},
handleAudio(e) { handleAudio(e) {
this.setData({ this.setData({
audios: [ audios: [
@ -201,6 +207,9 @@ Page({
}, },
}); });
}, },
handleMapFile() {
app.mpBehavior({ PageName: "BTN_INPUTCASESELECTFILE" });
},
handleFile(e) { handleFile(e) {
this.setData({ this.setData({
files: [ files: [
@ -295,6 +304,7 @@ Page({
}); });
}, },
handleDept(e) { handleDept(e) {
app.mpBehavior({ PageName: "BTN_INPUTCASETAG" });
const { params } = e.currentTarget.dataset; const { params } = e.currentTarget.dataset;
this.setData({ this.setData({
deptId: params.value, deptId: params.value,
@ -303,6 +313,7 @@ Page({
}); });
}, },
handleLabel(e) { handleLabel(e) {
app.mpBehavior({ PageName: "BTN_INPUTCASETAG" });
const { params } = e.currentTarget.dataset; const { params } = e.currentTarget.dataset;
const labelIds = this.data.labelIds; const labelIds = this.data.labelIds;
const newLabelId = labelIds.includes(params.value) const newLabelId = labelIds.includes(params.value)

104
src/module1/pages/entryCases/index.wxml

@ -1,15 +1,6 @@
<wxs src="/utils/util.wxs" module="tools" /> <wxs src="/utils/util.wxs" module="tools" />
<van-nav-bar <van-nav-bar title="录入病历" fixed bind:click-left="handleBack" bind:click-right="onClickRight">
title="录入病历" <van-icon name="arrow-left" slot="left" size="18px" />
fixed
bind:click-left="handleBack"
bind:click-right="onClickRight"
>
<van-icon
name="arrow-left"
slot="left"
size="18px"
/>
</van-nav-bar> </van-nav-bar>
<view class="page" style="padding-top:{{menuButtonInfo.top + 60}}px;"> <view class="page" style="padding-top:{{menuButtonInfo.top + 60}}px;">
<view class="card"> <view class="card">
@ -18,23 +9,9 @@
<text class="limit">({{images.length}}/9)</text> <text class="limit">({{images.length}}/9)</text>
</view> </view>
<view class="image-files"> <view class="image-files">
<view <view class="photo" wx:for="{{images}}" wx:key="index" bind:tap="handlePreviewImage" data-url="{{item.url}}">
class="photo" <image class="p-img" src="{{item.url}}" mode="aspectFill"></image>
wx:for="{{images}}" <view class="del" catch:tap="handleDelPhoto" data-index="{{index}}">
wx:key="index"
bind:tap="handlePreviewImage"
data-url="{{item.url}}"
>
<image
class="p-img"
src="{{item.url}}"
mode="aspectFill"
></image>
<view
class="del"
catch:tap="handleDelPhoto"
data-index="{{index}}"
>
<van-icon name="cross" /> <van-icon name="cross" />
</view> </view>
<view class="repeat" wx:if="{{item.repeat}}"> <view class="repeat" wx:if="{{item.repeat}}">
@ -42,12 +19,7 @@
<view class="r-title">重复图片</view> <view class="r-title">重复图片</view>
</view> </view>
</view> </view>
<uploadFile <uploadFile obscure edit="{{edit}}" bind:file="handlePhoto" bind:tap="handleMapPhoto" wx:if="{{images.length<9}}">
obscure
edit="{{edit}}"
bind:file="handlePhoto"
wx:if="{{images.length<9}}"
>
<view class="upload-file"> <view class="upload-file">
<van-icon class="add" name="plus" /> <van-icon class="add" name="plus" />
</view> </view>
@ -68,16 +40,8 @@
<view class="limit">{{description.length}}/3000</view> <view class="limit">{{description.length}}/3000</view>
</view> </view>
<view class="audio-list"> <view class="audio-list">
<view <view class="row" wx:for="{{audios}}" wx:key="index">
class="row" <customAudioBar class="audio-bar" url="{{item.url}}" time="{{item.duration}}"></customAudioBar>
wx:for="{{audios}}"
wx:key="index"
>
<customAudioBar
class="audio-bar"
url="{{item.url}}"
time="{{item.duration}}"
></customAudioBar>
<image <image
class="del" class="del"
src="{{imageUrl}}icon-clsoe-green.png?t={{Timestamp}}" src="{{imageUrl}}icon-clsoe-green.png?t={{Timestamp}}"
@ -85,23 +49,26 @@
data-index="{{index}}" data-index="{{index}}"
></image> ></image>
<view class="options"> <view class="options">
<customAudioText class="trans" url="{{item.url}}">转文字</customAudioText> <customAudioText
class="trans"
url="{{item.url}}"
data-map1="BTN_INPUTCASEVOICETOTEXT"
data-map2="BTN_INPUTCASECOPYTEXT"
>
转文字
</customAudioText>
</view> </view>
</view> </view>
</view> </view>
<view class="record"> <view class="record">
<customRecord class="custom-record" bind:file="handleAudio"></customRecord> <customRecord class="custom-record" bind:file="handleAudio" bind:tap="handleMapAudio"></customRecord>
<view class="r-title">您也可以长按录入语音</view> <view class="r-title">您也可以长按录入语音</view>
</view> </view>
</view> </view>
<view class="card"> <view class="card">
<view class="card-title"> <view class="card-title">
病历相关文件 病历相关文件
<uploadFile <uploadFile class="message-select-wrap" chooseMessage bind:file="handleFile" bind:tap="handleMapFile">
class="message-select-wrap"
chooseMessage
bind:file="handleFile"
>
<view class="message-select">从聊天记录选择文件</view> <view class="message-select">从聊天记录选择文件</view>
</uploadFile> </uploadFile>
</view> </view>
@ -160,33 +127,13 @@
</view> </view>
</view> </view>
<view class="footer"> <view class="footer">
<view <view class="cancel" wx:if="{{ !caseId || auth.canDraft }}" bind:tap="handleCache">存为草稿</view>
class="cancel" <view wx:if="{{isInvite}}" class="submit" bind:tap="handleInvite">保存并提交</view>
wx:if="{{ !caseId || auth.canDraft }}" <view wx:else class="submit disabled" bind:tap="handleNoInvite">保存并提交</view>
bind:tap="handleCache"
>存为草稿
</view>
<view
wx:if="{{isInvite}}"
class="submit"
bind:tap="handleInvite"
>保存并提交
</view>
<view
wx:else
class="submit disabled"
bind:tap="handleNoInvite"
>保存并提交
</view>
</view> </view>
</view> </view>
<van-popup <van-popup show="{{ show1 }}" bind:close="onClose" round closeable>
show="{{ show1 }}"
bind:close="onClose"
round
closeable
>
<view class="popup1"> <view class="popup1">
<view class="title">确认提交您的反馈信息</view> <view class="title">确认提交您的反馈信息</view>
<view class="btn1" bind:tap="handleSubmit">直接提交我的反馈信息</view> <view class="btn1" bind:tap="handleSubmit">直接提交我的反馈信息</view>
@ -197,12 +144,7 @@
</view> </view>
</van-popup> </van-popup>
<van-popup <van-popup show="{{ show2 }}" bind:close="onClose" round closeable>
show="{{ show2 }}"
bind:close="onClose"
round
closeable
>
<view class="popup2"> <view class="popup2">
<view class="title">您的病历没有进行涂抹</view> <view class="title">您的病历没有进行涂抹</view>
<!-- prettier-ignore --> <!-- prettier-ignore -->

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

@ -9,9 +9,14 @@ Page({
protool: false, protool: false,
codeText: "发送验证码", codeText: "发送验证码",
}, },
onLoad() {}, onLoad() {
app.waitLogin(true).then(() => {
app.mpBehavior({ PageName: "PG_LOGIN" });
});
},
getCode() { getCode() {
if (timer) return; if (timer) return;
app.mpBehavior({ PageName: "BTN_SENDVERIFICATION" });
const mobile = this.data.mobile; const mobile = this.data.mobile;
if (!mobile) { if (!mobile) {
wx.showToast({ wx.showToast({
@ -57,6 +62,7 @@ Page({
}, },
handleSubmit() { handleSubmit() {
const { mobile, code, protool } = this.data; const { mobile, code, protool } = this.data;
app.mpBehavior({ PageName: "BTN_LOGIN" });
if (!protool) { if (!protool) {
this.handleNavProtool(); this.handleNavProtool();
return; return;
@ -87,6 +93,7 @@ Page({
}); });
}, },
handleWxSubmit(e: any) { handleWxSubmit(e: any) {
app.mpBehavior({ PageName: "BTN_PHONEQUICKACCESS" });
const { protool } = this.data; const { protool } = this.data;
const { iv, encryptedData } = e.detail; const { iv, encryptedData } = e.detail;
if (!protool) { if (!protool) {
@ -128,6 +135,9 @@ Page({
}, },
handleNavProtool(e) { handleNavProtool(e) {
const phone = e?.currentTarget?.dataset?.phone; const phone = e?.currentTarget?.dataset?.phone;
if (phone === "1") {
app.mpBehavior({ PageName: "BTN_PHONEQUICKACCESS" });
}
wx.navigateTo({ url: `/module1/pages/loginProtool/index?phone=${phone}` }); wx.navigateTo({ url: `/module1/pages/loginProtool/index?phone=${phone}` });
}, },
}); });

8
src/module1/pages/loginOut/index.ts

@ -2,11 +2,17 @@ const app = getApp<IAppOption>();
Page({ Page({
data: {}, data: {},
onLoad() {}, onLoad() {
app.waitLogin().then(() => {
app.mpBehavior({ PageName: "PG_CANCELACCOUNT" });
});
},
handleCancel() { handleCancel() {
app.mpBehavior({ PageName: "BTN_CANCELACCOUNTCANCEL" });
wx.navigateBack(); wx.navigateBack();
}, },
handleLoginOut() { handleLoginOut() {
app.mpBehavior({ PageName: "BTN_CANCELACCOUNTCONFIRM" });
wx.showModal({ wx.showModal({
confirmColor: "#00B4C5", confirmColor: "#00B4C5",
cancelColor: "#141515", cancelColor: "#141515",

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

@ -10,7 +10,10 @@ Page({
onLoad(options) { onLoad(options) {
this.setData({ this.setData({
ismy: options.ismy === "1", ismy: options.ismy === "1",
phone : options.phone === "1", phone: options.phone === "1",
});
app.waitLogin(true).then(() => {
app.mpBehavior({ PageName: "PG_PRIVACY" });
}); });
}, },
handleScrollToLower(e) { handleScrollToLower(e) {
@ -21,6 +24,7 @@ Page({
} }
}, },
handleCancel() { handleCancel() {
app.mpBehavior({ PageName: "BTN_UNAGREEPRIVACY" });
const pages = getCurrentPages(); //获取当前页面js里面的pages里的所有信息。 const pages = getCurrentPages(); //获取当前页面js里面的pages里的所有信息。
const prevPage = pages[pages.length - 2]; const prevPage = pages[pages.length - 2];
prevPage.setData({ prevPage.setData({
@ -29,6 +33,7 @@ Page({
wx.navigateBack(); wx.navigateBack();
}, },
handleOk() { handleOk() {
app.mpBehavior({ PageName: "BTN_AGREEPRIVACY" });
const pages = getCurrentPages(); //获取当前页面js里面的pages里的所有信息。 const pages = getCurrentPages(); //获取当前页面js里面的pages里的所有信息。
const prevPage = pages[pages.length - 2]; const prevPage = pages[pages.length - 2];
prevPage.setData({ prevPage.setData({
@ -37,6 +42,7 @@ Page({
wx.navigateBack(); wx.navigateBack();
}, },
handleWxSubmit(e: any) { handleWxSubmit(e: any) {
app.mpBehavior({ PageName: "BTN_AGREEPRIVACY" });
const { iv, encryptedData } = e.detail; const { iv, encryptedData } = e.detail;
if (iv && encryptedData) { if (iv && encryptedData) {
wx.ajax({ wx.ajax({

3
src/module1/pages/setApplicationDoctor/index.ts

@ -51,6 +51,7 @@ Page({
}); });
} }
app.waitLogin().then(() => { app.waitLogin().then(() => {
app.mpBehavior({ PageName: "PG_SELECTBINDDOCTOR" });
this.getList(); this.getList();
this.getDoctorDict(); this.getDoctorDict();
this.getHostipalDict(); this.getHostipalDict();
@ -235,6 +236,7 @@ Page({
}, },
handleSubmit({ exempt = false }) { handleSubmit({ exempt = false }) {
const { DoctorId, doctorRejectCount } = this.data; const { DoctorId, doctorRejectCount } = this.data;
app.mpBehavior({ PageName: "BTN_SELECTBINDDOCTORSEND" });
if (!DoctorId) { if (!DoctorId) {
wx.showToast({ wx.showToast({
title: "请选择医生", title: "请选择医生",
@ -271,6 +273,7 @@ Page({
}); });
}, },
handleBack() { handleBack() {
app.mpBehavior({ PageName: "BTN_SELECTBINDDOCTORBACK" });
wx.navigateBack(); wx.navigateBack();
}, },
}); });

1
src/module1/pages/setApplicationDoctorResult/index.ts

@ -8,6 +8,7 @@ Page({
}, },
onLoad(options) { onLoad(options) {
app.waitLogin(true).then(() => { app.waitLogin(true).then(() => {
app.mpBehavior({ PageName: "PG_BINDSUCCESS" });
this.getCodeUrl(); this.getCodeUrl();
this.setData({ this.setData({
isf: Number(options.isf), isf: Number(options.isf),

4
src/module1/pages/setInfo/index.ts

@ -23,6 +23,7 @@ Page({
}, },
onLoad() { onLoad() {
app.waitLogin(true).then(() => { app.waitLogin(true).then(() => {
app.mpBehavior({ PageName: "PG_DOCTORREGISTRATION" });
this.getApplyDoctor(); this.getApplyDoctor();
this.getLoastApplyHostipal(); this.getLoastApplyHostipal();
this.getDoctorDict(); this.getDoctorDict();
@ -128,6 +129,7 @@ Page({
}); });
}, },
handleSubmitConform() { handleSubmitConform() {
app.mpBehavior({ PageName: "BTN_DOCTORREGISTRATIONSUBMIT" });
wx.showModal({ wx.showModal({
content: "您没有邀约医生,可能会影响您的审核", content: "您没有邀约医生,可能会影响您的审核",
confirmColor: "#00B4C5", confirmColor: "#00B4C5",
@ -142,6 +144,7 @@ Page({
}); });
}, },
handleSubmit() { handleSubmit() {
app.mpBehavior({ PageName: "BTN_DOCTORREGISTRATIONSUBMIT" });
const { const {
AuditId, AuditId,
Name, Name,
@ -296,6 +299,7 @@ Page({
}); });
}, },
handleLoginOut() { handleLoginOut() {
app.mpBehavior({ PageName: "BTN_DOCTORREGISTRATIONLOGOUT" });
wx.showModal({ wx.showModal({
confirmColor: "#00B4C5", confirmColor: "#00B4C5",
cancelColor: "#141515", cancelColor: "#141515",

3
src/module1/pages/setInfoResult/index.ts

@ -8,6 +8,7 @@ Page({
}, },
onLoad(options) { onLoad(options) {
app.waitLogin(true).then(() => { app.waitLogin(true).then(() => {
app.mpBehavior({ PageName: "PG_DOCTORSUBMITSUCCESS" });
this.setData({ this.setData({
isFollow: Number(options.isf), isFollow: Number(options.isf),
InviteDoctorName: options.iname === "null" ? "" : options.iname, InviteDoctorName: options.iname === "null" ? "" : options.iname,
@ -45,7 +46,7 @@ Page({
title: "确认退出登录?", title: "确认退出登录?",
success(res) { success(res) {
if (res.confirm) { if (res.confirm) {
app.globalData.isLogin = 0 app.globalData.isLogin = 0;
wx.ajax({ wx.ajax({
method: "POST", method: "POST",
url: "?r=takeda/account/reg-logout", url: "?r=takeda/account/reg-logout",

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

@ -19,6 +19,7 @@ Page({
}, },
onShow() { onShow() {
app.waitLogin().then(async () => { app.waitLogin().then(async () => {
app.mpBehavior({ PageName: "PG_PERSONALINFO" });
await this.getDoctorDict(); await this.getDoctorDict();
this.getUserInfo(); this.getUserInfo();
}); });
@ -69,6 +70,7 @@ Page({
this.handleSubmit(); this.handleSubmit();
}, },
handleShowDept() { handleShowDept() {
app.mpBehavior({ PageName: "BTN_PERSONALINFODEPARTMENT" });
this.setData({ this.setData({
show1: true, show1: true,
}); });
@ -114,6 +116,7 @@ Page({
}); });
}, },
handleIntroduce() { handleIntroduce() {
app.mpBehavior({ PageName: "BTN_PERSONALINFOINTRODUCTION" });
this.setData({ this.setData({
show2: true, show2: true,
}); });
@ -150,6 +153,7 @@ Page({
this.onClose(); this.onClose();
}, },
changePhone() { changePhone() {
app.mpBehavior({ PageName: "BTN_PERSONALINFOCHANGEMOBILE" });
wx.navigateTo({ wx.navigateTo({
url: "/module1/pages/changePhone/index", url: "/module1/pages/changePhone/index",
}); });
@ -160,6 +164,7 @@ Page({
}); });
}, },
handleLoginOut() { handleLoginOut() {
app.mpBehavior({ PageName: "BTN_PERSONALINFOLOGOUT" });
wx.showModal({ wx.showModal({
confirmColor: "#00B4C5", confirmColor: "#00B4C5",
cancelColor: "#141515", cancelColor: "#141515",
@ -180,6 +185,7 @@ Page({
}); });
}, },
handleLogout() { handleLogout() {
app.mpBehavior({ PageName: "BTN_PERSONALINFOCANCELACCOUNT" });
wx.navigateTo({ wx.navigateTo({
url: "/module1/pages/loginOut/index", url: "/module1/pages/loginOut/index",
}); });

15
src/pages/cases/index.ts

@ -105,6 +105,7 @@ Page({
}); });
app.globalData.needDeal = ""; app.globalData.needDeal = "";
app.waitLogin().then(() => { app.waitLogin().then(() => {
app.mpBehavior({ PageName: "PG_CASELIST" });
this.getBaseInfo(); this.getBaseInfo();
this.getList(); this.getList();
this.getHospitalsList(); this.getHospitalsList();
@ -208,6 +209,9 @@ Page({
this.getList(page + 1); this.getList(page + 1);
} }
}, },
handleSearchFocus() {
app.mpBehavior({ PageName: "BTN_CASELISTSEARCH" });
},
handleSearch() { handleSearch() {
this.getList(); this.getList();
}, },
@ -301,6 +305,7 @@ Page({
}, },
handleDetail(e) { handleDetail(e) {
const { params } = e.currentTarget.dataset; const { params } = e.currentTarget.dataset;
app.mpBehavior({ PageName: "BTN_CASECARD" });
this.setData({ this.setData({
entryDetail: true, entryDetail: true,
}); });
@ -458,6 +463,15 @@ Page({
handleRadio(e) { handleRadio(e) {
const { key } = e.currentTarget.dataset; const { key } = e.currentTarget.dataset;
const PageName = {
isReject: "BTN_CASELISTREJECTFILTER",
isHighQuality: "BTN_CASELISTQUALITYFILTER",
isOpen: "BTN_CASELISTPUBLIC",
newFeedback: "BTN_CASELISTUPDATE",
}[key];
if (PageName) {
app.mpBehavior({ PageName });
}
this.setData({ this.setData({
[key]: this.data[key] === "1" ? "" : "1", [key]: this.data[key] === "1" ? "" : "1",
}); });
@ -471,6 +485,7 @@ Page({
this.handleSearch(); this.handleSearch();
}, },
handleFold() { handleFold() {
app.mpBehavior({ PageName: "BTN_CASELISTFILTERTOGGLE" });
this.setData({ this.setData({
fold: !this.data.fold, fold: !this.data.fold,
}); });

1
src/pages/cases/index.wxml

@ -27,6 +27,7 @@
class="input" class="input"
model:value="{{search}}" model:value="{{search}}"
confirm-type="search" confirm-type="search"
bind:focus="handleSearchFocus"
bindconfirm="handleSearch" bindconfirm="handleSearch"
placeholder-class="place-input" placeholder-class="place-input"
type="text" type="text"

12
src/pages/chatRoomList/index.ts

@ -74,6 +74,7 @@ Page({
notice: false, notice: false,
}); });
app.waitLogin().then(() => { app.waitLogin().then(() => {
app.mpBehavior({ PageName: "PG_CHATROOMLIST" });
this.getBaseInfo(); this.getBaseInfo();
this.getList(); this.getList();
this.getHospitalsList(); this.getHospitalsList();
@ -180,6 +181,7 @@ Page({
} }
}, },
handleSearch() { handleSearch() {
app.mpBehavior({ PageName: "BTN_CHATROOMSEARCH" });
this.getList(); this.getList();
}, },
handleCaseShow() { handleCaseShow() {
@ -419,6 +421,13 @@ Page({
}, },
handleRead(e) { handleRead(e) {
const { value } = e.currentTarget.dataset; const { value } = e.currentTarget.dataset;
const PageName = {
1: "BTN_CHATROOMREAD",
2: "BTN_CHATROOMUNREAD",
}[value];
if (PageName) {
app.mpBehavior({ PageName });
}
this.setData({ this.setData({
readStatus: value, readStatus: value,
}); });
@ -450,6 +459,7 @@ Page({
}, },
handleFold() { handleFold() {
app.mpBehavior({ PageName: "BTN_CHATROOMFILTERTOGGLE" });
this.setData({ this.setData({
fold: !this.data.fold, fold: !this.data.fold,
}); });
@ -460,12 +470,14 @@ Page({
}, },
handleRoom(e) { handleRoom(e) {
app.mpBehavior({ PageName: "BTN_CHATROOMCARD" });
const { params } = e.currentTarget.dataset; const { params } = e.currentTarget.dataset;
wx.navigateTo({ wx.navigateTo({
url: `/module1/pages/chatRoom/index?id=${params.roomId}`, url: `/module1/pages/chatRoom/index?id=${params.roomId}`,
}); });
}, },
handleReadAll() { handleReadAll() {
app.mpBehavior({ PageName: "BTN_CHATROOMMARKALLREAD" });
wx.showModal({ wx.showModal({
title: "确认全部标为已读", title: "确认全部标为已读",
confirmColor: "#00B4C5", confirmColor: "#00B4C5",

9
src/pages/home/index.ts

@ -26,6 +26,7 @@ Page({
notice: false, notice: false,
}); });
app.waitLogin().then(() => { app.waitLogin().then(() => {
app.mpBehavior({ PageName: "PG_HOME" });
this.handleBindDoctor(); this.handleBindDoctor();
this.getDoctorDict(); this.getDoctorDict();
this.getHostipalDict(); this.getHostipalDict();
@ -120,6 +121,14 @@ Page({
9: "S2:核心医生", 9: "S2:核心医生",
10: "S3:质控医生", 10: "S3:质控医生",
}[index]; }[index];
const PageName = {
1: "BTN_MANAGEDCASESNEWINFO",
2: "BTN_MANAGEDCASESDISCUSSINFO",
3: "BTN_MANAGEDCASESCLOSEDINFO",
}[index];
if (PageName) {
app.mpBehavior({ PageName });
}
wx.showModal({ wx.showModal({
content: tip, content: tip,
confirmColor: "#00B4C5", confirmColor: "#00B4C5",

7
src/pages/my/index.ts

@ -13,6 +13,7 @@ Page({
notice: false, notice: false,
}); });
app.waitLogin().then(() => { app.waitLogin().then(() => {
app.mpBehavior({ PageName: "PG_MY" });
this.getDoctorDict(); this.getDoctorDict();
app.getUserInfo(this, (userInfo) => { app.getUserInfo(this, (userInfo) => {
this.getTabBar().setData({ this.getTabBar().setData({
@ -45,11 +46,13 @@ Page({
}); });
}, },
handleUserInfo() { handleUserInfo() {
app.mpBehavior({ PageName: "BTN_MYPERSONALINFO" });
wx.navigateTo({ wx.navigateTo({
url: "/module1/pages/userInfo/index", url: "/module1/pages/userInfo/index",
}); });
}, },
handleProtocol() { handleProtocol() {
app.mpBehavior({ PageName: "BTN_MYPRIVACYPOLICY" });
wx.navigateTo({ wx.navigateTo({
url: "/module1/pages/loginProtool/index?ismy=1", url: "/module1/pages/loginProtool/index?ismy=1",
}); });
@ -59,6 +62,10 @@ Page({
url: "/module1/pages/invite/index", url: "/module1/pages/invite/index",
}); });
}, },
handleBZSC() {
app.mpBehavior({ PageName: "BTN_MYHELPMANUAL" });
},
}); });
export {}; export {};

1
typings/index.d.ts vendored

@ -21,6 +21,7 @@ interface IAppOption {
getMenuInfo: (arg0: WechatMiniprogram.Page.Instance<any, any>) => void; getMenuInfo: (arg0: WechatMiniprogram.Page.Instance<any, any>) => void;
getUserInfo: (arg0: WechatMiniprogram.Page.Instance<any, any>, arg1?: (arg0: any) => void) => void; getUserInfo: (arg0: WechatMiniprogram.Page.Instance<any, any>, arg1?: (arg0: any) => void) => void;
getApplyDoctor: () => Promise<any>; getApplyDoctor: () => Promise<any>;
mpBehavior: (data: { PageName: string }) => void;
} }
interface IAgaxParams extends WechatMiniprogram.RequestOption { interface IAgaxParams extends WechatMiniprogram.RequestOption {

Loading…
Cancel
Save