Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mr-julyedu
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
baiguangyao
mr-julyedu
Commits
582f9148
Commit
582f9148
authored
May 12, 2020
by
xuzhenghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
支付
parent
e381a2e5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
7 deletions
+8
-7
src/components/ml/index.js
+4
-5
src/components/ml/pythomDes/index.js
+2
-1
src/components/ml/pythonStudy/index.js
+2
-1
No files found.
src/components/ml/index.js
View file @
582f9148
...
@@ -68,20 +68,19 @@ class ML extends Component {
...
@@ -68,20 +68,19 @@ class ML extends Component {
signType
:
data
.
signType
,
//微信签名方式:
signType
:
data
.
signType
,
//微信签名方式:
paySign
:
data
.
paySign
//微信签名
paySign
:
data
.
paySign
//微信签名
},
},
function
(
res
)
{
function
(
res
)
{
if
(
res
.
err_msg
==
"get_brand_wcp
sys/order_status/
ay_request:ok"
)
{
if
(
res
.
err_msg
==
"get_brand_wcpay_request:ok"
)
{
Toast
.
info
(
'支付成功'
,
2
)
Toast
.
info
(
'支付成功'
,
2
)
_this
.
intervalPayStatus
=
setInterval
(
function
()
{
_this
.
intervalPayStatus
=
setInterval
(
function
()
{
http
.
get
(
`
${
API
[
'base-api'
]}
/m/orderState/oid/
${
getParam
(
'oid'
)}
`
).
then
(
res
=>
{
http
.
get
(
`
${
API
[
'base-api'
]}
/m/orderState/oid/
${
getParam
(
'oid'
)}
`
).
then
(
res
=>
{
if
(
res
.
data
.
errno
===
401
)
{
if
(
res
.
data
.
errno
===
401
)
{
clearInterval
(
_this
.
intervalPayStatus
)
clearInterval
(
_this
.
intervalPayStatus
)
_this
.
intervalPayStatus
=
null
_this
.
intervalPayStatus
=
null
location
.
reload
(
)
location
.
href
=
'/ml?id='
+
getParam
(
'id'
)
}
}
})
})
},
1000
)
},
1000
)
}
else
{
Toast
.
info
(
'支付失败'
,
2
)
}
}
}
}
)
)
...
@@ -112,7 +111,7 @@ class ML extends Component {
...
@@ -112,7 +111,7 @@ class ML extends Component {
if
(
res
.
data
.
errno
===
401
)
{
if
(
res
.
data
.
errno
===
401
)
{
clearInterval
(
_this
.
intervalPayStatus
)
clearInterval
(
_this
.
intervalPayStatus
)
_this
.
intervalPayStatus
=
null
_this
.
intervalPayStatus
=
null
location
.
reload
(
)
location
.
href
=
'/ml?id='
+
getParam
(
'id'
)
}
}
})
})
},
1000
)
},
1000
)
...
...
src/components/ml/pythomDes/index.js
View file @
582f9148
...
@@ -78,7 +78,8 @@ class PythonDes extends Component {
...
@@ -78,7 +78,8 @@ class PythonDes extends Component {
weixinPay
=
(
orderId
)
=>
{
weixinPay
=
(
orderId
)
=>
{
// 微信内部-支付
// 微信内部-支付
if
(
browser
.
isWeixin
)
{
if
(
browser
.
isWeixin
)
{
window
.
location
.
href
=
"https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri="
+
encodeURIComponent
(
window
.
location
.
href
+
"&aa=bb&oid="
+
orderId
).
toLowerCase
()
+
"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect"
let
url
=
window
.
location
.
origin
+
location
.
pathname
+
'?id='
+
getParam
(
'id'
)
window
.
location
.
href
=
"https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri="
+
encodeURIComponent
(
url
+
"&aa=bb&oid="
+
orderId
).
toLowerCase
()
+
"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect"
;
}
else
{
}
else
{
// 微信外部-支付
// 微信外部-支付
http
.
get
(
`
${
API
[
'base-api'
]}
/pay/wxpay/wap_charge/oid/
${
orderId
}
`
).
then
((
res
)
=>
{
http
.
get
(
`
${
API
[
'base-api'
]}
/pay/wxpay/wap_charge/oid/
${
orderId
}
`
).
then
((
res
)
=>
{
...
...
src/components/ml/pythonStudy/index.js
View file @
582f9148
...
@@ -101,7 +101,8 @@ class PythonStudy extends Component {
...
@@ -101,7 +101,8 @@ class PythonStudy extends Component {
weixinPay
=
(
orderId
)
=>
{
weixinPay
=
(
orderId
)
=>
{
// 微信内部-支付
// 微信内部-支付
if
(
browser
.
isWeixin
)
{
if
(
browser
.
isWeixin
)
{
window
.
location
.
href
=
"https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri="
+
encodeURIComponent
(
window
.
location
.
href
+
"&aa=bb&oid="
+
orderId
).
toLowerCase
()
+
"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect"
;
let
url
=
window
.
location
.
origin
+
location
.
pathname
+
'?id='
+
getParam
(
'id'
)
window
.
location
.
href
=
"https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri="
+
encodeURIComponent
(
url
+
"&aa=bb&oid="
+
orderId
).
toLowerCase
()
+
"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect"
;
}
else
{
}
else
{
// 微信外部-支付
// 微信外部-支付
http
.
get
(
`
${
API
[
'base-api'
]}
/pay/wxpay/wap_charge/oid/
${
orderId
}
`
).
then
((
res
)
=>
{
http
.
get
(
`
${
API
[
'base-api'
]}
/pay/wxpay/wap_charge/oid/
${
orderId
}
`
).
then
((
res
)
=>
{
...
...
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