|
|
|
@ -9,7 +9,7 @@ Page({
|
|
|
|
|
*/
|
|
|
|
|
data: {
|
|
|
|
|
cartlistsee:[], //该用户购物车的数组
|
|
|
|
|
total_all_price: 0, //商品的总价格
|
|
|
|
|
total_all_price:0, //商品的总价格
|
|
|
|
|
all_shop: 0, //所选商品的id
|
|
|
|
|
shop_num: 0, //所选商品的数量
|
|
|
|
|
good_one: [], //单个商品的数据
|
|
|
|
@ -87,14 +87,15 @@ setChecked: function() {
|
|
|
|
|
good_one1.food_shop=good[i].food_shop
|
|
|
|
|
good_one1.price=good[i].price
|
|
|
|
|
good_one1.num=good[i].num
|
|
|
|
|
var all=this.data.total_all_price
|
|
|
|
|
Selection.push(good_one1)
|
|
|
|
|
this.setData({
|
|
|
|
|
Selection:Selection
|
|
|
|
|
})
|
|
|
|
|
//将数据添加到数组里边
|
|
|
|
|
|
|
|
|
|
this.getTotalPrice()
|
|
|
|
|
wx.navigateTo({
|
|
|
|
|
url:'/pages/paying/paying?info='+JSON.stringify(Selection),
|
|
|
|
|
url:'/pages/paying/paying?info='+JSON.stringify(Selection)+'&totalprice='+this.data.total_all_price
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}}},
|
|
|
|
|