Skip to content

Commit

Permalink
调整了actions中减少数量
Browse files Browse the repository at this point in the history
  • Loading branch information
tangcaiye committed Jan 11, 2018
1 parent 767683a commit 8366a34
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/store/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,11 @@ export default {
}
if (cartObj.num > 1) {
// 更改-》减少
let num = cartObj.num
num--
// 发请求更新num数值
return http.patch(api.host + '/carts/' + cartObj.id, {
num: cartObj.num
num: num
})
.then(res => {
if (res.data.id > 0) {
Expand Down

0 comments on commit 8366a34

Please sign in to comment.