Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
657feb94
Commit
657feb94
authored
Dec 20, 2019
by
huangjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hj
parent
97c4f445
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
119 additions
and
47 deletions
+119
-47
igirl-web/app/front/vues/pages/orderpay/orderpay.js
+119
-47
No files found.
igirl-web/app/front/vues/pages/orderpay/orderpay.js
View file @
657feb94
{
{
template
:
'${tmpl}'
,
template
:
'${tmpl}'
,
data
:
function
()
{
data
:
function
()
{
return
{
return
{
imgHeight
:
null
,
imgHeight
:
null
,
orderNum
:
""
,
orderNum
:
""
,
orderInfo
:
{},
orderInfo
:
{},
payType
:
"wx"
,
payType
:
"wx"
,
d
:
{},
d
:
{},
action
:
""
,
action
:
""
,
zfpzUrl
:
""
,
zfpzUrl
:
""
,
accounts
:
[],
accounts
:
[],
account_id
:
""
,
account_id
:
""
,
account_index
:
""
,
account_index
:
""
,
accountinfo
:
{},
accountinfo
:
{},
qrcode
:
""
,
qrcode
:
""
,
tradekey
:
""
,
tradekey
:
""
,
time
:
""
,
time
:
""
,
interval
:
null
,
interval
:
null
,
roleList
:
null
,
roleList
:
null
,
isBizemp
:
false
,
isBizemp
:
false
,
loading
:
false
,
loading
:
false
,
payOrderType
:
false
payOrderType
:
false
,
}
email
:
""
,
},
poliyLevel
:
""
,
mounted
:
function
()
{
address
:
""
,
Deparment
:
""
,
industry
:
""
,
period
:
"3个月"
,
}
},
mounted
:
function
()
{
this
.
imgHeight
=
'min-height:'
+
(
document
.
documentElement
.
clientHeight
-
221
)
+
"px;"
;
this
.
imgHeight
=
'min-height:'
+
(
document
.
documentElement
.
clientHeight
-
221
)
+
"px;"
;
var
currentUser
=
this
.
currentUser
;
var
currentUser
=
this
.
currentUser
;
if
(
currentUser
)
{
if
(
currentUser
)
{
...
@@ -41,7 +47,9 @@
...
@@ -41,7 +47,9 @@
}
}
this
.
orderNum
=
this
.
$router
.
history
.
current
.
query
.
orderNum
;
this
.
orderNum
=
this
.
$router
.
history
.
current
.
query
.
orderNum
;
var
that
=
this
;
var
that
=
this
;
this
.
$root
.
getReq
(
"/web/orderCtl/getItemTmOrderDetail"
,
{
orderNum
:
this
.
orderNum
}).
then
(
function
(
d
)
{
this
.
$root
.
getReq
(
"/web/orderCtl/getItemTmOrderDetail"
,
{
orderNum
:
this
.
orderNum
}).
then
(
function
(
d
)
{
if
(
d
.
code
==
1
)
{
if
(
d
.
code
==
1
)
{
that
.
orderInfo
=
d
.
data
;
that
.
orderInfo
=
d
.
data
;
that
.
closePayConfirm
();
that
.
closePayConfirm
();
...
@@ -72,23 +80,42 @@
...
@@ -72,23 +80,42 @@
console
.
log
(
e
);
console
.
log
(
e
);
that
.
$message
.
warning
(
"获取账户信息失败"
);
that
.
$message
.
warning
(
"获取账户信息失败"
);
});
});
/*接受pay.js界面传的参数*/
this
.
poliyLevel
=
this
.
$router
.
history
.
current
.
query
.
poliyLevel
;
this
.
address
=
this
.
$router
.
history
.
current
.
query
.
address
;
this
.
Department
=
this
.
$router
.
history
.
current
.
query
.
Department
;
this
.
industry
=
this
.
$router
.
history
.
current
.
query
.
industry
;
this
.
email
=
this
.
$router
.
history
.
current
.
query
.
email
;
this
.
period
=
this
.
$router
.
history
.
current
.
query
.
period
;
if
(
this
.
$store
.
state
.
currentUser
)
{
this
.
userName
=
this
.
$store
.
state
.
currentUser
.
userName
;
this
.
userId
=
this
.
$store
.
state
.
currentUser
.
id
;
console
.
log
(
this
.
userName
,
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxuser"
);
}
if
(
this
.
$store
.
state
.
currentCompany
)
{
this
.
currentCompany
=
this
.
$store
.
state
.
currentCompany
.
name
;
console
.
log
(
this
.
$store
.
state
.
currentCompany
,
"BeginTimexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxcurrentCompany"
);
};
this
.
Subscribe
();
},
},
created
:
function
()
{
created
:
function
()
{
},
},
methods
:
{
methods
:
{
afterpayjump
(){
afterpayjump
()
{
var
that
=
this
;
var
that
=
this
;
this
.
$root
.
getReq
(
"/wxop/pushmsgWxop/getQr"
,
{}).
then
(
function
(
r
)
{
this
.
$root
.
getReq
(
"/wxop/pushmsgWxop/getQr"
,
{}).
then
(
function
(
r
)
{
console
.
log
(
"rrrrrrr"
);
console
.
log
(
"rrrrrrr"
);
console
.
log
(
r
);
console
.
log
(
r
);
if
(
r
&&
r
.
code
==
1
&&
r
.
data
)
{
if
(
r
&&
r
.
code
==
1
&&
r
.
data
)
{
that
.
$root
.
pushx
({
that
.
$root
.
pushx
({
title
:
"支付成功"
,
title
:
"支付成功"
,
name
:
"/paysuccess"
,
name
:
"/paysuccess"
,
params
:
{
orderNum
:
that
.
orderNum
}
params
:
{
orderNum
:
that
.
orderNum
}
});
});
}
else
{
}
else
{
if
(
that
.
isBizemp
)
{
if
(
that
.
isBizemp
)
{
that
.
$root
.
pushx
({
that
.
$root
.
pushx
({
title
:
"我的订单"
,
title
:
"我的订单"
,
...
@@ -101,7 +128,7 @@
...
@@ -101,7 +128,7 @@
});
});
}
}
}
}
}).
catch
(
e
=>
{
}).
catch
(
e
=>
{
if
(
that
.
isBizemp
)
{
if
(
that
.
isBizemp
)
{
that
.
$root
.
pushx
({
that
.
$root
.
pushx
({
title
:
"我的订单"
,
title
:
"我的订单"
,
...
@@ -115,7 +142,7 @@
...
@@ -115,7 +142,7 @@
}
}
});
});
},
},
bankchange
(
d
){
bankchange
(
d
)
{
var
account
=
this
.
accounts
[
d
];
var
account
=
this
.
accounts
[
d
];
console
.
log
(
account
);
console
.
log
(
account
);
if
(
account
)
{
if
(
account
)
{
...
@@ -123,7 +150,7 @@
...
@@ -123,7 +150,7 @@
this
.
account_id
=
account
.
id
;
this
.
account_id
=
account
.
id
;
}
}
},
},
copyLink
(){
copyLink
()
{
var
oInput
=
document
.
createElement
(
'input'
);
var
oInput
=
document
.
createElement
(
'input'
);
oInput
.
value
=
"https://igirl.gongsibao.com/orderpay/orderpay?state="
+
this
.
orderNum
;
oInput
.
value
=
"https://igirl.gongsibao.com/orderpay/orderpay?state="
+
this
.
orderNum
;
document
.
body
.
appendChild
(
oInput
);
document
.
body
.
appendChild
(
oInput
);
...
@@ -136,11 +163,11 @@
...
@@ -136,11 +163,11 @@
message
:
'复制成功'
message
:
'复制成功'
});
});
},
},
error
(
err
){
error
(
err
)
{
this
.
$message
.
warning
(
`上传失败,请重新上传`
);
this
.
$message
.
warning
(
`上传失败,请重新上传`
);
console
.
log
(
err
);
console
.
log
(
err
);
},
},
setKey
(
name
,
flag
){
setKey
(
name
,
flag
)
{
console
.
log
(
name
);
console
.
log
(
name
);
console
.
log
(
flag
);
console
.
log
(
flag
);
name
=
name
.
substring
(
name
.
length
-
5
);
name
=
name
.
substring
(
name
.
length
-
5
);
...
@@ -149,19 +176,19 @@
...
@@ -149,19 +176,19 @@
console
.
log
(
this
.
$refs
[
flag
]);
console
.
log
(
this
.
$refs
[
flag
]);
this
.
$refs
[
flag
].
d
.
key
=
key
;
this
.
$refs
[
flag
].
d
.
key
=
key
;
},
},
uploadsuccess2
(
result
,
obj
){
uploadsuccess2
(
result
,
obj
)
{
this
.
zfpzUrl
=
result
;
this
.
zfpzUrl
=
result
;
this
.
payOrderType
=
true
;
this
.
payOrderType
=
true
;
},
},
toOfflinePay
(){
toOfflinePay
()
{
this
.
payType
=
"offline"
;
this
.
payType
=
"offline"
;
this
.
closePayConfirm
();
this
.
closePayConfirm
();
},
},
toOtherPeoplePay
(){
toOtherPeoplePay
()
{
this
.
payType
=
"otherPeople"
;
this
.
payType
=
"otherPeople"
;
this
.
closePayConfirm
();
this
.
closePayConfirm
();
},
},
offlinePaySubmit
(){
offlinePaySubmit
()
{
var
that
=
this
;
var
that
=
this
;
var
fileUrl
=
this
.
zfpzUrl
;
var
fileUrl
=
this
.
zfpzUrl
;
var
orderNum
=
this
.
orderNum
;
var
orderNum
=
this
.
orderNum
;
...
@@ -208,24 +235,28 @@
...
@@ -208,24 +235,28 @@
that
.
$message
.
warning
(
"参数错误"
);
that
.
$message
.
warning
(
"参数错误"
);
}
}
},
},
toWxPay
(){
toWxPay
()
{
this
.
payType
=
"wx"
;
this
.
payType
=
"wx"
;
this
.
closePayConfirm
();
this
.
closePayConfirm
();
this
.
getPayQrCode
();
this
.
getPayQrCode
();
},
},
toAliPay
(){
toAliPay
()
{
this
.
payType
=
"alipay"
;
this
.
payType
=
"alipay"
;
this
.
closePayConfirm
();
this
.
closePayConfirm
();
this
.
getPayQrCode
();
this
.
getPayQrCode
();
},
},
getPayQrCode
:
function
()
{
getPayQrCode
:
function
()
{
var
self
=
this
;
var
self
=
this
;
if
(
!
this
.
orderInfo
||
!
this
.
orderInfo
.
code
)
{
if
(
!
this
.
orderInfo
||
!
this
.
orderInfo
.
code
)
{
this
.
$message
.
warning
(
`获取支付码失败,订单信息有误`
);
this
.
$message
.
warning
(
`获取支付码失败,订单信息有误`
);
return
;
return
;
}
}
self
.
loading
=
true
;
self
.
loading
=
true
;
self
.
$root
.
postReq
(
"/web/orderCtl/getQrCodeTl"
,
{
code
:
this
.
orderInfo
.
code
,
company_id
:
this
.
orderInfo
.
company_id
,
op_type
:
this
.
payType
}).
then
(
d
=>
{
self
.
$root
.
postReq
(
"/web/orderCtl/getQrCodeTl"
,
{
code
:
this
.
orderInfo
.
code
,
company_id
:
this
.
orderInfo
.
company_id
,
op_type
:
this
.
payType
}).
then
(
d
=>
{
console
.
log
(
d
,
"getQrCode........................"
);
console
.
log
(
d
,
"getQrCode........................"
);
if
(
d
&&
d
.
code
==
1
)
{
if
(
d
&&
d
.
code
==
1
)
{
var
data
=
d
.
data
;
var
data
=
d
.
data
;
...
@@ -243,17 +274,24 @@
...
@@ -243,17 +274,24 @@
self
.
loading
=
false
;
self
.
loading
=
false
;
});
});
},
},
closePayConfirm
(){
closePayConfirm
()
{
if
(
this
.
interval
)
{
if
(
this
.
interval
)
{
window
.
clearInterval
(
this
.
interval
);
window
.
clearInterval
(
this
.
interval
);
}
}
},
},
checkOrderStatus
(){
checkOrderStatus
()
{
var
self
=
this
;
var
self
=
this
;
var
startTime
=
Number
(
this
.
time
);
var
startTime
=
Number
(
this
.
time
);
setTimeout
(
function
()
{
setTimeout
(
function
()
{
var
inth
=
setInterval
(
function
()
{
var
inth
=
setInterval
(
function
()
{
self
.
$root
.
postReq
(
"/web/orderCtl/findItemByCodeTl"
,
{
orderCode
:
self
.
orderInfo
.
code
,
wxPayOrderCode
:
self
.
orderInfo
.
wxPayOrderCode
,
aliPayOrderCode
:
self
.
orderInfo
.
aliPayOrderCode
,
company_id
:
self
.
orderInfo
.
company_id
,
sub_type
:
self
.
orderInfo
.
subType
,
op_type
:
self
.
payType
}).
then
(
d
=>
{
self
.
$root
.
postReq
(
"/web/orderCtl/findItemByCodeTl"
,
{
orderCode
:
self
.
orderInfo
.
code
,
wxPayOrderCode
:
self
.
orderInfo
.
wxPayOrderCode
,
aliPayOrderCode
:
self
.
orderInfo
.
aliPayOrderCode
,
company_id
:
self
.
orderInfo
.
company_id
,
sub_type
:
self
.
orderInfo
.
subType
,
op_type
:
self
.
payType
}).
then
(
d
=>
{
if
(
d
&&
d
.
code
==
1
&&
d
.
data
&&
d
.
data
.
orderPayStatus
==
"yfk"
)
{
if
(
d
&&
d
.
code
==
1
&&
d
.
data
&&
d
.
data
.
orderPayStatus
==
"yfk"
)
{
self
.
orderInfo
=
d
.
data
;
self
.
orderInfo
=
d
.
data
;
window
.
clearInterval
(
inth
);
window
.
clearInterval
(
inth
);
...
@@ -283,6 +321,39 @@
...
@@ -283,6 +321,39 @@
self
.
interval
=
inth
;
self
.
interval
=
inth
;
},
5000
);
},
5000
);
},
},
Subscribe
()
{
console
.
log
(
"oooooooooooo"
);
axios
.
post
(
'http://106.13.228.212:8010/gsb/Subscribe'
,
{
"userId"
:
this
.
userId
,
"poliyLevel"
:
this
.
poliyLevel
,
"city"
:
this
.
address
,
"Departments"
:
this
.
Department
,
"industry"
:
this
.
industry
,
"BeginTime"
:
this
.
Date_new
(
new
Date
()),
"Email"
:
this
.
email
,
"comanyname"
:
this
.
currentCompany
,
"username"
:
this
.
userName
,
"period"
:
this
.
period
,
"money"
:
this
.
money
,
"pid"
:
this
.
orderInfo
.
code
}).
then
(
d
=>
{
console
.
log
(
this
.
cities
,
"this.cities----------------------"
);
console
.
log
(
this
.
currentCompany
,
"this.currentCompany----------------------"
);
console
.
log
(
String
(
this
.
cities
),
"string----------------------"
);
console
.
log
(
JSON
.
stringify
(
this
.
cities
),
"cities----------------------"
);
})
},
Date_new
(
str
)
{
let
date
=
str
||
new
Date
(),
year
=
date
.
getFullYear
(),
month
=
date
.
getMonth
()
+
1
,
day
=
date
.
getDate
(),
hours
=
date
.
getHours
(),
minutes
=
date
.
getMinutes
();
second
=
date
.
getSeconds
();
let
a
=
`
${
year
}
-
${
month
}
-
${
day
}
${
hours
}
:
${
minutes
}
:
${
second
}
`
;
return
a
;
},
},
},
vname
:
"gsb_orderpay"
vname
:
"gsb_orderpay"
}
}
\ No newline at end of file
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