Commit bb7e270445716a31fbcdf0057d05813506e13e87
1 parent
54568e2d
小程序加入购物车排版
Showing
4 changed files
with
50 additions
and
34 deletions
pages/goods/goodsInfo/goodsInfo.js
pages/goods/goodsInfo/goodsInfo.wxml
... | ... | @@ -313,7 +313,8 @@ |
313 | 313 | <text class="bg_jj"></text> |
314 | 314 | </view> |
315 | 315 | </view> |
316 | - <view class="flex-space-between address ai_end "> | |
316 | + <view wx:if="{{new_user==1}}"> | |
317 | + <view class="flex-space-between address ai_end "> | |
317 | 318 | <view> |
318 | 319 | <text class="fs32 xc-black3 shop_name"> 泉州开源盛世</text> |
319 | 320 | <text class="fs20">暂无库存</text> |
... | ... | @@ -323,6 +324,7 @@ |
323 | 324 | </view> |
324 | 325 | </view> |
325 | 326 | <view class="fs20">地址:福建省泉州市鲤城区软件园4栋4层</view> |
327 | + </view> | |
326 | 328 | </view> |
327 | 329 | |
328 | 330 | </view> |
... | ... | @@ -669,7 +671,7 @@ |
669 | 671 | <view>购物车</view> |
670 | 672 | </navigator> |
671 | 673 | </view> |
672 | - <!---<view bindtap="openSpecModel" class="buy-btn cart-btn cart-btn-lg" wx:if="{{data.goods.is_virtual}}">立即购买</view>--> | |
674 | + <view bindtap="openSpecModel" class="buy-btn cart-btn cart-btn-lg" wx:if="{{data.goods.is_virtual}}">立即购买</view> | |
673 | 675 | <block wx:if="{{prom_type==0}}"> |
674 | 676 | <view bindtap="openSpecModel" data-ind="1" class="join-btn cart-btn">加入购物车</view> |
675 | 677 | <view bindtap="openSpecModel" data-ind="2" class="buy-btn cart-btn">立即购买</view> |
... | ... | @@ -790,15 +792,16 @@ |
790 | 792 | <view class="fs20 xc-ash xc-distance-top">地址:福建省泉州市鲤城区软件园4栋4层</view> |
791 | 793 | </view> |
792 | 794 | <!----商品的属性项目----> |
795 | + <view class="xc-goods-attribute"> | |
793 | 796 | <view hidden="{{ismend==1}}" class="spec-name">商品属性</view> |
794 | 797 | <view hidden="{{ismend==1}}" class="flex"> |
795 | 798 | <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-gid='item.goods_id' wx:for="{{sku_g}}" wx:key="sku_g"> |
796 | 799 | {{item.gg}} |
797 | 800 | </view> |
798 | 801 | </view> |
799 | - | |
802 | +</view> | |
800 | 803 | <!----点击选择门店的时候要隐藏----> |
801 | - <view hidden="{{ismend==1}}"> | |
804 | + <!-- <view hidden="{{ismend==1}}"> | |
802 | 805 | <view bindtap="getmendian" class="quhuo logistics-item"> |
803 | 806 | <view wx:if="{{sto_sele_name==''}}">取货门店 |
804 | 807 | <text class='small'>(选择门店)</text> |
... | ... | @@ -808,6 +811,8 @@ |
808 | 811 | <image class="wh100" src="{{iurl}}/miniapp/images/icon-arrowdown.png"></image> |
809 | 812 | </view> |
810 | 813 | </view> |
814 | + </view> --> | |
815 | + | |
811 | 816 | <view class="b_num"> |
812 | 817 | <view>购买数量</view> |
813 | 818 | <view class="count"> |
... | ... | @@ -817,6 +822,14 @@ |
817 | 822 | </view> |
818 | 823 | </view> |
819 | 824 | </view> |
825 | + <view class="spec-cart-btns"> | |
826 | + | |
827 | + <block> | |
828 | + <view wx:if="{{openSpecModal_ind==1}}" bindtap="addCart" class="spec-cart-btn yellow fs32" data-action="add">加入购物车</view> | |
829 | + <view wx:if="{{openSpecModal_ind==2}}" bindtap="addCart" class="spec-cart-btn spec-buy" data-action="buy">立即购买</view> | |
830 | + </block> | |
831 | + </view> | |
832 | + | |
820 | 833 | <view class="clear"></view> |
821 | 834 | <!---选择门店的列表---> |
822 | 835 | <view hidden="{{ismend==0}}" class="sto_v"> |
... | ... | @@ -842,13 +855,7 @@ |
842 | 855 | </view> |
843 | 856 | </view> |
844 | 857 | </view> |
845 | - <view class="spec-cart-btns"> | |
846 | - <block> | |
847 | - <view wx:if="{{openSpecModal_ind==1}}" bindtap="addCart" class="spec-cart-btn spec-buy" data-action="add">加入购物车</view> | |
848 | - <view wx:if="{{openSpecModal_ind==2}}" bindtap="addCart" class="spec-cart-btn spec-buy" data-action="buy">立即购买</view> | |
849 | - </block> | |
850 | - </view> | |
851 | - </view> | |
858 | + | |
852 | 859 | </view> |
853 | 860 | <!----弹起来,选择规格数量,拼单商品购买------> |
854 | 861 | <view hidden="{{!openSpecModal_pt}}"> |
... | ... | @@ -876,8 +883,8 @@ |
876 | 883 | </view> |
877 | 884 | </view> |
878 | 885 | <!----商品的属性项目----> |
886 | + <view> | |
879 | 887 | <view hidden="{{ismend==1}}" class="spec-name">商品属性</view> |
880 | - | |
881 | 888 | <block wx:if="{{is_normal==0}}"> |
882 | 889 | <view hidden="{{ismend==1}}" class="flex"> |
883 | 890 | <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-gid='item.goods_id' wx:for="{{sku_g}}" wx:key="sku_g">{{item.gg}} |
... | ... | @@ -892,7 +899,7 @@ |
892 | 899 | </view> |
893 | 900 | </block> |
894 | 901 | <view class="clear"></view> |
895 | - | |
902 | + </view> | |
896 | 903 | <view> |
897 | 904 | <view bindtap="getmendian" class="quhuo logistics-item" hidden="{{ismend==1}}"> |
898 | 905 | <view wx:if="{{sto_sele_name==''}}">取货门店 |
... | ... | @@ -907,7 +914,7 @@ |
907 | 914 | <view>购买数量</view> |
908 | 915 | <view class="count"> |
909 | 916 | <view bindtap="subCartNum" class="sub">-</view> |
910 | - <input bindblur="inputCartNum" type="number" value="{{goodsInputNum}}"></input> | |
917 | + <input bindblur="inputCartNum xc-val-fream" type="number" value="{{goodsInputNum}}"></input> | |
911 | 918 | <view bindtap="addCartNum" class="add">+</view> |
912 | 919 | </view> |
913 | 920 | </view> |
... | ... | @@ -937,7 +944,7 @@ |
937 | 944 | </view> |
938 | 945 | </view> |
939 | 946 | </view> |
940 | - </view> | |
947 | + </view> | |
941 | 948 | <view class="pt_qd"> |
942 | 949 | <view bindtap="addCart_pt" class="spec-cart-btn spec-buy w100" data-action="buy">确定</view> |
943 | 950 | </view> | ... | ... |
pages/goods/goodsInfo/goodsInfo.wxss
... | ... | @@ -518,7 +518,7 @@ border-radius: 0 56rpx 55rpx 0; |
518 | 518 | font-size: 32rpx; |
519 | 519 | box-sizing: border-box; |
520 | 520 | border-radius: 20rpx; |
521 | - | |
521 | + height: 72%; | |
522 | 522 | } |
523 | 523 | |
524 | 524 | .spec-model .pding{padding: 0 30rpx;} |
... | ... | @@ -579,7 +579,7 @@ border-radius: 0 56rpx 55rpx 0; |
579 | 579 | position: fixed; |
580 | 580 | display: flex; |
581 | 581 | height: 50rpx; |
582 | - border: 1rpx solid #f8f8f8; | |
582 | + border: 1rpx solid #000; | |
583 | 583 | font-size: 28rpx; |
584 | 584 | right: 30rpx; |
585 | 585 | } |
... | ... | @@ -592,15 +592,15 @@ border-radius: 0 56rpx 55rpx 0; |
592 | 592 | text-align: center; |
593 | 593 | } |
594 | 594 | .spec_bt{ |
595 | - background: fff;color: #333; margin-left: 10rpx;padding: 8rpx 12rpx; border-radius:20rpx;font-size: 24rpx;border: 1rpx solid #ccc; | |
595 | + background: fff;color: #333; margin-left: 10rpx;padding: 4rpx 15rpx 4rpx; border-radius:30rpx;font-size: 24rpx;border: 1rpx solid #ccc; | |
596 | 596 | } |
597 | 597 | .spec_bt.act{background: #d60021;color: #fff;border: 1rpx solid #d60021;} |
598 | 598 | .sub { |
599 | - border-right: 1px solid #ddd; | |
599 | + border-right: 1px solid #000; | |
600 | 600 | } |
601 | 601 | |
602 | 602 | .add { |
603 | - border-left: 1px solid #ddd; | |
603 | + border-left: 1px solid #000; | |
604 | 604 | } |
605 | 605 | |
606 | 606 | .spec-btn { |
... | ... | @@ -622,22 +622,21 @@ border-radius: 0 56rpx 55rpx 0; |
622 | 622 | } |
623 | 623 | |
624 | 624 | .spec-cart-btns { |
625 | - /* background-color: #f8f8f8; | |
626 | - margin: 40rpx -30rpx 0; | |
627 | - padding: 20rpx 34rpx; */ | |
628 | - float: left; | |
629 | - width: 100%; | |
630 | - line-height: 80rpx; | |
631 | - margin-top: 40rpx; | |
625 | + width: 92%; | |
626 | + line-height: 70rpx; | |
627 | + margin: 0rpx auto; | |
628 | + margin-top: 80rpx; | |
629 | + border-radius: 20rpx; | |
630 | + | |
632 | 631 | } |
633 | 632 | |
634 | 633 | .spec-cart-btn { |
635 | - float: left; | |
636 | - width: 100%; | |
634 | + | |
635 | + width:100%; | |
637 | 636 | font-size: 30rpx; |
638 | 637 | text-align: center; |
639 | 638 | color: white; |
640 | - border-radius: 4rpx; | |
639 | + border-radius: 40rpx; | |
641 | 640 | } |
642 | 641 | |
643 | 642 | .spec-add-cart { |
... | ... | @@ -2241,7 +2240,8 @@ right:17rpx; top:55rpx; |
2241 | 2240 | .xc-address_frame{ |
2242 | 2241 | border-top:1rpx solid #eee; |
2243 | 2242 | width: 100%; |
2244 | - height: 170rpx; | |
2243 | + min-height: 90rpx; | |
2244 | + height: auto; | |
2245 | 2245 | } |
2246 | 2246 | .xc-address_frame .address_frame{ |
2247 | 2247 | width: 92%; |
... | ... | @@ -2454,4 +2454,12 @@ margin-top: 10rpx; |
2454 | 2454 | border-right: 2rpx solid #d70026; |
2455 | 2455 | transform: rotate(45deg);display:inline-block; |
2456 | 2456 | margin-bottom:3rpx; |
2457 | +} | |
2458 | +.xc-goods-attribute{ | |
2459 | + border-bottom: 1px solid #eee; | |
2460 | +padding-bottom: 15px; | |
2461 | +margin-bottom:40rpx; | |
2462 | +} | |
2463 | +.xc-val-fream{ | |
2464 | + width: 105rpx; | |
2457 | 2465 | } |
2458 | 2466 | \ No newline at end of file | ... | ... |
pages/user/index/index.wxml
... | ... | @@ -105,7 +105,7 @@ |
105 | 105 | <view class="xc-equity-title flex-level" bindtap="go_qy"> |
106 | 106 | <view class="xc-title-frame flex-space-between"> |
107 | 107 | <view class="flex-vertical xc-title-content"> |
108 | - <image class="xc-title-img" src="../../../images/medal.png"></image> | |
108 | + <image class="xc-title-img" src="{{iurl}}/miniapp/images/medal.png"></image> | |
109 | 109 | <view class="three-level-word" > |
110 | 110 | 我的权益 |
111 | 111 | </view> |
... | ... | @@ -167,7 +167,7 @@ |
167 | 167 | <view class="fs26">秒杀活动</view> |
168 | 168 | </view> |
169 | 169 | <view class="item t-c" bindtap="go_qy" wx:if="{{qy_list!=null && is_init && gradeId}}"> |
170 | - <image class="xc-center-img " src="/images/quanyi2.png"></image> | |
170 | + <image class="xc-center-img " src="{{iurl}}/miniapp/images/quanyi2.png"></image> | |
171 | 171 | <view class="fs26">我的权益</view> |
172 | 172 | </view> |
173 | 173 | |
... | ... | @@ -188,7 +188,7 @@ |
188 | 188 | </view> |
189 | 189 | |
190 | 190 | <view class="item t-c" data-url="/pages/user/address_list/address_list" bindtap="goto" > |
191 | - <image class="xc-center-img " src="/images/add2.png"></image> | |
191 | + <image class="xc-center-img " src="{{iurl}}/miniapp/images/add2.png"></image> | |
192 | 192 | <view class="four-level-word">我的地址</view> |
193 | 193 | </view> |
194 | 194 | ... | ... |