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
a751ed5e
Commit
a751ed5e
authored
Apr 06, 2021
by
malin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
93aefe04
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
5 deletions
+39
-5
index.vue
src/views/Pay/index.vue
+10
-3
index.css
src/views/Result/index.css
+1
-1
index.vue
src/views/Result/index.vue
+28
-1
No files found.
src/views/Pay/index.vue
View file @
a751ed5e
...
...
@@ -191,7 +191,16 @@ export default {
}
},
1000
);
this
.
_payConfig
();
// 监听滚动,当立即支付按钮消失时,将立刻获取按钮固定
// let payBtn = document.querySelector(".pay-btn");
// let top = payBtn.offsetTop + payBtn.clientHeight;
// window.onscroll = () => {
// if (window.pageYOffset >= top) {
// console.log(111);
// }
// };
this
.
_payConfig
();
// 获取支付价格
},
computed
:
{
...
...
@@ -258,8 +267,6 @@ export default {
source
:
"toutiao"
,
});
console
.
log
(
params
);
utils
.
setCookie
(
"orderId"
,
params
.
result
.
data
.
orderId
,
0
);
// 将orderId添加到cookie中
// 上报 --> 信息收集
...
...
src/views/Result/index.css
View file @
a751ed5e
...
...
@@ -144,6 +144,6 @@
.convert
{
width
:
3rem
;
height
:
1rem
;
background-color
:
#
b1d6fe
;
background-color
:
#
2080f0
;
border-radius
:
0.2rem
;
}
\ No newline at end of file
src/views/Result/index.vue
View file @
a751ed5e
...
...
@@ -196,7 +196,34 @@ 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
{
// 支付不成功
this
.
$router
.
push
({
path
:
"/pay"
,
query
:
JSON
.
parse
(
utils
.
getCookie
(
"babyInfo"
)),
});
}
});
},
// 单双字切换
convertImg
(
item
)
{
this
.
page
=
1
;
this
.
words
=
item
.
words
;
...
...
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