Commit 2331e964 by 高淑倩

modify: 购物车

parent 7cd48605
...@@ -52,20 +52,22 @@ wxService.page({ ...@@ -52,20 +52,22 @@ wxService.page({
}) })
// 1556108807316001 // 1556108807316001
// 1556108807316000 // 1556108807316000
const trolleySku = { this.getCartList()
count: 1,
skuId: '1556108807316001' // const trolleySku = {
} // count: 1,
// 加入购物车 // skuId: '1556108807316001'
wxService.post('/sale/trolley/put', trolleySku).then(res => { // }
if (res) { // // 加入购物车
const { result } = res.data // wxService.post('/sale/trolley/put', trolleySku).then(res => {
if (result == 0) { // if (res) {
wx.hideLoading() // const { result } = res.data
this.getCartList() // if (result == 0) {
} // wx.hideLoading()
} // this.getCartList()
}) // }
// }
// })
}, },
// 查询 /trolley/query // 查询 /trolley/query
getCartList() { getCartList() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment