Browse Source

1. 动态直播banner 2. 医生码登录页

master
kola-web 2 weeks ago
parent
commit
b4b221c7b2
  1. 2
      project.config.json
  2. 12
      src/app.ts
  3. BIN
      src/images/za-images/live-banner.png
  4. 2
      src/pages/d_patient/index.wxml
  5. 39
      src/pages/start/index.ts
  6. 43
      src/patient/pages/index/index.ts
  7. 15
      src/patient/pages/index/index.wxml

2
project.config.json

@ -71,5 +71,5 @@
} }
] ]
}, },
"appid": "wx71ac9c27c3c3e3f4" "appid": "wxf9ce8010f1ad24aa"
} }

12
src/app.ts

@ -16,15 +16,15 @@ App<IAppOption>({
// 测试号 wx2b0bb13edf717c1d // 测试号 wx2b0bb13edf717c1d
// dev // dev
// appid:wxf9ce8010f1ad24aa // appid:wxf9ce8010f1ad24aa
// url: 'https://m.xd.hbraas.com', url: 'https://m.xd.hbraas.com',
// upFileUrl: 'https://m.xd.hbraas.com/', upFileUrl: 'https://m.xd.hbraas.com/',
// imageUrl: 'https://m.xd.hbraas.com/xd/', imageUrl: 'https://m.xd.hbraas.com/xd/',
// pro // pro
// appid:wx71ac9c27c3c3e3f4 // appid:wx71ac9c27c3c3e3f4
url: 'https://m.xd.hbsaas.com', // url: 'https://m.xd.hbsaas.com',
upFileUrl: 'https://m.xd.hbsaas.com/', // upFileUrl: 'https://m.xd.hbsaas.com/',
imageUrl: 'https://m.xd.hbsaas.com/api/xd/', // imageUrl: 'https://m.xd.hbsaas.com/api/xd/',
loginState: '', loginState: '',
isLogin: 0, isLogin: 0,

BIN
src/images/za-images/live-banner.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 682 KiB

After

Width:  |  Height:  |  Size: 696 KiB

2
src/pages/d_patient/index.wxml

@ -35,7 +35,7 @@
<view class="edc" wx:if="{{item.IsEDC==1}}">EDC患者</view> <view class="edc" wx:if="{{item.IsEDC==1}}">EDC患者</view>
</view> </view>
</view> </view>
<view class="replay-date">注册时间:{{item.BecomePatientTime}}</view> <view class="replay-date">邀约时间:{{item.InviteTime}}</view>
</view> </view>
<view class="send" catch:tap="handleSend" data-index="{{index}}">消息</view> <view class="send" catch:tap="handleSend" data-index="{{index}}">消息</view>
</view> </view>

39
src/pages/start/index.ts

@ -1,47 +1,54 @@
const app = getApp<IAppOption>(); const app = getApp<IAppOption>()
Page({ Page({
data: {}, data: {},
onLoad() { onLoad() {
app.waitLogin().then(() => { app.waitLogin().then(() => {
const { isLogin, isNewReg, loginType } = app.globalData; const { isLogin, isNewReg, loginType, scene } = app.globalData
if (isLogin === 0) { if (isLogin === 0) {
// 未登录用户,扫医生邀请码,重定向到患者登录页
if (scene?.doctorId) {
wx.reLaunch({
url: '/patient/pages/login/index',
})
return
}
wx.reLaunch({ wx.reLaunch({
url: '/patient/pages/index/index', url: '/patient/pages/index/index',
}); })
return; return
} }
if (loginType === 0) { if (loginType === 0) {
wx.reLaunch({ wx.reLaunch({
url: '/patient/pages/index/index', url: '/patient/pages/index/index',
}); })
return; return
} }
if (loginType === 1) { if (loginType === 1) {
if (isNewReg === 1) { if (isNewReg === 1) {
wx.reLaunch({ wx.reLaunch({
url: '/patient/pages/index/index', url: '/patient/pages/index/index',
}); })
return; return
} }
wx.reLaunch({ wx.reLaunch({
url: '/patient/pages/enterInfo/index', url: '/patient/pages/enterInfo/index',
}); })
return; return
} }
if (loginType === 2) { if (loginType === 2) {
if (isNewReg === 1) { if (isNewReg === 1) {
wx.reLaunch({ wx.reLaunch({
url: '/pages/home/index', url: '/pages/home/index',
}); })
return; return
} }
wx.reLaunch({ wx.reLaunch({
url: '/pages/login/index', url: '/pages/login/index',
}); })
} }
}); })
}, },
}); })
export {}; export {}

43
src/patient/pages/index/index.ts

@ -1,4 +1,5 @@
import dayjs from 'dayjs' import dayjs from 'dayjs'
const app = getApp<IAppOption>() const app = getApp<IAppOption>()
const licia = require('miniprogram-licia') const licia = require('miniprogram-licia')
@ -307,7 +308,8 @@ Page({
}, },
routerTo(e) { routerTo(e) {
let { url, active, code } = e.currentTarget.dataset let { url, active, code } = e.currentTarget.dataset
if (!url) return if (!url)
return
if (code === 'doctor') { if (code === 'doctor') {
app.mpBehavior({ PageName: 'BTN_PatientHomeDoctorCard' }) app.mpBehavior({ PageName: 'BTN_PatientHomeDoctorCard' })
} }
@ -399,7 +401,8 @@ Page({
wx.navigateTo({ wx.navigateTo({
url: '/patient/pages/vipLogin/index', url: '/patient/pages/vipLogin/index',
}) })
} else if (MedicineAuditSwitch === '1') { }
else if (MedicineAuditSwitch === '1') {
const pendPath = { const pendPath = {
0: '/patient/pages/vipPending/index', 0: '/patient/pages/vipPending/index',
1: '/patient/pages/vipStartPending/index', 1: '/patient/pages/vipStartPending/index',
@ -411,7 +414,8 @@ Page({
wx.navigateTo({ wx.navigateTo({
url: url || '/patient/pages/vipCert/index', url: url || '/patient/pages/vipCert/index',
}) })
} else { }
else {
wx.showToast({ wx.showToast({
icon: 'none', icon: 'none',
title: '工程师正在努力建设中,敬请期待!', title: '工程师正在努力建设中,敬请期待!',
@ -423,26 +427,31 @@ Page({
if (toastType === 'vipScan') { if (toastType === 'vipScan') {
this.routerVipTo() this.routerVipTo()
this.handleToastCancel() this.handleToastCancel()
} else if (toastType === 'aldAlert') { }
else if (toastType === 'aldAlert') {
wx.navigateTo({ wx.navigateTo({
url: '/patient/pages/adl/index', url: '/patient/pages/adl/index',
}) })
this.handleToastCancel() this.handleToastCancel()
} else if (toastType === 'healthCare') { }
else if (toastType === 'healthCare') {
this.setPopupInfo() this.setPopupInfo()
this.handleNRDL() this.handleNRDL()
this.handleToastCancel() this.handleToastCancel()
} else if (toastType === 'ndrlAldAlert') { }
else if (toastType === 'ndrlAldAlert') {
wx.navigateTo({ wx.navigateTo({
url: '/patient/pages/adl/index?nrdl=1', url: '/patient/pages/adl/index?nrdl=1',
}) })
this.handleToastCancel() this.handleToastCancel()
} else if (toastType === 'doubleStandards') { }
else if (toastType === 'doubleStandards') {
wx.navigateTo({ wx.navigateTo({
url: '/patient/pages/adl/index', url: '/patient/pages/adl/index',
}) })
this.handleToastCancel() this.handleToastCancel()
} else if (toastType === 'dedicatedDoctor') { }
else if (toastType === 'dedicatedDoctor') {
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=zd/popup/close-popup', url: '?r=zd/popup/close-popup',
@ -455,7 +464,8 @@ Page({
}) })
}) })
this.handleToastCancel(null, false) this.handleToastCancel(null, false)
} else if (toastType === 'referral-toast') { }
else if (toastType === 'referral-toast') {
this.setData({ this.setData({
referralFromShow: true, referralFromShow: true,
}) })
@ -465,7 +475,8 @@ Page({
data: {}, data: {},
}) })
this.handleToastCancel(null, false) this.handleToastCancel(null, false)
} else if (toastType === 'drug-guide') { }
else if (toastType === 'drug-guide') {
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=zd/popup/add-record', url: '?r=zd/popup/add-record',
@ -488,7 +499,8 @@ Page({
Type: 5, Type: 5,
}, },
}) })
} else if (toastType === 'dedicatedDoctor' && sure) { }
else if (toastType === 'dedicatedDoctor' && sure) {
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=zd/popup/close-popup', url: '?r=zd/popup/close-popup',
@ -496,13 +508,15 @@ Page({
Type: 6, Type: 6,
}, },
}) })
} else if (toastType === 'referral-toast') { }
else if (toastType === 'referral-toast') {
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=zd/re-visit/update-popup-show-status', url: '?r=zd/re-visit/update-popup-show-status',
data: {}, data: {},
}) })
} else if (toastType === 'drug-guide' && sure) { }
else if (toastType === 'drug-guide' && sure) {
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=zd/popup/add-record', url: '?r=zd/popup/add-record',
@ -570,7 +584,8 @@ Page({
infoList: list, infoList: list,
}) })
}) })
} else { }
else {
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=zd/pic-text/collection', url: '?r=zd/pic-text/collection',

15
src/patient/pages/index/index.wxml

@ -99,10 +99,21 @@
<view <view
class="l-banner" class="l-banner"
bind:tap="routerTo" bind:tap="routerTo"
data-url="/patient/pages/live/index?index=0" data-url="{{card.configLinkUrl || '/patient/pages/live/index?index=0'}}"
data-code="{{card.code}}" data-code="{{card.code}}"
> >
<image class="live-img" mode="aspectFill" src="{{imageUrl}}za-images/live-banner.png?t={{Timestamp}}"></image> <image
wx:if="{{card.configImg}}"
class="live-img"
mode="aspectFill"
src="{{card.configImg}}"
></image>
<image
wx:else
class="live-img"
mode="aspectFill"
src="{{imageUrl}}za-images/live-banner.png?t={{Timestamp}}"
></image>
</view> </view>
<view class="list" wx:if="{{liveList.length}}"> <view class="list" wx:if="{{liveList.length}}">
<view <view

Loading…
Cancel
Save