Browse Source

Merge branch 'master' of http://118.190.145.217:3000/xiaojincai/wanzb_xcxv2

xjc 3 years ago
parent
commit
da2bb64db0

+ 2 - 1
app.js

@@ -14,6 +14,7 @@ App({
     })
   },
   globalData: {
-    userInfo: null
+    userInfo: null,
+    follow:0
   }
 })

+ 7 - 0
pages/day/day.js

@@ -53,6 +53,13 @@ Page({
       })
     })
   },
+  //预览
+  preview(e) {
+    wx.previewImage({
+      urls: e.target.dataset.urls,
+      current: e.target.dataset.src
+    })
+  },
 
 
   /**

+ 17 - 4
pages/index/index.js

@@ -14,7 +14,7 @@ Page({
     winList:[],
     hotFollowList:[],
     page:1,
-    total:0,
+    total:-1,
     page1: 1,
     total1: 0,
     page2: 1,
@@ -43,10 +43,9 @@ Page({
     })
   },
   fresh: function () {
-    console.log(233)
     this.setData({
       page:1,
-      total:0,
+      total:-1,
       loading:1
     })
     this.getFollow()
@@ -227,7 +226,21 @@ Page({
     wx.showNavigationBarLoading()
     this.getHot()
   },
-  onShow: function () {
+  onShow: function (e) {
+    if (app.globalData.follow){
+      this.setData({
+        page: 1,
+        page3: 1,
+        total: -1,
+        total3:0,
+        followList: [],
+        hotFollowList:[]
+      })
+      app.globalData.follow=0
+      this.getFollow()
+      this.getHotFollowList()
+    }
+    
     if (this.data.error) {
       this.onLoad()
     }

+ 3 - 0
pages/index/index.wxml

@@ -47,6 +47,9 @@
           <block wx:if='{{total >= 20}}'>
             <view class='loading' wx:if='{{followList.length < total}}'>上拉加载更多...</view>
           </block>
+          <block wx:if='{{total == 0}}'>
+            <view class='loading' style="margin-top:200rpx;">暂无关注选手</view>
+          </block>
       </scroll-view>
   </swiper-item>
   <swiper-item>

+ 1 - 0
pages/index/index.wxss

@@ -189,6 +189,7 @@ scroll-view{
   font-size: 28rpx;
   color: #666;
   text-align: right;
+  width: 80%;
 }
 .num text{
   font-size: 36rpx;

+ 1 - 1
pages/list/list.wxml

@@ -1,6 +1,6 @@
 <view class="total">
   应到 {{total_person}}人 | 实到 {{actual_person}} 人 | 请假 {{leave_person}} 人    
-  <view>盈亏比  <text class="up">{{win_person}}</text> : <text class="down">{{loss_person}}</text></view>
+  <view>盈亏比  <text class="up">{{win_person}}</text>:<text class="down">{{loss_person}}</text></view>
 </view>
 <view class="top">
     <text>排名</text>

+ 2 - 2
pages/style/style.wxml

@@ -28,7 +28,7 @@
 <view class="item">
   <label>入市时间</label>
   <view class="tags">
-      <picker mode="date" value="{{form.join_time}}"  bindchange="bindDateChange">
+      <picker mode="date" fields='year' value="{{form.join_time}}"  bindchange="bindDateChange">
           <view class="date-picker">
               <text wx:if='{{!form.join_time}}'>请选择</text>{{form.join_time}}
               <image mode="widthFix" src="../../images/icon_down@2x.png"></image>
@@ -41,7 +41,7 @@
   <view class="tags">
       <input wx:if="{{!form.init_fund}}" type="digit" value="{{form.init_fund}}" bindinput="bindinput" placeholder-style="color:#999;" placeholder="请填写"></input>
       <input wx:else disabled="{{true}}" style="background:#eee;" value="{{form.init_fund}}"></input>
-      <view style="color:red;font-size:24rpx;">参赛金额修改需在提交作业之前联系顽主</view>
+      <view style="color:red;font-size:23rpx;">比赛期间有资金进出请联系QQ客服除权,再提交作业</view>
   </view>
 </view>
 <view class="item">

+ 2 - 1
pages/style/style.wxss

@@ -23,7 +23,7 @@ page{
 }
 .tags>text{
   display: inline-block;
-  width: 160rpx;
+  /* width: 160rpx; */
   border: 1px solid #E0E0E0;
   text-align: center;
   line-height: 64rpx;
@@ -31,6 +31,7 @@ page{
   font-size: 30rpx;
   margin-bottom: 16rpx;
   margin-right: 16rpx;
+  padding: 0 30rpx;
 }
 .tags .act{
   border: 1px solid #FFEFEB;

+ 4 - 0
pages/today/today.js

@@ -1,4 +1,5 @@
 // pages/today/today.js
+const app = getApp()
 import * as echarts from '../../ec-canvas/echarts';
 const $api = require('../../utils/api.js').API;
 var id, record_id, records = [], today_stock=[];
@@ -77,6 +78,7 @@ Page({
         datas: res.data.data,
         date: stock_date[0] + '-' + stock_date[1],
         is_follow: res.data.data.is_follow,
+        player_id: res.data.data.today_record.player_id,
         ec: {
           onInit: initChart
         },
@@ -152,6 +154,8 @@ Page({
       this.setData({
         is_follow: !this.data.is_follow
       })
+      app.globalData.follow=1
+
     })
   },
 

+ 7 - 7
pages/upload/upload.js

@@ -229,13 +229,13 @@ Page({
     }else{
       parm.today_stock = []
     }
-    // if (parm.today_stock_img.length<=0) {
-    //   wx.showToast({
-    //     icon: 'none',
-    //     title: '请上传截图'
-    //   })
-    //   return
-    // }
+    if (parm.today_stock_img.length<=0) {
+      wx.showToast({
+        icon: 'none',
+        title: '请上传截图'
+      })
+      return
+    }
     wx.showLoading({
       title: '正在提交',
     })