Browse Source

埋点 + 功能优化

dev
kola-web 1 week ago
parent
commit
7b234961c3
  1. 7
      doc/track.md
  2. 2
      src/components/uploadFile/index.js
  3. 3
      src/doctor/pages/d_patientDetail/index.ts
  4. 4
      src/gift/pages/record/index.ts
  5. 2
      src/pages/getUserInfo/index.ts
  6. 6
      src/pages/interactivePatient/index.ts
  7. 11
      src/pages/my/index.ts
  8. 1
      src/pages/qaFormDetail/index.ts
  9. 23
      src/pages/repository/index.ts
  10. 5
      src/pages/repositoryDetail/index.ts

7
doc/track.md

@ -117,12 +117,9 @@ app.mpBehavior({ PageName: 'MINI_PROGRAM_VISIT' }) @@ -117,12 +117,9 @@ app.mpBehavior({ PageName: 'MINI_PROGRAM_VISIT' })
| 方法 | PageName | 说明 |
|------|----------|------|
| `routerVipTo()` | `BTN_PatientMyVip` | VIP 认证入口 |
| `handleMyHealthRecord(e)` | `BTN_PatientMyHealthRecord` | 健康档案 |
| `handleQaForm()` | `BTN_PatientMyQaForm` | 健康问卷 |
| `handleQaForm()` | `BTN_PatientMyQaForm` | 健康档案|
| `routerTo(e)` → mySave | `BTN_PatientMySave` | 我的收藏 |
| `routerTo(e)` → personalInfo | `BTN_PatientMyPersonalInfo` | 个人信息 |
| `handleMiniDoctor()` | `BTN_PatientMyMiniDoctor` | 迷你医生 |
| `handleFeedback()` | `BTN_PatientMyFeedback` | 问题反馈 |
#### 医患互动(pages/interactivePatient/index)
@ -132,7 +129,6 @@ app.mpBehavior({ PageName: 'MINI_PROGRAM_VISIT' }) @@ -132,7 +129,6 @@ app.mpBehavior({ PageName: 'MINI_PROGRAM_VISIT' })
| `handleHot(e)` | `BTN_PatientInteractiveHotQuestion` | 热门问题点击 |
| `handleQuestion(e)` | `BTN_PatientInteractiveQuestion` | 快捷问题点击 |
| `handleConfirm()` | `BTN_PatientInteractiveSend` | 发送消息 |
| `handleAdl()` | `BTN_PatientInteractiveAdl` | ADL 评估入口 |
| `handleQol()` | `BTN_PatientInteractiveQol` | QoL 入口 |
| `handleDoctorDetail()` | `BTN_PatientInteractiveDoctorDetail` | 查看医生详情 |
@ -140,7 +136,6 @@ app.mpBehavior({ PageName: 'MINI_PROGRAM_VISIT' }) @@ -140,7 +136,6 @@ app.mpBehavior({ PageName: 'MINI_PROGRAM_VISIT' })
| 方法 | PageName | 说明 |
|------|----------|------|
| `tabChange(e)` | `BTN_PatientRepositoryTab` | Tab 切换 |
| `handleSearch()` | `BTN_PatientRepositorySearch` | 搜索 |
| `handleCate(e)` | `BTN_PatientRepositoryCategory` | 分类筛选 |
| `handleDetail(e)` | `BTN_PatientRepositoryArticle` | 文章详情 |

2
src/components/uploadFile/index.js

