xjc %!s(int64=2) %!d(string=hai) anos
pai
achega
9a7315c0bc
Modificáronse 2 ficheiros con 12 adicións e 8 borrados
  1. 4 4
      pages/apply/apply.wxml
  2. 8 4
      pages/message/message.js

+ 4 - 4
pages/apply/apply.wxml

@@ -13,16 +13,16 @@
         <view class="date">开赛时间:{{info.start_time}}到{{info.end_time}}结束 </view>
         <view class="date">报名时间:{{info.signup_start_time}}到{{info.signup_end_time}}</view>
         <view class="title title1">2、比赛分组</view>
-        <!-- <view class="date" wx:for="{{info.groups}}">{{item.name}}</view>
-         -->
-         <view class="date">
+        <view class="date" wx:for="{{info.groups}}">{{item.name}}</view>
+        
+         <!-- <view class="date">
           <text>冠军组:历届小组前三选手,无资金门槛</text>
           <text>千万组:300W以上</text>
           <text>百万组:50W到300W</text>
           <text>十万组:10W到500W</text>
           <text>菜鸟组:10W以下</text>
           <text>各组第一有牛气冲天奖杯!</text>
-        </view>
+        </view> -->
         <view class="title title1">3、交作业</view>
         <view class="date">
           7月5日收盘后开始交作业,默认为初始资金,随后每天下午3:00到3:30,在比赛系统自主提交,前排成绩将更新在比赛公众号。

+ 8 - 4
pages/message/message.js

@@ -2,14 +2,15 @@
 const app = getApp()
 var host = app.globalData.host;
 const $api = require('../../utils/api.js').API;
-var timer;
+// var timer;
 Page({
 
     /**
      * 页面的初始数据
      */
     data: {
-        focus:false
+        focus:false,
+        timer:null
     },
 
     /**
@@ -21,7 +22,10 @@ Page({
     getData(){
         var _this=this;
         f()
-        timer=setInterval(f,10000)
+        timer=setInterval(f,1000)
+        this.setData({
+          timer:timer
+        })
         function f(){
           $api.getconsult().then(res=>{
             _this.setData({
@@ -75,7 +79,7 @@ Page({
      * 生命周期函数--监听页面卸载
      */
     onUnload: function () {
-      clearInterval(timer)
+      clearInterval(this.data.timer)
     },
 
     /**