Browse Source

1v1 & 就诊地图 bugfix

master
kola-web 2 months ago
parent
commit
80adc8cdea
  1. 4
      src/components/pickerArea/index.wxml
  2. 4
      src/components/popup/index.scss
  3. 10
      src/gift/pages/dtpDurg/index.scss
  4. 88
      src/gift/pages/dtpDurg/index.ts
  5. BIN
      src/images/icon101.png
  6. BIN
      src/images/icon102.png
  7. BIN
      src/images/icon41.png
  8. BIN
      src/images/icon42.png
  9. BIN
      src/images/icon95.png
  10. BIN
      src/images/icon96.png
  11. BIN
      src/images/icon97.png
  12. BIN
      src/images/icon98.png
  13. 30
      src/pages/d_interactiveDoctor/index.scss
  14. 2
      src/pages/d_interactiveDoctor/index.ts
  15. 13
      src/pages/d_interactiveDoctor/index.wxml
  16. 2
      src/pages/d_invite/index.ts
  17. 1
      src/pages/d_invite/index.wxml
  18. 2
      src/patient/pages/doctor/index.scss
  19. 14
      src/patient/pages/hospital/index.scss
  20. 33
      src/patient/pages/hospital/index.ts
  21. 6
      src/patient/pages/hospital/index.wxml
  22. 17
      src/patient/pages/index/index.scss
  23. 6
      src/patient/pages/index/index.wxml
  24. 10
      src/patient/pages/infusionCenter/index.scss
  25. 87
      src/patient/pages/infusionCenter/index.ts
  26. 25
      src/patient/pages/interactivePatient/index.scss
  27. 2
      src/patient/pages/interactivePatient/index.ts
  28. 10
      src/patient/pages/interactivePatient/index.wxml
  29. 2
      src/patient/pages/liveResult/index.wxml
  30. 29
      src/utils/request.ts
  31. 1
      typings/index.d.ts

4
src/components/pickerArea/index.wxml

@ -37,7 +37,7 @@
data-name="{{item.label}}" data-name="{{item.label}}"
> >
<view class="left">{{item.label}}</view> <view class="left">{{item.label}}</view>
<image wx:if="{{item.value === CityId}}" class="icon" src="{{imageUrl}}icon7.png?t={{Timestamp}}"></image> <image wx:if="{{item.value === CityId}}" class="icon" src="{{imageUrl}}icon102.png?t={{Timestamp}}"></image>
</view> </view>
</scroll-view> </scroll-view>
</block> </block>
@ -77,7 +77,7 @@
<image <image
wx:if="{{item.code=== ProvinceId}}" wx:if="{{item.code=== ProvinceId}}"
class="icon" class="icon"
src="{{imageUrl}}icon7.png?t={{Timestamp}}" src="{{imageUrl}}icon102.png?t={{Timestamp}}"
></image> ></image>
</view> </view>
</block> </block>

4
src/components/popup/index.scss

@ -220,10 +220,10 @@
} }
.title { .title {
margin-top: 24rpx; margin-top: 24rpx;
font-size: 32rpx; font-size: 38rpx;
color: #211d2e; color: #211d2e;
font-weight: bold; font-weight: bold;
line-height: 40rpx; line-height: 56rpx;
} }
.btn { .btn {
margin: 36rpx auto 0; margin: 36rpx auto 0;

10
src/gift/pages/dtpDurg/index.scss

@ -46,15 +46,16 @@
line-height: 70rpx; line-height: 70rpx;
font-size: 32rpx; font-size: 32rpx;
color: #b982ff; color: #b982ff;
text-align: center;
border-radius: 60rpx 60rpx 60rpx 60rpx; border-radius: 60rpx 60rpx 60rpx 60rpx;
border: 1px solid #b982ff; border: 1px solid #b982ff;
display: flex;
align-items: center;
justify-content: center;
.icon { .icon {
margin-right: 8rpx; margin-right: 8rpx;
display: inline-block; display: inline-block;
width: 36rpx; width: 36rpx;
height: 36rpx; height: 36rpx;
vertical-align: middle;
} }
} }
.site { .site {
@ -63,14 +64,15 @@
font-size: 32rpx; font-size: 32rpx;
color: #ffffff; color: #ffffff;
border-radius: 60rpx; border-radius: 60rpx;
text-align: center;
background: linear-gradient(197deg, #ffbcf9 0%, #b982ff 100%); background: linear-gradient(197deg, #ffbcf9 0%, #b982ff 100%);
display: flex;
align-items: center;
justify-content: center;
.icon { .icon {
margin-right: 8rpx; margin-right: 8rpx;
display: inline-block; display: inline-block;
width: 32rpx; width: 32rpx;
height: 32rpx; height: 32rpx;
vertical-align: middle;
} }
} }
} }

