Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-h5-ailipay
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 55ff46e6
authored
Dec 12, 2025
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix 优化代码
1 parent
22947dff
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
src/views/alipay/index.vue
src/views/alipay/index.vue
View file @
55ff46e
...
@@ -193,12 +193,17 @@ export default {
...
@@ -193,12 +193,17 @@ export default {
},
},
methods
:
{
methods
:
{
handleConfirm
()
{
handleConfirm
()
{
function
is
WeiXin
()
{
function
is
Alipay
()
{
var
ua
=
window
.
navigator
.
userAgent
.
toLowerCase
();
var
ua
=
window
.
navigator
.
userAgent
.
toLowerCase
();
if
(
ua
.
match
(
/MicroMessenger/i
)
==
'micromessenger'
)
{
return
ua
.
indexOf
(
'alipay'
)
!==
-
1
;
return
true
;
}
function
closeAlipay
()
{
if
(
window
.
AlipayJSBridge
)
{
window
.
AlipayJSBridge
.
call
(
'closeWebview'
);
}
else
{
}
else
{
return
false
;
document
.
addEventListener
(
'AlipayJSBridgeReady'
,
function
()
{
window
.
AlipayJSBridge
&&
window
.
AlipayJSBridge
.
call
(
'closeWebview'
);
},
false
);
}
}
}
}
function
isPc
()
{
function
isPc
()
{
...
@@ -217,8 +222,9 @@ export default {
...
@@ -217,8 +222,9 @@ export default {
}
}
var
userAgent
=
navigator
.
userAgent
;
var
userAgent
=
navigator
.
userAgent
;
if
(
isWeiXin
())
{
if
(
isAlipay
())
{
WeixinJSBridge
.
call
(
'closeWindow'
);
closeAlipay
();
return
;
}
}
if
(
!
isPc
())
{
if
(
!
isPc
())
{
window
.
opener
=
null
;
window
.
open
(
'about:blank'
,
'_self'
,
''
).
close
();
window
.
opener
=
null
;
window
.
open
(
'about:blank'
,
'_self'
,
''
).
close
();
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment