Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CFFP-HB
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
Chao Sun
CFFP-HB
Commits
7fbf069f
Commit
7fbf069f
authored
Dec 22, 2022
by
sunchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
微信支付
parent
8f6a8577
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
21 deletions
+17
-21
api/api.ts
+4
-0
pages/orderConfirm/orderConfirm.vue
+13
-21
No files found.
api/api.ts
View file @
7fbf069f
...
...
@@ -346,5 +346,9 @@ export default {
// 子女教育测算
educationEstimate
(
params
){
return
request
(
`
${
baseURL
}
/api/sfp/calcuteUtil/educationEstimate`
,
"POST"
,
params
)
},
//微信认证
wxAuthorize
(
params
){
return
request
(
`
${
baseURL
}
/api/pay/wxAuthorize`
,
"POST"
,
params
)
}
}
pages/orderConfirm/orderConfirm.vue
View file @
7fbf069f
...
...
@@ -206,7 +206,9 @@
paymentMethod
:
this
.
paymentMethod
,
userId
:
this
.
userId
,
integralExchange
:
this
.
isDeduction
==
true
?
parseFloat
(
this
.
deductionCore
)
:
0
,
paymentType
:
''
paymentType
:
''
,
isPayOrAuth
:
''
,
fileId
:
this
.
fileId
}
if
(
this
.
paymentMethod
==
1
){
// APP:微信app支付
...
...
@@ -221,29 +223,16 @@
param
.
paymentType
=
2
;
//deviceType:PC为1,移动端为2,微信为3
if
(
this
.
deviceType
==
3
){
//微信h5支付
uni
.
login
({
provider
:
'weixin'
,
success
:
function
(
loginRes
)
{
console
.
log
(
loginRes
)
// 登录成功
uni
.
getUserInfo
({
provider
:
'weixin'
,
success
:
function
(
info
)
{
alert
(
JSON
.
stringify
(
info
))
param
.
openId
=
info
.
openId
;
}
})
},
fail
:
function
(
err
)
{
// 登录授权失败
// err.code是错误码
}
});
param
.
isPayOrAuth
=
1
;
api
.
wxAuthorize
(
param
).
then
((
res
)
=>
{
if
(
res
[
'success'
]){
window
.
location
.
href
=
res
[
'data'
][
'paymentForm'
][
'action'
];
}
})
}
else
{
//微信二维码支付
}
// #endif
...
...
@@ -401,6 +390,9 @@
this
.
courseDetail
();
this
.
queryByUserIdFortuneStatistic
()
this
.
deviceType
=
common
.
checkDeviceType
();
if
(
this
.
deviceType
==
3
){
this
.
paymentMethod
=
1
;
}
this
.
isRedirect
=
option
.
isRedirect
;
if
(
this
.
isRedirect
==
1
){
if
(
option
.
amount
){
...
...
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