Browse Source

push id 适配

dev
kola-web 2 weeks ago
parent
commit
de550aa169
  1. 14
      project.private.config.json
  2. 3
      src/pages/home/index.wxml
  3. 13
      src/patient/pages/liveDetail/index.ts
  4. 16
      src/patient/pages/qol/index.ts

14
project.private.config.json

@ -23,6 +23,13 @@
"miniprogram": { "miniprogram": {
"list": [ "list": [
{ {
"name": "患者-qol",
"pathName": "patient/pages/qol/index",
"query": "pushId=81",
"scene": null,
"launchMode": "default"
},
{
"name": "医生-患者量表", "name": "医生-患者量表",
"pathName": "pages/d_qolDetail/index", "pathName": "pages/d_qolDetail/index",
"query": "id=178", "query": "id=178",
@ -121,13 +128,6 @@
"scene": null "scene": null
}, },
{ {
"name": "患者-qol",
"pathName": "patient/pages/qol/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "患者-录入个人信息", "name": "患者-录入个人信息",
"pathName": "patient/pages/enterInfo/index", "pathName": "patient/pages/enterInfo/index",
"query": "", "query": "",

3
src/pages/home/index.wxml

@ -146,8 +146,7 @@
<view class="stat" bind:tap="handlePatient"> <view class="stat" bind:tap="handlePatient">
<view class="s-header"> <view class="s-header">
<view class="title"> <view class="title">
统计数据截止到昨天 患者数据看板
<text class="sub">每天00:05更新</text>
</view> </view>
</view> </view>
<view class="s-container"> <view class="s-container">

13
src/patient/pages/liveDetail/index.ts

@ -38,12 +38,15 @@ Page({
answer: false, answer: false,
isAnswer: false, isAnswer: false,
pushId: '',
}, },
videoContext: {} as WechatMiniprogram.VideoContext, videoContext: {} as WechatMiniprogram.VideoContext,
onLoad(options) { onLoad(options) {
this.setData({ this.setData({
id: options.id, id: options.id,
answer: options.answer === '1', answer: options.answer === '1',
pushId: options.pushId,
}) })
if (options.jump == '1') { if (options.jump == '1') {
this.setData({ this.setData({
@ -101,6 +104,16 @@ Page({
app.getZdUserInfo(this, true, () => { app.getZdUserInfo(this, true, () => {
this.getPosterParams() this.getPosterParams()
}) })
if (this.data.pushId) {
wx.ajax({
method: 'POST',
url: '?r=xd/push-click/update-click-status',
data: {
pushId: this.data.pushId,
},
showMsg: false,
})
}
}) })
}, },
async getPopup() { async getPopup() {

16
src/patient/pages/qol/index.ts

@ -2,8 +2,20 @@ const app = getApp<IAppOption>()
Page({ Page({
data: {}, data: {},
onLoad() { onLoad(options) {
app.waitLogin({ type: [1] }).then(() => {}) app.waitLogin({ type: [1] }).then(() => {
const pushId = options.pushId
if (pushId) {
wx.ajax({
method: 'POST',
url: '?r=xd/push-click/update-click-status',
data: {
pushId,
},
showMsg: false,
})
}
})
}, },
handleAdd() { handleAdd() {
wx.navigateTo({ wx.navigateTo({

Loading…
Cancel
Save