Переглянути джерело

1、修改保存按钮和购物车的样式

zhoux 1 рік тому
батько
коміт
751a22b1e7

+ 1 - 1
components/dkbase/dk-save-button/dk-save-button.wxss

@@ -3,7 +3,7 @@
   position: fixed;
   bottom: 0;
   width: 100%;
-  height: 182rpx;
+  height: 160rpx;
   border-top: 1px solid #efefef;
   z-index: 7;
   box-shadow: 0px -8rpx 24rpx rgba(0, 16, 39, 0.1);

+ 4 - 5
pages/shopping/shopping.js

@@ -18,7 +18,7 @@ Page({
   data: {
     imageUrl:config.image_url + '/static/img/',
     routeObjName: 'goodsSku',
-    dataItem: {},
+    dataItem: '{}',
     choosedGoodsList: [],
     commonService: app.globalData['commonService'],
     inventoryService: app.globalData['inventoryService'],
@@ -41,8 +41,7 @@ Page({
       { name: 'confirm', title: '结算', color: '#CAA977' }
     ],
     contentList: [
-      { code: 'need', title: mixins.$t("totalAmount"), type: 'str' },
-      { code: 'amount', content: 0, type: 'number' },
+      { code: 'amount', content: 0, type: 'number' ,title: mixins.$t("totalAmount")},
       { type: 'count', code: 'count', quantity: 0 }
     ]
   },
@@ -179,8 +178,8 @@ Page({
       sumAmt += (res.priceStandard * res.itemQty)
       sumQty += res.itemQty
     })
-    contentList[1].content = sumAmt
-    contentList[2].quantity = sumQty
+    contentList[0].content = sumAmt
+    contentList[1].quantity = sumQty
     this.setData({
       contentList: contentList
     })

+ 3 - 7
pages/shopping/shopping.wxml

@@ -40,10 +40,6 @@
 </van-sticky>
 
 
-
-
-
-
 <view class="main-good-class" style="height:100%;background-color:#FFFFFF;">
   <!-- 商品编码的列表 -->
   <scroll-view scroll-y='{{true}}' bindscrolltolower='scrollToLower' lower-threshold='100' wx:if="{{active == 0 }}" class="goods-class" style="height:calc({{windowHeight+'px'}} - 295rpx);overflow: scroll;">
@@ -67,7 +63,7 @@
             <view style="display: flex;align-items: flex-end;">
               <!-- 标准价/标价-->
               <view style="width: 85%;">
-                <view style="color: #002340A6;font-size:22rpx;font-weight: 500;">销售价</view>
+                <view style="color: #002340A6;font-size:22rpx;font-weight: 500;margin-top: 18rpx;">销售价</view>
                 <dk-cell height="46rpx" spaceWidth="1rpx" left="0" fontSize="14" contentColor="#FF7B1A" fontWeight="700" title="" content="{{item.priceStandard?item.priceStandard:0}}"></dk-cell>
               </view>
               <!-- 加号 -->
@@ -116,7 +112,7 @@
             <view style="display: flex;align-items: flex-end;">
               <!-- 标准价/标价-->
               <view style="width: 85%;">
-                <view style="color: #002340A6;font-size:22rpx;font-weight: 500;">销售价</view>
+                <view style="color: #002340A6;font-size:22rpx;font-weight: 500;margin-top: 18rpx;">销售价</view>
                 <dk-cell height="46rpx" spaceWidth="1rpx" left="0" fontSize="14" contentColor="#FF7B1A" fontWeight="700" title="" content="{{item.priceStandard?item.priceStandard:0}}"></dk-cell>
               </view>
               <!-- 加号 -->
@@ -147,7 +143,7 @@
 
 <van-sidebar activeKey="{{sideKey}}" bindchange="changeSidebar" custom-class="{{active == 0 ? 'left-class' : 'right-class'}}">
   <view wx:if="{{active != 1}}" style="height:calc({{windowHeight+'px'}} - {{active == 1 ? '270rpx' :'370rpx' }});overflow: scroll;">
-    <van-sidebar-item wx:key="index" custom-class="{{sideKey - 1 == index? 'sidebar-item-before': (sideKey + 1 == index?'sidebar-item-next':'sidebar-item')}}" title="{{item.catName}}" data-id="{{item.catId}}" wx:for="{{typeList}}" />
+    <van-sidebar-item class="sidebar" wx:key="index" custom-class="{{sideKey - 1 == index? 'sidebar-item-before': (sideKey + 1 == index?'sidebar-item-next':'sidebar-item')}}" title="{{item.catName}}" data-id="{{item.catId}}" wx:for="{{typeList}}" />
   </view>
 </van-sidebar>
 

+ 2 - 7
pages/shopping/shopping.wxss

@@ -40,8 +40,7 @@ page{
   border-radius: 16rpx !important;
 }
 
-.van-sidebar-item--selected {
-  border-color: #3E69F6 !important;
+.sidebar .van-sidebar-item--selected {
   color: #333333 !important;
   font-weight: 600 !important;
 }
@@ -52,7 +51,6 @@ page{
   color: #666666 !important;
   font-weight: 600;
 }
-
 .goods-class {
   position: fixed;
   left: 20rpx;
@@ -71,7 +69,7 @@ page{
 
 .goods-cell-class {
   margin: 32rpx 32rpx 32rpx 32rpx;
-  padding: 20rpx;
+  padding: 0 20rpx 15rpx 20rpx !important;
   box-shadow: 0px 10px 20px 0px #0000000D;
   border-radius: 16rpx;
 }
@@ -126,9 +124,6 @@ page{
 .width-80{
   width:100%;
 }
-.goods-cell-class{
-  padding: 0 20rpx 30rpx 20rpx !important;
-}
 .van-nav-bar__title {
   color: #002340 !important;
   font-size: 15px !important;