hh-doctor-sdk 0.7.3 → 0.7.5
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.
|
@@ -14,6 +14,10 @@ const apiPaths = {
|
|
|
14
14
|
hostType: hostDefine.hostTypes.order,
|
|
15
15
|
path: '/doctor/doctorinfo'
|
|
16
16
|
},
|
|
17
|
+
getAccountInfo: {
|
|
18
|
+
hostType: hostDefine.hostTypes.order,
|
|
19
|
+
path: '/doctor/get_account_info'
|
|
20
|
+
},
|
|
17
21
|
getRoomId: {
|
|
18
22
|
hostType: hostDefine.hostTypes.order,
|
|
19
23
|
path: '/ordercreate/getRoomId'
|
|
@@ -104,6 +108,14 @@ function getDoctorInfo(doctorId) {
|
|
|
104
108
|
return httpUtils.get(apiPaths.getDoctor, params, null)
|
|
105
109
|
}
|
|
106
110
|
|
|
111
|
+
function getAccountInfo(doctorId) {
|
|
112
|
+
const params = {
|
|
113
|
+
doctor_id: doctorId,
|
|
114
|
+
user_id: doctorId
|
|
115
|
+
}
|
|
116
|
+
return httpUtils.post(apiPaths.getAccountInfo, params, null)
|
|
117
|
+
}
|
|
118
|
+
|
|
107
119
|
/**
|
|
108
120
|
* 获取视频房间号
|
|
109
121
|
* @param {*} orderId
|
|
@@ -237,6 +249,7 @@ module.exports = {
|
|
|
237
249
|
getExpertInfo,
|
|
238
250
|
getAgoraToken,
|
|
239
251
|
getDoctorInfo,
|
|
252
|
+
getAccountInfo,
|
|
240
253
|
requestReply,
|
|
241
254
|
orderList,
|
|
242
255
|
getOrderFeedbackTags,
|
package/components/hh-doctor.js
CHANGED
|
@@ -43,11 +43,13 @@ function setLoginCheck(judgeLogin, directLogin) {
|
|
|
43
43
|
*/
|
|
44
44
|
async function isDoctorAuth(doctorId) {
|
|
45
45
|
try {
|
|
46
|
-
const res = await api.
|
|
46
|
+
const res = await api.getAccountInfo(doctorId);
|
|
47
47
|
if (res && res.data) {
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
return
|
|
48
|
+
console.log(JSON.stringify(res.data.loginInfo));
|
|
49
|
+
const loginInfo = res.data.loginInfo;
|
|
50
|
+
return loginInfo && loginInfo.iscardcheck === 1;
|
|
51
|
+
// const isAuthHH = doctorInfo.authhh === 1;
|
|
52
|
+
// return isAuthHH;
|
|
51
53
|
// const haveLicense = (doctorInfo.superLicenseUrl && doctorInfo.superLicenseUrl.length > 0) || (doctorInfo.superLicense1Url && doctorInfo.superLicense1Url.length > 0);
|
|
52
54
|
// return isAuthHH && haveLicense;
|
|
53
55
|
}
|