hh-doctor-sdk 0.0.9 → 0.1.1
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/detail/consultation-detail-page.wxml +6 -1
- package/components/consultation/list/behaviors/consultation-list-base-behaviors.js +6 -3
- package/components/consultation/list/consultation-list-page.js +22 -12
- package/components/consultation/list/consultation-list-page.json +2 -1
- package/components/consultation/list/consultation-list-page.wxml +9 -1
- package/components/hh-doctor.js +7 -0
- package/components/utils/httpUtils.js +2 -2
- package/package.json +1 -1
- package/components/utils/uiUtil.js +0 -7
|
@@ -7,7 +7,12 @@
|
|
|
7
7
|
/>
|
|
8
8
|
本咨询为视频咨询,请设置你方便的视频时间</view
|
|
9
9
|
>
|
|
10
|
-
<scroll-view
|
|
10
|
+
<scroll-view
|
|
11
|
+
class="scroll-view"
|
|
12
|
+
scroll-y
|
|
13
|
+
scroll-into-view="{{scrollTo}}"
|
|
14
|
+
type="list"
|
|
15
|
+
>
|
|
11
16
|
<view class="consultation-header" wx:if="{{order}}">
|
|
12
17
|
<block wx:for="{{headerTexts}}" wx:key="text">
|
|
13
18
|
<detail-text
|
|
@@ -36,16 +36,19 @@ module.exports = Behavior({
|
|
|
36
36
|
|
|
37
37
|
methods: {
|
|
38
38
|
loadList() {
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
this.setData({
|
|
40
|
+
triggered: true
|
|
41
41
|
})
|
|
42
42
|
api.orderList().then((res) => {
|
|
43
|
-
|
|
43
|
+
this.setData({
|
|
44
|
+
triggered: false
|
|
45
|
+
})
|
|
44
46
|
this._buildOrderGroupInfo(res.data)
|
|
45
47
|
})
|
|
46
48
|
},
|
|
47
49
|
|
|
48
50
|
_buildOrderGroupInfo(orderModel) {
|
|
51
|
+
// console.error(JSON.stringify(orderModel))
|
|
49
52
|
if (orderModel) {
|
|
50
53
|
var orderGroups = []
|
|
51
54
|
// if (orderModel.requestOrderList) {
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
const doctorLoader = require('../../public/doctor-loader')
|
|
2
|
-
|
|
3
|
-
judgeLogin
|
|
4
|
-
} = require('../../utils/uiUtil')
|
|
2
|
+
|
|
5
3
|
Page({
|
|
6
4
|
|
|
7
5
|
|
|
@@ -12,6 +10,7 @@ Page({
|
|
|
12
10
|
*/
|
|
13
11
|
data: {
|
|
14
12
|
needRefresh: false,
|
|
13
|
+
triggered: false,
|
|
15
14
|
},
|
|
16
15
|
|
|
17
16
|
/**
|
|
@@ -30,7 +29,14 @@ Page({
|
|
|
30
29
|
* 生命周期函数--监听页面显示
|
|
31
30
|
*/
|
|
32
31
|
onShow() {
|
|
33
|
-
if (judgeLogin
|
|
32
|
+
if (wx.loginConfig && wx.loginConfig.judgeLogin) {
|
|
33
|
+
wx.showToast({
|
|
34
|
+
title: '未配置登录检测',
|
|
35
|
+
})
|
|
36
|
+
return
|
|
37
|
+
}
|
|
38
|
+
const judgeLogin = wx.loginConfig.judgeLogin()
|
|
39
|
+
if (judgeLogin) {
|
|
34
40
|
wx.statLog.sendStatLog(null, '打开咨询单列表界面')
|
|
35
41
|
const doctorId = wx.getStorageSync('doctorId') || ''
|
|
36
42
|
const isTest = (getApp().globalData.profileName || 'prod') == 'test'
|
|
@@ -50,15 +56,19 @@ Page({
|
|
|
50
56
|
confirmColor: "#0066ff",
|
|
51
57
|
content: "您还未登录,是否去登录?",
|
|
52
58
|
complete: (res) => {
|
|
53
|
-
if (
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
59
|
+
if (wx.loginConfig && wx.loginConfig.judgeLogin) {
|
|
60
|
+
if (res.cancel) {
|
|
61
|
+
// wx.switchTab({
|
|
62
|
+
// url: '/pages/recommend/recommend',
|
|
63
|
+
// })
|
|
64
|
+
wx.loginConfig.judgeLogin(false)
|
|
65
|
+
}
|
|
57
66
|
}
|
|
58
67
|
if (res.confirm) {
|
|
59
|
-
wx.navigateTo({
|
|
60
|
-
|
|
61
|
-
})
|
|
68
|
+
// wx.navigateTo({
|
|
69
|
+
// url: '/pkgMine/pages/mine/loginpage',
|
|
70
|
+
// })
|
|
71
|
+
wx.loginConfig.judgeLogin(true)
|
|
62
72
|
}
|
|
63
73
|
}
|
|
64
74
|
})
|
|
@@ -85,7 +95,7 @@ Page({
|
|
|
85
95
|
* 页面相关事件处理函数--监听用户下拉动作
|
|
86
96
|
*/
|
|
87
97
|
onPullDownRefresh() {
|
|
88
|
-
|
|
98
|
+
this.loadList()
|
|
89
99
|
},
|
|
90
100
|
|
|
91
101
|
/**
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
<view class="match-parent">
|
|
2
|
-
<scroll-view
|
|
2
|
+
<scroll-view
|
|
3
|
+
class="scroll-view"
|
|
4
|
+
type="list"
|
|
5
|
+
scroll-y
|
|
6
|
+
scroll-into-view="{{scrollTo}}"
|
|
7
|
+
refresher-enabled="true"
|
|
8
|
+
bindrefresherrefresh="onPullDownRefresh"
|
|
9
|
+
refresher-triggered="{{triggered}}"
|
|
10
|
+
>
|
|
3
11
|
<view class="chatting-body">
|
|
4
12
|
<block
|
|
5
13
|
wx:for="{{orderGroup}}"
|
package/components/hh-doctor.js
CHANGED
|
@@ -28,9 +28,16 @@ function initSDK() {
|
|
|
28
28
|
wx.baseNavigationPath = '/miniprogram_npm/hh-doctor-sdk/'
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
function setLoginCheck(judgeLogin, directLogin) {
|
|
32
|
+
wx.loginConfig = {}
|
|
33
|
+
wx.loginConfig.judgeLogin = judgeLogin
|
|
34
|
+
wx.loginConfig.directLogin = directLogin
|
|
35
|
+
}
|
|
36
|
+
|
|
31
37
|
module.exports = {
|
|
32
38
|
initSDK,
|
|
33
39
|
initEventBus,
|
|
34
40
|
initTim,
|
|
35
41
|
initStatLog,
|
|
42
|
+
setLoginCheck,
|
|
36
43
|
}
|
|
@@ -96,10 +96,10 @@ function _request(request, method, params, data) {
|
|
|
96
96
|
setCookie(res.header['Set-Cookie']);
|
|
97
97
|
}
|
|
98
98
|
if (success(res)) {
|
|
99
|
-
console.error(`success => ${JSON.stringify(res.data)}`)
|
|
99
|
+
// console.error(`success => ${JSON.stringify(res.data)}`)
|
|
100
100
|
resolve(res.data);
|
|
101
101
|
} else {
|
|
102
|
-
console.error(`failed => ${JSON.stringify(res.data)}`)
|
|
102
|
+
// console.error(`failed => ${JSON.stringify(res.data)}`)
|
|
103
103
|
reject(res.data);
|
|
104
104
|
}
|
|
105
105
|
},
|
package/package.json
CHANGED