Browse Source

修改样式

lex-xin 9 months ago
parent
commit
2c453a6ae9

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

@@ -52,9 +52,18 @@
       font-size: 26rpx;
       color: rgba(0, 0, 0, 0.5);
       line-height: 36rpx;
+      display: flex;
 
       text {
         padding-right: 16rpx;
+
+        &:first-child {
+          display: inline-block;
+          white-space: nowrap;
+          overflow: hidden;
+          text-overflow: ellipsis;
+          max-width: 300rpx;
+        }
       }
     }
   }
@@ -78,7 +87,7 @@
       color: #333333;
       background-color: transparent;
       border-radius: 24rpx;
-      border: 1rpx solid #DCDCDC;
+      border: 1rpx solid rgba(0, 0, 0, 0.15) !important;
     }
 
     .update-btn {
@@ -133,6 +142,7 @@
       border-radius: 36rpx;
       border: 2rpx solid #FE2451;
       color: #FFFFFF;
+      font-weight: bold !important;
     }
   }
 }

+ 2 - 2
miniprogram/pages/address/index.wxml

@@ -44,10 +44,10 @@
         </view>
 
         <van-cell-group border="{{ false }}" class="cell-group">
-          <van-field model:value="{{ name }}" label="收货人" placeholder="请填写收货人姓名" placeholder-style="color: #bbb" />
+          <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 model:value="{{ detailAddress }}" label="详细地址" type="textarea" placeholder-style="color: #bbb" placeholder="请填写小区/楼号/单元/门牌号" input-class="textarea" autosize fixed />
+          <van-field model:value="{{ detailAddress }}" label="详细地址" type="textarea" placeholder-style="color: #bbb" placeholder="请填写小区/楼号/单元/门牌号" input-class="textarea" autosize fixed maxlength="100" />
         </van-cell-group>
 
         <view class="pop-btn-group">

BIN
miniprogram/pages/index/images/icon-man.png


+ 14 - 5
miniprogram/pages/index/index.less

@@ -46,8 +46,8 @@
       margin: 0 auto;
       height: 100%;
       width: 100%;
-      background: #FFFFFF;
-      border-radius: 32rpx;
+      // background: #FFFFFF;
+      // border-radius: 32rpx;
     }
   }
 
@@ -305,6 +305,10 @@ page {
       color: #B1B1B1;
     }
 
