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
2 years ago
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 {
let
shopCarNum
=
(
type
==
'add'
?
1
:
0
)
shopCarInfo
.
forEach
(
item
=>
shopCarNum
+=
item
.
num
)
let
countOfOrder
=
uni
.
getStorageSync
(
'countOfOrder'
);
if
((
this
.
size
+
shopCarNum
)
<=
countOfOrder
)
{
if
((
Number
(
this
.
size
)
+
Number
(
shopCarNum
)
)
<=
countOfOrder
)
{
return
true
}
else
{
this
.
showToast
({
...
...
@@ -368,7 +368,7 @@ export default {
.topBar
{
//
border
:
1px
solid
red
;
position
:
fixed
;
z-index
:
10
;
z-index
:
99999999
;
width
:
100%
;
display
:
flex
;
align-items
:
center
;
...
...
This diff is collapsed.
Click to expand it.
orderSubPackage/pages/orderInfo/index.vue
View file @
2a8be8f6
...
...
@@ -174,7 +174,7 @@ export default {
const
numObj
=
{}
const
{
id
,
shopId
,
orderDetails
}
=
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
});
if
(
!
data
||
!
data
.
data
){
...
...
This diff is collapsed.
Click to expand it.
pages/order/order.vue
View file @
2a8be8f6
...
...
@@ -95,11 +95,12 @@ export default {
}
},
onShow
()
{
// this.getList()
console
.
log
(
1
)
this
.
getList
()
},
mounted
()
{
this
.
orderBottom
=
uni
.
getStorageSync
(
'orderBottom'
)
this
.
getList
()
//
this.getList()
},
computed
:
{
userms
()
{
...
...
@@ -148,7 +149,7 @@ export default {
const
numObj
=
{}
const
{
id
,
shopId
,
orderDetails
}
=
item
;
orderDetails
.
forEach
(
item
=>
{
orderDetails
[
item
.
skuId
]
=
item
.
num
orderDetails
[
item
.
skuId
]
=
Number
(
item
.
num
)
})
const
{
data
}
=
await
order
.
moreOrder
({
orderId
:
id
,
shopId
});
if
(
!
data
||
!
data
.
data
){
...
...
This diff is collapsed.
Click to expand it.
utils/utils.js
View file @
2a8be8f6
...
...
@@ -63,7 +63,7 @@ export default {
if
(
shopCarInfo
)
{
let
currentGoods
=
shopCarInfo
.
find
((
v
)
=>
v
.
goodsId
==
Obj
.
goodsId
&&
v
.
skuId
==
Obj
.
skuId
);
if
(
currentGoods
)
{
currentGoods
.
num
+=
1
;
currentGoods
.
num
+=
Obj
.
num
;
}
else
{
shopCarInfo
.
push
(
Obj
);
}
...
...
This diff is collapsed.
Click to expand it.
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