Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
user
Overview
Overview
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
hooloo
mp
user
Commits
4de1a348
Commit
4de1a348
authored
Jul 01, 2022
by
宋冰琦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复订单详情再来一单跳转问题
parent
3c70c978
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
orderSubPackage/pages/orderInfo/index.vue
+11
-4
No files found.
orderSubPackage/pages/orderInfo/index.vue
View file @
4de1a348
...
...
@@ -160,7 +160,8 @@ export default {
ewmImg
:
''
,
Utils
,
isBuild
:
true
,
waitTime
:
0
waitTime
:
0
,
backFlag
:
false
}
},
methods
:
{
...
...
@@ -170,15 +171,18 @@ export default {
return
rpx
*
(
wx
.
getSystemInfoSync
().
windowWidth
/
750
);
},
goBack
(){
if
(
!
this
.
backFlag
){
uni
.
switchTab
({
url
:
'/pages/order/order'
})
}
},
async
oneMoreOrder
(
item
)
{
uni
.
removeStorageSync
(
'shopCarInfo'
);
$EventBus
.
$emit
(
'updateCar'
);
const
numObj
=
{}
const
{
id
,
shopId
,
orderDetails
}
=
item
;
orderDetails
.
forEach
(
item
=>
{
orderDetails
[
item
.
skuId
]
=
Number
(
item
.
num
)
const
newOrderDetail
=
[...
orderDetails
]
newOrderDetail
.
forEach
(
item
=>
{
newOrderDetail
[
item
.
skuId
]
=
Number
(
item
.
num
)
})
const
{
data
}
=
await
Order
.
moreOrder
({
orderId
:
id
,
shopId
});
if
(
!
data
||
!
data
.
data
){
...
...
@@ -188,7 +192,7 @@ export default {
let
list
=
new
Array
();
data
.
data
.
forEach
(
item
=>
{
const
skuId
=
item
.
skus
[
0
].
skuId
const
nextData
=
{
...
item
,
skuId
,
num
:
orderDetails
[
skuId
],
flag
:
true
,
sku
:
item
.
skus
[
0
]
}
const
nextData
=
{
...
item
,
skuId
,
num
:
newOrderDetail
[
skuId
],
flag
:
true
,
sku
:
item
.
skus
[
0
]
}
if
(
nextData
.
sku
.
state
==
1
)
{
list
.
push
(
nextData
);
}
...
...
@@ -200,6 +204,7 @@ export default {
list
.
forEach
(
nextData
=>
{
Utils
.
getallNum
(
nextData
);
})
this
.
backFlag
=
true
uni
.
switchTab
({
url
:
'/pages/menu/menu'
})
},
async
PayNow
()
{
...
...
@@ -220,6 +225,7 @@ export default {
success
:
(
res
)
=>
{
if
(
res
.
confirm
)
{
Order
.
orderRefund
({
orderId
:
this
.
orderInfo
.
id
,
refundAmount
:
this
.
orderInfo
.
amount
}).
then
(
res
=>
{
this
.
backFlag
=
true
uni
.
switchTab
({
url
:
'/pages/menu/menu'
})
})
}
else
if
(
res
.
cancel
)
{
...
...
@@ -234,6 +240,7 @@ export default {
},
cancelOrder
()
{
Order
.
cancelOrder
({
orderId
:
this
.
orderInfo
.
id
}).
then
(
res
=>
{
this
.
backFlag
=
true
uni
.
switchTab
({
url
:
'/pages/menu/menu'
})
})
},
...
...
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