Commit c3f5dd10 by 高淑倩

modify: 初始化购物车

parent 235b56c3
...@@ -52,22 +52,22 @@ wxService.page({ ...@@ -52,22 +52,22 @@ wxService.page({
}) })
// 1556108807316001 // 1556108807316001
// 1556108807316000 // 1556108807316000
// this.getCartList()
const trolleySku = {
count: 1,
skuId: '1556108807316000'
}
// 加入购物车
wxService.post('/sale/trolley/put', trolleySku).then(res => {
if (res) {
const { result } = res.data
if (result == 0) {
wx.hideLoading()
this.getCartList() this.getCartList()
}
} // const trolleySku = {
}) // count: 1,
// skuId: '1556108807316000'
// }
// // 加入购物车
// wxService.post('/sale/trolley/put', trolleySku).then(res => {
// if (res) {
// const { result } = res.data
// 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