From b2671cd939a7e480bef8f06e7bccf26fde7a049a Mon Sep 17 00:00:00 2001 From: kola-web Date: Wed, 25 Mar 2026 15:07:41 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=8E=A8=E9=80=81ID?= =?UTF-8?q?=E5=A4=84=E7=90=86=E9=80=BB=E8=BE=91=E5=B9=B6=E6=9B=B4=E6=96=B0?= =?UTF-8?q?API=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复qol和liveDetail页面的推送ID处理顺序问题,确保在用户登录前检查推送ID 更新app.ts中的API配置,恢复使用hbraas.com域名 修改project.config.json中的appid配置 --- project.config.json | 2 +- src/app.ts | 12 ++++++------ src/patient/pages/liveDetail/index.ts | 23 ++++++++++------------- src/patient/pages/qol/index.ts | 24 +++++++++++------------- 4 files changed, 28 insertions(+), 33 deletions(-) diff --git a/project.config.json b/project.config.json index 1d8faf4..625d498 100644 --- a/project.config.json +++ b/project.config.json @@ -71,5 +71,5 @@ } ] }, - "appid": "wx71ac9c27c3c3e3f4" + "appid": "wxf9ce8010f1ad24aa" } \ No newline at end of file diff --git a/src/app.ts b/src/app.ts index d095bd7..cbd248d 100644 --- a/src/app.ts +++ b/src/app.ts @@ -18,15 +18,15 @@ App({ // 测试号 wx2b0bb13edf717c1d // dev // appid:wxf9ce8010f1ad24aa - // url: 'https://m.xd.hbraas.com', - // upFileUrl: 'https://m.xd.hbraas.com/', - // imageUrl: 'https://m.xd.hbraas.com/xd/', + url: 'https://m.xd.hbraas.com', + upFileUrl: 'https://m.xd.hbraas.com/', + imageUrl: 'https://m.xd.hbraas.com/xd/', // pro // appid:wx71ac9c27c3c3e3f4 - url: 'https://m.xd.hbsaas.com', - upFileUrl: 'https://m.xd.hbsaas.com/', - imageUrl: 'https://m.xd.hbsaas.com/api/xd/', + // url: 'https://m.xd.hbsaas.com', + // upFileUrl: 'https://m.xd.hbsaas.com/', + // imageUrl: 'https://m.xd.hbsaas.com/api/xd/', loginState: '', isLogin: 0, diff --git a/src/patient/pages/liveDetail/index.ts b/src/patient/pages/liveDetail/index.ts index bce8bfc..d134447 100644 --- a/src/patient/pages/liveDetail/index.ts +++ b/src/patient/pages/liveDetail/index.ts @@ -38,16 +38,23 @@ Page({ answer: false, isAnswer: false, - - pushId: '', }, videoContext: {} as WechatMiniprogram.VideoContext, onLoad(options) { this.setData({ id: options.id, answer: options.answer === '1', - pushId: options.pushId, }) + if (options.pushId) { + wx.ajax({ + method: 'POST', + url: '?r=xd/push-click/update-click-status', + data: { + pushId: options.pushId, + }, + showMsg: false, + }) + } if (options.jump == '1') { this.setData({ popupShow: true, @@ -104,16 +111,6 @@ Page({ app.getZdUserInfo(this, true, () => { 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() { diff --git a/src/patient/pages/qol/index.ts b/src/patient/pages/qol/index.ts index b296ef3..a0a10fd 100644 --- a/src/patient/pages/qol/index.ts +++ b/src/patient/pages/qol/index.ts @@ -3,19 +3,17 @@ const app = getApp() Page({ data: {}, onLoad(options) { - 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, - }) - } - }) + if (options.pushId) { + wx.ajax({ + method: 'POST', + url: '?r=xd/push-click/update-click-status', + data: { + pushId: options.pushId, + }, + showMsg: false, + }) + } + app.waitLogin({ type: [1] }).then(() => {}) }, handleAdd() { wx.navigateTo({