黄琪勇 5 месяцев назад
Родитель
Сommit
b688355d81

+ 1 - 1
miniprogram/pages/address/addAddress.less

@@ -89,7 +89,7 @@
       color: #FFFFFF;
       line-height: 88rpx;
       text-align: center;
-      background: url("https://oss.dayaedu.com/ktyq/1738898417485.png") no-repeat;
+      background: url("https://oss.dayaedu.com/ktyq/1739528494657.png") no-repeat;
       background-size: 100% 100%;
     }
   }

+ 1 - 1
miniprogram/pages/address/addressList.less

@@ -157,7 +157,7 @@
       font-size: 32rpx;
       color: #FFFFFF;
       line-height: 88rpx;
-      background: url("https://oss.dayaedu.com/ktyq/1738898417485.png") no-repeat;
+      background: url("https://oss.dayaedu.com/ktyq/1739528494657.png") no-repeat;
       background-size: 100% 100%;
       display: flex;
       align-items: center;

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


BIN
miniprogram/pages/index/images/member.png


BIN
miniprogram/pages/index/images/nosale.png


+ 159 - 117
miniprogram/pages/index/index.less

@@ -5,6 +5,7 @@ page {
   flex-direction: column;
   background: #F5F6F7;
 }
+
 .scrollarea {
   flex: 1;
   overflow-y: hidden;
@@ -12,37 +13,44 @@ page {
 
 .container {
   position: relative;
+
   .slider-count {
     position: absolute;
     top: 678rpx;
     right: 0;
-    background: rgba(0,0,0,0.4);
+    background: rgba(0, 0, 0, 0.4);
     border-radius: 200rpx 0rpx 0rpx 200rpx;
     font-weight: 600;
     font-size: 28rpx;
     color: #FFFFFF;
     line-height: 40rpx;
     text-align: center;
-    padding: 4rpx 20rpx 4rpx 28rpx  ;
+    padding: 4rpx 20rpx 4rpx 28rpx;
     z-index: 1;
   }
+
   swiper {
     height: 750rpx;
   }
+
   .swiper-item {
     width: 100%;
     height: 100%;
+
     image {
       width: 100%;
       height: 100%;
     }
   }
+
   .demo-text-1 {
     background-color: red;
   }
+
   .demo-text-2 {
     background-color: black;
   }
+
   .demo-text-3 {
     background-color: gray;
   }
@@ -64,7 +72,8 @@ page {
     align-items: center;
     justify-content: center;
 
-    .before, .after {
+    .before,
+    .after {
       content: '';
       width: 68rpx;
       height: 2rpx;
@@ -72,12 +81,14 @@ page {
       opacity: 0.3;
       display: inline-block;
     }
+
     .before {
-      background: linear-gradient( 90deg, rgba(0,0,0,0) 0%, #000000 100%);
+      background: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, #000000 100%);
       margin-right: 24rpx;
     }
+
     .after {
-      background: linear-gradient( 270deg, rgba(0,0,0,0) 0%, #000000 100%);
+      background: linear-gradient(270deg, rgba(0, 0, 0, 0) 0%, #000000 100%);
       margin-left: 24rpx;
     }
   }
@@ -88,10 +99,12 @@ page {
     color: #999999;
     line-height: 40rpx;
     display: flex;
+
     view {
       padding: 8rpx 24rpx;
       margin-right: 12rpx;
     }
+
     .active {
       background: #FFDF9E;
       border-radius: 28rpx;
@@ -102,6 +115,7 @@ page {
 
   .images {
     font-size: 0;
+
     image {
       display: block;
       width: 100%;
@@ -109,17 +123,19 @@ page {
   }
 }
 
-.bottom-sectionBox{
+.bottom-sectionBox {
   position: fixed;
   display: flex;
   flex-direction: column;
-  .orders{
+
+  .orders {
     width: 148rpx;
     height: 150rpx;
     background: url("https://oss.dayaedu.com/ktyq/1739521394910.png") no-repeat;
     background-size: 100% 100%;
   }
-  .btnSection{
+
+  .btnSection {
     margin-top: 20rpx;
     width: 148rpx;
     height: 150rpx;
@@ -143,9 +159,10 @@ page {
     left: 0;
     right: 0;
     bottom: 0;
-    background-color: rgba(0,0,0,0.6);
+    background-color: rgba(0, 0, 0, 0.6);
     z-index: 9;
   }
+
   .popup-container {
     position: fixed;
     bottom: 0;
@@ -157,16 +174,28 @@ page {
     border-radius: 32rpx 32rpx 0rpx 0rpx;
     padding: 40rpx 0 56rpx;
     box-sizing: border-box;
+
+    .topTit {
+      font-weight: 600;
+      font-size: 36rpx;
+      color: #131415;
+      line-height: 50rpx;
+      text-align: center;
+      margin-bottom: 40rpx;
+    }
+
     .iconClose {
       position: absolute;
       right: 40rpx;
-      top: 40rpx;
+      top: 50rpx;
       width: 32rpx;
       height: 32rpx;
     }
+
     .product-section {
       display: flex;
-      padding: 0 40rpx;
+      padding: 0 26rpx;
+
       .product-img {
         width: 160rpx;
         height: 160rpx;
@@ -174,50 +203,60 @@ page {
         margin-right: 32rpx;
         border-radius: 6px;
         overflow: hidden;
+
         image {
           width: 100%;
           height: 100%;
         }
       }
+
       .product-left {
         display: flex;
         flex-direction: column;
         align-items: flex-start;
+        justify-content: center;
         overflow: hidden;
+
         .price-s {
           display: flex;
           align-items: center;
-          .priceImg{
+
+          .priceImg {
             margin-right: 8rpx;
             width: 96rpx;
             height: 40rpx;
           }
+
           .currentPrice {
             font-weight: bold;
-            color: #000000;
+            color: #FE462E;
             font-family: DINAlternate, DINAlternate;
             line-height: 1;
+
             .stuff {
               font-size: 32rpx;
             }
-            .numberDisplay--integer{
+
+            .numberDisplay--integer {
               line-height: 60rpx;
               font-size: 52rpx;
             }
-            .numberDisplay--decimal{
+
+            .numberDisplay--decimal {
               font-size: 32rpx;
             }
           }
+
           .originPrice {
-            margin-left: 8rpx;
+            margin-left: 12rpx;
             font-weight: 400;
             font-size: 28rpx;
             color: #AAAAAA;
-            text-decoration: line-through;
           }
         }
+
         .current-s {
-          margin-top: 8rpx;
+          margin-top: 16rpx;
           font-weight: 400;
           font-size: 26rpx;
           color: #777777;
@@ -227,8 +266,9 @@ page {
           overflow: hidden;
           text-overflow: ellipsis;
         }
-        .discountCon{
-          margin-top: 16rpx;
+
+        .discountCon {
+          margin-top: 10rpx;
           font-weight: 400;
           font-size: 24rpx;
           color: #FD4502;
@@ -239,97 +279,91 @@ page {
         }
       }
     }
-    .memberBox{
-      margin: 48rpx 40rpx;
+
+    .memberBox {
+      margin: 48rpx 26rpx;
       background: #F5F6F7;
       border-radius: 20rpx;
       border: 3rpx solid transparent;
+
       &.showMemberInfoTip{
         border-color: #FD4502;
       }
-      .memberCon{
+      .memberCon {
         padding: 24rpx;
         display: flex;
         justify-content: space-between;
-        align-items: center;
-        .memberImg{
+        position: relative;
+
+        .memberImg {
+          margin-top: 4rpx;
           width: 44rpx;
           height: 44rpx;
-        }
-        .info{
-          flex-grow: 1;
-          margin-left: 16rpx;
-          font-weight: 600;
-          font-size: 28rpx;
-          color: #131415;
-          line-height: 40rpx;
-        }
-        .chevronImg{
           flex-shrink: 0;
-          width: 32rpx;
-          height: 32rpx;
-        }
-        .memberInfoCon{
-          overflow: hidden;
-        }
-        .infoCon {
-          display: flex;
-          align-items: center;
-          font-weight: 600;
-          font-size: 28rpx;
-          color: #131415;
-          line-height: 40rpx;
-          .tip {
-            flex-shrink: 0;
-            width: 44rpx;
-            height: 44rpx;
-          }
-          .name{
-            margin-left: 16rpx;
-            white-space: nowrap;
-            overflow: hidden;
-            text-overflow: ellipsis;
-          }
-          .phone {
-            flex-shrink: 0;
-            margin-left: 16rpx;
-          }
         }
-        .schoolInfoCon{
-          margin-top: 20rpx;
+
+        .infoBox {
+          margin-left: 12rpx;
           display: flex;
-          align-items: center;
-          .schoolInfo{
-            margin-right: 8rpx;
-            border-radius: 4rpx;
-            border: 1.6rpx solid rgba(15,179,96,0.5);
-            padding: 2rpx 6rpx;
-            font-weight: 400;
-            font-size: 20rpx;
-            color: #0FB360;
-            line-height: 32rpx;
-            flex-shrink: 0;
+          flex-direction: column;
+          flex-grow: 1;
+          margin-right: 42rpx;
+          overflow: hidden;
+
+          .topInfo {
+            font-weight: 600;
+            font-size: 28rpx;
+            color: #131415;
+            line-height: 40rpx;
           }
-          .schoolInfoDes{
-            margin-right: 10rpx;
+
+          .info {
+            margin-top: 14rpx;
             font-weight: 400;
             font-size: 24rpx;
-            color: #777777;
-            line-height: 32rpx;
+            color: rgba(19, 20, 21, 0.4);
+            line-height: 34rpx;
             white-space: nowrap;
             overflow: hidden;
             text-overflow: ellipsis;
           }
+
+          .infoCon {
+            display: flex;
+            align-items: center;
+
+            .name {
+              white-space: nowrap;
+              overflow: hidden;
+              text-overflow: ellipsis;
+            }
+
+            .phone {
+              flex-shrink: 0;
+              margin-left: 16rpx;
+            }
+          }
+        }
+
+        .chevronImg {
+          position: absolute;
+          right: 24rpx;
+          top: 50%;
+          transform: translateY(-50%);
+          width: 32rpx;
+          height: 32rpx;
         }
       }
     }
+
     .btnSections {
       margin-top: 20rpx;
-      padding: 0 40rpx;
+      padding: 0 26rpx;
+
       button {
         width: 100%;
         line-height: 88rpx;
-        background: url("https://oss.dayaedu.com/ktyq/1738898417485.png") no-repeat;
+        background: url("https://oss.dayaedu.com/ktyq/1739528494657.png") no-repeat;
         background-size: 100% 100%;
         font-weight: 500;
         font-size: 32rpx;
@@ -337,82 +371,87 @@ page {
         padding-top: 0;
         padding-bottom: 0;
         border-radius: 78rpx;
+
         &[disabled][type=primary] {
           color: #fff;
           opacity: 0.7;
         }
       }
     }
+
     .goodsInfo {
-      padding: 0 40rpx;
+      margin-top: 48rpx;
+      padding: 0 26rpx;
       max-height: 578rpx;
       overflow-x: hidden;
       overflow-y: auto;
+
       &::-webkit-scrollbar {
         display: none;
       }
+
       .desc {
         margin-top: 48rpx;
-        font-weight: 600;
-        font-size: 28rpx;
-        line-height: 40rpx;
-        color: #131415;
-        &:first-child{
+        font-weight: 400;
+        font-size: 26rpx;
+        color: #777777;
+        line-height: 36rpx;
+
+        &:first-child {
           margin-top: 0;
         }
-        text{
-          color: #FD4502;
-        }
       }
+
       .goodsList {
         display: flex;
         flex-wrap: wrap;
-        &.instrumentsList{
-          .goodsItem{
+
+        &.instrumentsList {
+          .goodsItem {
             padding: 10rpx 24rpx;
           }
         }
+
         .goodsItem {
           margin-right: 24rpx;
           margin-top: 24rpx;
-          padding: 10rpx 30rpx;
-          background: #F2F2F2;
-          border-radius: 12rpx;
+          padding: 12rpx 50rpx;
+          border-radius: 34rpx;
           font-weight: 400;
-          font-size: 28rpx;
+          font-size: 26rpx;
           color: #444444;
-          line-height: 40rpx;
+          line-height: 36rpx;
           position: relative;
-          border:2.4rpx solid transparent;
-          &.instrumentsGoodsItem{
+          border: 2.4rpx solid #DCDCDC;
+
+          &.instrumentsGoodsItem {
             display: flex;
             align-items: center;
-            view{
+
+            view {
               margin: 0 16rpx;
               width: 2rpx;
               height: 32rpx;
-              background: rgba(0,0,0,0.3);
+              background: rgba(0, 0, 0, 0.3);
             }
           }
-          &.nosale{
+
+          &.nosale {
             color: #BBBBBB;
           }
-          &.selected{
-            background: #E6FADB;
-            font-weight: 600;
-            color: #0AAF5F;
-            border-color: #51BA35;
-            border-radius: 12rpx;
-            view{
-              background: #0AAF5F; 
-            }
+
+          &.selected {
+            background: rgba(255,240,238,0.5);
+            color: #FE462E;
+            border-color: rgba(254,70,46,0.5);
           }
-          .iconSale{
+
+          .iconSale {
             position: absolute;
             width: 56rpx;
             height: 28rpx;
-            right: -14rpx;
-            top: -14rpx;
+            right: -12rpx;
+            top: -12rpx;
           }
         }
       }
@@ -427,11 +466,12 @@ page {
   left: 0;
   right: 0;
   height: 378rpx;
-  background: linear-gradient( 180deg, rgba(255,255,255,0) 0%, #FFFFFF 100%);
+  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #FFFFFF 100%);
   display: flex;
   justify-content: center;
   align-items: flex-end;
   pointer-events: none;
+
   .iconUpScroll {
     width: 80rpx;
     height: 80rpx;
@@ -445,9 +485,11 @@ page {
       opacity: 1;
       transform: translateY(0rpx);
     }
-    75%{
+
+    75% {
       opacity: 1;
     }
+
     100% {
       opacity: 0;
       transform: translateY(-50rpx);

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

@@ -46,7 +46,8 @@ Page({
    */
   async onInit() {
     try {
-      const [{ data }, { data: instrumentsData }] = await Promise.all([api_shopProduct({ appId: app.globalData.appId }), api_shopInstruments({ appId: app.globalData.appId })])
+      // const [{ data }, { data: instrumentsData }] = await Promise.all([api_shopProduct({ appId: app.globalData.appId }), api_shopInstruments({ appId: app.globalData.appId })])
+      const [{ data }] = await Promise.all([api_shopProduct({ appId: app.globalData.appId })])
       // 商品
       const list = data.data || []
       let selected: any = {}
@@ -65,7 +66,8 @@ Page({
         selected = list[0]
       }
       // 乐器
-      const instrumentsList = instrumentsData.data
+      // const instrumentsList = instrumentsData.data
+      const instrumentsList = []
       this.setData({
         list,
         isOverSaled,
@@ -176,7 +178,7 @@ Page({
       }
       if (!that.data.memberInfo.id) {
         wx.showToast({
-          title: "请填写会员信息",
+          title: "请填写会员资料",
           icon: 'none'
         })
         that.setData({

+ 35 - 28
miniprogram/pages/index/index.wxml

@@ -20,66 +20,73 @@
     <view class="popup-section" wx:if="{{popupShow}}">
       <view class="popup-mask" bind:tap="onClose"></view>
       <view class="popup-container">
+        <view class="topTit">选择规格</view>
         <image bind:tap="onClose" src="./images/icon-close.png" class="iconClose"></image>
-
+        <view class="memberBox {{isShowMemberInfoTip?'showMemberInfoTip':''}}">
+          <view wx:if="{{ !memberInfo.id }}" class="memberCon" bind:tap="onMemberInfo">
+            <image class="memberImg" src="./images/member.png"></image>
+            <view class="infoBox">
+              <text class="topInfo">请先完善会员资料</text>
+              <text class="info">为了给您更好的服务,请认真填写~</text>
+            </view>
+            <image class="chevronImg" src="./images/chevron.png"></image>
+          </view>
+          <view wx:else class="memberCon" bind:tap="onMemberInfo">
+            <image class="memberImg" src="./images/member.png"></image>
+            <view class="infoBox">
+              <view class="infoCon">
+                <text class="name">{{memberInfo.name}}</text>
+                <text class="phone">{{memberInfo.phone}}</text>
+              </view>
+              <text class="info">{{ memberInfo.schoolInfo }}</text>
+            </view>
+            <image class="chevronImg" src="./images/chevron.png"></image>
+          </view>
+        </view>
         <view class="product-section">
           <view class="product-img">
             <image bind:tap="onPreivewGoods" data-src="{{ selected.pic }}" src="{{ selected.pic }}"></image>
           </view>
           <view class="product-left">
             <view class="price-s">
-              <image wx:if="{{selected.originalPrice + (selectedInstruments.originalPrice || 0) - (selected.salePrice + (selectedInstruments.salePrice || 0)) > 0}}" class="priceImg" src="./images/yhj.png" />
+              <!-- <image wx:if="{{selected.originalPrice + (selectedInstruments.originalPrice || 0) - (selected.salePrice + (selectedInstruments.salePrice || 0)) > 0}}" class="priceImg" src="./images/yhj.png" /> -->
               <view class="currentPrice">
                 <text class="stuff">¥ </text>
                 <numberDisplay number="{{ selected.salePrice + (selectedInstruments.salePrice || 0) }}" />
-                <text wx:if="{{selected.originalPrice + (selectedInstruments.originalPrice || 0) - (selected.salePrice + (selectedInstruments.salePrice || 0)) > 0}}" class="originPrice">¥{{ my.formatValue(selected.originalPrice + (selectedInstruments.originalPrice || 0)) }}</text>
+                <text wx:if="{{selected.originalPrice + (selectedInstruments.originalPrice || 0) - (selected.salePrice + (selectedInstruments.salePrice || 0)) > 0}}" class="originPrice">原价¥{{ my.formatValue(selected.originalPrice + (selectedInstruments.originalPrice || 0)) }}</text>
               </view>
             </view>
             <view class="current-s">
-              当前选中:{{ selected.typeName + (selectedInstruments.name?"+"+selectedInstruments.name:"")}}
+              已选中:{{ "VIP会员"+selected.typeName + (selectedInstruments.name?"+"+selectedInstruments.name:"")}}
             </view>
-            <view wx:if="{{selected.originalPrice + (selectedInstruments.originalPrice || 0) - (selected.salePrice + (selectedInstruments.salePrice || 0)) > 0}}" class="discountCon">已优惠 ¥{{my.formatValue(selected.originalPrice + (selectedInstruments.originalPrice || 0) - (selected.salePrice + (selectedInstruments.salePrice || 0)))}}</view>
+            <!-- <view wx:if="{{selected.originalPrice + (selectedInstruments.originalPrice || 0) - (selected.salePrice + (selectedInstruments.salePrice || 0)) > 0}}" class="discountCon">已优惠 ¥{{my.formatValue(selected.originalPrice + (selectedInstruments.originalPrice || 0) - (selected.salePrice + (selectedInstruments.salePrice || 0)))}}</view> -->
           </view>
         </view>
-        <view class="memberBox {{isShowMemberInfoTip?'showMemberInfoTip':''}}">
-          <view wx:if="{{ !memberInfo.id }}" class="memberCon" bind:tap="onMemberInfo">
-            <image class="memberImg" src="./images/member.png"></image>
-            <text class="info">请填写会员信息</text>
-            <image class="chevronImg" src="./images/chevron.png"></image>
-          </view>
-          <view wx:else class="memberCon" bind:tap="onMemberInfo">
-            <view class="memberInfoCon">
-              <view class="infoCon">
-                <image class="tip" src="./images/member.png" />
-                <text class="name">{{memberInfo.name}}</text>
-                <text class="phone">{{memberInfo.phone}}</text>
-              </view>
-              <view class="schoolInfoCon">
-                <text class="schoolInfo">学校信息</text><text class="schoolInfoDes">{{memberInfo.schoolInfo}}</text>
-              </view>
+        <view class="goodsInfo">
+          <view class="desc">类型</view>
+          <view class="goodsList">
+            <view class="goodsItem selected">
+              <text class="name">VIP会员</text>
             </view>
-            <image class="chevronImg" src="./images/chevron.png"></image>
           </view>
-        </view>
-        <view class="goodsInfo">
-          <view class="desc"><text>*</text>会员卡类型</view>
+          <view class="desc">时长</view>
           <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 }}">
               <text class="name">{{ item.typeName }}</text>
               <image class="iconSale" wx:if="{{ item.stockNum <= 0 }}" src="./images/nosale.png"></image>
             </view>
           </view>
-          <view wx:if="{{ instrumentsList.length > 0 }}" class="desc">乐器套装</view>
+          <!-- <view wx:if="{{ instrumentsList.length > 0 }}" class="desc">乐器套装</view>
           <view wx:if="{{ instrumentsList.length > 0 }}" class="goodsList instrumentsList">
             <view wx:for="{{ instrumentsList }}" wx:key="index" class="goodsItem instrumentsGoodsItem {{ item.id == selectedInstruments.id ? 'selected' : '' }}" bind:tap="onSelectInstrumentsGoods" data-index="{{ index }}">
               <text class="name">{{ item.name }}</text>
               <view></view>
               <text>{{ "¥" + my.formatValue(item.salePrice) }}</text>
             </view>
-          </view>
+          </view> -->
         </view>
 
-        <view class="btnSections"><button type="primary" disabled="{{ isOverSaled }}" bind:tap="onSubmit">立即购买</button></view>
+        <view class="btnSections"><button type="primary" disabled="{{ isOverSaled }}" bind:tap="onSubmit">立即获取</button></view>
       </view>
     </view>
 

+ 1 - 1
miniprogram/pages/member/addMember.less

@@ -179,7 +179,7 @@
       color: #FFFFFF;
       text-align: center;
       line-height: 88rpx;
-      background: url("https://oss.dayaedu.com/ktyq/1738898417485.png") no-repeat;
+      background: url("https://oss.dayaedu.com/ktyq/1739528494657.png") no-repeat;
       background-size: 100% 100%;
     }
   }

+ 1 - 1
miniprogram/pages/member/memberList.less

@@ -157,7 +157,7 @@
       font-size: 32rpx;
       color: #FFFFFF;
       line-height: 88rpx;
-      background: url("https://oss.dayaedu.com/ktyq/1738898417485.png") no-repeat;
+      background: url("https://oss.dayaedu.com/ktyq/1739528494657.png") no-repeat;
       background-size: 100% 100%;
       display: flex;
       align-items: center;