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

2
src/components/uploadFile/index.js

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

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

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

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

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

2
src/pages/getUserInfo/index.ts

@ -24,7 +24,7 @@ Page({
onChooseAvatar(e) { onChooseAvatar(e) {
const { avatarUrl } = e.detail; const { avatarUrl } = e.detail;
const that = this; 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({ wx.showLoading({
title: "上传中", title: "上传中",
}); });

6
src/pages/interactivePatient/index.ts

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

11
src/pages/my/index.ts

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

1
src/pages/qaFormDetail/index.ts

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

23
src/pages/repository/index.ts

@ -25,6 +25,11 @@ Page({
}) })
}, },
onShow() { onShow() {
if (typeof this.__loaded === 'undefined') {
this.__loaded = true
return
}
app.mpBehavior({ PageName: 'PG_PatientRepository' })
if (app.globalData.loginState) { if (app.globalData.loginState) {
if (this.data.list.length) { if (this.data.list.length) {
this.getList() this.getList()
@ -59,7 +64,6 @@ Page({
}) })
}, },
tabChange(e) { tabChange(e) {
app.mpBehavior({ PageName: 'BTN_PatientRepositoryTab' })
const { storyCateId } = this.data const { storyCateId } = this.data
this.setData({ this.setData({
active: e.detail.index, active: e.detail.index,
@ -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) { handleCate(e: WechatMiniprogram.CustomEvent) {
app.mpBehavior({ PageName: 'BTN_PatientRepositoryCategory' }) app.mpBehavior({ PageName: 'BTN_PatientRepositoryCategory' })
const { id } = e.currentTarget.dataset const { id } = e.currentTarget.dataset

5
src/pages/repositoryDetail/index.ts

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

Loading…
Cancel
Save