Browse Source

9/13 增加banner,打包测试

Foystor 3 years ago
parent
commit
10e111d75e
3 changed files with 42 additions and 42 deletions
  1. 6 6
      src/components/banner.vue
  2. 29 21
      src/pages/joint/index.vue
  3. 7 15
      src/pages/report/index.vue

+ 6 - 6
src/components/banner.vue

@@ -52,12 +52,12 @@ export default {
           url: "/pages/competition/main",
           button_text: "比赛详情",
         },
-        // {
-        //   id: 3,
-        //   src: "https://img.shuimuai.com/banner_joint.png",
-        //   url: "/pages/joint/main",
-        //   button_text: "我要联名",
-        // },
+        {
+          id: 3,
+          src: "https://img.shuimuai.com/banner_joint.png",
+          url: "/pages/joint/main",
+          button_text: "我要联名",
+        },
       ],
     };
   },

+ 29 - 21
src/pages/joint/index.vue

@@ -1,7 +1,6 @@
 <template>
   <div
     id="index_login_container"
-    @click="no_pop"
   >
     <div class="cover_whole">
        <!-- 填写表框 -->
@@ -25,8 +24,7 @@
          <swiper 
          class="swiper"
          easing-function="linear"
-         :current="currentTab" 
-         circular="true" 
+         :circular="circular" 
          :indicator-dots="indicatorDots"
          :autoplay="autoplay"
          :interval="interval"
@@ -38,19 +36,18 @@
            </block>
          </swiper>
        </div>
-
-       <!-- 弹窗 -->
+    </div>
+    <!-- 弹窗 -->
        <van-popup
         :show="show"
         @close="close_pop"
-        :close-on-click-overlay="false"
+        :close-on-click-overlay="true"
         custom-class="pop"
         overlay
         z-index="99"
        >
-         <div class="cover_pop"></div>
+         <img class="cover_pop" show-menu-by-longpress="true" src="https://img.shuimuai.com/success_joint.png"/>
       </van-popup>
-    </div>
 
   </div>
 </template>
@@ -72,7 +69,8 @@ export default {
        autoplay: true,
        interval: 1800,
        duration: 1800,
-       vertical:true
+       vertical: true,
+       circular: true,
     };
   },
   methods: {
@@ -87,6 +85,13 @@ export default {
          let $res = res.data;
          if ($res.code == 0) {
            $this.show = true
+           $this.school = ''
+           $this.student = ''
+         }else if($res.code == 1012){
+           wx.showToast({
+             title:'请先登录',
+             icon: "error"
+           })
          }else{
            wx.showToast({
              title: $res.errmsg,
@@ -98,9 +103,9 @@ export default {
       })
    },
 
-    no_pop(){
-      $this.show = false
-    }
+    close_pop() {
+      $this.show = false;
+    },
   },
   mounted() {
     getJoint().then((res) => {
@@ -118,6 +123,11 @@ export default {
   created() {
     $this = this;
   },
+  onUnload(){
+    $this.show = false;
+    $this.school = ''
+    $this.student = ''
+  }
 };
 </script>
 <style scoped>
@@ -162,7 +172,7 @@ export default {
   width: 634rpx;
   height: 111rpx;
   margin-top: 88rpx;
-  padding: 10rpx;
+  padding: 14rpx;
 }
 
 
@@ -203,22 +213,20 @@ input{
 }
 
 .cover_pop{
-  background: url("https://img.shuimuai.com/test.jpg");
-  background-size: 100% 100%;
-  background-position: center;
   width: 493rpx;
   height: 662rpx;
 }
+
 </style>
 
 <style>
 .pop {
   background-color: rgba(255, 255, 255, 0) !important;
 }
-.swiper{
-  height:90rpx !important;
-}
-.swiper-item{
-  height:50rpx !important;
+ .swiper{
+  height:87rpx !important;
 }
+/* .swiper-item{
+  height:90rpx !important;
+}  */
 </style>

+ 7 - 15
src/pages/report/index.vue

@@ -55,9 +55,7 @@
             />
           </view>
           <view class="left_content">
-            <view class="left_num">{{ record.height_absorbed }}
-              <text class="textLil text-gray">%</text>
-            </view>
+            <view class="left_num">{{ record.height_absorbed }}<text class="textLil text-gray">%</text></view>
             <view class="left_text">高专注力<br/>&emsp;占比</view>
           </view>
         </view>
@@ -68,9 +66,7 @@
             <view>专注力维持区间</view>
           </view>
           <view class="detail">
-            <view class="detail_num">{{ record.interfere }}
-              <text class="textLil text-gray">次</text>
-            </view>
+            <view class="detail_num">{{ record.interfere }}<text class="textLil text-gray">次</text></view>
             <view>受干扰次数</view>
           </view>
           <view class="detail">
@@ -78,18 +74,14 @@
             <view>专注力最大爆发值</view>
           </view>
           <view class="detail">
-            <view class="detail_num">{{ record.start }}
-              <text class="textLil text-gray">秒</text>
-            </view>
+            <view class="detail_num">{{ record.start }}<text class="textLil text-gray">秒</text></view>
             <view>专注力启动时长</view>
           </view>
         </view>
 
         <!-- 平均专注力 -->
         <view class="margin_right ">
-          <view class="right_num">{{ record.att_average_big }}
-            <text class="text-sm">{{ record.att_average_lil }}</text>
-          </view>
+          <view class="right_num">{{ record.att_average_big }}<text class="text-sm">{{ record.att_average_lil }}</text></view>
           <view class="right_text">平均专注力</view>
         </view>
 
@@ -547,9 +539,9 @@ export default {
           let $res = res.data;
 
           $this.report_show = $res.data.line.length > 0;
-          if (!$this.report_show) {
-            return false;
-          }
+          // if (!$this.report_show) {
+          //   return false;
+          // }
           setTimeout(() => {
             $this.record = $res.data;
             let $options = getHightPieChartOption(