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 @@ @@ -71,5 +71,5 @@
}
]
},
"appid": "wx71ac9c27c3c3e3f4"
"appid": "wxf9ce8010f1ad24aa"
}

12
src/app.ts

@ -16,15 +16,15 @@ App<IAppOption>({ @@ -16,15 +16,15 @@ App<IAppOption>({
// 测试号 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,

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

39
src/pages/start/index.ts

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

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

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

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

@ -99,10 +99,21 @@ @@ -99,10 +99,21 @@
<view
class="l-banner"
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}}"
>
<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 class="list" wx:if="{{liveList.length}}">
<view

Loading…
Cancel
Save