Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
H
h5-baby
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
malin
h5-baby
Commits
902d8df1
Commit
902d8df1
authored
Apr 06, 2021
by
malin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
a901cd95
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
9 deletions
+31
-9
index.vue
src/views/Pay/index.vue
+29
-1
index.vue
src/views/Result/index.vue
+2
-8
No files found.
src/views/Pay/index.vue
View file @
902d8df1
...
...
@@ -269,9 +269,11 @@ export default {
utils
.
setCookie
(
"orderId"
,
params
.
result
.
data
.
orderId
,
0
);
// 将orderId添加到cookie中
// this._queryOrder();
// 上报 --> 信息收集
API
.
API_h5Logs
({
outTradeNo
:
params
.
orderId
,
outTradeNo
:
params
.
result
.
data
.
orderId
,
link
:
link
,
clickId
:
h5LogsObj
.
clickid
,
source
:
h5LogsObj
.
source
,
...
...
@@ -298,6 +300,32 @@ export default {
});
},
_queryOrder
()
{
let
orderId
=
utils
.
getCookie
(
"orderId"
);
let
h5LogsObj
=
JSON
.
parse
(
decodeURI
(
utils
.
getCookie
(
"h5LogsObj"
)));
let
params
=
{
outTradeNo
:
orderId
,
payPlatform
:
1
,
payType
:
2
,
wxType
:
"H5Page"
,
// pkg: h5LogsObj.pkg
pkg
:
"com.h5game.bbqm"
,
};
API
.
API_gatewayQueryOrder
(
params
).
then
((
res
)
=>
{
let
status
=
res
.
result
.
data
.
status
;
if
(
status
==
200
)
{
// 支付成功
return
;
}
else
if
(
status
==
500
)
{
// 支付不成功
this
.
$router
.
push
({
path
:
"/pay"
,
query
:
this
.
babyInfo
,
});
}
});
},
// 倒计时
showtime
(
endTime
)
{
let
nowTime
=
new
Date
().
getTime
();
...
...
src/views/Result/index.vue
View file @
902d8df1
...
...
@@ -212,15 +212,9 @@ export default {
};
API
.
API_gatewayQueryOrder
(
params
).
then
((
res
)
=>
{
let
status
=
res
.
result
.
data
.
status
;
if
(
status
==
200
)
{
// 支付成功
return
;
}
else
if
(
status
==
500
)
{
if
(
status
!=
200
)
{
// 支付不成功
this
.
$router
.
push
({
path
:
"/pay"
,
query
:
this
.
babyInfo
,
});
this
.
$router
.
push
({
path
:
"/pay"
,
query
:
this
.
babyInfo
});
}
});
},
...
...
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