@ -142,7 +142,7 @@ Component({ @@ -142,7 +142,7 @@ Component({
return new Promise((resolve, resject) => {
let url = `${app.globalData.upFileUrl}?r=file-service/upload-`;
if (item.fileType === "image") {
url += "img";
url += "ali-img";
}
if (item.fileType === "video") {
url += "video";

3
src/doctor/pages/d_patientDetail/index.ts

@ -625,6 +625,7 @@ Page({ @@ -625,6 +625,7 @@ Page({
// ========== 导出PPT ==========
handleGeneratePdf() {
const { detail } = this.data
if (this.data.pptGenerating) return
this.setData({ pptGenerating: true })
const patientId = this.data.id
@ -635,7 +636,7 @@ Page({ @@ -635,7 +636,7 @@ Page({
if (res.statusCode === 200) {
wx.shareFileMessage({
filePath: res.tempFilePath,
fileName: 'medical-visit.pptx',
fileName: `${detail.Name}的病历.pptx`,
success: () => {
wx.showToast({ title: '分享成功', icon: 'success' })
this.setData({ pptGenerating: false })

4
src/gift/pages/record/index.ts

@ -346,11 +346,13 @@ Page({ @@ -346,11 +346,13 @@ Page({
},
handlePreviewImage(e: WechatMiniprogram.CustomEvent) {
const { index } = e.currentTarget.dataset
const imageType = e.currentTarget.dataset.type as string
const filesKey = `${imageType}Files`
const files = this.data[filesKey as any] as any[]
const urls = files.map((f) => f.fileUrl || f.imgUrl)
wx.previewImage({ urls })
const url = urls[index]
wx.previewImage({ urls, current: url })
},
handleExample(e: WechatMiniprogram.CustomEvent) {

2
src/pages/getUserInfo/index.ts

@ -24,7 +24,7 @@ Page({ @@ -24,7 +24,7 @@ Page({
onChooseAvatar(e) {
const { avatarUrl } = e.detail;
const that = this;
const url = `${app.globalData.upFileUrl}?r=file-service/upload-img`;
const url = `${app.globalData.upFileUrl}?r=file-service/upload-ali-img`;
wx.showLoading({
title: "上传中",
});

6
src/pages/interactivePatient/index.ts

@ -412,12 +412,6 @@ Page({ @@ -412,12 +412,6 @@ Page({
this.handleView()
})
},
handleAdl() {
app.mpBehavior({ PageName: 'BTN_PatientInteractiveAdl' })
wx.navigateTo({
url: '/pages/adl/index',
})
},
handleQol() {
app.mpBehavior({ PageName: 'BTN_PatientInteractiveQol' })
wx.navigateTo({

11
src/pages/my/index.ts

@ -45,15 +45,6 @@ Page({ @@ -45,15 +45,6 @@ Page({
})
})
},
handleMyHealthRecord(e) {
app.mpBehavior({ PageName: 'BTN_PatientMyHealthRecord' })
const { url } = e.currentTarget.dataset
app.permissionVerification(3, 0, url).then(() => {
wx.navigateTo({
url,
})
})
},
handleFamily(e) {
const { url } = e.currentTarget.dataset
app.permissionVerification(3, 0, url).then(() => {
@ -112,7 +103,6 @@ Page({ @@ -112,7 +103,6 @@ Page({
})
},
routerVipTo() {
app.mpBehavior({ PageName: 'BTN_PatientMyVip' })
const { UseDrugsAuditStatus, UserType } = this.data.userInfo
if (!UserType) {
app.getUserInfo(this, true, () => {
@ -136,7 +126,6 @@ Page({ @@ -136,7 +126,6 @@ Page({
},
handleMiniDoctor() {
app.mpBehavior({ PageName: 'BTN_PatientMyMiniDoctor' })
wx.navigateTo({
url: '/pages/webview/index',
})

1
src/pages/qaFormDetail/index.ts

@ -68,6 +68,7 @@ Page({ @@ -68,6 +68,7 @@ Page({
onShow() {
this.setData({ questions: [], hasData: false, showPage: false })
app.waitLogin().then(() => {
app.mpBehavior({ PageName: 'PG_PatientQaFormDetail' })
this.loadData()
})
},

23
src/pages/repository/index.ts

@ -25,6 +25,11 @@ Page({ @@ -25,6 +25,11 @@ Page({
})
},
onShow() {
if (typeof this.__loaded === 'undefined') {
this.__loaded = true
return
}
app.mpBehavior({ PageName: 'PG_PatientRepository' })
if (app.globalData.loginState) {
if (this.data.list.length) {
this.getList()
@ -59,7 +64,6 @@ Page({ @@ -59,7 +64,6 @@ Page({
})
},
tabChange(e) {
app.mpBehavior({ PageName: 'BTN_PatientRepositoryTab' })
const { storyCateId } = this.data
this.setData({
active: e.detail.index,
@ -136,23 +140,6 @@ Page({ @@ -136,23 +140,6 @@ Page({
})
})
},
handleStar(e) {
app.mpBehavior({ PageName: 'BTN_PatientRepositoryStar' })
const { id, index } = e.currentTarget.dataset
wx.ajax({
method: 'POST',
url: '?r=igg4/pic-text/compliment',
data: {
ContentId: id,
},
showMsg: false,
}).then(() => {
this.setData({
[`list[${index}].IsCompliment`]: 1,
[`list[${index}].ComplimentNum`]: Number(this.data.list[index].ComplimentNum) + 1,
})
})
},
handleCate(e: WechatMiniprogram.CustomEvent) {
app.mpBehavior({ PageName: 'BTN_PatientRepositoryCategory' })
const { id } = e.currentTarget.dataset

5
src/pages/repositoryDetail/index.ts

@ -167,6 +167,7 @@ Page({ @@ -167,6 +167,7 @@ Page({
})
},
handleStar() {
app.mpBehavior({ PageName: 'BTN_PatientRepositoryStar' })
this.setData({
starShow: true,
})
@ -198,6 +199,7 @@ Page({ @@ -198,6 +199,7 @@ Page({
})
},
handleToggleSave() {
app.mpBehavior({ PageName: 'BTN_PatientRepositorySave' })
const {
id,
detail: { IsCollect },
@ -321,6 +323,5 @@ Page({ @@ -321,6 +323,5 @@ Page({
})
}
},
handleTapShare() {
},
handleTapShare() {},
})

Loading…
Cancel
Save