Commit 32b209a6 by 高淑倩

add: 全选_购物车_参数

parent 69ddb7ad
...@@ -206,7 +206,7 @@ wxService.page({ ...@@ -206,7 +206,7 @@ wxService.page({
}, },
goBuy() { goBuy() {
let goodsIds = [] let skuIds = []
let specIds = [] let specIds = []
let quantitys = [] let quantitys = []
let redemptionSpecIds = [] let redemptionSpecIds = []
...@@ -215,11 +215,10 @@ wxService.page({ ...@@ -215,11 +215,10 @@ wxService.page({
if (!cartListData) return false if (!cartListData) return false
cartListData.filter(item => { // 选中的商品信息 cartListData.filter(item => { // 选中的商品信息
return item.checked return item.checked
}).map(function (item) { }).map(item => {
goodsIds.push(item.skuId) skuIds.push(item.skuId)
quantitys.push(item.count)
}) })
if (goodsIds.length == 0) { if (skuIds.length == 0) {
wx.showToast({ wx.showToast({
title: '请选择商品', title: '请选择商品',
icon: 'none' icon: 'none'
...@@ -227,38 +226,41 @@ wxService.page({ ...@@ -227,38 +226,41 @@ wxService.page({
return false return false
} }
// 去下单页 // 去下单页
this.handleGoBuy() // wxService
// .router('/subPackage/home/pages/orderInit/orderInit')
// .search(parmas)
this.handleGoBuy(skuIds)
}, },
handleGoBuy() { handleGoBuy(parmas) {
// 下单 // 下单
wx.showLoading({ wx.showLoading({
title: '加载中' title: '加载中'
}) })
// wxService.post(`/sale/trade/buyer/create`).then(res => { wxService.post(`/sale/trade/buyer/create`,parmas).then(res => {
// if (!res) return false; if (!res) return false;
// const { result, data } = res && res.data || res && res.result const { result, data } = res && res.data || res && res.result
// if (result == 0) { if (result == 0) {
// delete data.appId delete data.appId
// wx.requestPayment(Object.assign({ wx.requestPayment(Object.assign({
// success(res) { success(res) {
// wx.hideLoading() wx.hideLoading()
// wx.showToast({ wx.showToast({
// title: '支付成功', title: '支付成功',
// icon: 'none', icon: 'none',
// mask: true mask: true
// }) })
// }, },
// fail(res) { fail(res) {
// wx.hideLoading() wx.hideLoading()
// wx.showToast({ wx.showToast({
// title: '支付失败', title: '支付失败',
// icon: 'none', icon: 'none',
// mask: true mask: true
// }) })
// } }
// }, data)) }, data))
// } }
// }) })
}, },
// 调整商品 /trolley/add // 调整商品 /trolley/add
editOk() { editOk() {
......
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