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
2a8be8f6
Commit
2a8be8f6
authored
Jun 25, 2022
by
songbingqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复订单详情再来一单数量/报错问题
parent
f9e2d711
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
7 deletions
+8
-7
menuSubPackage/pages/goodsDetail/goodsDetail.vue
+2
-2
orderSubPackage/pages/orderInfo/index.vue
+1
-1
pages/order/order.vue
+4
-3
utils/utils.js
+1
-1
No files found.
menuSubPackage/pages/goodsDetail/goodsDetail.vue
View file @
2a8be8f6
...
@@ -250,7 +250,7 @@ export default {
...
@@ -250,7 +250,7 @@ export default {
let
shopCarNum
=
(
type
==
'add'
?
1
:
0
)
let
shopCarNum
=
(
type
==
'add'
?
1
:
0
)
shopCarInfo
.
forEach
(
item
=>
shopCarNum
+=
item
.
num
)
shopCarInfo
.
forEach
(
item
=>
shopCarNum
+=
item
.
num
)
let
countOfOrder
=
uni
.
getStorageSync
(
'countOfOrder'
);
let
countOfOrder
=
uni
.
getStorageSync
(
'countOfOrder'
);
if
((
this
.
size
+
shopCarNum
)
<=
countOfOrder
)
{
if
((
Number
(
this
.
size
)
+
Number
(
shopCarNum
)
)
<=
countOfOrder
)
{
return
true
return
true
}
else
{
}
else
{
this
.
showToast
({
this
.
showToast
({
...
@@ -368,7 +368,7 @@ export default {
...
@@ -368,7 +368,7 @@ export default {
.topBar
{
.topBar
{
//
border
:
1px
solid
red
;
//
border
:
1px
solid
red
;
position
:
fixed
;
position
:
fixed
;
z-index
:
10
;
z-index
:
99999999
;
width
:
100%
;
width
:
100%
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
...
...
orderSubPackage/pages/orderInfo/index.vue
View file @
2a8be8f6
...
@@ -174,7 +174,7 @@ export default {
...
@@ -174,7 +174,7 @@ export default {
const
numObj
=
{}
const
numObj
=
{}
const
{
id
,
shopId
,
orderDetails
}
=
item
;
const
{
id
,
shopId
,
orderDetails
}
=
item
;
orderDetails
.
forEach
(
item
=>
{
orderDetails
.
forEach
(
item
=>
{
orderDe
=
tails
[
item
.
skuId
]
=
item
.
num
orderDe
tails
[
item
.
skuId
]
=
Number
(
item
.
num
)
})
})
const
{
data
}
=
await
Order
.
moreOrder
({
orderId
:
id
,
shopId
});
const
{
data
}
=
await
Order
.
moreOrder
({
orderId
:
id
,
shopId
});
if
(
!
data
||
!
data
.
data
){
if
(
!
data
||
!
data
.
data
){
...
...
pages/order/order.vue
View file @
2a8be8f6
...
@@ -95,11 +95,12 @@ export default {
...
@@ -95,11 +95,12 @@ export default {
}
}
},
},
onShow
()
{
onShow
()
{
// this.getList()
console
.
log
(
1
)
this
.
getList
()
},
},
mounted
()
{
mounted
()
{
this
.
orderBottom
=
uni
.
getStorageSync
(
'orderBottom'
)
this
.
orderBottom
=
uni
.
getStorageSync
(
'orderBottom'
)
this
.
getList
()
//
this.getList()
},
},
computed
:
{
computed
:
{
userms
()
{
userms
()
{
...
@@ -148,7 +149,7 @@ export default {
...
@@ -148,7 +149,7 @@ export default {
const
numObj
=
{}
const
numObj
=
{}
const
{
id
,
shopId
,
orderDetails
}
=
item
;
const
{
id
,
shopId
,
orderDetails
}
=
item
;
orderDetails
.
forEach
(
item
=>
{
orderDetails
.
forEach
(
item
=>
{
orderDetails
[
item
.
skuId
]
=
item
.
num
orderDetails
[
item
.
skuId
]
=
Number
(
item
.
num
)
})
})
const
{
data
}
=
await
order
.
moreOrder
({
orderId
:
id
,
shopId
});
const
{
data
}
=
await
order
.
moreOrder
({
orderId
:
id
,
shopId
});
if
(
!
data
||
!
data
.
data
){
if
(
!
data
||
!
data
.
data
){
...
...
utils/utils.js
View file @
2a8be8f6
...
@@ -63,7 +63,7 @@ export default {
...
@@ -63,7 +63,7 @@ export default {
if
(
shopCarInfo
)
{
if
(
shopCarInfo
)
{
let
currentGoods
=
shopCarInfo
.
find
((
v
)
=>
v
.
goodsId
==
Obj
.
goodsId
&&
v
.
skuId
==
Obj
.
skuId
);
let
currentGoods
=
shopCarInfo
.
find
((
v
)
=>
v
.
goodsId
==
Obj
.
goodsId
&&
v
.
skuId
==
Obj
.
skuId
);
if
(
currentGoods
)
{
if
(
currentGoods
)
{
currentGoods
.
num
+=
1
;
currentGoods
.
num
+=
Obj
.
num
;
}
else
{
}
else
{
shopCarInfo
.
push
(
Obj
);
shopCarInfo
.
push
(
Obj
);
}
}
...
...
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