From 119cdeb112537ed2bc33632cd9f4923d5e12ed59 Mon Sep 17 00:00:00 2001 From: taiyuan Date: Thu, 8 Jul 2021 14:10:27 +0800 Subject: [PATCH] 购物车修改 --- pages/cart/cart/cart.wxml | 2 +- pages/cart/cart/cart.wxss | 5 +++++ pages/cart/cart2/cart2.js | 29 +++++++++++++++++++++-------- pages/cart/cart2/cart2.wxml | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------- pages/cart/cart2/cart2.wxss | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------- 5 files changed, 137 insertions(+), 63 deletions(-) diff --git a/pages/cart/cart/cart.wxml b/pages/cart/cart/cart.wxml index ad72782..e8b2f10 100644 --- a/pages/cart/cart/cart.wxml +++ b/pages/cart/cart/cart.wxml @@ -114,7 +114,7 @@ - + diff --git a/pages/cart/cart/cart.wxss b/pages/cart/cart/cart.wxss index 94bdba2..633ef3d 100644 --- a/pages/cart/cart/cart.wxss +++ b/pages/cart/cart/cart.wxss @@ -362,3 +362,8 @@ page { padding: 0; vertical-align: top; } + +.sub.active { + /* background-color: #ddd; */ + color: #ccc; +} diff --git a/pages/cart/cart2/cart2.js b/pages/cart/cart2/cart2.js index 5517e31..3af5a32 100644 --- a/pages/cart/cart2/cart2.js +++ b/pages/cart/cart2/cart2.js @@ -108,14 +108,17 @@ Page({ order_prom_list_cart:null, ispt_goods:0, //是否平摊至单品,0要平摊 1不平摊 - rank_switch:0, //是不是开同等级卡 - show_card:null, //显示的等级卡 - card_name:'', //显示的卡的名称 - card_cut_price:null,//减价多少钱 - - show_submit:0, //提交按钮变正常显示 - is_get_offline:1, + + rank_switch:0, //是不是开同等级卡 + show_card:null, //显示的等级卡 + card_name:'', //显示的卡的名称 + card_cut_price:null,//减价多少钱 + + show_submit:0, //提交按钮变正常显示 + is_get_offline:1, + tabs: ['门店自提','快递邮寄'], + currentTabIndex: 1, }, onLoad: function(t) { wx.setNavigationBarTitle({ title: "填写订单",}) @@ -3423,7 +3426,17 @@ Page({ //是不是线下 var is_get_offline=item.is_offline; this.setData({pop_offline_index:index,is_offline_show:1,show_off_price:off_price.toFixed(2),is_get_offline:is_get_offline}); - } + }, + + + clickTab(e) { + // console.log(e); + let index = e.currentTarget.dataset.index; + this.setData({ + currentTabIndex: index, + }); + this.setexptype_w(e); + }, diff --git a/pages/cart/cart2/cart2.wxml b/pages/cart/cart2/cart2.wxml index a525d4c..9851a52 100644 --- a/pages/cart/cart2/cart2.wxml +++ b/pages/cart/cart2/cart2.wxml @@ -4,18 +4,30 @@
+ + + + {{item}} + + + - {{user_addr.more_address}}{{' '}}{{user_addr.address}} - - + + + + + {{user_addr.more_address}}{{' '}}{{user_addr.address}} + @@ -112,28 +124,31 @@ {{order.store_prom}} - - - + + + + + - + - - - + + + + + - + + - + - + + 配送方式 + + + + {{wu_arr[item.wind].name}} + + + - + - + + @@ -321,14 +344,15 @@ - + + + 配送方式 @@ -406,7 +430,7 @@ - 应付金额:¥{{formData.order_amount}} + 应付金额:{{formData.order_amount}} diff --git a/pages/cart/cart2/cart2.wxss b/pages/cart/cart2/cart2.wxss index a3ed00c..d8c09c8 100644 --- a/pages/cart/cart2/cart2.wxss +++ b/pages/cart/cart2/cart2.wxss @@ -20,6 +20,8 @@ } + + page { /* background-color: #FAFAFA; */ background-color: #F0F0F0; @@ -31,6 +33,32 @@ page { /* padding-top: 28rpx; */ padding-bottom: 120rpx; } + +.tab-container { + font-size: 28rpx; + margin-top: 20rpx; + display: flex; +} + +.tab-wrapper { + background-color: #ccc; + display: flex; + border-radius: 40rpx; + overflow: hidden; +} + +.tab { + padding: 20rpx 30rpx; + +} + + +.tab.active { + background-color: white; + border-radius: 40rpx; +} + + .user-mes { position: relative; background-color: #fff; @@ -38,23 +66,25 @@ page { color: #444; /* margin-top: 28rpx; */ border-radius: 14rpx; + padding: 20rpx 70rpx 20rpx 20rpx; } .user-contact { - padding: 24rpx 26rpx; - font-weight: 600; + /* padding: 24rpx 26rpx; + font-weight: 600; */ } .location { position: relative; - padding: 0 70rpx 24rpx; + /* padding: 0 70rpx 24rpx; */ } .pos-icon { - position: absolute; - left: 28rpx; - top: 6rpx; - width: 30rpx; - height: 36rpx; + /* position: absolute; */ + /* left: 28rpx; + top: 6rpx; */ + width: 20rpx; + height: 24rpx; + display: inline-block; } .border-img { @@ -132,12 +162,12 @@ page { .use-item{ display: flex; align-items: center; - height: 80rpx; + /* height: 80rpx; */ /* border-bottom: 1px solid #ddd; */ - font-size: 30rpx; + font-size: 26rpx; /* width:95%; margin:auto; */ - padding: 0 26rpx; + padding: 20rpx; } .use-item>view{ display: flex; @@ -148,9 +178,9 @@ margin:auto; */ } .use-item .dp{ display: block; - width: 50rpx; - height: 50rpx; - margin-left: -6rpx; + width: 40rpx; + height: 40rpx; + /* margin-left: -6rpx; */ } .set-item { @@ -182,11 +212,11 @@ margin:auto; */ .coupon-mes { /* box-sizing: border-box; */ - height:95rpx; - padding: 0 26rpx; + /* height:95rpx; */ + padding: 20rpx; background-color: #fff; font-size: 30rpx; - color: #444; + /* color: #444; */ /* width: 100%; */ border-radius: 14rpx; margin-top: 20rpx; @@ -225,9 +255,9 @@ margin:auto; */ .word-box { font-size: 26rpx; /* width: 600rpx; */ - padding: 10rpx; + /* padding: 10rpx; height: 28rpx; - line-height: 40rpx; + line-height: 40rpx; */ } .max-word { @@ -237,7 +267,7 @@ margin:auto; */ } .information { - padding: 0 26rpx; + /* padding: 20rpx; */ background-color: #fff; /* margin-bottom: 120rpx; */ } @@ -245,10 +275,11 @@ margin:auto; */ .information .item { display: flex; justify-content: space-between; - height: 60rpx; - line-height: 60rpx; - font-size: 26rpx; - color: #777; + /* height: 60rpx; + line-height: 60rpx; */ + font-size: 24rpx; + /* color: #333; */ + padding: 20rpx; } .btn-wrap { @@ -364,12 +395,13 @@ margin:auto; */ background-color: white; } .xc-right{ - width:20rpx; - height:20rpx; + width:12rpx; + height:12rpx; border-top:2rpx solid #000; border-right:2rpx solid #000; transform:rotate(45deg); display:inline-block; + margin-left: 10rpx; } .xc-coupon-frame .work-frame .work{ font-size: 30rpx; line-height: 92rpx; } @@ -904,7 +936,7 @@ margin-left: 20rpx; .plus_buy{ background-color: #fff; margin:15rpx 0; - padding: 20rpx 10rpx; + padding: 20rpx; position: relative; } -- libgit2 0.21.4