Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wechat_lung
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hanpeng
wechat_lung
Commits
595b9cfe
Commit
595b9cfe
authored
Jan 09, 2020
by
hanpeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
-mark -20200109
parent
e12c7de4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
115 additions
and
105 deletions
+115
-105
imgConsultDetail.js
wechat_lung_imgConsult/javaScript/imgConsultDetail.js
+5
-0
index.js
wechat_lung_imgConsult/javaScript/index.js
+110
-105
No files found.
wechat_lung_imgConsult/javaScript/imgConsultDetail.js
View file @
595b9cfe
...
...
@@ -41,6 +41,9 @@ define(['zepto', 'medtap'], function($, medtap) {
//alert(detail.doctorId)
$
(
'.service_type'
).
html
(
detail
.
payDesc
);
$
(
'.service_doctor'
).
html
(
imgConsult
.
doctorName
);
$
(
'.service_doctor'
).
unbind
.
bind
(
'click'
,
function
(){
medtap
.
pushWindow
(
'https://review-formal.iplusmed.com/wechatForLungCancer/dev/wechat_lung_push_doctor/pages/doctorHomePage.html?doctorId='
+
imgConsult
.
doctorId
+
'&wechatId='
+
detail
.
wechatId
)
})
$
(
'.service_price'
).
html
(
detail
.
payFee
+
'元'
);
var
sex
=
''
;
if
(
imgConsult
.
sex
==
'M'
)
{
...
...
@@ -87,6 +90,8 @@ define(['zepto', 'medtap'], function($, medtap) {
}
else
{
$
(
'.pay_box'
).
hide
();
}
}
}
})
...
...
wechat_lung_imgConsult/javaScript/index.js
View file @
595b9cfe
define
([
'zepto'
,
'medtap'
],
function
(
$
,
medtap
)
{
define
([
'zepto'
,
'medtap'
],
function
(
$
,
medtap
)
{
var
imgConsult
=
{
doctorId
:
medtap
.
getRequest
(
'doctorId'
),
doctorName
:
''
,
pmdOrderSn
:
medtap
.
getRequest
(
'pmdOrderSn'
),
doctorId
:
medtap
.
getRequest
(
'doctorId'
),
doctorName
:
''
,
pmdOrderSn
:
medtap
.
getRequest
(
'pmdOrderSn'
),
localIds
:
[],
serverId
:
""
,
imgList
:
[],
emrId
:
''
,
payFee
:
''
,
isPmd
:
false
,
wxLungToken
:
localStorage
.
wxLungToken
,
init
:
function
()
{
emrId
:
''
,
payFee
:
''
,
isPmd
:
false
,
wxLungToken
:
localStorage
.
wxLungToken
,
init
:
function
()
{
imgConsult
.
getDoctorDetail
();
imgConsult
.
bindEve
();
imgConsult
.
getWechatTicket
();
imgConsult
.
getPatient
();
imgConsult
.
confirmImgConsult
();
$
(
'textarea'
).
on
(
'blur'
,
function
()
{
$
(
'textarea'
).
on
(
'blur'
,
function
()
{
window
.
scrollTo
(
0
,
document
.
documentElement
.
clientHeight
);
});
},
bindEve
:
function
()
{
$
(
'.btn_icon'
).
unbind
().
bind
(
'click'
,
function
()
{
bindEve
:
function
()
{
$
(
'.btn_icon'
).
unbind
().
bind
(
'click'
,
function
()
{
$
(
this
).
toggleClass
(
'btnSelect'
);
if
(
$
(
this
).
hasClass
(
'btnSelect'
))
{
$
(
this
).
attr
(
'select'
,
'yes'
);
...
...
@@ -29,97 +29,98 @@ define(['zepto','medtap'],function($,medtap){
$
(
this
).
attr
(
'select'
,
'no'
);
}
});
$
(
'.consult_agreement'
).
unbind
().
bind
(
'click'
,
function
(){
medtap
.
pushWindow
(
'https://review-formal.iplusmed.com/App/dev/FF499211739FD801DOCTOR/AppHtml/DoctorServiceLicense.html'
)
$
(
'.consult_agreement'
).
unbind
().
bind
(
'click'
,
function
()
{
medtap
.
pushWindow
(
'https://review-formal.iplusmed.com/App/dev/FF499211739FD801DOCTOR/AppHtml/DoctorServiceLicense.html'
)
})
$
(
'.submit_order'
).
unbind
().
bind
(
'click'
,
function
()
{
$
(
'.submit_order'
).
unbind
().
bind
(
'click'
,
function
()
{
var
flag
=
$
(
'.btn_icon'
).
attr
(
'select'
);
var
result
=
imgConsult
.
checkValue
();
if
(
result
==
true
)
{
if
(
flag
==
'yes'
)
{
if
(
imgConsult
.
pmdOrderSn
==
''
||
imgConsult
.
pmdOrderSn
==
'undefined'
)
{
if
(
result
==
true
)
{
if
(
flag
==
'yes'
)
{
if
(
imgConsult
.
pmdOrderSn
==
''
||
imgConsult
.
pmdOrderSn
==
'undefined'
)
{
imgConsult
.
createImgConsult
();
}
else
{
if
(
imgConsult
.
isPmd
==
true
&&
imgConsult
.
payFee
==
'0'
)
{
}
else
{
if
(
imgConsult
.
isPmd
==
true
&&
imgConsult
.
payFee
==
'0'
)
{
imgConsult
.
freeOrder
();
}
else
{
}
else
{
//imgConsult.createImgConsult();
}
}
}
else
{
}
else
{
medtap
.
toast
({
message
:
'<p style="text-align:center">请阅读并同意<br/>《医生咨询服务订单协议》</p>'
,
time
:
1500
message
:
'<p style="text-align:center">请阅读并同意<br/>《医生咨询服务订单协议》</p>'
,
time
:
1500
})
}
}
})
},
getDoctorDetail
:
function
()
{
getDoctorDetail
:
function
()
{
medtap
.
loading
(
1
);
medtap
.
submitAjax
({
url
:
'https://testdevgw.medtap.cn/doctor/getDoctorDetail'
,
type
:
'get'
,
async
:
false
,
data
:{
doctorId
:
imgConsult
.
doctorId
url
:
'https://testdevgw.medtap.cn/doctor/getDoctorDetail'
,
type
:
'get'
,
async
:
false
,
data
:
{
doctorId
:
imgConsult
.
doctorId
},
success
:
function
(
res
)
{
success
:
function
(
res
)
{
medtap
.
loading
(
0
);
if
(
res
.
success
==
true
)
{
if
(
res
.
success
==
true
)
{
var
doctorInfo
=
res
.
content
.
doctorItem
;
var
str
=
doctorInfo
.
hasOwnProperty
(
'technologyProfessional'
)
?
doctorInfo
.
technologyProfessional
.
value
:
''
;
var
str
=
doctorInfo
.
hasOwnProperty
(
'technologyProfessional'
)
?
doctorInfo
.
technologyProfessional
.
value
:
''
;
$
(
'.doctor_name'
).
html
(
doctorInfo
.
doctorName
+
"("
+
str
+
")"
);
imgConsult
.
doctorName
=
doctorInfo
.
doctorName
;
$
(
'.img_consult_price'
).
html
(
doctorInfo
.
hasOwnProperty
(
'imageConsultPrice'
)
?
doctorInfo
.
imageConsultPrice
+
' / 次'
:
''
);
$
(
'.img_consult_price'
).
html
(
doctorInfo
.
hasOwnProperty
(
'imageConsultPrice'
)
?
doctorInfo
.
imageConsultPrice
+
' / 次'
:
''
);
}
}
})
},
getPatient
:
function
()
{
getPatient
:
function
()
{
medtap
.
loading
(
1
);
medtap
.
submitAjax
({
url
:
'https://testdevgw.medtap.cn/user/patientEMR/listPatientEMR'
,
type
:
'post'
,
async
:
false
,
url
:
'https://testdevgw.medtap.cn/user/patientEMR/listPatientEMR'
,
type
:
'post'
,
async
:
false
,
contentType
:
'application/json'
,
data
:{
pageNum
:
1
,
pageSize
:
10
,
condition
:{
data
:
{
pageNum
:
1
,
pageSize
:
10
,
condition
:
{
}
},
success
:
function
(
res
)
{
success
:
function
(
res
)
{
medtap
.
loading
(
0
);
if
(
res
.
success
==
true
)
{
if
(
res
.
success
==
true
)
{
var
patientList
=
res
.
content
.
list
;
var
sex
=
''
;
var
age
=
''
;
var
city
=
''
;
for
(
var
i
=
0
;
i
<
patientList
.
length
;
i
++
){
if
(
patientList
[
i
].
defaultFlg
==
true
){
for
(
var
i
=
0
;
i
<
patientList
.
length
;
i
++
)
{
$
(
'.service_patient'
).
html
(
patientList
[
i
].
patientName
);
imgConsult
.
emrId
=
patientList
[
i
].
emrId
;
$
(
'.patient_name'
).
text
(
patientList
[
i
].
patientName
);
if
(
patientList
[
i
].
sex
==
'M'
)
{
if
(
patientList
[
i
].
sex
==
'M'
)
{
sex
=
'男'
;
}
else
if
(
patientList
[
i
].
sex
==
'F'
)
{
}
else
if
(
patientList
[
i
].
sex
==
'F'
)
{
sex
=
'女'
;
}
age
=
patientList
[
i
].
age
;
city
=
patientList
[
i
].
hasOwnProperty
(
'areaItem'
)
?
patientList
[
i
].
areaItem
.
fullName
:
''
;
$
(
'.patient_sex_age_city'
).
text
(
'('
+
sex
+
' '
+
age
+
'岁 '
+
city
+
')'
);
$
(
'.patient_sex_age_city'
).
text
(
'('
+
sex
+
' '
+
age
+
'岁 '
+
city
+
')'
);
$
(
'.diseaseDiagnosis'
).
text
(
'疾病诊断:'
+
patientList
[
i
].
diseaseDiagnosisName
);
$
(
'.pathologyType'
).
text
(
'病理类型:'
+
patientList
[
i
].
pathologyTypeName
)
}
}
}
}
})
},
createImgConsult
:
function
()
{
createImgConsult
:
function
()
{
var
urls
=
[],
picUrl
=
""
;
[].
forEach
.
call
(
$
(
'#ImgUp .image_files_img'
),
function
(
item
)
{
...
...
@@ -128,27 +129,30 @@ define(['zepto','medtap'],function($,medtap){
var
picUrl
=
urls
.
join
(
','
);
medtap
.
loading
(
1
);
medtap
.
submitAjax
({
url
:
'https://testdevgw.medtap.cn/trade/imageConsultOrder/submitOrder'
,
type
:
'post'
,
url
:
'https://testdevgw.medtap.cn/trade/imageConsultOrder/submitOrder'
,
type
:
'post'
,
async
:
false
,
contentType
:
'application/json'
,
data
:{
emrId
:
imgConsult
.
emrId
,
doctorId
:
imgConsult
.
doctorId
,
describe
:
$
(
'#disease_detail'
).
val
()
||
''
,
describePic
:
picUrl
,
expectationHelp
:
$
(
'#expectation_help_detail'
).
val
()
||
''
data
:
{
emrId
:
imgConsult
.
emrId
,
doctorId
:
imgConsult
.
doctorId
,
describe
:
$
(
'#disease_detail'
).
val
()
||
''
,
describePic
:
picUrl
,
expectationHelp
:
$
(
'#expectation_help_detail'
).
val
()
||
''
},
success
:
function
(
res
)
{
success
:
function
(
res
)
{
medtap
.
loading
(
0
);
if
(
res
.
success
==
true
)
{
if
(
res
.
success
==
true
)
{
var
orderDetail
=
res
.
content
.
order
;
medtap
.
pushWindow
(
'https://review-formal.iplusmed.com/wechatForLungCancer/dev/wechat_lung_wxPay/wxPay.html?orderType=imgConsult&orderId='
+
orderDetail
.
orderSn
+
'&wxLungToken='
+
imgConsult
.
wxLungToken
+
'&wechatId='
+
medtap
.
getRequest
(
'wechatId'
));
medtap
.
pushWindow
(
'https://review-formal.iplusmed.com/wechatForLungCancer/dev/wechat_lung_wxPay/wxPay.html?orderType=imgConsult&orderId='
+
orderDetail
.
orderSn
+
'&wxLungToken='
+
imgConsult
.
wxLungToken
+
'&wechatId='
+
medtap
.
getRequest
(
'wechatId'
));
}
}
})
},
freeOrder
:
function
()
{
freeOrder
:
function
()
{
var
urls
=
[],
picUrl
=
""
;
[].
forEach
.
call
(
$
(
'#ImgUp .image_files_img'
),
function
(
item
)
{
...
...
@@ -157,52 +161,53 @@ define(['zepto','medtap'],function($,medtap){
var
picUrl
=
urls
.
join
(
','
);
medtap
.
loading
(
1
);
medtap
.
submitAjax
({
url
:
'https://testdevgw.medtap.cn/trade/imageConsultOrder/submitOrderByPmd'
,
type
:
'post'
,
url
:
'https://testdevgw.medtap.cn/trade/imageConsultOrder/submitOrderByPmd'
,
type
:
'post'
,
async
:
false
,
contentType
:
'application/json'
,
data
:{
emrId
:
imgConsult
.
emrId
,
doctorId
:
imgConsult
.
doctorId
,
pmdOrderSn
:
medtap
.
getRequest
(
'pmdOrderSn'
),
describe
:
$
(
'#disease_detail'
).
val
()
||
''
,
describePic
:
picUrl
,
expectationHelp
:
$
(
'#expectation_help_detail'
).
val
()
||
''
data
:
{
emrId
:
imgConsult
.
emrId
,
doctorId
:
imgConsult
.
doctorId
,
pmdOrderSn
:
medtap
.
getRequest
(
'pmdOrderSn'
),
describe
:
$
(
'#disease_detail'
).
val
()
||
''
,
describePic
:
picUrl
,
expectationHelp
:
$
(
'#expectation_help_detail'
).
val
()
||
''
},
success
:
function
(
res
)
{
success
:
function
(
res
)
{
medtap
.
loading
(
0
);
if
(
res
.
success
==
true
)
{
if
(
res
.
success
==
true
)
{
var
orderDetail
=
res
.
content
.
order
;
setTimeout
(
function
(){
medtap
.
pushWindow
(
'pages/success.html?id='
+
orderDetail
.
orderSn
+
'&wechatId='
+
medtap
.
getRequest
(
'wechatId'
));
},
1000
);
setTimeout
(
function
()
{
medtap
.
pushWindow
(
'pages/success.html?id='
+
orderDetail
.
orderSn
+
'&wechatId='
+
medtap
.
getRequest
(
'wechatId'
));
},
1000
);
}
}
})
},
confirmImgConsult
:
function
()
{
confirmImgConsult
:
function
()
{
medtap
.
loading
(
1
);
medtap
.
submitAjax
({
url
:
'https://testdevgw.medtap.cn/trade/imageConsultOrder/confirmOrder'
,
type
:
'post'
,
url
:
'https://testdevgw.medtap.cn/trade/imageConsultOrder/confirmOrder'
,
type
:
'post'
,
async
:
false
,
contentType
:
'application/json'
,
data
:{
emrId
:
imgConsult
.
emrId
,
doctorId
:
imgConsult
.
doctorId
,
pmdOrderSn
:
medtap
.
getRequest
(
'pmdOrderSn'
)
data
:
{
emrId
:
imgConsult
.
emrId
,
doctorId
:
imgConsult
.
doctorId
,
pmdOrderSn
:
medtap
.
getRequest
(
'pmdOrderSn'
)
},
success
:
function
(
res
)
{
success
:
function
(
res
)
{
medtap
.
loading
(
0
);
if
(
res
.
success
==
true
)
{
if
(
res
.
success
==
true
)
{
var
result
=
res
.
content
.
result
;
imgConsult
.
isPmd
=
result
.
isPmd
;
imgConsult
.
payFee
=
result
.
payFee
;
$
(
'.img_consult_price'
).
html
(
result
.
hasOwnProperty
(
'totalFee'
)
?
result
.
totalFee
+
'元 / 次'
:
''
);
if
(
result
.
isPmd
==
true
&&
result
.
payFee
==
'0'
)
{
if
(
result
.
isPmd
==
true
&&
result
.
payFee
==
'0'
)
{
$
(
'.free_tip'
).
show
();
$
(
'.needPay'
).
hide
();
}
else
{
}
else
{
$
(
'.free_tip'
).
hide
();
$
(
'.needPay'
).
show
();
}
...
...
@@ -297,9 +302,9 @@ define(['zepto','medtap'],function($,medtap){
url
:
'https://testdevgw.medtap.cn/common/uploadWechatFile'
,
type
:
'POST'
,
async
:
false
,
headers
:{
'apptype'
:
'wechat_lung'
,
'user-os'
:
'wechat'
headers
:
{
'apptype'
:
'wechat_lung'
,
'user-os'
:
'wechat'
},
data
:
{
bizType
:
"3"
,
...
...
@@ -322,33 +327,33 @@ define(['zepto','medtap'],function($,medtap){
})
},
checkValue
:
function
()
{
checkValue
:
function
()
{
var
flag
=
false
;
if
(
!
$
(
'#disease_detail'
).
val
())
{
if
(
!
$
(
'#disease_detail'
).
val
())
{
medtap
.
toast
({
message
:
'请输入疾病描述'
,
time
:
1500
message
:
'请输入疾病描述'
,
time
:
1500
})
flag
=
false
;
}
else
if
(
$
(
'#disease_detail'
).
val
().
length
<
10
)
{
}
else
if
(
$
(
'#disease_detail'
).
val
().
length
<
10
)
{
medtap
.
toast
({
message
:
'疾病描述不可少于10个字'
,
time
:
1500
message
:
'疾病描述不可少于10个字'
,
time
:
1500
})
flag
=
false
;
}
else
if
(
!
$
(
'#expectation_help_detail'
).
val
())
{
}
else
if
(
!
$
(
'#expectation_help_detail'
).
val
())
{
medtap
.
toast
({
message
:
'请输入您想要咨询的内容'
,
time
:
1500
message
:
'请输入您想要咨询的内容'
,
time
:
1500
})
flag
=
false
;
}
else
if
(
$
(
'#expectation_help_detail'
).
val
().
length
<
5
||
$
(
'#expectation_help_detail'
).
val
().
length
>
20
)
{
}
else
if
(
$
(
'#expectation_help_detail'
).
val
().
length
<
5
||
$
(
'#expectation_help_detail'
).
val
().
length
>
20
)
{
medtap
.
toast
({
message
:
'咨询内容只能输入5-20字'
,
time
:
1500
message
:
'咨询内容只能输入5-20字'
,
time
:
1500
})
flag
=
false
;
}
else
{
}
else
{
flag
=
true
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment