调整购物车样式

This commit is contained in:
唐明明
2023-10-10 10:59:56 +08:00
parent 51a04d53ce
commit 4faf065c96
16 changed files with 269 additions and 75 deletions

View File

@@ -18,8 +18,9 @@ Page({
freight : '', // 运费
weight : '', // 重量
distribution : [
{ type: 0, title: "快递" },
{ type: 1, title: "自提" },
{ type: 0, title: "选择配送方式" },
{ type: 1, title: "快递" },
{ type: 2, title: "自提" },
],
distributionIndex: 0
},
@@ -28,11 +29,9 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
console.log(options.skuId)
this.setData({
skuId : options.skuId
})
// 获取商品下单信息
this.placeInfo(options.skuId);
},
@@ -80,6 +79,13 @@ Page({
* 商品确认下单
*/
buyTap() {
if(this.data.distributionIndex == 0){
wx.showToast({
title: '请选择配送方式',
icon : 'none'
})
return
}
wx.showLoading({
title: '下单中...',
mask : true
@@ -90,7 +96,6 @@ Page({
remark : '',
delivery_type : this.data.distributionIndex
}).then(res => {
wx.redirectTo({
url: '/pages/pay/index?params=' + encodeURIComponent(JSON.stringify(res.data))
})