hh-doctor-sdk 0.6.8 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/consultation/list/behaviors/consultation-list-base-behaviors.js +3 -2
- package/components/consultation/list/consultation-list-page.js +17 -2
- package/components/consultation/list/consultation-list-page.wxml +11 -2
- package/components/consultation/list/consultation-list-page.wxss +29 -0
- package/components/video-chat-page/behaviors/chat-log-behaviors.js +1 -3
- package/package.json +1 -1
|
@@ -39,7 +39,7 @@ module.exports = Behavior({
|
|
|
39
39
|
loadList() {
|
|
40
40
|
wx.showNavigationBarLoading()
|
|
41
41
|
this.setData({
|
|
42
|
-
|
|
42
|
+
isLoading: true
|
|
43
43
|
})
|
|
44
44
|
api.orderList().then((res) => {
|
|
45
45
|
wx.hideNavigationBarLoading()
|
|
@@ -61,7 +61,8 @@ module.exports = Behavior({
|
|
|
61
61
|
let showEmpty = orderGroups.length === 0
|
|
62
62
|
this.setData({
|
|
63
63
|
orderGroup: orderGroups,
|
|
64
|
-
showEmpty: showEmpty
|
|
64
|
+
showEmpty: showEmpty,
|
|
65
|
+
isLoading: false
|
|
65
66
|
})
|
|
66
67
|
}
|
|
67
68
|
},
|
|
@@ -11,7 +11,8 @@ Page({
|
|
|
11
11
|
*/
|
|
12
12
|
data: {
|
|
13
13
|
init: false,
|
|
14
|
-
isLogin: false
|
|
14
|
+
isLogin: false,
|
|
15
|
+
isLoading: true,
|
|
15
16
|
},
|
|
16
17
|
|
|
17
18
|
/**
|
|
@@ -30,12 +31,22 @@ Page({
|
|
|
30
31
|
* 生命周期函数--监听页面显示
|
|
31
32
|
*/
|
|
32
33
|
onShow() {
|
|
34
|
+
// 初始显示loading状态
|
|
35
|
+
this.setData({
|
|
36
|
+
isLoading: true,
|
|
37
|
+
isLogin: false
|
|
38
|
+
})
|
|
39
|
+
|
|
33
40
|
if (!wx.loginConfig || !wx.loginConfig.judgeLogin) {
|
|
34
41
|
wx.showToast({
|
|
35
42
|
title: '未配置登录检测',
|
|
36
43
|
})
|
|
44
|
+
this.setData({
|
|
45
|
+
isLoading: false
|
|
46
|
+
})
|
|
37
47
|
return
|
|
38
48
|
}
|
|
49
|
+
|
|
39
50
|
const judgeLogin = wx.loginConfig.judgeLogin()
|
|
40
51
|
if (judgeLogin) {
|
|
41
52
|
wx.statLog.sendStatLog(null, '打开咨询单列表界面')
|
|
@@ -47,6 +58,9 @@ Page({
|
|
|
47
58
|
doctorId: doctorId
|
|
48
59
|
})
|
|
49
60
|
if (!doctorId) {
|
|
61
|
+
this.setData({
|
|
62
|
+
isLoading: false
|
|
63
|
+
})
|
|
50
64
|
wx.showModal({
|
|
51
65
|
title: "提示",
|
|
52
66
|
showCancel: false,
|
|
@@ -81,7 +95,8 @@ Page({
|
|
|
81
95
|
}
|
|
82
96
|
} else {
|
|
83
97
|
this.setData({
|
|
84
|
-
isLogin: false
|
|
98
|
+
isLogin: false,
|
|
99
|
+
isLoading: false
|
|
85
100
|
})
|
|
86
101
|
// wx.showModal({
|
|
87
102
|
// showCancel: true,
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
<view class="match-parent">
|
|
2
|
-
|
|
2
|
+
<!-- Loading状态 -->
|
|
3
|
+
<view wx:if="{{isLoading}}" class="loading-body">
|
|
4
|
+
<view class="loading-spinner"></view>
|
|
5
|
+
<view class="loading-text">加载中...</view>
|
|
6
|
+
</view>
|
|
7
|
+
|
|
8
|
+
<!-- 已登录且有数据时显示列表 -->
|
|
9
|
+
<view wx:elif="{{isLogin && !showEmpty}}" class="order-list-body">
|
|
3
10
|
<block wx:for="{{orderGroup}}" wx:key="orderGroup" wx:for-item="group">
|
|
4
11
|
<view
|
|
5
12
|
id="{{group.sectionId}}"
|
|
@@ -48,7 +55,9 @@
|
|
|
48
55
|
</view>
|
|
49
56
|
</block>
|
|
50
57
|
</view>
|
|
51
|
-
|
|
58
|
+
|
|
59
|
+
<!-- 空数据状态 -->
|
|
60
|
+
<view wx:else class="empty-body">
|
|
52
61
|
<image class="empty-body-image"
|
|
53
62
|
src="https://image.hh-medic.com/icon/pacs/hh_icon_no_order_data.png"
|
|
54
63
|
/>
|
|
@@ -141,4 +141,33 @@ page {
|
|
|
141
141
|
.empty-body-text {
|
|
142
142
|
color: #999999;
|
|
143
143
|
font-size: 30rpx;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.loading-body {
|
|
147
|
+
width: 100%;
|
|
148
|
+
height: 100%;
|
|
149
|
+
display: flex;
|
|
150
|
+
flex-direction: column;
|
|
151
|
+
align-items: center;
|
|
152
|
+
justify-content: center;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.loading-spinner {
|
|
156
|
+
width: 60rpx;
|
|
157
|
+
height: 60rpx;
|
|
158
|
+
border: 4rpx solid #f3f3f3;
|
|
159
|
+
border-top: 4rpx solid #0c92f0;
|
|
160
|
+
border-radius: 50%;
|
|
161
|
+
animation: spin 1s linear infinite;
|
|
162
|
+
margin-bottom: 20rpx;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
@keyframes spin {
|
|
166
|
+
0% { transform: rotate(0deg); }
|
|
167
|
+
100% { transform: rotate(360deg); }
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.loading-text {
|
|
171
|
+
color: #666666;
|
|
172
|
+
font-size: 28rpx;
|
|
144
173
|
}
|