hh-doctor-sdk 0.1.0 → 0.1.2
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/consultation-list-page.js +23 -13
- package/components/consultation/list/consultation-list-page.wxml +1 -0
- package/components/hh-doctor.js +8 -0
- 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
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
const doctorLoader = require('../../public/doctor-loader')
|
|
2
|
-
const {
|
|
3
|
-
judgeLogin
|
|
4
|
-
} = require('../../utils/uiUtil')
|
|
5
2
|
|
|
6
3
|
Page({
|
|
7
4
|
|
|
@@ -32,7 +29,14 @@ Page({
|
|
|
32
29
|
* 生命周期函数--监听页面显示
|
|
33
30
|
*/
|
|
34
31
|
onShow() {
|
|
35
|
-
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) {
|
|
36
40
|
wx.statLog.sendStatLog(null, '打开咨询单列表界面')
|
|
37
41
|
const doctorId = wx.getStorageSync('doctorId') || ''
|
|
38
42
|
const isTest = (getApp().globalData.profileName || 'prod') == 'test'
|
|
@@ -52,16 +56,22 @@ Page({
|
|
|
52
56
|
confirmColor: "#0066ff",
|
|
53
57
|
content: "您还未登录,是否去登录?",
|
|
54
58
|
complete: (res) => {
|
|
55
|
-
if (
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
59
|
+
if (wx.loginConfig && wx.loginConfig.judgeLogin) {
|
|
60
|
+
if (res.cancel) {
|
|
61
|
+
// wx.switchTab({
|
|
62
|
+
// url: '/pages/recommend/recommend',
|
|
63
|
+
// })
|
|
64
|
+
wx.loginConfig.directLogin(false)
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (res.confirm) {
|
|
68
|
+
// wx.navigateTo({
|
|
69
|
+
// url: '/pkgMine/pages/mine/loginpage',
|
|
70
|
+
// })
|
|
71
|
+
wx.loginConfig.directLogin(true)
|
|
72
|
+
}
|
|
64
73
|
}
|
|
74
|
+
|
|
65
75
|
}
|
|
66
76
|
})
|
|
67
77
|
}
|
package/components/hh-doctor.js
CHANGED
|
@@ -28,9 +28,17 @@ function initSDK() {
|
|
|
28
28
|
wx.baseNavigationPath = '/miniprogram_npm/hh-doctor-sdk/'
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
function setLoginCheck(judgeLogin, directLogin) {
|
|
32
|
+
console.error('增加登录检测配置===>')
|
|
33
|
+
wx.loginConfig = {}
|
|
34
|
+
wx.loginConfig.judgeLogin = judgeLogin
|
|
35
|
+
wx.loginConfig.directLogin = directLogin
|
|
36
|
+
}
|
|
37
|
+
|
|
31
38
|
module.exports = {
|
|
32
39
|
initSDK,
|
|
33
40
|
initEventBus,
|
|
34
41
|
initTim,
|
|
35
42
|
initStatLog,
|
|
43
|
+
setLoginCheck,
|
|
36
44
|
}
|
package/package.json
CHANGED