+    text {
+      padding-left: 8rpx;
+    }
+
     image {
       position: absolute;
       top: -14rpx;
@@ -480,6 +484,7 @@ page {
     .addBuyer-left {
       display: flex;
       flex: 1;
+      margin-right: 20rpx;
       .info {
         flex: 1;
       }
@@ -661,7 +666,7 @@ page {
   }
 
   .priceZ {
-    font-size: 60rpx;
+    font-size: 56rpx;
     line-height: 1;
   }
 
@@ -733,11 +738,15 @@ page {
     background-color: transparent !important;
 
     .van-field__label {
-      color: #666666;
+      color: #666666 !important;
+      line-height: 52rpx;
+    }
+    .van-field__body {
+      color: #000 !important;
     }
 
     .van-icon-arrow {
-      color: #BBBBBB;
+      color: #BBBBBB !important;
       // font-weight: 600;
     }
   }

+ 10 - 1
miniprogram/pages/index/index.ts

@@ -87,6 +87,7 @@ Page({
       typeName: '',
       showSalePrice: '', // 显示的现价
       originalPrice: 0, // 原价
+      showOriginalPrice: '', // 显示的原价
       salePrice: 0, // 现价
       discountPrice: '' // 已省
     } as any, // 格式化所有选中的数据
@@ -159,8 +160,13 @@ Page({
   /**
    * 生命周期函数--监听页面加载
    */
-  onLoad() {
+  onLoad(options: any) {
     // this.onInit()
+    if(options.currentIndex) {
+      this.setData({
+        currentIndex: options.currentIndex
+      })
+    }
   },
   /**
    * 获取基础信息
@@ -309,6 +315,7 @@ Page({
       typeName: '',
       showSalePrice: '' as any, // 显示的现价
       originalPrice: 0, // 原价
+      showOriginalPrice: '',
       salePrice: 0, // 现价
       discountPrice: '' as any, // 已省
       integerPart: '',
@@ -319,6 +326,7 @@ Page({
       params.typeName = selected.typeName
       params.showSalePrice = selected.showSalePrice
       params.originalPrice = selected.originalPrice
+      params.showOriginalPrice = formatPrice(Number(selected.originalPrice || 0), 'ALL') as any
       params.salePrice = selected.salePrice
       params.discountPrice = selected.discountPrice
 
@@ -330,6 +338,7 @@ Page({
     if (selectedInstrument.id) {
       params.typeName = selected.typeName ? selected.typeName + '+' + selectedInstrument.name : selectedInstrument.name
       params.originalPrice = Number(selected.originalPrice) + Number(selectedInstrument.originalPrice)
+      params.showOriginalPrice = formatPrice(params.originalPrice || 0, 'ALL') as any
       params.salePrice = Number(selected.salePrice) + Number(selectedInstrument.salePrice)
       params.showSalePrice = formatPrice(params.salePrice, "ALL");
       params.discountPrice = formatPrice(

+ 12 - 8
miniprogram/pages/index/index.wxml

@@ -1,12 +1,12 @@
 <swiper current="{{ currentIndex }}" indicator-dots="{{false}}" vertical="true" class="firstConainer">
-<!--  || !showBuyer || !showGender || showArea || showSchool || showGradeClass || showClass -->
+  <!--  || !showBuyer || !showGender || showArea || showSchool || showGradeClass || showClass -->
   <swiper-item wx:if="{{ !popupShow }}">
     <view class="pageContainer firstPageContainer">
       <navigation-bar title="器乐数字AI工具" back="{{false}}"></navigation-bar>
       <swiper indicator-dots="{{false}}" class="fistSwiperSection" previous-margin="78rpx" next-margin="78rpx" bindchange="onFirstChange">
         <swiper-item wx:for="{{firstImgList}}" wx:key="index">
           <view class="swiper-item {{ firstCurrent == index ? 'current' : '' }}">
-            <image data-src="{{ item }}" src="{{ item }}"></image>
+            <image data-src="{{ item }}" mode="widthFix" src="{{ item }}"></image>
           </view>
         </swiper-item>
       </swiper>
@@ -96,7 +96,7 @@
               <!-- wx:if="{{popupShow}}" -->
               <!-- <view class="popup-mask" bind:tap="onClose"></view> -->
               <scroll-view class="popup-container" bounces="false" scroll-y="true" type="list">
-                
+
                 <view class="popup-scroll">
                   <image src="https://oss.dayaedu.com/ktyq/1739242193106.png" mode="widthFix" class="top-vip-img"></image>
                   <!-- 添加权益人 -->
@@ -132,7 +132,7 @@
                     <view class="desc">乐器搭配<text>(非必选)</text></view>
                     <view class="goodsList">
                       <view wx:for="{{ instrumentList }}" wx:key="index" class="goodsItem {{ item.id == selectInstrumentId ? 'selected' : '' }}" bind:tap="onSelectInstrument" data-id="{{ item.id }}">
-                        {{ item.name }} <text>¥{{ item.showSalePrice }}</text>
+                        {{ item.name }}<text>¥{{ item.showSalePrice }}</text>
                       </view>
                     </view>
                   </view>
@@ -147,10 +147,10 @@
                         <text class="priceZ">{{ formatSelectGood.integerPart || 0 }}</text>
                         <text class="priceF">.{{ formatSelectGood.decimalPart || '00' }}</text>
                       </view>
-                      <text class="line">|</text>原价 ¥ {{ formatSelectGood.originalPrice }}
+                      <text class="line">|</text>原价 ¥{{ formatSelectGood.showOriginalPrice }}
                       <block wx:if="{{ formatSelectGood.originalPrice > formatSelectGood.salePrice }}">
                         <text class="line">|</text>
-                        <text>优惠 ¥ {{ formatSelectGood.discountPrice }}</text>
+                        <text>优惠 ¥{{ formatSelectGood.discountPrice }}</text>
                       </block>
                     </view>
 
@@ -173,7 +173,10 @@
           <image src="./images/icon-back.png" class="icon-close-pop" bind:tap="onCloseBuyer" />
           <view class="container-pop">
             <view class="pop-address-title">享用者信息</view>
-            <view class="section">
+            <!-- <view class="section">
+             
+            </view> -->
+            <scroll-view class="section" bounces="false" scroll-y="true" type="list">
               <view class="section-content">
                 <van-field label="姓名" model:value="{{ name }}" maxlength="15" placeholder="请填写享用者姓名" />
                 <van-field label="电话号码" model:value="{{ phone }}" maxlength="11" type="number" placeholder="请填写电话号码" />
@@ -185,7 +188,8 @@
                 <van-field value="{{ currentGradeTxt }}" label="所在年级" placeholder="请选择所在年级" is-link readonly bind:tap="onSelectGradeClass" />
                 <van-field value="{{ currentClassTxt }}" label="所在班级" placeholder="请选择所在年级" is-link readonly bind:tap="onSelectClass" />
               </view>
-            </view>
+            </scroll-view>
+
 
             <view class="pop-btn-group">
               <button disabled="{{ buyerLoading }}" class="submit-btn" bind:tap="onSubmitBuyer">保存信息</button>

BIN
miniprogram/pages/orders/images/address-top.png


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

@@ -89,7 +89,7 @@ page {
     color: #131415;
     line-height: 40rpx;
 
-    width: 520rpx;
+    width: 550rpx;
     white-space: nowrap;
     overflow: hidden;
     text-overflow: ellipsis;
@@ -100,6 +100,15 @@ page {
     font-size: 26rpx;
     color: #777777;
     line-height: 34rpx;
+    display: flex;
+
+    .username {
+      display: inline-block;
+      max-width: 240rpx;
+      white-space: nowrap;
+      overflow: hidden;
+      text-overflow: ellipsis;
+    }
 
     text {
       padding-right: 24rpx;
@@ -524,7 +533,7 @@ page {
   }
 
   button {
-    margin-left: 12rpx !important;
+    margin-left: 24rpx !important;
     width: 240rpx !important;
     line-height: 88rpx;
     background: linear-gradient(270deg, #FF204B 0%, #FE5B71 100%);

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

@@ -22,7 +22,7 @@
               {{ receiveAddressInfo.addressDetail }}
             </view>
             <view class="address">
-              <text>{{ receiveAddressInfo.name }}</text>
+              <text class="username">{{ receiveAddressInfo.name }}</text>
               <text>{{ receiveAddressInfo.phoneNumber }}</text>
             </view>
           </view>

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

@@ -199,7 +199,7 @@ Page({
   },
   onOne() {
     wx.redirectTo({
-      url: '../index/index',
+      url: '../index/index?currentIndex=1',
     })
   },
   onDetail(e: any) {

+ 1 - 1
miniprogram/pages/orders/orders.wxml

@@ -1,6 +1,6 @@
 <!--pages/orders/orders.wxml-->
 <view class="container">
-  <navigation-bar title="我的订单"></navigation-bar>
+  <navigation-bar title="订单列表"></navigation-bar>
 
   <view class="record-content">
     <view class="record-tab">