Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
groupPurchase-miniapp
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
彭佳妮(贵阳日报)
groupPurchase-miniapp
Commits
ce89fee3
Commit
ce89fee3
authored
Aug 08, 2024
by
彭佳妮(贵阳日报)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单列表
parent
3a27604a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
index.vue
src/pages/order/components/Payment/index.vue
+3
-2
order.vue
src/pages/order/order.vue
+13
-0
No files found.
src/pages/order/components/Payment/index.vue
View file @
ce89fee3
...
...
@@ -36,6 +36,7 @@
</
template
>
<
script
setup
>
import
{
debounce
}
from
'@/utils/common'
;
const
emits
=
defineEmits
([
'payment'
]);
const
selectType
=
ref
(
'TENPAY'
);
const
show
=
ref
(
false
);
...
...
@@ -45,10 +46,10 @@ function radioChange(evt) {
selectType
.
value
=
value
;
}
const
toPay
=
()
=>
{
const
toPay
=
debounce
(
()
=>
{
emits
(
'payment'
,
{
selectType
:
selectType
.
value
,
orderNumber
:
orderNumber
.
value
});
show
.
value
=
false
;
};
}
)
;
const
orderNumber
=
ref
(
''
);
const
open
=
(
e
)
=>
{
...
...
src/pages/order/order.vue
View file @
ce89fee3
...
...
@@ -376,6 +376,19 @@ const payNow = async (data) => {
dataList
.
value
[
changeIndex
.
value
].
orderNumber
=
outTradeNo
;
pendingPaymentOrder
.
value
=
outTradeNo
;
window
.
location
.
href
=
paymentUrl
;
// 设置一个延时器
const
start
=
Date
.
now
();
setTimeout
(()
=>
{
const
end
=
Date
.
now
();
if
(
end
-
start
<
1200
)
{
// 如果 iframe 加载时间小于 1.2 秒,说明应用没有安装
xma
.
showToast
({
title
:
'未安装App'
,
icon
:
'error'
,
});
// 这里可以跳转到应用下载页面
}
},
1000
);
};
/**
...
...
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