Browse Source

修改样式

lex-xin 4 months ago
parent
commit
c43ce4a0f5

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

@@ -62,10 +62,10 @@
       <view class="goodsIntro">
         <view class="title">图文详情</view>
         <view class="images">
-          <image class="img1" src="https://oss.dayaedu.com/ktyq/1731664304424.png"></image>
-          <image class="img2" src="https://oss.dayaedu.com/ktyq/1731664318588.png"></image>
-          <image class="img3" src="https://oss.dayaedu.com/ktyq/1731664330981.png"></image>
-          <image class="img4" src="https://oss.dayaedu.com/ktyq/1732085582320.png"></image>
+          <image mode="widthFix" src="https://oss.dayaedu.com/ktyq/1731664304424.png"></image>
+          <image mode="widthFix" src="https://oss.dayaedu.com/ktyq/1731664318588.png"></image>
+          <image mode="widthFix" src="https://oss.dayaedu.com/ktyq/1731664330981.png"></image>
+          <image mode="widthFix" src="https://oss.dayaedu.com/ktyq/1732085582320.png"></image>
         </view>
       </view>
     </view>

+ 14 - 78
miniprogram/pages/orders/order-result.less

@@ -6,6 +6,10 @@ page {
   background: #F5F6F7;
 }
 
+.scroll-container {
+  padding-bottom: 174rpx;
+}
+
 .order-status {
   margin: 24rpx 26rpx 0;
   background-color: #FFFFFF;
@@ -101,14 +105,13 @@ page {
       line-height: 36rpx;
     }
   }
-
 }
 .only_canvas {
   position: absolute;
   left: -300rpx;
   top: 0;
-  width: 202rpx;
-  height: 202rpx;
+  width: 262rpx;
+  height: 262rpx;
 }
 .qrcode-section {
   margin-top: 28rpx;
@@ -121,6 +124,7 @@ page {
     border: 3rpx solid #EDEDED;
     padding: 10rpx;
     display: inline-block;
+    font-size: 0;
   }
   .my_draw_canvas {
     width: 262rpx;
@@ -175,6 +179,13 @@ page {
     }
   }
 }
