Browse Source

修改样式

lex-xin 9 months ago
parent
commit
2da25d6e70

+ 6 - 2
miniprogram/pages/address/index.less

@@ -14,7 +14,7 @@
 
 
 .address-list {
-  padding: 24rpx 26rpx 0;
+  padding: 24rpx 26rpx;
 }
 
 .address-item {
@@ -24,6 +24,10 @@
   border: 2rpx solid #fff;
   margin-bottom: 22rpx;
 
+  &:last-child {
+    margin-bottom: 0;
+  }
+
   &.active {
     border: 2rpx solid rgba(254, 36, 81, 0.7);
     background: #FFF4F6;
@@ -252,7 +256,7 @@ toolbar-confirm {
 
   .cell-group {
     flex: 1 auto;
-    overflow-y: auto;
+    // overflow-y: auto;
 
     .van-cell {
       padding: 36rpx 40rpx;

+ 17 - 18
miniprogram/pages/address/index.wxml

@@ -8,25 +8,24 @@
           <image src="https://oss.dayaedu.com/ktyq/1731839238916.png"></image>
           <view class="empty-text">暂无收货地址</view>
         </view>
-        <view wx:for="{{ addressList }}" wx:key="index">
-          <view class="address-item {{ item.id === id ? 'active' : '' }}" bind:tap="onSelectAddress" data-id="{{ item.id }}">
-            <view class="item-title">
-              {{ item.provinceName }}{{ item.cityName }}{{ item.regionName }}
-            </view>
-            <view class="detailAddress">
-              {{ item.detailAddress }}
-            </view>
-            <view class="item-users">
-              <view class="item-user">
-                <text>{{ item.name }}</text>
-                <text>{{ item.phoneNumber }}</text>
-              </view>
-            </view>
-            <view class="item-btn-group">
-              <button class="btn del-btn" catch:tap="onRemoveAddress" data-id="{{ item.id }}">删除</button>
-              <button class="btn update-btn" catch:tap="onUpdateAddress" data-id="{{ item.id }}">编辑</button>
+
+        <view wx:for="{{ addressList }}" wx:key="index" class="address-item {{ item.id === id ? 'active' : '' }}" bind:tap="onSelectAddress" data-id="{{ item.id }}">
+          <view class="item-title">
+            {{ item.provinceName }}{{ item.cityName }}{{ item.regionName }}
+          </view>
+          <view class="detailAddress">
+            {{ item.detailAddress }}
+          </view>
+          <view class="item-users">
+            <view class="item-user">
+              <text>{{ item.name }}</text>
+              <text>{{ item.phoneNumber }}</text>
             </view>
           </view>
+          <view class="item-btn-group">
+            <button class="btn del-btn" catch:tap="onRemoveAddress" data-id="{{ item.id }}">删除</button>
+            <button class="btn update-btn" catch:tap="onUpdateAddress" data-id="{{ item.id }}">编辑</button>
+          </view>
         </view>
       </view>
     </scroll-view>
@@ -48,7 +47,7 @@
           <van-field model:value="{{ name }}" label="收货人" placeholder="请填写收货人姓名" placeholder-style="color: #bbb" maxlength="50" />
           <van-field model:value="{{ phoneNumber }}" label="电话号码" type="number" placeholder-style="color: #bbb" placeholder="请输入手机号码" maxlength="11" />
           <van-field value="{{ provinceName ? provinceName + '/' + cityName + (regionName ? '/' + regionName : '' )  : '' }}" label="选择地区" placeholder-style="color: #bbb" placeholder="请选择省/市/区" readonly is-link bind:tap="onShowAreaList" />
-          <van-field wx:if="{{ showTextarea }}" model:value="{{ detailAddress }}" label="详细地址" type="textarea" placeholder-style="color: #bbb" placeholder="请填写小区/楼号/单元/门牌号" cursor="{{ cursor }}" autosize maxlength="100" border="{{ false }}" />
+          <van-field wx:if="{{ showTextarea }}" model:value="{{ detailAddress }}" label="详细地址" type="textarea" placeholder-style="color: #bbb" placeholder="请填写小区/楼号/单元/门牌号" cursor="{{ cursor }}" autosize="{{ { maxHeight: 80, minHeight: 30 } }}" maxlength="100" border="{{ false }}" />
         </van-cell-group>
 
         <view class="pop-btn-group">

+ 1 - 1
miniprogram/pages/index/index.less

@@ -927,7 +927,7 @@ toolbar-confirm {
 .empty-box {
   // padding-top: 64rpx;
   // padding-bottom: 70rpx;
-  height: 528rpx;
+  height: 264px !important;
   display: flex;
   flex-direction: column;
   justify-content: center;

+ 4 - 1
miniprogram/pages/index/index.wxml

@@ -147,7 +147,10 @@
                         <text class="priceZ">{{ formatSelectGood.integerPart || 0 }}</text>
                         <text class="priceF">.{{ formatSelectGood.decimalPart || '00' }}</text>
                       </view>
-                      <text class="line">|</text>原价 ¥{{ formatSelectGood.showOriginalPrice }}
+                      <block wx:if="{{  formatSelectGood.originalPrice > formatSelectGood.salePrice }}">
+                        <text class="line">|</text>原价 ¥{{ formatSelectGood.showOriginalPrice }}
+                      </block>
+
                       <block wx:if="{{ formatSelectGood.originalPrice > formatSelectGood.salePrice }}">
                         <text class="line">|</text>
                         <text>优惠 ¥{{ formatSelectGood.discountPrice }}</text>

+ 2 - 1
miniprogram/pages/orders/order-detail.less

@@ -498,7 +498,7 @@ page {
     .desc {
       font-size: 24rpx;
       color: #777;
-      line-height: 40rpx;
+      line-height: 38rpx;
       flex-shrink: 0;
     }
 
@@ -512,6 +512,7 @@ page {
       .stuff {
         font-size: 32rpx;
         padding: 0 4rpx;
+        line-height: 40rpx;
       }
 
       .priceZ {

+ 1 - 1
miniprogram/pages/orders/order-detail.ts

@@ -168,7 +168,7 @@ Page({
     if (!type) return ''
     const template: any = {
       DAY: "天",
-      MONTH: "月",
+      MONTH: "月",
       YEAR: "年"
     }
     if (type === "YEAR" && num >= 99) {

+ 7 - 5
miniprogram/pages/orders/order-detail.wxml

@@ -81,8 +81,9 @@
             <view class="goods-price">
               <text class="before">共{{ goodsInfo.goodsList.length }}件:</text>
               <view class="gp"><text class="stuff">¥</text>
-              <text class="priceZ">{{ goodsInfo.integerPart }}</text>
-              <text class="priceF">.{{ goodsInfo.decimalPart }}</text></view>
+                <text class="priceZ">{{ goodsInfo.integerPart }}</text>
+                <text class="priceF">.{{ goodsInfo.decimalPart }}</text>
+              </view>
             </view>
           </view>
         </view>
@@ -141,10 +142,11 @@
               <text class="priceZ">{{ goodsInfo.integerPart }}</text>
               <text class="priceF">.{{ goodsInfo.decimalPart }}</text>
             </view>
+            <block wx:if="{{ goodsInfo.allDiscountPrice > 0 }}">
+              <text class="line"></text>
+              <text class="discountPrice">优惠 ¥{{ goodsInfo.allDiscountPrice }}</text>
+            </block>
 
-            <text class="line"></text>
-
-            <text class="discountPrice">优惠 ¥{{ goodsInfo.allDiscountPrice }}</text>
           </view>
         </view>
         <button type="primary" bind:tap="onSubmit">{{ goodsInfo.orderNo ? '继续支付' : '提交' }}</button>

+ 1 - 1
miniprogram/pages/orders/order-result.ts

@@ -131,7 +131,7 @@ Page({
     }
     const template: any = {
       DAY: "天",
-      MONTH: "月",
+      MONTH: "月",
       YEAR: "年"
     }
     if (type === "YEAR" && num >= 99) {

+ 2 - 2
miniprogram/pages/orders/orders.less

@@ -184,7 +184,7 @@
       .desc {
         font-size: 24rpx;
         color: #999;
-        line-height: 40rpx;
+        line-height: 42rpx;
         flex-shrink: 0;
         display: inline-block;
       }
@@ -213,7 +213,7 @@
       }
 
       .line {
-        margin: 10rpx 12rpx;
+        margin: 0 12rpx 12rpx;
         background-color: #D2D2D2;
         width: 2rpx;
         height: 20rpx;

+ 3 - 1
miniprogram/pages/orders/orders.ts

@@ -160,7 +160,7 @@ Page({
     }
     const template: any = {
       DAY: "天",
-      MONTH: "月",
+      MONTH: "月",
       YEAR: "年"
     }
     if (type === "YEAR" && num >= 99) {
@@ -221,6 +221,8 @@ Page({
         params.push({
           pic: item.goodsUrl,
           name: item.goodsName,
+          period: item.activationCodeInfo?.type,
+          num: item.activationCodeInfo?.times || 0,
           originalPrice: item.originalPrice,
           salePrice: item.paymentCashAmount,
           goodsType: item.goodsType, // INSTRUMENTS

+ 5 - 2
miniprogram/pages/orders/orders.wxml

@@ -40,8 +40,11 @@
                   <text class="priceZ">{{ item.integerPart }}</text>
                   <text class="priceF">.{{ item.decimalPart }}</text>
                 </view>
-                <text class="line"></text>
-                <text class="discountPrice">优惠 ¥{{ item.discountPrice }}</text>
+                <block wx:if="{{ item.discountPrice > 0 }}">
+                  <text class="line"></text>
+                  <text class="discountPrice">优惠 ¥{{ item.discountPrice }}</text>
+                </block>
+
               </view>
 
               <button class="sure" type="primary" wx:if="{{ item.wechatStatus == 'WAIT_PAY' }}" catch:tap="onPay" data-id="{{item.id}}">继续支付</button>