瀏覽代碼

修改样式

lex-xin 4 月之前
父節點
當前提交
78ba234e57

+ 136 - 122
miniprogram/pages/index/index.less

@@ -68,12 +68,13 @@ page {
 
 .shop-section {
   background: #FFFFFF;
-  padding: 20rpx 32rpx 24rpx;
+  // padding: 20rpx 32rpx 24rpx;
+  padding-bottom: 80rpx;
 
   .main-goods {
     width: 100%;
     height: 160rpx;
-    background: url('https://oss.dayaedu.com/ktyq/1732175749177.png') no-repeat center;
+    background: url('https://oss.dayaedu.com/ktyq/1733109076504.png') no-repeat center;
     background-size: contain;
   }
 
@@ -332,7 +333,7 @@ page {
 
 .goodsSection {
   // margin-bottom: 156rpx;
-  margin-top: 12rpx;
+  // margin-top: 12rpx;
   background: #FFFFFF;
   padding-bottom: 162rpx;
 
@@ -493,138 +494,150 @@ page {
     width: 100%;
     background: #FFFFFF;
     border-radius: 32rpx 32rpx 0rpx 0rpx;
-    padding: 40rpx 32rpx 58rpx;
+    padding: 48rpx 32rpx 58rpx;
     box-sizing: border-box;
 
-    .goodsInfo {
-      padding-bottom: 28rpx;
-      min-height: 300rpx;
-      .goodsItem {
-        height: 102rpx;
-        margin-bottom: 22rpx;
-        // flex: 1;
-        width: 31.53%;
-        margin-right: 2%;
-        max-width: 31.53%;
-        &:nth-child(3n + 3) {
-          margin-right: 0;
-        }
-
-        &.selected .select-arrow {
-          display: none !important;
-        }
-        .nameorprice {
-          height: 82rpx;
-          display: flex;
-          flex-direction: column;
-          justify-content: space-between;
-        }
-      }
-
-      .goodsList {
-        max-height: 480rpx;
-        overflow-y: auto;
-        overflow-x: hidden;
-
-        &::-webkit-scrollbar {
-          display: none;
-        }
-
-        flex-wrap: wrap;
-        width: 100%;
-
-        .pic {
-          width: 82rpx;
-          height: 82rpx;
-        }
-      }
+    &::before {
+      content: '';
+      position: absolute;
+      top: 0;
+      left: 0;
+      right: 0;
+      width: 100%;
+      height: 30rpx;
+      background: linear-gradient( 180deg, #FBEAD0 0%, #FFFFFF 100%);
+      border-radius: 32rpx 32rpx 0rpx 0rpx;
     }
+
+  //   .goodsInfo {
+  //     padding-bottom: 28rpx;
+  //     min-height: 300rpx;
+  //     .goodsItem {
+  //       height: 102rpx;
+  //       margin-bottom: 22rpx;
+  //       // flex: 1;
+  //       width: 31.53%;
+  //       margin-right: 2%;
+  //       max-width: 31.53%;
+  //       &:nth-child(3n + 3) {
+  //         margin-right: 0;
+  //       }
+
+  //       &.selected .select-arrow {
+  //         display: none !important;
+  //       }
+  //       .nameorprice {
+  //         height: 82rpx;
+  //         display: flex;
+  //         flex-direction: column;
+  //         justify-content: space-between;
+  //       }
+  //     }
+
+  //     .goodsList {
+  //       max-height: 480rpx;
+  //       overflow-y: auto;
+  //       overflow-x: hidden;
+
+  //       &::-webkit-scrollbar {
+  //         display: none;
+  //       }
+
+  //       flex-wrap: wrap;
+  //       width: 100%;
+
+  //       .pic {
+  //         width: 82rpx;
+  //         height: 82rpx;
+  //       }
+  //     }
+  //   }
   }
 
   .iconClose {
     position: absolute;
-    right: 40rpx;
-    top: 40rpx;
+    right: 32rpx;
+    top: 32rpx;
     width: 30rpx;
     height: 30rpx;
   }
 
 
-  .product-section {
-    display: flex;
-    padding-bottom: 40rpx;
-
-    .product-img {
-      width: 160rpx;
-      height: 160rpx;
-      flex-shrink: 0;
-      margin-right: 32rpx;
-      border-radius: 12rpx;
-      overflow: hidden;
-
-      image {
-        width: 100%;
-        height: 100%;
-      }
-    }
-
-    .product-left {
-      display: flex;
-      align-items: flex-start;
-
-      .currentPrice {
-        font-weight: bold;
-        color: #FE2451;
-        font-family: DINAlternate, DINAlternate;
-
-        .stuff {
-          font-size: 32rpx;
-        }
-
-        .priceZ {
-          font-family: DINAlternate, DINAlternate;
-          font-size: 56rpx;
-        }
-
-        .priceF {
-          font-family: DINAlternate, DINAlternate;
-          font-size: 32rpx;
-        }
-      }
-
-      .originPrice {
-        padding-left: 16rpx;
-        font-size: 28rpx;
-        color: #AAAAAA;
-        line-height: 40rpx;
-        padding-top: 30rpx;
-      }
-    }
-
-    .selected-info {
-      padding-top: 24rpx;
-      font-size: 28rpx;
-      color: #131415;
-      line-height: 40rpx;
-
-      text {
-        color: #FF0047;
-      }
-    }
-  }
-
-  .goodsInfo {
-    flex-direction: column;
-    align-items: flex-start;
-    padding-bottom: 90rpx;
+  // .product-section {
+  //   display: flex;
+  //   padding-bottom: 40rpx;
+
+  //   .product-img {
+  //     width: 160rpx;
+  //     height: 160rpx;
+  //     flex-shrink: 0;
+  //     margin-right: 32rpx;
+  //     border-radius: 12rpx;
+  //     overflow: hidden;
+
+  //     image {
+  //       width: 100%;
+  //       height: 100%;
+  //     }
+  //   }
+
+  //   .product-left {
+  //     display: flex;
+  //     align-items: flex-start;
+
+  //     .currentPrice {
+  //       font-weight: bold;
+  //       color: #FE2451;
+  //       font-family: DINAlternate, DINAlternate;
+
+  //       .stuff {
+  //         font-size: 32rpx;
+  //       }
+
+  //       .priceZ {
+  //         font-family: DINAlternate, DINAlternate;
+  //         font-size: 56rpx;
+  //       }
+
+  //       .priceF {
+  //         font-family: DINAlternate, DINAlternate;
+  //         font-size: 32rpx;
+  //       }
+  //     }
+
+  //     .originPrice {
+  //       padding-left: 16rpx;
+  //       font-size: 28rpx;
+  //       color: #AAAAAA;
+  //       line-height: 40rpx;
+  //       padding-top: 30rpx;
+  //     }
+  //   }
+
+  //   .selected-info {
+  //     padding-top: 24rpx;
+  //     font-size: 28rpx;
+  //     color: #131415;
+  //     line-height: 40rpx;
+
+  //     text {
+  //       color: #FF0047;
+  //     }
+  //   }
+  // }
 
-    .desc {
-      font-size: 28rpx;
-      color: #131415;
-      line-height: 40rpx;
-      padding-bottom: 30rpx;
-    }
-  }
+  // .goodsInfo {
+  //   flex-direction: column;
+  //   align-items: flex-start;
+  //   padding-bottom: 90rpx;
+
+  //   .desc {
+  //     font-size: 28rpx;
+  //     color: #131415;
+  //     line-height: 40rpx;
+  //     padding-bottom: 30rpx;
+  //   }
+  // }
 
   button {
     width: 100%;
@@ -637,4 +650,5 @@ page {
     padding-top: 0;
     padding-bottom: 0;
   }
+  
 }

+ 5 - 5
miniprogram/pages/index/index.ts

@@ -332,9 +332,9 @@ Page({
       scrollIntoViewType: true,
     })
   },
-  onLookMore() {
-    this.setData({
-      popupShow: true
-    })
-  }
+  // onLookMore() {
+  //   this.setData({
+  //     popupShow: true
+  //   })
+  // }
 })

+ 57 - 63
miniprogram/pages/index/index.wxml

@@ -11,62 +11,6 @@
       </swiper-item>
     </swiper>
 
-    <view class="shop-section">
-      <view class="main-goods">
-        <view class="showPrice">
-          <view class="left">
-            <view class="left-top">
-              <image class="t1" src="./images/t1.png"></image>
-            </view>
-            <view class="left-bottom">
-              <view class="currentPrice">
-                <text class="stuff">¥ </text>
-                <text class="priceZ">{{ selected.integerPart || 0 }}</text>
-                <text class="priceF">.{{ selected.decimalPart || '00' }}</text>
-              </view>
-            </view>
-          </view>
-          <view class="right">
-            <view class="right-top">
-              <block wx:if="{{ selected.originalPrice > selected.salePrice }}">
-                <view class="originPrice">原价 ¥{{ selected.originalPrice || '0.00' }}</view><text style="padding: 0 6rpx"> | </text>
-              </block>
-              <view class="saleNum">已售10W+</view>
-            </view>
-            <view class="right-bottom">
-              <view class="shopName">
-                {{ selected.name }}
-              </view>
-            </view>
-          </view>
-        </view>
-      </view>
-
-      <view class="goodsInfo">
-        <text class="desc">规格选择</text>
-        <view class="goodsList">
-          <view wx:for="{{ list }}" wx:key="index" class="goodsItem {{ item.id == selected.id ? 'selected' : '' }} {{ item.stockNum <= 0 ? 'nosale' : '' }}" bind:tap="onSelectGoods" data-id="{{ item.id }}">
-            <image class="select-arrow" src="./images/icon-down-arrow.png"></image>
-            <image class="imgSale" wx:if="{{ item.stockNum <= 0 }}" src="./images/nosale.png"></image>
-            <image class="pic" src="{{ item.pic }}"></image>
-            <view class="nameorprice">
-              <view class="name">{{ item.typeName }}</view>
-              <view class="price">¥{{ item.showSalePrice }}</view>
-            </view>
-          </view>
-        </view>
-        <image wx:if="{{ list.length > 3 }}" bind:tap="onLookMore" class="iconMore" src="./images/icon-more.png"></image>
-      </view>
-
-      <!-- 有选择商品的时候  -->
-      <view class="current-item" wx:if="{{!isOverSaled && selected.id}}">
-        您已选中:<text>{{ selected.typeName }}</text>,合计:<text>¥ {{ selected.showSalePrice }}</text>
-        <block wx:if="{{ selected.originalPrice > selected.salePrice }}">,已优惠:<text>¥ {{ selected.discountPrice }}</text></block>
-      </view>
-
-    </view>
-
-
     <view id="scroll-header" class="scroll-header" style="opacity: {{opacity}}">
       <navigation-bar back="{{false}}" title="商品详情"></navigation-bar>
       <view class="product-catagory">
@@ -94,10 +38,6 @@
           <image mode="widthFix" bind:tap="onPreivewGoodsImg" src="https://oss.dayaedu.com/ktyq/1732175031878.png" data-src="https://oss.dayaedu.com/ktyq/1732175031878.png"></image>
           <image id="type3" mode="widthFix" bind:tap="onPreivewGoodsImg" src="https://oss.dayaedu.com/ktyq/1732617269723.png" data-src="https://oss.dayaedu.com/ktyq/1732617269723.png"></image>
           <image id="type2" class="type2s" mode="widthFix" bind:tap="onPreivewGoodsImg" src="https://oss.dayaedu.com/ktyq/1732617388991.png" data-src="https://oss.dayaedu.com/ktyq/1732617388991.png"></image>
-          
-          <!-- <block wx:for="{{ goodsImgList }}" wx:key="index">
-            <image id="{{ 'type1' + (index + 1) }}" mode="widthFix" bind:tap="onPreivewGoodsImg" data-src="{{item}}" src="{{ item }}"></image>
-          </block> -->
         </view>
       </view>
     </view>
@@ -117,7 +57,7 @@
       <view class="popup-container">
         <image catch:tap="onClose" src="./images/icon-close.png" class="iconClose"></image>
 
-        <view class="product-section">
+        <!-- <view class="product-section">
           <view class="product-img">
             <image bind:tap="onPreivewGoods" data-src="{{ selected.pic }}" src="{{ selected.pic }}"></image>
           </view>
@@ -134,9 +74,9 @@
               您已选中:<text>{{ selected.typeName }}</text> <block wx:if="{{ selected.originalPrice > selected.salePrice }}">,已优惠:<text>¥ {{ selected.discountPrice }}</text></block>
             </view>
           </view>
-        </view>
+        </view> -->
 
-        <view class="goodsInfo">
+        <!-- <view class="goodsInfo">
           <view class="goodsList">
             <view wx:for="{{ list }}" wx:key="index" class="goodsItem {{ item.id == selected.id ? 'selected' : '' }} {{ item.stockNum <= 0 ? 'nosale' : '' }}" catch:tap="onSelectGoods" data-id="{{ item.id }}">
               <image class="select-arrow" src="./images/icon-down-arrow.png"></image>
@@ -148,6 +88,60 @@
               </view>
             </view>
           </view>
+        </view> -->
+        <view class="shop-section">
+          <view class="main-goods">
+            <view class="showPrice">
+              <view class="left">
+                <view class="left-top">
+                  <image class="t1" src="./images/t1.png"></image>
+                </view>
+                <view class="left-bottom">
+                  <view class="currentPrice">
+                    <text class="stuff">¥ </text>
+                    <text class="priceZ">{{ selected.integerPart || 0 }}</text>
+                    <text class="priceF">.{{ selected.decimalPart || '00' }}</text>
+                  </view>
+                </view>
+              </view>
+              <view class="right">
+                <view class="right-top">
+                  <block wx:if="{{ selected.originalPrice > selected.salePrice }}">
+                    <view class="originPrice">原价 ¥{{ selected.originalPrice || '0.00' }}</view><text style="padding: 0 6rpx"> | </text>
+                  </block>
+                  <view class="saleNum">已售10W+</view>
+                </view>
+                <view class="right-bottom">
+                  <view class="shopName">
+                    {{ selected.name }}
+                  </view>
+                </view>
+              </view>
+            </view>
+          </view>
+
+          <view class="goodsInfo">
+            <text class="desc">规格选择</text>
+            <view class="goodsList">
+              <view wx:for="{{ list }}" wx:key="index" class="goodsItem {{ item.id == selected.id ? 'selected' : '' }} {{ item.stockNum <= 0 ? 'nosale' : '' }}" bind:tap="onSelectGoods" data-id="{{ item.id }}">
+                <image class="select-arrow" src="./images/icon-down-arrow.png"></image>
+                <image class="imgSale" wx:if="{{ item.stockNum <= 0 }}" src="./images/nosale.png"></image>
+                <image class="pic" src="{{ item.pic }}"></image>
+                <view class="nameorprice">
+                  <view class="name">{{ item.typeName }}</view>
+                  <view class="price">¥{{ item.showSalePrice }}</view>
+                </view>
+              </view>
+            </view>
+            <!-- <image wx:if="{{ list.length > 3 }}" bind:tap="onLookMore" class="iconMore" src="./images/icon-more.png"></image> -->
+          </view>
+
+          <!-- 有选择商品的时候  -->
+          <view class="current-item" wx:if="{{!isOverSaled && selected.id}}">
+            您已选中:<text>{{ selected.typeName }}</text>,合计:<text>¥ {{ selected.showSalePrice }}</text>
+            <block wx:if="{{ selected.originalPrice > selected.salePrice }}">,已优惠:<text>¥ {{ selected.discountPrice }}</text></block>
+          </view>
+
         </view>
 
         <button type="primary" catch:tap="onSubmit">立即购买</button>

+ 3 - 3
miniprogram/pages/protocol/register.ts

@@ -6,7 +6,7 @@ Page({
    * 页面的初始数据
    */
   data: {
-    src: app.globalData.baseUrl + '/classroom-app/#/preview-protocol'
+    src: app.globalData.baseUrl + '/classroom-app/#/preview-protocol?wx=3'
   },
 
   /**
@@ -17,11 +17,11 @@ Page({
     if(options.type) {
       if(options.type === "privacy") {
         this.setData({
-          src: app.globalData.baseUrl + '/classroom-app/#/privacy-protocol'
+          src: app.globalData.baseUrl + '/classroom-app/#/privacy-protocol?wx=3'
         })
       } else if(options.type === "register") {
         this.setData({
-          src: app.globalData.baseUrl + '/classroom-app/#/preview-protocol'
+          src: app.globalData.baseUrl + '/classroom-app/#/preview-protocol?wx=3'
         })
       }
     }