+.btn-refound {
+  padding-top: 40rpx;
+  text-align: center;
+  font-size: 28rpx;
+  color: #A7ABAF;
+  line-height: 40rpx;
+}
 
 .order-btn {
   position: fixed;
@@ -241,79 +252,4 @@ page {
     color: #FFFFFF;
     line-height: 44rpx;
   }
-}
-
-.useRefound-pop {
-  position: fixed;
-  top: 0;
-  left: 0;
-  right: 0;
-  bottom: 0;
-
-  .useRefound-mask {
-    position: absolute;
-    top: 0;
-    left: 0;
-    right: 0;
-    bottom: 0;
-    background-color: rgba(0, 0, 0, 0.6);
-  }
-  .useRefound-container {
-    position: absolute;
-    left: 0;
-    right: 0;
-    bottom: 0;
-    width: 100%;
-    background: linear-gradient( 180deg, #FFDEE7 0%, #FFFFFF 12%, #FFFFFF 100%);
-    background-color: #fff;
-    border-radius: 32rpx 32rpx 0rpx 0rpx;
-    .icon-close {
-      position: absolute;
-      width: 38rpx;
-      height: 38rpx;
-      top: 40rpx;
-      right: 40rpx;
-    }
-    .use-title {
-      font-weight: 600;
-      font-size: 36rpx;
-      color: #131415;
-      line-height: 50rpx;
-      padding-top: 34rpx;
-      padding-bottom: 30rpx;
-      text-align: center;
-    }
-    .use-form {
-      margin: 0 40rpx;
-      background: #F7F8F9;
-      border-radius: 16rpx;
-      padding: 16rpx 16rpx 8rpx;
-      margin-bottom: 80rpx;
-      textarea {
-        height: 140rpx;
-        font-size: 30rpx;
-      }
-      .num {
-        text-align: right;
-        font-size: 26rpx;
-        color: #AAAAAA;
-        line-height: 42rpx;
-      }
-    }
-
-    .btnSection {
-      padding: 0 32rpx 58rpx;
-      button {
-        margin: 0;
-        width: 100%;
-        background: linear-gradient( 270deg, #FF204B 0%, #FE5B71 100%);
-        border-radius: 78rpx;
-        padding: 22rpx 84rpx;
-        font-weight: 500;
-        font-size: 32rpx;
-        color: #FFFFFF;
-        line-height: 44rpx;
-      }
-    }
-  }
 }

+ 55 - 51
miniprogram/pages/orders/order-result.wxml

@@ -3,65 +3,69 @@
   <navigation-bar title="订单详情"></navigation-bar>
 
   <scroll-view class="record-list" type="list" scroll-y bindscrolltolower="loadMore">
-    <view class="order-status" wx:if="{{statusList[status]}}">
-      <view class="status">
-        <image src="{{ statusList[status].logo }}"></image>
-        <text>{{ statusList[status].title }}</text>
+    <view class="scroll-container">
+      <view class="order-status" wx:if="{{statusList[status]}}">
+        <view class="status">
+          <image src="{{ statusList[status].logo }}"></image>
+          <text>{{ statusList[status].title }}</text>
+        </view>
+        <view class="tips" wx:if="{{ statusList[status].content }}">{{ statusList[status].content }}</view>
       </view>
-      <view class="tips" wx:if="{{ statusList[status].content }}">{{ statusList[status].content }}</view>
-    </view>
 
-    <view class="order-content">
-      <view class="item-content" wx:for="{{ goodsInfo.goods }}" wx:key="index">
-        <image class='goods-icon' src="{{ item.goodsUrl }}" mode="" />
-        <view class="goods-desc">
-          <view class="goodsInfo">
-            <view class="goods-name">{{ item.goodsName }}</view>
-            <view class="goods-price">¥ {{ item.originalPrice }}</view>
-          </view>
-          <view class="goods-type">
-            <view class="goods-card">{{ item.typeName }}</view>
-            <view class="goods-num">x1</view>
+      <view class="order-content">
+        <view class="item-content" wx:for="{{ goodsInfo.goods }}" wx:key="index">
+          <image class='goods-icon' src="{{ item.goodsUrl }}" mode="" />
+          <view class="goods-desc">
+            <view class="goodsInfo">
+              <view class="goods-name">{{ item.goodsName }}</view>
+              <view class="goods-price">¥ {{ item.originalPrice }}</view>
+            </view>
+            <view class="goods-type">
+              <view class="goods-card">{{ item.typeName }}</view>
+              <view class="goods-num">x1</view>
+            </view>
           </view>
         </view>
-      </view>
-      <view class="qrcode-section" wx:if="{{ (goodsInfo.wechatStatus == 'PAID' || goodsInfo.wechatStatus == 'WAIT_USE') && showCanvas }}">
-        <view class="qrcode-wrap">
-          <!-- <canvas class='my_draw_canvas' data-type="image" canvas-id='canvasCode' id="canvasCode"></canvas> -->
-          <image src="{{canvasImg}}" mode="scaleToFill" class='my_draw_canvas' style="opacity: {{ goodsInfo.wechatStatus == 'PAID' ? 0.4 : 1 }};" show-menu-by-longpress="true"></image>
+        <view class="qrcode-section" wx:if="{{ (goodsInfo.wechatStatus == 'PAID' || goodsInfo.wechatStatus == 'WAIT_USE') && showCanvas }}">
+          <view class="qrcode-wrap">
+            <!-- <canvas class='my_draw_canvas' data-type="image" canvas-id='canvasCode' id="canvasCode"></canvas> -->
+            <image src="{{canvasImg}}" mode="scaleToFill" class='my_draw_canvas' style="opacity: {{ goodsInfo.wechatStatus == 'PAID' ? 0.4 : 1 }};" show-menu-by-longpress="true"></image>
+          </view>
+          <view class="qrcode-text" wx:if="{{goodsInfo.wechatStatus == 'WAIT_USE'}}">请扫描二维码激活使用</view>
+          <view class="qrcode-text used" wx:else>二维码已使用</view>
         </view>
-        <view class="qrcode-text" wx:if="{{goodsInfo.wechatStatus == 'WAIT_USE'}}">请扫描二维码激活使用</view>
-        <view class="qrcode-text used" wx:else>二维码已使用</view>
       </view>
-    </view>
 
-    <canvas class='my_draw_canvas only_canvas' data-type="image" canvas-id='canvasCode' id="canvasCode"></canvas>
+      <canvas class='my_draw_canvas only_canvas' data-type="image" canvas-id='canvasCode' id="canvasCode"></canvas>
 
-    <view class="order-time">
-      <view class="order-item">
-        <view class="title">订单号</view>
-        <view class="value">{{ goodsInfo.orderNo }}
-          <view class="copy" bind:tap="onCopy" data-orderno="{{goodsInfo.orderNo}}">复制</view></view>
-      </view>
-      <view class="order-item">
-        <view class="title">下单时间</view>
-        <view class="value">{{ goodsInfo.createTime }}</view>
+      <view class="order-time">
+        <view class="order-item">
+          <view class="title">订单号</view>
+          <view class="value">{{ goodsInfo.orderNo }}
+            <view class="copy" bind:tap="onCopy" data-orderno="{{goodsInfo.orderNo}}">复制</view></view>
+        </view>
+        <view class="order-item">
+          <view class="title">下单时间</view>
+          <view class="value">{{ goodsInfo.createTime }}</view>
+        </view>
       </view>
-    </view>
 
-    <view class="order-time" wx:if="{{ goodsInfo.wechatStatus == 'REFUNDED' }}">
-      <view class="order-item">
-        <view class="title">{{ goodsInfo.wechatStatus == 'REFUNDED' ? '退款时间' : '申请退款时间' }}</view>
-        <view class="value">{{ goodsInfo.refundTime }}</view>
-      </view>
-      <view class="order-item">
-        <view class="title">退款金额</view>
-        <view class="value red">¥{{ goodsInfo.refundAmount }}</view>
-      </view>
-      <view class="order-item">
-        <view class="title">退款路径</view>
-        <view class="value">{{ goodsInfo.refundStyleStr }}</view>
+      <view class="order-time" wx:if="{{ goodsInfo.wechatStatus == 'REFUNDED' }}">
+        <view class="order-item">
+          <view class="title">{{ goodsInfo.wechatStatus == 'REFUNDED' ? '退款时间' : '申请退款时间' }}</view>
+          <view class="value">{{ goodsInfo.refundTime }}</view>
+        </view>
+        <view class="order-item">
+          <view class="title">退款金额</view>
+          <view class="value red">¥{{ goodsInfo.refundAmount }}</view>
+        </view>
+        <view class="order-item">
+          <view class="title">退款路径</view>
+          <view class="value">{{ goodsInfo.refundStyleStr }}</view>
+        </view>
       </view>
+
+      <view class="btn-refound" bind:tap="useRefound">申请退款</view>
     </view>
   </scroll-view>
 
@@ -70,11 +74,11 @@
       <image src="./images/icon-service.png" />
       <text>客服</text>
     </view>
-    <button type="primary" bind:tap="useRefound" wx:if="{{ goodsInfo.wechatStatus == 'WAIT_USE' }}">申请退款</button>
-    <block wx:else>
+    <!-- <button type="primary" bind:tap="useRefound" wx:if="{{ goodsInfo.wechatStatus == 'WAIT_USE' }}">申请退款</button>
+    <block wx:else> -->
       <button type="primary" bind:tap="cancelRefound" wx:if="{{ goodsInfo.wechatStatus == 'REFUNDING' }}">取消退款</button>
       <button type="primary" wx:else bind:tap="onSubmit">再来一单</button>
-    </block>
+    <!-- </block> -->
   </view>
 
   <service popShow="{{ showService }}" bind:changePop="changePop"></service>

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

@@ -199,7 +199,6 @@ Page({
   onDetail(e: any) {
     const { dataset } = e.currentTarget
     if(dataset.wechatstatus === "WAIT_PAY") {
-      console.log()
       this.onSubmit({orderNo: dataset.orderno})
     } else {
       wx.navigateTo({

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

@@ -11,7 +11,7 @@
     <scroll-view class="record-list" type="list" scroll-y bindscrolltolower="loadMore">
       <block wx:if="{{ recordList.length }}">
         <view class="list-item-group">
-          <view class="list-item" wx:for="{{recordList}}" wx:key="index" data-orderno="{{item.orderNo}}" bind:tap="onDetail">
+          <view class="list-item" wx:for="{{recordList}}" wx:key="index" data-orderno="{{item.orderNo}}" data-wechatstatus="{{item.wechatStatus}}" bind:tap="onDetail">
             <view class="item-top">
               <view class="item-mid">订单号:{{ item.orderNo }}</view>
               <text class="{{ item.wechatStatus == 'WAIT_PAY' || item.wechatStatus == 'WAIT_USE' || item.wechatStatus == 'REFUNDING' ? 'red' : '' }}">{{ item.statusName }}</text>
@@ -33,7 +33,7 @@
               <view class="order-price">
                 订单金额:<text class="price-first">¥ </text><text class="price">{{item.amount}}</text>
               </view>
-              <block wx:if="{{ item.wechatStatus == 'REFUNDING' || item.wechatStatus == 'WAIT_USE' }}" wx:key="block">
+              <block wx:if="{{ item.wechatStatus == 'REFUNDING' || (item.wechatStatus == 'WAIT_USE' && tabIdx == 5) }}" wx:key="block">
                 <button wx:if="{{ item.wechatStatus == 'REFUNDING' }}" type="primary" wx:if="{{ item.wechatStatus == 'REFUNDING' }}"  catch:tap="onRefounded" data-id="{{item.id}}">取消退款</button>
                 <button wx:else type="primary" catch:tap="onRefounded" data-id="{{item.id}}">申请退款</button>
               </block>