master
wbb 2 years ago
parent 326cb959a5
commit 0c872d31dc

@ -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
})
}
}}},

@ -13,17 +13,21 @@ Page({
payFocus: true, //文本框焦点
addresslist:[],
buylist:[],
orderlist:{}
orderlist:{},
totalprice:0
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
console.log(options.totalprice)
console.log(JSON.parse(options.info))
var buylist=JSON.parse(options.info)
this.setData({
buylist:buylist
buylist:buylist,
totalprice:options.totalprice
})
console.log(buylist)

@ -35,14 +35,10 @@
</view>
</view>
</view>
<view class="order-cut" wx:if="{{order.promotion.length > 0}}">
<label class="order-cut-dec">减</label>
<label class="order-cut-note">{{order.promotion.name}}</label>
<label class="order-cut-number activity-color">-¥ {{order.promotion.discount}}</label>
</view>
<view class="order-sum">
<label>总计 </label>
<label class="order-sum-number activity-color">¥ {{sumMonney-cutMonney}}</label>
<label class="order-sum-number activity-color">¥ {{totalprice}}</label>
</view>
</view>
<!-- 备注 -->

Loading…
Cancel
Save