tanyanfei 1 年之前
父节点
当前提交
ea9b741c06
共有 5 个文件被更改,包括 82 次插入60 次删除
  1. 5 0
      pages/index/index.js
  2. 11 0
      pages/index/index.wxml
  3. 40 43
      pages/index/index.wxss
  4. 4 6
      pages/rank/rank.wxml
  5. 22 11
      pages/rank/rank.wxss

+ 5 - 0
pages/index/index.js

@@ -188,6 +188,11 @@ Page({
     }
   },
   onShow: function (e) {
+    $api.getsignup().then(res => {
+      this.setData({
+        info: res.data.data
+      })
+    })
     //判断是否报名
     $api.getAuthinfo().then(res=>{
       if(res.data.data.role==0){

+ 11 - 0
pages/index/index.wxml

@@ -61,6 +61,17 @@
         </block>
 </swiper>
 
+<view  class="marquee_container" wx:if="{{info.signup_status==1}}">
+  <!-- <view class="zd"></view> -->
+  <!-- <image src="../../images/lb.png" mode="widthFix" class="notice"></image> -->
+    <view class="marquee_text">
+      {{info.name}}正在报名中
+      <text>报名时间:{{info.signup_start_time}}到{{info.signup_end_time}}</text> 
+    </view>
+    <navigator hover-class="none" url="../apply/apply?type=2">马上报名</navigator>
+    <!-- <image class="signupPoint" mode="widthFix" src="../../images/right.png"></image> -->
+</view>
+
 <view class="notice">
   <view>
     <image mode="widthFix" src="../../xiao/gonggao@2x.png"></image>

+ 40 - 43
pages/index/index.wxss

@@ -9,49 +9,6 @@
    margin-left: -100%;
   }
  }
- .zd{
-   width: 80px;
-   height: 100%;
-   position: absolute;
-   left: 0;
-   top: 0;
-   background: #fff;
-
- }
-.marquee_container{
-  width: 100%;
-  background: #fff;
-  /* box-shadow:0px 4px 12px 0px rgba(0,0,0,0.08); */
-  border-radius:4px;
-  padding: 12.5px 12px;
-  position: relative;
-  overflow: hidden;
-  height: 90rpx;
-}
-.marquee_container:hover{
-  /* 不起作用 */
-  animation-play-state: paused;
-}
-.marquee_text{
-  color:#333;
-  font-size: 28rpx;
-  display: flex;
-  white-space: nowrap;
-  animation-name: around;
-  animation-duration: 15s;  /*过渡时间*/
-  animation-iteration-count: infinite;
-  animation-timing-function:linear;
-}
-.marquee_text navigator{
-  margin-right: 20px;
-}
-.marquee_container image{
-  width: 60px;
-  max-height: 30px;
-  position: absolute;
-  left: 10px;
-  top: 30rpx;
-}
 page{
   background: #F7F7F7;
 }
@@ -591,4 +548,44 @@ scroll-view{
   color: #999;
   font-size: 28rpx;
   margin-right: 40rpx;
+}
+
+.marquee_container{
+  width: 100%;
+  background-color: #fff;
+  /* background: rgba(255, 244.8, 244.8, 1); */
+  /* box-shadow:0px 4px 12px 0px rgba(0,0,0,0.08); */
+  border-radius:4px;
+  padding: 12.5px 12px;
+  position: relative;
+  overflow: hidden;
+  height: 125rpx;
+  margin-bottom: 20rpx;
+}
+.marquee_container navigator{
+  background-color: #ff0f03;
+  position: absolute;
+  right: 20rpx;
+  top: 0;
+  color: #fff;
+  padding: 0 20rpx;
+  height: 60rpx;
+  line-height: 60rpx;
+  border-radius: 6rpx;
+  font-size: 26rpx;
+  bottom: 0;
+  margin: auto;
+}
+.marquee_text{
+  color:#333;
+  font-weight: 600;
+  font-size: 30rpx;
+}
+
+.marquee_text text{
+  display: block;
+  color:#666;
+  font-size: 26rpx;
+  margin-top: 5rpx;
+  font-weight: 400;
 }

+ 4 - 6
pages/rank/rank.wxml

@@ -9,16 +9,14 @@
   
 </view> -->
 <view  class="marquee_container" wx:if="{{info.signup_status==1}}">
-  <view class="zd"></view>
-  <navigator hover-class="none" url="../apply/apply?type=2">
-  <image src="../../images/lb.png" mode="widthFix" class="notice"></image>
+  <!-- <view class="zd"></view> -->
+  <!-- <image src="../../images/lb.png" mode="widthFix" class="notice"></image> -->
     <view class="marquee_text">
       {{info.name}}正在报名中
       <text>报名时间:{{info.signup_start_time}}到{{info.signup_end_time}}</text> 
-      
     </view>
-    <image class="signupPoint" mode="widthFix" src="../../images/right.png"></image>
-  </navigator>
+    <navigator hover-class="none" url="../apply/apply?type=2">马上报名</navigator>
+    <!-- <image class="signupPoint" mode="widthFix" src="../../images/right.png"></image> -->
 </view>
 
 

+ 22 - 11
pages/rank/rank.wxss

@@ -22,37 +22,48 @@ page{
  }
 .marquee_container{
   width: 100%;
-  background: rgba(255, 244.8, 244.8, 1);
+  background-color: #fff;
+  /* background: rgba(255, 244.8, 244.8, 1); */
   /* box-shadow:0px 4px 12px 0px rgba(0,0,0,0.08); */
   border-radius:4px;
   padding: 12.5px 12px;
   position: relative;
   overflow: hidden;
   height: 125rpx;
+  margin-bottom: 10rpx;
+}
+.marquee_container navigator{
+  background-color: #ff0f03;
+  position: absolute;
+  right: 20rpx;
+  top: 0;
+  color: #fff;
+  padding: 0 20rpx;
+  height: 60rpx;
+  line-height: 60rpx;
+  border-radius: 6rpx;
+  font-size: 26rpx;
+  bottom: 0;
+  margin: auto;
 }
 .marquee_container:hover{
   /* 不起作用 */
   animation-play-state: paused;
 }
 .marquee_text{
-  color:#5C5C5C;
-  font-size: 28rpx;
-  /* display: flex; */
-  white-space: nowrap;
-  /* animation-name: around;
-  animation-duration: 15s;  /*过渡时间*/
-  animation-iteration-count: infinite;
-  animation-timing-function:linear; 
-  margin-left: 64rpx;
+  color:#333;
+  font-weight: 600;
+  font-size: 30rpx;
 }
 .marquee_text navigator{
   margin-right: 20px;
 }
 .marquee_text text{
   display: block;
-  color:#5C5C5C;
+  color:#666;
   font-size: 26rpx;
   margin-top: 5rpx;
+  font-weight: 400;
 }
 .marquee_container .notice{
   width: 34rpx;