88
src/gift/pages/dtpDurg/index.ts

@ -4,22 +4,108 @@ Page({
data: { data: {
id: '', id: '',
detail: {} as any, detail: {} as any,
LNG: '' as number | string,
LAT: '' as number | string,
}, },
onLoad(options) { onLoad(options) {
this.setData({ this.setData({
id: options.id, id: options.id,
}) })
app.waitLogin({ type: [0, 1] }).then(() => { app.waitLogin({ type: [0, 1] }).then(() => {
this.handleToggleSite()
})
},
handleToggleSite() {
if (!this.data.LNG) {
wx.getSetting({
success: (res) => {
if (
res.authSetting['scope.userFuzzyLocation'] != undefined
&& res.authSetting['scope.userFuzzyLocation'] == true
) {
// 获取当前位置
this.getFuzzyLocation()
}
else if (res.authSetting['scope.userFuzzyLocation'] == undefined) {
// 获取当前位置
this.getFuzzyLocation()
}
else {
wx.showModal({
title: '请求授权当前位置',
content: '需要获取您的地理位置,请确认授权',
confirmColor: '#8c75d0',
success: (res) => {
if (res.cancel) {
// 取消授权
wx.showToast({
title: '拒绝授权',
icon: 'none',
duration: 1000,
})
this.getDetail() this.getDetail()
}
else if (res.confirm) {
// 确定授权,通过wx.openSetting发起授权请求
wx.openSetting({
success: (res) => {
if (res.authSetting['scope.userFuzzyLocation'] == true) {
wx.showToast({
title: '授权成功',
icon: 'success',
duration: 1000,
})
// 再次授权,调用wx.getLocation的API
this.getFuzzyLocation()
}
else {
wx.showToast({
title: '授权失败',
icon: 'none',
duration: 1000,
})
this.getDetail()
}
},
})
}
},
})
}
},
})
}
else {
this.setData({
LNG: '',
LAT: '',
})
this.getDetail()
}
},
getFuzzyLocation() {
wx.getFuzzyLocation({
success: (res) => {
this.setData({
LNG: res.longitude,
LAT: res.latitude,
})
this.getDetail()
},
fail: () => {
this.getDetail()
},
}) })
}, },
getDetail() { getDetail() {
wx.ajax({ wx.ajax({
method: 'GET', method: 'GET',
url: '?r=zd/dtp-pharmacy/detail', url: '?r=zd/dtp-pharmacy/detail',
data: { data: {
Id: this.data.id, Id: this.data.id,
lng: this.data.LNG,
lat: this.data.LAT,
}, },
}).then((res) => { }).then((res) => {
this.setData({ this.setData({

BIN
src/images/icon101.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 618 B

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
src/images/icon102.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 459 B

BIN
src/images/icon41.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
src/images/icon42.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
src/images/icon95.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 483 B

After

Width:  |  Height:  |  Size: 753 B

BIN
src/images/icon96.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 348 B

After

Width:  |  Height:  |  Size: 558 B

BIN
src/images/icon97.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 566 B

After

Width:  |  Height:  |  Size: 945 B

BIN
src/images/icon98.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 388 B

After

Width:  |  Height:  |  Size: 616 B

30
src/pages/d_interactiveDoctor/index.scss

@ -468,14 +468,15 @@ page {
padding: 32rpx 30rpx calc(32rpx + env(safe-area-inset-bottom)); padding: 32rpx 30rpx calc(32rpx + env(safe-area-inset-bottom));
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
gap: 10rpx; gap: 20rpx;
border-radius: 32rpx 32rpx 0 0; border-radius: 32rpx 32rpx 0 0;
box-shadow: 0rpx 8rpx 16rpx 0rpx rgba(40, 48, 49, 0.04); box-shadow: 0rpx 8rpx 16rpx 0rpx rgba(40, 48, 49, 0.04);
border: 2rpx solid #ffffff; border: 2rpx solid #ffffff;
background-color: #fff; background-color: #fff;
.send { .send {
padding: 0 12rpx 0 32rpx;
flex: 1; flex: 1;
padding: 0 12rpx 0 32rpx;
box-sizing: border-box;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
@ -485,6 +486,9 @@ page {
padding: 10rpx 0; padding: 10rpx 0;
flex: 1; flex: 1;
color: #adacb2; color: #adacb2;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} }
.btn { .btn {
flex-shrink: 0; flex-shrink: 0;
@ -498,7 +502,25 @@ page {
border-radius: 111rpx 111rpx 111rpx 111rpx; border-radius: 111rpx 111rpx 111rpx 111rpx;
} }
} }
.short-send {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
color: rgba(40, 48, 49, 1);
height: 76rpx;
background: #ffffff;
box-shadow: 0rpx 8rpx 16rpx 0rpx rgba(40, 48, 49, 0.04);
border-radius: 140rpx 140rpx 140rpx 140rpx;
border: 2rpx solid #f2f4f5;
.icon {
width: 36rpx;
height: 36rpx;
}
}
.send-date { .send-date {
text-align: center;
flex-shrink: 0; flex-shrink: 0;
font-size: 24rpx; font-size: 24rpx;
color: #283031; color: #283031;
@ -549,6 +571,7 @@ page {
box-sizing: border-box; box-sizing: border-box;
padding-bottom: 80rpx; padding-bottom: 80rpx;
background-color: transparent; background-color: transparent;
font-size: 32rpx;
.ka-container { .ka-container {
padding: 30rpx 62rpx; padding: 30rpx 62rpx;
display: flex; display: flex;
@ -558,6 +581,9 @@ page {
.stat { .stat {
font-size: 28rpx; font-size: 28rpx;
color: #adacb2; color: #adacb2;
&.red {
color: #ef3939;
}
} }
.send-btn { .send-btn {
width: 128rpx; width: 128rpx;

2
src/pages/d_interactiveDoctor/index.ts

@ -494,6 +494,8 @@ Page({
text: customMessage, text: customMessage,
patientId, patientId,
}, },
loading: true,
loadingText: '发送中...',
}).then((res) => { }).then((res) => {
if (res.errcode == 10001) { if (res.errcode == 10001) {
this.setData({ this.setData({

13
src/pages/d_interactiveDoctor/index.wxml

@ -153,10 +153,11 @@
</scroll-view> </scroll-view>
</view> </view>
<view class="page-footer"> <view class="page-footer">
<view class="send"> <view class="send" wx:if="{{doctor.IsOpenOneToOne==1}}">
<view class="content" catch:tap="handleInputShow">输入文字</view> <view class="content" catch:tap="handleInputShow">{{customMessage || '输入文字'}}</view>
<view class="btn" catch:tap="handleSendShow">发送消息</view> <view class="btn" catch:tap="handleSendShow">快捷回复</view>
</view> </view>
<view wx:else class="short-send" bind:tap="handleSendShow">发送消息</view>
<view class="send-date" bind:tap="handleSendDate"> <view class="send-date" bind:tap="handleSendDate">
<image class="icon" src="{{imageUrl}}za-images/3/icon-send-date.png?t={{Timestamp}}"></image> <image class="icon" src="{{imageUrl}}za-images/3/icon-send-date.png?t={{Timestamp}}"></image>
<view>出诊时间</view> <view>出诊时间</view>
@ -182,13 +183,13 @@
confirm-type="send" confirm-type="send"
adjust-keyboard-to="bottom" adjust-keyboard-to="bottom"
maxlength="{{500}}" maxlength="{{500}}"
placeholder="输入您的问题" placeholder="输入文字"
bind:blur="bindblur" bind:blur="bindblur"
bindconfirm="handleConfirm" bindconfirm="handleConfirm"
> >
<keyboard-accessory class="ka" hold-keyboard="{{true}}" style="background-color: #fff;"> <keyboard-accessory class="ka" hold-keyboard="{{true}}" style="background-color: #fff;">
<cover-view class="ka-container"> <cover-view class="ka-container">
<cover-view class="stat">{{customMessage.length}}/500</cover-view> <cover-view class="stat {{customMessage.length==500 && 'red'}}">{{customMessage.length}}/500</cover-view>
<cover-view class="send-btn" bind:tap="handleConfirm">发送</cover-view> <cover-view class="send-btn" bind:tap="handleConfirm">发送</cover-view>
</cover-view> </cover-view>
</keyboard-accessory> </keyboard-accessory>
@ -206,7 +207,7 @@
closeable closeable
> >
<view class="popup-message"> <view class="popup-message">
<view class="title">发送消息</view> <view class="title">快捷回复</view>
<view class="list"> <view class="list">
<view <view
class="l-item {{wordIndex===index && 'active'}}" class="l-item {{wordIndex===index && 'active'}}"

2
src/pages/d_invite/index.ts

@ -18,7 +18,7 @@ Page({
}) })
} }
app.waitLogin().then((_res) => { app.waitLogin().then((_res) => {
app.mpBehavior({ doctor:true, PageName: 'PG_DoctorCode' }) app.mpBehavior({ doctor: true, PageName: 'PG_DoctorCode' })
wx.showLoading({ wx.showLoading({
title: '加载中', title: '加载中',
}) })

1
src/pages/d_invite/index.wxml

@ -4,3 +4,4 @@
</view> </view>
<customPoster params="{{params}}" bind:finish="handlePosterFinish"></customPoster> <customPoster params="{{params}}" bind:finish="handlePosterFinish"></customPoster>

2
src/patient/pages/doctor/index.scss

@ -171,7 +171,7 @@ page {
margin-top: 16rpx; margin-top: 16rpx;
margin-right: 22rpx; margin-right: 22rpx;
display: inline-block; display: inline-block;
padding: 4rpx 16rpx 6rpx 16rpx; padding: 4rpx 16rpx 4rpx 16rpx;
line-height: 1; line-height: 1;
font-size: 22rpx; font-size: 22rpx;
color: #b982ff; color: #b982ff;

14
src/patient/pages/hospital/index.scss

@ -7,7 +7,6 @@
.banner { .banner {
padding: 44rpx 30rpx 0; padding: 44rpx 30rpx 0;
display: flex; display: flex;
align-items: center;
.hosttipat-img { .hosttipat-img {
flex-shrink: 0; flex-shrink: 0;
width: 180rpx; width: 180rpx;
@ -51,6 +50,7 @@
font-size: 32rpx; font-size: 32rpx;
color: #211d2e; color: #211d2e;
.icon { .icon {
margin-right: 10rpx;
width: 36rpx; width: 36rpx;
height: 36rpx; height: 36rpx;
vertical-align: -8rpx; vertical-align: -8rpx;
@ -86,15 +86,16 @@
line-height: 70rpx; line-height: 70rpx;
font-size: 32rpx; font-size: 32rpx;
color: #b982ff; color: #b982ff;
text-align: center;
border-radius: 60rpx 60rpx 60rpx 60rpx; border-radius: 60rpx 60rpx 60rpx 60rpx;
border: 1px solid #b982ff; border: 1px solid #b982ff;
display: flex;
align-items: center;
justify-content: center;
.icon { .icon {
margin-right: 8rpx; margin-right: 8rpx;
display: inline-block; display: inline-block;
width: 36rpx; width: 36rpx;
height: 36rpx; height: 36rpx;
vertical-align: middle;
} }
} }
.site { .site {
@ -103,14 +104,15 @@
font-size: 32rpx; font-size: 32rpx;
color: #ffffff; color: #ffffff;
border-radius: 60rpx; border-radius: 60rpx;
text-align: center;
background: linear-gradient(197deg, #ffbcf9 0%, #b982ff 100%); background: linear-gradient(197deg, #ffbcf9 0%, #b982ff 100%);
display: flex;
align-items: center;
justify-content: center;
.icon { .icon {
margin-right: 8rpx; margin-right: 8rpx;
display: inline-block; display: inline-block;
width: 32rpx; width: 32rpx;
height: 32rpx; height: 32rpx;
vertical-align: middle;
} }
} }
} }
@ -156,7 +158,7 @@
display: inline-block; display: inline-block;
width: 32rpx; width: 32rpx;
height: 32rpx; height: 32rpx;
vertical-align: middle; vertical-align: -6rpx;
} }
} }
.p { .p {

33
src/patient/pages/hospital/index.ts

@ -28,27 +28,26 @@ Page({
}) })
}, },
handleToggleSite() { handleToggleSite() {
const that = this
if (!this.data.LNG) { if (!this.data.LNG) {
wx.getSetting({ wx.getSetting({
success(res) { success: (res) => {
if ( if (
res.authSetting['scope.userFuzzyLocation'] != undefined res.authSetting['scope.userFuzzyLocation'] != undefined
&& res.authSetting['scope.userFuzzyLocation'] == true && res.authSetting['scope.userFuzzyLocation'] == true
) { ) {
// 获取当前位置 // 获取当前位置
that.getFuzzyLocation() this.getFuzzyLocation()
} }
else if (res.authSetting['scope.userFuzzyLocation'] == undefined) { else if (res.authSetting['scope.userFuzzyLocation'] == undefined) {
// 获取当前位置 // 获取当前位置
that.getFuzzyLocation() this.getFuzzyLocation()
} }
else { else {
wx.showModal({ wx.showModal({
title: '请求授权当前位置', title: '请求授权当前位置',
content: '需要获取您的地理位置,请确认授权', content: '需要获取您的地理位置,请确认授权',
confirmColor: '#8c75d0', confirmColor: '#8c75d0',
success(res) { success: (res) => {
if (res.cancel) { if (res.cancel) {
// 取消授权 // 取消授权
wx.showToast({ wx.showToast({
@ -56,12 +55,12 @@ Page({
icon: 'none', icon: 'none',
duration: 1000, duration: 1000,
}) })
that.getDetail() this.getDetail()
} }
else if (res.confirm) { else if (res.confirm) {
// 确定授权,通过wx.openSetting发起授权请求 // 确定授权,通过wx.openSetting发起授权请求
wx.openSetting({ wx.openSetting({
success(res) { success: (res) => {
if (res.authSetting['scope.userFuzzyLocation'] == true) { if (res.authSetting['scope.userFuzzyLocation'] == true) {
wx.showToast({ wx.showToast({
title: '授权成功', title: '授权成功',
@ -69,7 +68,7 @@ Page({
duration: 1000, duration: 1000,
}) })
// 再次授权,调用wx.getLocation的API // 再次授权,调用wx.getLocation的API
that.getFuzzyLocation() this.getFuzzyLocation()
} }
else { else {
wx.showToast({ wx.showToast({
@ -77,7 +76,7 @@ Page({
icon: 'none', icon: 'none',
duration: 1000, duration: 1000,
}) })
that.getDetail() this.getDetail()
} }
}, },
}) })
@ -89,7 +88,7 @@ Page({
}) })
} }
else { else {
that.setData({ this.setData({
LNG: '', LNG: '',
LAT: '', LAT: '',
}) })
@ -97,18 +96,16 @@ Page({
} }
}, },
getFuzzyLocation() { getFuzzyLocation() {
const that = this
wx.getFuzzyLocation({ wx.getFuzzyLocation({
success(res) { success: (res) => {
console.log(res) this.setData({
that.setData({
LNG: res.longitude, LNG: res.longitude,
LAT: res.latitude, LAT: res.latitude,
}) })
that.getDetail() this.getDetail()
}, },
fail() { fail: () => {
that.getDetail() this.getDetail()
}, },
}) })
}, },
@ -201,3 +198,5 @@ Page({
}, },
onPageScroll() {}, onPageScroll() {},
}) })
export {}

6
src/patient/pages/hospital/index.wxml

@ -31,9 +31,9 @@
<image class="icon" src="{{imageUrl}}icon95.png?t={{Timestamp}}"></image> <image class="icon" src="{{imageUrl}}icon95.png?t={{Timestamp}}"></image>
电话 电话
</view> </view>
<view class="site" bind:tap="handleSite" wx:if="{{detail.Address}}"> <view class="site" bind:tap="handleOpenMap" wx:if="{{detail.Address}}">
<image class="icon" src="{{imageUrl}}icon96.png?t={{Timestamp}}"></image> <image class="icon" src="{{imageUrl}}icon96.png?t={{Timestamp}}"></image>
地址{{detail.dist}} 地址 {{detail.dist}}
</view> </view>
</view> </view>
<view class="module" wx:if="{{detail.doctors && detail.doctors.length}}"> <view class="module" wx:if="{{detail.doctors && detail.doctors.length}}">
@ -52,7 +52,7 @@
<view class="content"> <view class="content">
<view class="name"> <view class="name">
{{item.Name}} {{item.Name}}
<image class="icon" src="{{imageUrl}}icon101.png?t={{Timestamp}}"></image> <image class="icon" wx:if="{{item.IsLively==1}}" src="{{imageUrl}}icon101.png?t={{Timestamp}}"></image>
</view> </view>
<view class="p ellipsis">{{item.Introduce}}</view> <view class="p ellipsis">{{item.Introduce}}</view>
<view class="row" wx:if="{[item.weekName]}"> <view class="row" wx:if="{[item.weekName]}">

17
src/patient/pages/index/index.scss

@ -21,7 +21,6 @@ page {
background: linear-gradient(195deg, #ffe3fc 0%, #ecddff 100%); background: linear-gradient(195deg, #ffe3fc 0%, #ecddff 100%);
.container { .container {
display: flex; display: flex;
align-items: center;
justify-content: space-between; justify-content: space-between;
border-radius: 21rpx; border-radius: 21rpx;
.avatar { .avatar {
@ -79,19 +78,19 @@ page {
} }
} }
} }
}
.content {
margin-top: 16rpx;
font-size: 32rpx;
line-height: 38rpx;
color: #211d2e;
.icon { .icon {
margin-left: 4rpx; vertical-align: -4rpx;
display: inline-block; display: inline-block;
width: 36rpx; width: 36rpx;
height: 36rpx; height: 36rpx;
} }
} }
.content {
margin-top: 16rpx;
font-size: 26rpx;
line-height: 38rpx;
color: rgba(51, 51, 51, 1);
}
.hostipal { .hostipal {
margin-top: 16rpx; margin-top: 16rpx;
font-size: 28rpx; font-size: 28rpx;
@ -104,7 +103,7 @@ page {
} }
.tag { .tag {
display: inline-block; display: inline-block;
padding: 4rpx 12rpx; padding: 6rpx 12rpx 4rpx;
font-size: 22rpx; font-size: 22rpx;
line-height: 1; line-height: 1;
color: #ffffff; color: #ffffff;

6
src/patient/pages/index/index.wxml

@ -22,10 +22,12 @@
<view class="name-wrap"> <view class="name-wrap">
<view class="name"> <view class="name">
<view class="n-content">{{zdUserInfo.ExclusiveDoctorName}}</view> <view class="n-content">{{zdUserInfo.ExclusiveDoctorName}}</view>
<image wx:if="{{unreadCount}}" class="icon" src="{{imageUrl}}/icon31.png?t={{Timestamp}}"></image>
</view> </view>
</view> </view>
<view class="content" wx:if="{{unreadCount}}">医生给您留言了,记得查看!</view> <view class="content" wx:if="{{unreadCount}}">
医生给您留言了,记得查看!
<image class="icon" src="{{imageUrl}}/icon31.png?t={{Timestamp}}"></image>
</view>
<view class="hostipal" wx:else> <view class="hostipal" wx:else>
<view class="h-content">{{zdUserInfo.ExclusiveDoctorHospitalName}}</view> <view class="h-content">{{zdUserInfo.ExclusiveDoctorHospitalName}}</view>
<view <view

10
src/patient/pages/infusionCenter/index.scss

@ -46,15 +46,16 @@
line-height: 70rpx; line-height: 70rpx;
font-size: 32rpx; font-size: 32rpx;
color: #b982ff; color: #b982ff;
text-align: center;
border-radius: 60rpx 60rpx 60rpx 60rpx; border-radius: 60rpx 60rpx 60rpx 60rpx;
border: 1px solid #b982ff; border: 1px solid #b982ff;
display: flex;
align-items: center;
justify-content: center;
.icon { .icon {
margin-right: 8rpx; margin-right: 8rpx;
display: inline-block; display: inline-block;
width: 36rpx; width: 36rpx;
height: 36rpx; height: 36rpx;
vertical-align: middle;
} }
} }
.site { .site {
@ -63,14 +64,15 @@
font-size: 32rpx; font-size: 32rpx;
color: #ffffff; color: #ffffff;
border-radius: 60rpx; border-radius: 60rpx;
text-align: center;
background: linear-gradient(197deg, #ffbcf9 0%, #b982ff 100%); background: linear-gradient(197deg, #ffbcf9 0%, #b982ff 100%);
display: flex;
align-items: center;
justify-content: center;
.icon { .icon {
margin-right: 8rpx; margin-right: 8rpx;
display: inline-block; display: inline-block;
width: 32rpx; width: 32rpx;
height: 32rpx; height: 32rpx;
vertical-align: middle;
} }
} }
} }

87
src/patient/pages/infusionCenter/index.ts

@ -4,22 +4,107 @@ Page({
data: { data: {
id: '', id: '',
detail: {} as any, detail: {} as any,
LNG: '' as number | string,
LAT: '' as number | string,
}, },
onLoad(options) { onLoad(options) {
this.setData({ this.setData({
id: options.id, id: options.id,
}) })
app.waitLogin({ type: [0, 1] }).then(() => { app.waitLogin({ type: [0, 1] }).then(() => {
this.handleToggleSite()
})
},
handleToggleSite() {
if (!this.data.LNG) {
wx.getSetting({
success: (res) => {
if (
res.authSetting['scope.userFuzzyLocation'] != undefined
&& res.authSetting['scope.userFuzzyLocation'] == true
) {
// 获取当前位置
this.getFuzzyLocation()
}
else if (res.authSetting['scope.userFuzzyLocation'] == undefined) {
// 获取当前位置
this.getFuzzyLocation()
}
else {
wx.showModal({
title: '请求授权当前位置',
content: '需要获取您的地理位置,请确认授权',
confirmColor: '#8c75d0',
success: (res) => {
if (res.cancel) {
// 取消授权
wx.showToast({
title: '拒绝授权',
icon: 'none',
duration: 1000,
})
this.getDetail() this.getDetail()
}
else if (res.confirm) {
// 确定授权,通过wx.openSetting发起授权请求
wx.openSetting({
success: (res) => {
if (res.authSetting['scope.userFuzzyLocation'] == true) {
wx.showToast({
title: '授权成功',
icon: 'success',
duration: 1000,
})
// 再次授权,调用wx.getLocation的API
this.getFuzzyLocation()
}
else {
wx.showToast({
title: '授权失败',
icon: 'none',
duration: 1000,
})
this.getDetail()
}
},
})
}
},
})
}
},
})
}
else {
this.setData({
LNG: '',
LAT: '',
})
this.getDetail()
}
},
getFuzzyLocation() {
wx.getFuzzyLocation({
success: (res) => {
this.setData({
LNG: res.longitude,
LAT: res.latitude,
})
this.getDetail()
},
fail: () => {
this.getDetail()
},
}) })
}, },
getDetail() { getDetail() {
wx.ajax({ wx.ajax({
method: 'GET', method: 'GET',
url: '?r=xd/infusion-center/detail', url: '?r=xd/infusion-center/detail',
data: { data: {
Id: this.data.id, Id: this.data.id,
lng: this.data.LNG,
lat: this.data.LAT,
}, },
}).then((res) => { }).then((res) => {
this.setData({ this.setData({

25
src/patient/pages/interactivePatient/index.scss

@ -13,7 +13,6 @@ page {
margin: 0 30rpx; margin: 0 30rpx;
padding: 30rpx; padding: 30rpx;
display: flex; display: flex;
align-items: center;
justify-content: space-between; justify-content: space-between;
border-radius: 24rpx; border-radius: 24rpx;
background-color: #fff; background-color: #fff;
@ -32,8 +31,11 @@ page {
} }
.content { .content {
margin-top: 8rpx; margin-top: 8rpx;
.c-name {
font-size: 28rpx; font-size: 28rpx;
color: rgba(173, 172, 178, 1); color: rgba(173, 172, 178, 1);
margin-right: 10rpx;
}
.tag { .tag {
display: inline-block; display: inline-block;
font-size: 24rpx; font-size: 24rpx;
@ -463,7 +465,7 @@ page {
} }
} }
.status { .status {
margin-bottom: 32rpx; margin: 0 0 32rpx;
text-align: center; text-align: center;
font-size: 28rpx; font-size: 28rpx;
color: #adacb2; color: #adacb2;
@ -480,7 +482,7 @@ page {
border-radius: 24rpx 24rpx 0 0; border-radius: 24rpx 24rpx 0 0;
background-color: #fff; background-color: #fff;
transition: all 0.3s; transition: all 0.3s;
height: calc(124rpx + env(safe-area-inset-bottom)); height: 184rpx;
box-sizing: border-box; box-sizing: border-box;
.unread { .unread {
position: absolute; position: absolute;
@ -513,14 +515,20 @@ page {
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
.custom-input { .custom-input {
flex-shrink: 0;
width: 424rpx;
box-sizing: border-box;
text-indent: 40rpx; text-indent: 40rpx;
flex: 1; padding-right: 40rpx;
height: 72rpx; height: 72rpx;
background: #f6f8f9; background: #f6f8f9;
line-height: 72rpx; line-height: 72rpx;
border-radius: 98rpx; border-radius: 98rpx;
font-size: 32rpx; font-size: 32rpx;
color: #adacb2; color: #adacb2;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
&.active { &.active {
color: #211d2e; color: #211d2e;
overflow: hidden; overflow: hidden;
@ -529,6 +537,7 @@ page {
} }
} }
.shortcut { .shortcut {
flex: 1;
width: 244rpx; width: 244rpx;
height: 72rpx; height: 72rpx;
background: #ffffff; background: #ffffff;
@ -632,8 +641,8 @@ page {
transition: all 0.3s; transition: all 0.3s;
.icon { .icon {
position: relative; position: relative;
width: 36rpx; width: 44rpx;
height: 36rpx; height: 44rpx;
overflow: visible; overflow: visible;
&::after { &::after {
content: ''; content: '';
@ -659,6 +668,7 @@ page {
box-sizing: border-box; box-sizing: border-box;
padding-bottom: 80rpx; padding-bottom: 80rpx;
background-color: transparent; background-color: transparent;
font-size: 32rpx;
.ka-container { .ka-container {
padding: 30rpx 62rpx; padding: 30rpx 62rpx;
display: flex; display: flex;
@ -668,6 +678,9 @@ page {
.stat { .stat {
font-size: 28rpx; font-size: 28rpx;
color: #adacb2; color: #adacb2;
&.red {
color: #ef3939;
}
} }
.send-btn { .send-btn {
width: 128rpx; width: 128rpx;

2
src/patient/pages/interactivePatient/index.ts

@ -369,6 +369,8 @@ Page({
data: { data: {
text: customMessage, text: customMessage,
}, },
loading: true,
loadingText: '发送中...',
}).then((res) => { }).then((res) => {
if (res.errcode == 10001) { if (res.errcode == 10001) {
this.setData({ this.setData({

10
src/patient/pages/interactivePatient/index.wxml

@ -13,7 +13,7 @@
<view class="wrap"> <view class="wrap">
<view class="name">{{doctorDetail.doctorName}}</view> <view class="name">{{doctorDetail.doctorName}}</view>
<view class="content"> <view class="content">
{{doctorDetail.hospitalName}} <div class="c-name">{{doctorDetail.hospitalName}}</div>
<view class="tag">{{doctorDetail.hospitalClassificationName}}{{doctorDetail.hospitalLevelName}}</view> <view class="tag">{{doctorDetail.hospitalClassificationName}}{{doctorDetail.hospitalLevelName}}</view>
</view> </view>
</view> </view>
@ -171,10 +171,12 @@
</view> </view>
<view class="line"></view> <view class="line"></view>
<view class="title" wx:if="{{!expend}}"> <view class="title" wx:if="{{!expend}}">
<view class="custom-input" catch:tap="handleFooterInput">输入您的问题</view> <view class="custom-input" wx:if="{{doctorDetail.isOpenOneToOne == 1}}" catch:tap="handleFooterInput">
{{customMessage || '输入您的问题'}}
</view>
<view class="shortcut" catch:tap="handleFooterShortcut"> <view class="shortcut" catch:tap="handleFooterShortcut">
<image class="icon" src="{{imageUrl}}za-images//doctor/icon-message.png?t={{Timestamp}}"></image> <image class="icon" src="{{imageUrl}}za-images//doctor/icon-message.png?t={{Timestamp}}"></image>
快捷提问 {{doctorDetail.isOpenOneToOne == 1 ? '快捷提问':'请选择您要咨询的问题'}}
</view> </view>
</view> </view>
<block wx:if="{{expend}}"> <block wx:if="{{expend}}">
@ -237,7 +239,7 @@
> >
<keyboard-accessory class="ka" hold-keyboard="{{true}}" style="background-color: #fff;"> <keyboard-accessory class="ka" hold-keyboard="{{true}}" style="background-color: #fff;">
<cover-view class="ka-container"> <cover-view class="ka-container">
<cover-view class="stat">{{customMessage.length}}/500</cover-view> <cover-view class="stat {{customMessage.length == 500 && 'red'}}">{{customMessage.length}}/500</cover-view>
<cover-view class="send-btn" bind:tap="handleConfirm">发送</cover-view> <cover-view class="send-btn" bind:tap="handleConfirm">发送</cover-view>
</cover-view> </cover-view>
</keyboard-accessory> </keyboard-accessory>

2
src/patient/pages/liveResult/index.wxml

@ -17,7 +17,7 @@
<view class="go-live" wx:if="{{detail.BeginTimeValue * 1 < dateValue * 1 && detail.Type==1}}" bind:tap="handleLive"> <view class="go-live" wx:if="{{detail.BeginTimeValue * 1 < dateValue * 1 && detail.Type==1}}" bind:tap="handleLive">
立即进入直播间 立即进入直播间
</view> </view>
<button wx:else open-type="share" class="btn btn2">分享活动</button> <button wx:else open-type="share" class="go-live">分享活动</button>
<view class="office"> <view class="office">
<view class="o-title">关注公众号,活动提醒不错过</view> <view class="o-title">关注公众号,活动提醒不错过</view>
<image class="code" src="{{qrCode}}" show-menu-by-longpress></image> <image class="code" src="{{qrCode}}" show-menu-by-longpress></image>

29
src/utils/request.ts

@ -2,14 +2,21 @@ interface IGlobalParams {
gUrl: string gUrl: string
} }
export const request = function ( export function request({ gUrl }: IGlobalParams, {
{ gUrl }: IGlobalParams, url,
{ url, method, data, header, showMsg = true, loading = false, isJSON = false, ...options }: IAgaxParams, method,
): Promise<any> { data,
header,
showMsg = true,
loading = false,
loadingText = '加载中...',
isJSON = false,
...options
}: IAgaxParams): Promise<any> {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if (loading) { if (loading) {
wx.showLoading({ wx.showLoading({
title: '加载中...', title: loadingText,
mask: true, mask: true,
}) })
} }
@ -29,9 +36,11 @@ export const request = function (
const { code, data } = res.data const { code, data } = res.data
if (isJSON) { if (isJSON) {
resolve(res.data) resolve(res.data)
} else if (code === 0) { }
else if (code === 0) {
resolve(data) resolve(data)
} else if (showMsg) { }
else if (showMsg) {
const msg = errPicker(res.data) const msg = errPicker(res.data)
if (loading) { if (loading) {
setTimeout(() => { setTimeout(() => {
@ -40,14 +49,16 @@ export const request = function (
icon: 'none', icon: 'none',
}) })
}, 30) }, 30)
} else { }
else {
wx.showToast({ wx.showToast({
title: msg, title: msg,
icon: 'none', icon: 'none',
}) })
reject(res) reject(res)
} }
} else { }
else {
reject(res) reject(res)
} }
}, },

1
typings/index.d.ts vendored

@ -52,6 +52,7 @@ interface IAppOption {
interface IAgaxParams extends WechatMiniprogram.RequestOption { interface IAgaxParams extends WechatMiniprogram.RequestOption {
showMsg?: boolean showMsg?: boolean
loading?: boolean loading?: boolean
loadingText?: string
isJSON?: boolean isJSON?: boolean
} }

Loading…
Cancel
Save