Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
h5-base
Project
Project
Details
Activity
Releases
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
new-sing
h5-base
Commits
6d0d2189
Commit
6d0d2189
authored
Sep 28, 2019
by
IvyXia123
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
91addeb1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
2 deletions
+43
-2
main.js
src/main.js
+17
-0
common.js
src/util/common.js
+20
-0
public.less
src/util/public.less
+6
-2
No files found.
src/main.js
View file @
6d0d2189
...
@@ -50,6 +50,23 @@ Vue.component('scroll', scroll);
...
@@ -50,6 +50,23 @@ Vue.component('scroll', scroll);
// 支付宝支付完成,订单状态查询
// 支付宝支付完成,订单状态查询
let
timer
=
null
;
let
timer
=
null
;
timer
=
setInterval
(()
=>
{
let
vanDialog
=
document
.
querySelectorAll
(
'.van-dialog'
)
Dialog
.
confirm
({
title
:
'标题'
,
message
:
'支付成功'
}).
then
(()
=>
{
if
(
res
.
buy_type
==
1
)
{
router
.
push
({
name
:
"buySuccess"
,
query
:
outTradEno
});
}
else
{
router
.
push
({
name
:
"success"
,
query
:
outTradEno
});
}
clearInterval
(
timer
);
localStorage
.
removeItem
(
'out_trade_no'
)
}).
catch
(()
=>
{
clearInterval
(
timer
);
localStorage
.
removeItem
(
'out_trade_no'
)
});
// }
},
6000
)
if
(
window
.
localStorage
.
out_trade_no
)
{
if
(
window
.
localStorage
.
out_trade_no
)
{
timer
=
setInterval
(()
=>
{
timer
=
setInterval
(()
=>
{
let
outTradEno
=
JSON
.
parse
(
window
.
localStorage
.
out_trade_no
);
let
outTradEno
=
JSON
.
parse
(
window
.
localStorage
.
out_trade_no
);
...
...
src/util/common.js
View file @
6d0d2189
...
@@ -119,6 +119,10 @@ export default {
...
@@ -119,6 +119,10 @@ export default {
}
}
return
newObj
;
return
newObj
;
},
},
/**
* 判断是否在那个浏览器里
* @returns {number}
*/
isWeixinBrowser
()
{
isWeixinBrowser
()
{
var
ui
=
0
var
ui
=
0
var
ua
=
navigator
.
userAgent
.
toLowerCase
();
var
ua
=
navigator
.
userAgent
.
toLowerCase
();
...
@@ -130,9 +134,25 @@ export default {
...
@@ -130,9 +134,25 @@ export default {
}
}
return
ui
;
return
ui
;
},
},
/**
* 获取链接后的参数
* @param name
* @param url
* @returns {RegExpExecArray | string}
*/
getParamByName
(
name
,
url
)
{
getParamByName
(
name
,
url
)
{
url
=
url
||
window
.
location
;
url
=
url
||
window
.
location
;
var
match
=
RegExp
(
'[?&]'
+
name
+
'=([^&]*)'
).
exec
(
url
);
var
match
=
RegExp
(
'[?&]'
+
name
+
'=([^&]*)'
).
exec
(
url
);
return
match
&&
decodeURIComponent
(
match
[
1
].
replace
(
/
\+
/g
,
' '
))
return
match
&&
decodeURIComponent
(
match
[
1
].
replace
(
/
\+
/g
,
' '
))
},
/**
* 动态改变css
* @param obj
* @param css
*/
setStyle
(
obj
,
css
)
{
for
(
var
attr
in
obj
){
obj
.
style
[
attr
]
=
css
[
attr
];
}
}
}
}
}
src/util/public.less
View file @
6d0d2189
...
@@ -79,6 +79,10 @@ html{
...
@@ -79,6 +79,10 @@ html{
i{
i{
font-style:normal;
font-style:normal;
}
}
.van-dialog {
border-radius: 15px;
}
// video::-internal-media-controls-download-button {
// video::-internal-media-controls-download-button {
// display:none;
// display:none;
// }
// }
...
@@ -86,5 +90,5 @@ i{
...
@@ -86,5 +90,5 @@ i{
// overflow:hidden;
// overflow:hidden;
// }
// }
// video::-webkit-media-controls-panel {
// video::-webkit-media-controls-panel {
// width: calc(100% + 50px);
// width: calc(100% + 50px);
// }
// }
\ 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