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
e3c1be13
Commit
e3c1be13
authored
Aug 05, 2024
by
石建新(贵阳日报)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单
parent
52788c69
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
+14
-7
confirmOrder.vue
src/pages/shop/confirmOrder.vue
+1
-1
paymentSuccessful.vue
src/pages/shop/paymentSuccessful.vue
+13
-6
No files found.
src/pages/shop/confirmOrder.vue
View file @
e3c1be13
...
@@ -186,7 +186,7 @@ onShow(() => {
...
@@ -186,7 +186,7 @@ onShow(() => {
if
(
outTradeNos
.
value
)
{
if
(
outTradeNos
.
value
)
{
// 查询订单状态决定是否支付
// 查询订单状态决定是否支付
getOrderDetail
({
orderNumber
:
outTradeNos
.
value
}).
then
((
res
)
=>
{
getOrderDetail
({
orderNumber
:
outTradeNos
.
value
}).
then
((
res
)
=>
{
switch
(
res
.
data
.
baseOrder
.
sub
s
tatus
)
{
switch
(
res
.
data
.
baseOrder
.
sub
S
tatus
)
{
case
'1'
:
case
'1'
:
xma
.
showToast
({
xma
.
showToast
({
title
:
'支付失败'
,
title
:
'支付失败'
,
...
...
src/pages/shop/paymentSuccessful.vue
View file @
e3c1be13
...
@@ -31,26 +31,33 @@
...
@@ -31,26 +31,33 @@
import
Header
from
'@/pages/order/components/Header/index.vue'
;
import
Header
from
'@/pages/order/components/Header/index.vue'
;
import
{
getOrderDetail
,
getShopDetail
,
getProdDetail
}
from
'@/api/order'
;
import
{
getOrderDetail
,
getShopDetail
,
getProdDetail
}
from
'@/api/order'
;
import
QRCode
from
'qrcode'
;
import
QRCode
from
'qrcode'
;
const
myOutTradeNos
=
ref
(
''
);
/**
/**
* 获取订单详情
* 获取订单详情
*/
*/
const
orderDetail
=
ref
();
const
orderDetail
=
ref
();
onLoad
((
options
)
=>
{
onLoad
((
options
)
=>
{
const
{
outTradeNos
}
=
options
;
const
{
outTradeNos
}
=
options
;
getOrderDetailFn
(
'NEONO-2024080509591318964'
);
myOutTradeNos
.
value
=
outTradeNos
;
getOrderDetailFn
(
outTradeNos
);
});
});
function
getOrderDetailFn
(
orderNumber
)
{
function
getOrderDetailFn
(
orderNumber
)
{
getOrderDetail
({
orderNumber
}).
then
((
res
)
=>
{
getOrderDetail
({
orderNumber
}).
then
((
res
)
=>
{
orderDetail
.
value
=
res
.
data
;
orderDetail
.
value
=
res
.
data
.
baseOrder
;
const
outTradeNo
=
res
.
data
.
orderNumber
;
orderDetail
.
value
.
orderItems
=
res
.
data
.
orderItems
;
orderDetail
.
value
.
orderStore
=
res
.
data
.
orderStore
;
const
outTradeNo
=
res
.
data
.
baseOrder
.
orderNumber
;
const
indexOfDash
=
outTradeNo
.
indexOf
(
'-'
);
const
indexOfDash
=
outTradeNo
.
indexOf
(
'-'
);
if
(
indexOfDash
!==
-
1
)
{
if
(
indexOfDash
!==
-
1
)
{
res
.
data
.
orderNumber
=
outTradeNo
.
substring
(
indexOfDash
+
1
);
res
.
data
.
baseOrder
.
orderNumber
=
outTradeNo
.
substring
(
indexOfDash
+
1
);
}
else
{
}
else
{
console
.
log
(
`订单编号
${
outTradeNo
}
中没有找到 "-" 符号。`
);
console
.
log
(
`订单编号
${
outTradeNo
}
中没有找到 "-" 符号。`
);
}
}
if
(
orderDetail
.
value
.
status
===
'2'
||
orderDetail
.
value
.
status
===
'3'
)
{
if
(
codeDetail
(
orderDetail
.
value
.
orderNumber
);
orderDetail
.
value
.
orderStore
.
status
===
'2'
||
orderDetail
.
value
.
orderStore
.
status
===
'3'
)
{
codeDetail
(
orderNumber
);
}
}
getProductDetail
(
orderDetail
.
value
.
orderItems
[
0
].
prodId
);
getProductDetail
(
orderDetail
.
value
.
orderItems
[
0
].
prodId
);
getShopMailDetail
(
orderDetail
.
value
.
shopId
);
getShopMailDetail
(
orderDetail
.
value
.
shopId
);
...
...
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