瀏覽代碼

优化展示

bayi 2 年之前
父節點
當前提交
089252be61
共有 6 個文件被更改,包括 31 次插入31 次删除
  1. 16 0
      app.wxss
  2. 1 1
      components/navigationBar/index.wxml
  3. 10 0
      pages/my/index.js
  4. 2 15
      pages/my/index.less
  5. 1 1
      pages/my/index.wxml
  6. 1 14
      pages/my/index.wxss

+ 16 - 0
app.wxss

@@ -87,4 +87,20 @@ text {
   100% {
     transform: rotate(360deg);
   }
+}
+
+.zoomIn {
+  animation: zoomIn 0.4s forwards;
+}
+
+@keyframes zoomIn {
+  from {
+    transform: scale(0);
+    opacity: 0;
+  }
+
+  to {
+    transform: scale(1);
+    opacity: 1;
+  }
 }

+ 1 - 1
components/navigationBar/index.wxml

@@ -16,7 +16,7 @@
 
 <view wx:if="{{isGradeShow}}" class="gradeContainer" catchtouchmove='true'
   style="margin-top:{{showNav?navBarHeight:0}}px;" bindtap="closeGrade">
-  <view class="gradeBox" catchtap="selectGrade">
+  <view class="gradeBox zoomIn" catchtap="selectGrade">
     <view class="title">请选择年级</view>
     <view class="content">
       <view class="grade oneRow {{temporaryGrade=='PRESCHOOL'?'check':''}}" data-code="PRESCHOOL">学前班</view>

+ 10 - 0
pages/my/index.js

@@ -138,6 +138,11 @@ Page({
       title: '请输入激活码',
       editable: true,
       success: () => {
+        if (typeof this.getTabBar === 'function') {
+          this.getTabBar().setData({
+            mask: true
+          })
+        }
         this.setData({
           activationModal: true
         })
@@ -167,6 +172,11 @@ Page({
     this.setData({
       activationModal: false
     })
+    if (typeof this.getTabBar === 'function') {
+      this.getTabBar().setData({
+        mask: false
+      })
+    }
   },
   // 分享配置
   onShareAppMessage: function (res) {

+ 2 - 15
pages/my/index.less

@@ -208,7 +208,7 @@
     top: 0rpx;
     width: 100vw;
     height: 100vh;
-    background-color: rgba(0, 0, 0, 0.3);
+    background: rgba(0, 0, 0, 0.7);
 
     .box {
       position: absolute;
@@ -221,9 +221,7 @@
       background-color: white;
       border-radius: 20rpx;
       text-align: center;
-      animation-name: zoomIn;
-      animation-duration: 0.4s;
-      animation-fill-mode: forwards;
+
 
       .sLcon {
         margin-top: 34rpx;
@@ -254,17 +252,6 @@
         margin: auto;
       }
 
-      @keyframes zoomIn {
-        from {
-          transform: scale(0);
-          opacity: 0;
-        }
-
-        to {
-          opacity: 1;
-          transform: scale(1);
-        }
-      }
     }
   }
 

+ 1 - 1
pages/my/index.wxml

@@ -67,7 +67,7 @@
     <view class="subBtn">激活</view>
   </view>
   <view class="activationModal" wx:if="{{activationModal}}">
-    <view class="box">
+    <view class="box zoomIn">
       <image src="/static/lan.png" class="sLcon" />
       <view class="tips1">恭喜您,激活成功</view>
       <view class="tips2">快去朗读挑战吧!</view>

+ 1 - 14
pages/my/index.wxss

@@ -175,7 +175,7 @@
   top: 0rpx;
   width: 100vw;
   height: 100vh;
-  background-color: rgba(0, 0, 0, 0.3);
+  background: rgba(0, 0, 0, 0.7);
 }
 .container .activationModal .box {
   position: absolute;
@@ -188,9 +188,6 @@
   background-color: white;
   border-radius: 20rpx;
   text-align: center;
-  animation-name: zoomIn;
-  animation-duration: 0.4s;
-  animation-fill-mode: forwards;
 }
 .container .activationModal .box .sLcon {
   margin-top: 34rpx;
@@ -217,16 +214,6 @@
   bottom: -140rpx;
   margin: auto;
 }
-@keyframes zoomIn {
-  from {
-    transform: scale(0);
-    opacity: 0;
-  }
-  to {
-    opacity: 1;
-    transform: scale(1);
-  }
-}
 .container .payBox {
   position: relative;
   margin-top: 36rpx;