Browse Source

1.7 埋点前端逻辑

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

110
project.config.json

@ -1,56 +1,56 @@ @@ -1,56 +1,56 @@
{
"description": "项目配置文件",
"miniprogramRoot": "src/",
"compileType": "miniprogram",
"setting": {
"useCompilerPlugins": [
"typescript",
"sass"
],
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"coverView": false,
"postcss": false,
"minified": false,
"enhance": true,
"showShadowRootInWxmlPanel": false,
"packNpmManually": true,
"packNpmRelationList": [
{
"packageJsonPath": "package.json",
"miniprogramNpmDistDir": "./src"
}
],
"ignoreUploadUnusedFiles": true,
"compileHotReLoad": false,
"skylineRenderEnable": true,
"es6": true
},
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
"condition": {},
"srcMiniprogramRoot": "src/",
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 2
},
"libVersion": "2.32.3",
"packOptions": {
"ignore": [
{
"value": "src/images/*",
"type": "glob"
}
],
"include": [
{
"value": "/echart/components/ec-canvas/echarts.js",
"type": "file"
}
]
},
"appid": "wxaae50c206446a964"
{
"description": "项目配置文件",
"miniprogramRoot": "src/",
"compileType": "miniprogram",
"setting": {
"useCompilerPlugins": [
"typescript",
"sass"
],
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"coverView": false,
"postcss": false,
"minified": false,
"enhance": true,
"showShadowRootInWxmlPanel": false,
"packNpmManually": true,
"packNpmRelationList": [
{
"packageJsonPath": "package.json",
"miniprogramNpmDistDir": "./src"
}
],
"ignoreUploadUnusedFiles": true,
"compileHotReLoad": false,
"skylineRenderEnable": true,
"es6": true
},
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
"condition": {},
"srcMiniprogramRoot": "src/",
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 2
},
"libVersion": "2.32.3",
"packOptions": {
"ignore": [
{
"value": "src/images/*",
"type": "glob"
}
],
"include": [
{
"value": "/echart/components/ec-canvas/echarts.js",
"type": "file"
}
]
},
"appid": "wxaae50c206446a964"
}

12
src/app.ts

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

14
src/components/doctorAvatar/index.ts

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

1
src/components/popupDoctorDetail/index.ts

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -1,6 +1,12 @@ @@ -1,6 +1,12 @@
<view class="page">
<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>
<view class="wrap">
<view class="w-header">

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -23,11 +23,18 @@ @@ -23,11 +23,18 @@
data-index="{{index}}"
></image>
<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 class="record">
<view class="record" bind:tap="handleMapAudio">
<customRecord class="record-btn" bind:file="handleAudio"></customRecord>
<view class="r-title">您也可以长按录入语音</view>
</view>
@ -48,7 +55,7 @@ @@ -48,7 +55,7 @@
<view class="r-title">重复图片</view>
</view>
</view>
<uploadFile bind:file="handlePhoto">
<uploadFile bind:file="handlePhoto" bind:tap="handleMapPhoto">
<view class="upload-file">
<van-icon class="add" name="plus" />
</view>
@ -58,7 +65,7 @@ @@ -58,7 +65,7 @@
<view class="card">
<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>
</uploadFile>
</view>

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

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

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

@ -165,7 +165,7 @@ @@ -165,7 +165,7 @@
/>
<view class="place" wx:else bind:tap="handleFocus">{{sendMessage}}</view>
</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>
<image

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

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

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

@ -1,15 +1,6 @@ @@ -1,15 +1,6 @@
<wxs src="/utils/util.wxs" module="tools" />
<van-nav-bar
title="录入病历"
fixed
bind:click-left="handleBack"
bind:click-right="onClickRight"
>
<van-icon
name="arrow-left"
slot="left"
size="18px"
/>
<van-nav-bar title="录入病历" fixed bind:click-left="handleBack" bind:click-right="onClickRight">
<van-icon name="arrow-left" slot="left" size="18px" />
</van-nav-bar>
<view class="page" style="padding-top:{{menuButtonInfo.top + 60}}px;">
<view class="card">
@ -18,23 +9,9 @@ @@ -18,23 +9,9 @@
<text class="limit">({{images.length}}/9)</text>
</view>
<view class="image-files">
<view
class="photo"
wx:for="{{images}}"
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}}"
>
<view class="photo" wx:for="{{images}}" 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" />
</view>
<view class="repeat" wx:if="{{item.repeat}}">
@ -42,12 +19,7 @@ @@ -42,12 +19,7 @@
<view class="r-title">重复图片</view>
</view>
</view>
<uploadFile
obscure
edit="{{edit}}"
bind:file="handlePhoto"
wx:if="{{images.length<9}}"
>
<uploadFile obscure edit="{{edit}}" bind:file="handlePhoto" bind:tap="handleMapPhoto" wx:if="{{images.length<9}}">
<view class="upload-file">
<van-icon class="add" name="plus" />
</view>
@ -68,16 +40,8 @@ @@ -68,16 +40,8 @@
<view class="limit">{{description.length}}/3000</view>
</view>
<view class="audio-list">
<view
class="row"
wx:for="{{audios}}"
wx:key="index"
>
<customAudioBar
class="audio-bar"
url="{{item.url}}"
time="{{item.duration}}"
></customAudioBar>
<view class="row" wx:for="{{audios}}" wx:key="index">
<customAudioBar class="audio-bar" url="{{item.url}}" time="{{item.duration}}"></customAudioBar>
<image
class="del"
src="{{imageUrl}}icon-clsoe-green.png?t={{Timestamp}}"
@ -85,23 +49,26 @@ @@ -85,23 +49,26 @@
data-index="{{index}}"
></image>
<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 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>
</view>
<view class="card">
<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>
</uploadFile>
</view>
@ -160,33 +127,13 @@ @@ -160,33 +127,13 @@
</view>
</view>
<view class="footer">
<view
class="cancel"
wx:if="{{ !caseId || auth.canDraft }}"
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 class="cancel" wx:if="{{ !caseId || auth.canDraft }}" 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>
<van-popup
show="{{ show1 }}"
bind:close="onClose"
round
closeable
>
<van-popup show="{{ show1 }}" bind:close="onClose" round closeable>
<view class="popup1">
<view class="title">确认提交您的反馈信息</view>
<view class="btn1" bind:tap="handleSubmit">直接提交我的反馈信息</view>
@ -197,12 +144,7 @@ @@ -197,12 +144,7 @@
</view>
</van-popup>
<van-popup
show="{{ show2 }}"
bind:close="onClose"
round
closeable
>
<van-popup show="{{ show2 }}" bind:close="onClose" round closeable>
<view class="popup2">
<view class="title">您的病历没有进行涂抹</view>
<!-- prettier-ignore -->

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

15
src/pages/cases/index.ts

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

1
src/pages/cases/index.wxml

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

12
src/pages/chatRoomList/index.ts

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

9
src/pages/home/index.ts

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

7
src/pages/my/index.ts

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

1
typings/index.d.ts vendored

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

Loading…
Cancel
Save