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

4
src/components/popup/index.scss

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

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

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

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

@ -4,22 +4,108 @@ Page({ @@ -4,22 +4,108 @@ Page({
data: {
id: '',
detail: {} as any,
LNG: '' as number | string,
LAT: '' as number | string,
},
onLoad(options) {
this.setData({
id: options.id,
})
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()
}
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() {
wx.ajax({
method: 'GET',
url: '?r=zd/dtp-pharmacy/detail',
data: {
Id: this.data.id,
lng: this.data.LNG,
lat: this.data.LAT,
},
}).then((res) => {
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 { @@ -468,14 +468,15 @@ page {
padding: 32rpx 30rpx calc(32rpx + env(safe-area-inset-bottom));
box-sizing: border-box;
display: flex;
gap: 10rpx;
gap: 20rpx;
border-radius: 32rpx 32rpx 0 0;
box-shadow: 0rpx 8rpx 16rpx 0rpx rgba(40, 48, 49, 0.04);
border: 2rpx solid #ffffff;
background-color: #fff;
.send {
padding: 0 12rpx 0 32rpx;
flex: 1;
padding: 0 12rpx 0 32rpx;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: space-between;
@ -485,6 +486,9 @@ page { @@ -485,6 +486,9 @@ page {
padding: 10rpx 0;
flex: 1;
color: #adacb2;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.btn {
flex-shrink: 0;
@ -498,7 +502,25 @@ page { @@ -498,7 +502,25 @@ page {
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 {
text-align: center;
flex-shrink: 0;
font-size: 24rpx;
color: #283031;
@ -549,6 +571,7 @@ page { @@ -549,6 +571,7 @@ page {
box-sizing: border-box;
padding-bottom: 80rpx;
background-color: transparent;
font-size: 32rpx;
.ka-container {
padding: 30rpx 62rpx;
display: flex;
@ -558,6 +581,9 @@ page { @@ -558,6 +581,9 @@ page {
.stat {
font-size: 28rpx;
color: #adacb2;
&.red {
color: #ef3939;
}
}
.send-btn {
width: 128rpx;

2
src/pages/d_interactiveDoctor/index.ts

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

13
src/pages/d_interactiveDoctor/index.wxml

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

2
src/pages/d_invite/index.ts

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

1
src/pages/d_invite/index.wxml

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

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

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

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

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

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

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

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

@ -31,9 +31,9 @@ @@ -31,9 +31,9 @@
<image class="icon" src="{{imageUrl}}icon95.png?t={{Timestamp}}"></image>
电话
</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>
地址{{detail.dist}}
地址 {{detail.dist}}
</view>
</view>
<view class="module" wx:if="{{detail.doctors && detail.doctors.length}}">
@ -52,7 +52,7 @@ @@ -52,7 +52,7 @@
<view class="content">
<view class="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 class="p ellipsis">{{item.Introduce}}</view>
<view class="row" wx:if="{[item.weekName]}">

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

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

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

@ -22,10 +22,12 @@ @@ -22,10 +22,12 @@
<view class="name-wrap">
<view class="name">
<view class="n-content">{{zdUserInfo.ExclusiveDoctorName}}</view>
<image wx:if="{{unreadCount}}" class="icon" src="{{imageUrl}}/icon31.png?t={{Timestamp}}"></image>
</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="h-content">{{zdUserInfo.ExclusiveDoctorHospitalName}}</view>
<view

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

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

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

@ -4,22 +4,107 @@ Page({ @@ -4,22 +4,107 @@ Page({
data: {
id: '',
detail: {} as any,
LNG: '' as number | string,
LAT: '' as number | string,
},
onLoad(options) {
this.setData({
id: options.id,
})
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()
}
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() {
wx.ajax({
method: 'GET',
url: '?r=xd/infusion-center/detail',
data: {
Id: this.data.id,
lng: this.data.LNG,
lat: this.data.LAT,
},
}).then((res) => {
this.setData({

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

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

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

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

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

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
<view class="wrap">
<view class="name">{{doctorDetail.doctorName}}</view>
<view class="content">
{{doctorDetail.hospitalName}}
<div class="c-name">{{doctorDetail.hospitalName}}</div>
<view class="tag">{{doctorDetail.hospitalClassificationName}}{{doctorDetail.hospitalLevelName}}</view>
</view>
</view>
@ -171,10 +171,12 @@ @@ -171,10 +171,12 @@
</view>
<view class="line"></view>
<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">
<image class="icon" src="{{imageUrl}}za-images//doctor/icon-message.png?t={{Timestamp}}"></image>
快捷提问
{{doctorDetail.isOpenOneToOne == 1 ? '快捷提问':'请选择您要咨询的问题'}}
</view>
</view>
<block wx:if="{{expend}}">
@ -237,7 +239,7 @@ @@ -237,7 +239,7 @@
>
<keyboard-accessory class="ka" hold-keyboard="{{true}}" style="background-color: #fff;">
<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>
</keyboard-accessory>

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

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

29
src/utils/request.ts

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

1
typings/index.d.ts vendored

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

Loading…
Cancel
Save