tanyanfei 3 lat temu
rodzic
commit
5a0d91cb38

BIN
.DS_Store


+ 6 - 4
app.json

@@ -1,12 +1,14 @@
 {
-  "pages": [
+"pages": [
+  
+    "pages/user/user",
     "pages/index/index",
     "pages/rank/rank",
     "pages/today/today",
-    
+    "pages/apply/apply",
     "pages/stock/stock",
     "pages/upload/upload",
-    "pages/user/user",
+    "pages/change/change",
     "pages/myMatchDetail/myMatchDetail",
     "pages/record/record",
     "pages/aboutus/aboutus",
@@ -40,7 +42,7 @@
         "pagePath": "pages/index/index",
         "iconPath": "images/home_0.png",
         "selectedIconPath": "images/home_1.png",
-        "text": "持仓"
+        "text": "社区"
       },
       {
         "pagePath": "pages/rank/rank",

BIN
images/logo.png


BIN
images/msg.png


BIN
images/zan.png


Plik diff jest za duży
+ 6 - 1
pages/aboutus/aboutus.wxml


+ 72 - 0
pages/apply/apply.js

@@ -0,0 +1,72 @@
+// pages/apply/apply.js
+const app = getApp()
+const $api = require('../../utils/api.js').API;
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        page:0
+    },
+
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+
+    },
+    tab(e){
+        this.setData({
+            page:e.target.dataset.id
+        })
+    },
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 3 - 0
pages/apply/apply.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 43 - 0
pages/apply/apply.wxml

@@ -0,0 +1,43 @@
+<view class="tab">
+    <view bindtap="tab" data-id='0' class="{{page==0?'act':''}}">比赛报名 <text></text></view>
+    <view bindtap="tab" data-id='1' class="{{page==1?'act':''}}">游客报名<text></text></view>
+</view>
+
+<scroll-view scroll-y='{{true}}' wx:if='{{page==0}}'>
+        <view class="intro">想要和大佬一起同台竞技,想要近距离体验拥有海量比赛数据的比赛小程序,就来报名,一次参赛,终身使用。</view>
+
+        <view class="title">49届顽主杯实盘大赛</view>
+        <view class="date">比赛时间:2022-04-26至2022-06-24</view>
+        <view class="date">报名时间:2022-04-20至2022-04-26</view>
+
+        <view class="title title1">一、比赛分组</view>
+        <view class="date">千万组:300W以上;</view>
+        <view class="date">百万组:50W至200W;</view>
+        <view class="date">十万组:10W至50W;</view>
+        <view class="date">菜鸟组:10W以下;</view>
+        <view class="title title1">二、参赛费用</view>
+        <view class="date">参赛费用:<text>每届218元(此费用为参加49届顽主
+        杯实盘大赛)</text></view>
+        <view class="info">
+            想永久免费参赛请添加顽主微信sm,已有顽主微信的直接联系,无须再添加。历届小组第一,倒数第一,腰斩选手,种子选手永久免费参赛,直接联系顽主授权。
+        </view>
+        <view class="title title1">三、比赛规则</view>
+        <view class="date">
+            1.所有选手参赛账户真实比赛规则比赛规则比赛规则比赛规则比赛规则比赛规则比赛规则比赛规则比赛规则比赛规则;
+        </view>
+</scroll-view>
+<scroll-view wx:if='{{page==1}}'>
+    <view class="title">顽主杯实盘大赛</view>
+        <view class="title title1">一、观赛费用</view>
+        <view class="date">观赛费用:<text>218元(此费用为参加49届顽主
+        杯实盘大赛)</text></view>
+        <view class="date">使用期限:1年(365天)</view>
+        <view class="info">
+            想永久免费观看比赛,请联系顽主微信sm
+        </view>
+        <view class="title title1">二、使用权限</view>
+        <view class="date">
+            1.所有选手参赛账户真实比赛规则比赛规则比赛规则比赛规则比赛规则比赛规则比赛规则比赛规则比赛规则比赛规则;
+        </view>
+</scroll-view>
+<button class="apply">立即报名</button>

+ 68 - 0
pages/apply/apply.wxss

@@ -0,0 +1,68 @@
+page{
+    padding: 0 35rpx;
+}
+view{
+    line-height: 56rpx;
+}
+.tab view{
+    line-height: 90rpx;
+    text-align: center;
+    width: 50%;
+    display: inline-block;
+    font-size: 30rpx;
+    position: relative;
+}
+.tab .act{
+    font-weight: bold;
+}
+.act text{
+    position: absolute;
+    width: 64rpx;
+    height: 6rpx;
+    top: 100%;
+    left: 0;
+    right: 0;
+    margin: auto;
+    background: rgba(217, 75, 36, 1);
+}
+.intro{
+    font-size: 32rpx;
+    line-height: 56rpx;
+    margin-top: 30rpx;
+}
+.title{
+    font-size: 40rpx;
+    line-height: 56rpx;
+    font-weight: bold;
+    margin: 50rpx 0 15rpx;
+}
+.date{
+    font-size: 32rpx;
+    line-height: 56rpx;
+}
+.title1{
+    font-size: 32rpx;
+    margin-bottom: 8rpx;
+}
+.date text{
+    color: rgba(233, 0, 1, 1);
+}
+.info{
+    font-size: 32rpx;
+    color: #666;
+    margin-top: 8rpx;
+}
+.apply:not([size='mini']){
+    background: #D94B24;
+    color: #fff;
+    width: 100%;
+    margin: 48rpx auto 0;
+    height: 88rpx;
+    line-height: 88rpx;
+    padding: 0;
+    font-size: 32rpx;
+    border-radius: 8rpx;
+  }
+  scroll-view{
+    height: calc(100vh - 250rpx);
+  }

+ 113 - 0
pages/change/change.js

@@ -0,0 +1,113 @@
+// pages/change/change.js
+const app = getApp()
+const $api = require('../../utils/api.js').API;
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        today_stock_img:[]
+    },
+
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+
+    },
+    uploadImg() {
+        var today_stock_img = this.data.today_stock_img;
+        wx.chooseImage({
+          success: res => {
+            wx.showLoading({
+              title: '正在上传',
+            })
+            const tempFilePaths = res.tempFiles
+            for (let i = 0; i < tempFilePaths.length; i++) {
+              $api.upload(tempFilePaths[i].path, 'file').then(res => {
+                wx.hideLoading()
+                if (res.code == 0) {
+                  today_stock_img.push(res.data.url)
+                  this.setData({
+                    today_stock_img: today_stock_img
+                  })
+                } else {
+                  wx.showToast({
+                    title: '上传失败',
+                  })
+                }
+              })
+                .catch(err => {
+                  wx.hideLoading()
+                })
+            }
+    
+          }
+        })
+      },
+      del(e) {
+        var i = e.target.dataset.id;
+        var today_stock_img = this.data.today_stock_img;
+        today_stock_img.splice(i, 1)
+        this.setData({
+          today_stock_img: today_stock_img
+        })
+      },
+      prview(e){
+        var src = e.target.dataset.src;
+        wx.previewImage({
+          current: src, // 当前显示图片的http链接
+          urls: [src] // 需要预览的图片http链接列表
+        })
+      },
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 3 - 0
pages/change/change.json

@@ -0,0 +1,3 @@
+{
+  "navigationBarTitleText": "初始资金修改"
+}

+ 28 - 0
pages/change/change.wxml

@@ -0,0 +1,28 @@
+<view class="item">
+    <label>今转出资金</label>
+    <input placeholder-style="color:rgba(203, 203, 203, 1)" type="text" placeholder="请填写"/>
+    <text>万 <text>(单位)</text></text>
+</view>
+<view class="item">
+    <label>今转入资金</label>
+    <input placeholder-style="color:rgba(203, 203, 203, 1)" type="text" placeholder="请填写"/>
+    <text>万 <text>(单位)</text></text>
+</view>
+<view class="item">
+    <label>账户截图</label>
+    <view wx:for='{{today_stock_img}}' class="stock_imgs">
+        <image  src="{{item}}" bindtap="prview" data-src="{{item}}"></image>
+        <view class="edit">
+            <text bindtap="del" data-id='{{index}}'>删除</text>
+        </view>
+    </view>
+    <view  class="upload" bindtap="uploadImg">
+          <image mode="widthFix" src="../../images/img.png"></image>
+            上传图片
+    </view>
+</view>
+<view class="item">
+    <label>规则</label>
+    <text style="margin: 0;">入金比赛成绩稀释,出金保持成绩不变</text>
+</view>
+<button bindtap="post">提交</button>

+ 96 - 0
pages/change/change.wxss

@@ -0,0 +1,96 @@
+/* pages/change/change.wxss */
+page{
+    padding: 30rpx;
+}
+.item{
+    display: flex;
+    margin-bottom: 16rpx;
+}
+.item label{
+    font-size: 30rpx;
+    line-height: 88rpx;
+    width: 150rpx;
+    color: #333;
+    margin-right: 30rpx;
+}
+.item input{
+    width: 40%;
+    height: 88rpx;
+    border: 1px solid rgba(224, 224, 224, 1);
+    border-radius: 8rpx;
+    padding: 0 24rpx;
+    font-size: 30rpx;
+}
+.item>text{
+    font-size: 30rpx;
+    line-height: 88rpx;
+    color: #333;
+    margin-left: 20rpx;
+}
+.item>text text{
+    color: rgba(153, 153, 153, 1);
+}
+.upload{
+    width: 240rpx;
+    height: 240rpx;
+    background: #F7F7F7;
+    border-radius: 8rpx;
+    text-align: center;
+    font-size: 30rpx;
+    padding-top: 74rpx;
+    display: inline-block;
+    vertical-align: top;
+  }
+  .upload image{
+    width: 50rpx;
+    display: block;
+    margin: 0 auto 8rpx;
+  }
+  .stock_imgs{
+    display: inline-block;
+    width: 240rpx;
+    height:240rpx;
+    vertical-align: top;
+    position: relative;
+    margin-right: 10rpx;
+    margin-bottom: 10rpx;
+  }
+  .stock_imgs icon{
+    position: absolute;
+    right: 10rpx;
+    top: 10rpx;
+  }
+  .stock_imgs image{
+    border-radius: 8rpx;
+    width:240rpx;height:240rpx;
+  }
+  .edit{
+    text-align: center;
+    position: absolute;
+    bottom: 2px;
+    left: 0;
+    width: 100%;
+  }
+  .edit text{
+    display: inline-block;
+    color: #fff;
+    background: #D94B24;
+    border-radius: 32rpx;
+    width: 100rpx;
+    line-height: 48rpx;
+    text-align: center;
+    font-size: 28rpx;
+    margin: 0 2px;
+  }
+  button:not([size='mini']){
+    background: #D94B24;
+    color: #fff;
+    width: 100% !important;
+    height: 88rpx;
+    line-height: 88rpx;
+    padding: 0;
+    font-size: 32rpx;
+    border-radius: 8rpx;
+    margin-top: 50rpx;
+    font-weight: 400;
+  }

+ 25 - 5
pages/detail/detail.js

@@ -2,12 +2,12 @@
 // 29014
 const $api = require('../../utils/api.js').API;
 Page({
-
   /**
    * 页面的初始数据
    */
   data: {
-
+    name:'',
+    articleid:'',
   },
 
   /**
@@ -16,7 +16,9 @@ Page({
   onLoad: function (options) {
     $api.getArticle({id:options.id}).then(res=>{
       this.setData({
-        info:res.data.data
+        info:res.data.data,
+        name:res.data.data.name,
+        articleid:options.id,
       })
     })
   },
@@ -66,7 +68,25 @@ Page({
   /**
    * 用户点击右上角分享
    */
-  onShareAppMessage: function () {
 
-  }
+  onShareAppMessage() {
+    // const promise = new Promise(resolve => {
+    //   setTimeout(() => {
+    //     resolve({
+    //       title: this.data.name
+    //     })
+    //   }, 2000)
+    // }),
+    return{
+      title:this.data.name,
+      path:'/pages/detail/detail?id=' + this.data.articleid
+    }
+  },
+
+  // onShareTimeline: function() {
+  //   return {
+  //   title: this.data.name,
+  //   query: {'id':this.data.articleid}
+  //   }
+  // }
 })

+ 1 - 1
pages/follow/follow.wxml

@@ -3,7 +3,7 @@
     <view class="name">{{item.username}}  <text>选手</text> 
     <view>TOP <text>{{item.group_rank}}</text></view></view> 
     <view class="info">
-      资产:  <view><label>187w</label>(今日收益 
+      资产:  <view><label>{{item.today_fund}}w</label>(今日收益 
       <text  class="{{item.today_income[0]=='-' ?'down':'up'}}">{{item.today_income}}</text>
       <text style="color:#F5F5F5;">  |  </text>
       总收益 

+ 65 - 47
pages/index/index.js

@@ -6,7 +6,7 @@ Page({
   data: {
     loading:0,
     notices:[],
-    tabs:['关注','热门股票','热门选手','胜率榜','防守榜','冠军心得'],
+    tabs:['关注','热门股票','热门选手','胜率榜','冠军心得'],
     cur:0,
     date:'2021-11-09',
     followList:[],
@@ -31,11 +31,9 @@ Page({
     this.setData({
       date: y + '-' + m + '-' + d
     })
+
     this.getFollow()
-    this.getData()
-    
-    this.getWin()
-    this.getDefen()
+   
     $api.getNotoice().then(res=>{
       this.setData({
         notices:res.data.data
@@ -110,30 +108,30 @@ Page({
       })
     })
   },
-  //防守分页
-  next2: function () {
-    if (this.data.defendList.length < this.data.total2) {
-      const page = this.data.page2 + 1
-      this.setData({
-        page2: page
-      })
-      this.getDefen()
-    }
-  },
-  getDefen() {
-    var defendList = this.data.defendList
-    $api.getDefend({
-      page: this.data.page2, page_size: 20
-    }).then(res => {
-      res.data.data.list.forEach(item => {
-        defendList.push(item)
-      })
-      this.setData({
-        defendList: defendList,
-        total2: res.data.data.total
-      })
-    })
-  },
+  //防守分页  防守榜去掉
+  // next2: function () {
+  //   if (this.data.defendList.length < this.data.total2) {
+  //     const page = this.data.page2 + 1
+  //     this.setData({
+  //       page2: page
+  //     })
+  //     this.getDefen()
+  //   }
+  // },
+  // getDefen() {
+  //   var defendList = this.data.defendList
+  //   $api.getDefend({
+  //     page: this.data.page2, page_size: 20
+  //   }).then(res => {
+  //     res.data.data.list.forEach(item => {
+  //       defendList.push(item)
+  //     })
+  //     this.setData({
+  //       defendList: defendList,
+  //       total2: res.data.data.total
+  //     })
+  //   })
+  // },
 
   getData(){
     //心得
@@ -143,13 +141,13 @@ Page({
       })
     })
     
-    $api.getDate().then(res=>{
-      this.setData({
-        date:res.data.data
-      })
-      this.getHot()
-      this.getHotFollowList()
-    })
+    // $api.getDate().then(res=>{
+    //   this.setData({
+    //     date:res.data.data
+    //   })
+    //   this.getHot()
+    //   this.getHotFollowList()
+    // })
   }, 
   //热门选手分页
   next3: function () {
@@ -202,6 +200,22 @@ Page({
       this.setData({
         cur:e.target.dataset.id
       })
+
+      switch(e.target.dataset.id){
+        case 0:
+          this.getFollow()
+        case 1:
+          this.getHot()
+        case 2:
+          this.getHotFollowList()
+        case 3:
+          this.getWin()
+        case 4:
+          this.getData()
+      }
+      
+
+
   },
   //预览
   preview(e){
@@ -216,7 +230,22 @@ Page({
         this.setData({
           cur: e.detail.current
         })
+
+        switch(e.detail.current){
+          case 0:
+            this.getFollow()
+          case 1:
+            this.getHot()
+          case 2:
+            this.getHotFollowList()
+          case 3:
+            this.getWin()
+          case 4:
+            this.getData()
+        }
     }
+  
+
   },
   //热门股票
   bindDateChange(e){
@@ -227,25 +256,14 @@ Page({
     this.getHot()
   },
   onShow: function (e) {
-    $api.getMyStyle().then(res => {
-      if (!res.data.data.init_fund) {
-        wx.navigateTo({
-          url: '../style/style',
-        })
-      }
-    })
     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) {

+ 2 - 2
pages/index/index.wxml

@@ -150,7 +150,7 @@
           </block>
       </scroll-view>
   </swiper-item>
-  <swiper-item>
+  <!-- <swiper-item>
       <scroll-view  scroll-y='{{true}}' bindscrolltolower='next2'>
           <view class="item4">
           <view class="exp">释义:开赛以来选手最大单日回撤,检验防守稳固性</view>
@@ -180,7 +180,7 @@
             <view class='loading' wx:if='{{defendList.length < total2}}'>上拉加载更多...</view>
           </block>
       </scroll-view>
-  </swiper-item>
+  </swiper-item> -->
   <swiper-item>
       <scroll-view  scroll-y='{{true}}'>
           <navigator hover-class="none" url="../detail/detail?id={{item.id}}" class="list" wx:for='{{championList}}'>

+ 2 - 2
pages/list/list.wxml

@@ -1,7 +1,7 @@
-<view class="total">
+<!-- <view class="total">
   应到 {{total_person}}人 | 实到 {{actual_person}} 人 | 请假 {{leave_person}} 人    
   <view>盈亏比  <text class="up">{{win_person}}</text>:<text class="down">{{loss_person}}</text></view>
-</view>
+</view> -->
 <view class="top">
     <text>排名</text>
     <text style="width:25%;">选手</text>

+ 1 - 8
pages/rank/rank.js

@@ -86,14 +86,7 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onShow: function () {
-    
-    $api.getMyStyle().then(res => {
-      if (!res.data.data.init_fund) {
-        wx.navigateTo({
-          url: '../style/style',
-        })
-      }
-    })
+    console.log('show')
     wx.hideNavigationBarLoading()
     if (!this.data.datas.groups){
       $api.getDate().then(res => {

+ 7 - 7
pages/rank/rank.wxml

@@ -13,15 +13,14 @@
     <!-- <image   mode="widthFix" src="../../images/jiangbei.png"></image> -->
     <!-- <text>{{datas.match.name}}</text> -->
     <picker  value="{{index}}"  range="{{match}}" range-key='name' bindchange="bindChange">
-    <view class="picker">
-      {{match[index].name}}
-    </view>
-  </picker>
+      <view class="picker">
+        {{match[index].name}}
+      </view>
+    </picker>
     <!-- {{datas.match.start_time}}至{{datas.match.end_time}} -->
     <picker mode="date" value="{{date}}"  bindchange="bindDateChange">
                 <view class="date-picker">
                    {{date}}
-                   <!-- <image  mode="heightFix"  src="../../images/icon_rise@2x.png"></image> -->
                 </view>
     </picker>
     <navigator hover-class="none" class="search" url="../search/search"><image  mode="heightFix" src="../../images/ss2.png"></image></navigator>
@@ -33,9 +32,10 @@
 </view>
 <view class="list" wx:for="{{datas.groups}}" >
     <view class="title">
-        {{item.name}} <text>({{item.players_num}}人)</text>
+        {{item.name}} 
+        <!-- <text>({{item.players_num}}人)</text> -->
         <navigator hover-class="none" url="../list/list?id={{item.id}}&stock_date={{date}}">
-          查看更多  <image mode="widthFix" src="../../images/right_icon.png"></image>
+          查看全部  <image mode="widthFix" src="../../images/right_icon.png"></image>
         </navigator>
     </view> 
     <navigator hover-class="none" class="item" wx:for='{{item.players}}' 

+ 2 - 2
pages/rank/rank.wxss

@@ -36,14 +36,14 @@ page{
   font-size: 28rpx;
   text-align: center;
 }
-.game_info image{
+/* .game_info image{ */
   /* width: 80rpx;
   position: absolute;
   left: 50rpx;
   top: 0;
   bottom: 0;
   margin: auto; */
-}
+/* } */
 .game_info .picker{
   display: block;
   font-size: 36rpx;

+ 14 - 14
pages/style/style.js

@@ -156,20 +156,20 @@ Page({
       })
       return
     }
-    if (!form.init_fund) {
-      wx.showToast({
-        title: '请输入参赛金额',
-        icon: 'none'
-      })
-      return
-    }
-    if (!form.account_img) {
-      wx.showToast({
-        title: '请上传账号截图',
-        icon: 'none'
-      })
-      return
-    }
+    // if (!form.init_fund) {
+    //   wx.showToast({
+    //     title: '请输入参赛金额',
+    //     icon: 'none'
+    //   })
+    //   return
+    // }
+    // if (!form.account_img) {
+    //   wx.showToast({
+    //     title: '请上传账号截图',
+    //     icon: 'none'
+    //   })
+    //   return
+    // }
     wx.showLoading({
       title: '正在提交',
     })

+ 10 - 10
pages/style/style.wxml

@@ -36,15 +36,15 @@
       </picker>
   </view>
 </view>
-<view class="item" wx:if="{{form.is_player==1}}">
-  <label>参赛金额</label>
-  <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:23rpx;">比赛期间有资金进出请联系QQ客服除权,再提交作业</view>
-  </view>
-</view>
-<view class="item">
+<!-- <view class="item" wx:if="{{form.is_player==1}}"> -->
+  <!-- <label>参赛金额</label> -->
+  <!-- <view class="tags"> -->
+      <!-- <input wx:if="{{!form.init_fund}}" type="digit" value="{{form.init_fund}}" bindinput="bindinput" placeholder-style="color:#999;" placeholder="请填写"></input> -->
+      <!-- <input disabled="{{true}}" style="background:#eee;" value="{{form.init_fund}}"></input>
+      <view style="color:red;font-size:23rpx;">比赛期间有资金进出请联系QQ客服除权,再提交作业</view> -->
+  <!-- </view> -->
+<!-- </view> -->
+<!-- <view class="item">
   <label>账户截图</label>
   <view class="tags">
       <image class="account_img" wx:if='{{form.account_img}}' bindtap="preview" src="{{form.account_img}}"></image>
@@ -54,6 +54,6 @@
             上传图片
       </view>
   </view>
-</view>
+</view> -->
 <button bindtap="post" class="post_btn">确定</button>
 </view>

+ 7 - 4
pages/today/today.wxml

@@ -8,7 +8,8 @@
           <label wx:for='{{datas.today_record.style}}' class="tag">{{item}}</label>
           </view>
           <view class="info">
-                  排名: <view>{{datas.today_record.group_rank}}/{{datas.today_record.players_num}}
+                  排名: <view>{{datas.today_record.group_rank}}
+                  <!-- /{{datas.today_record.players_num}} -->
                   ({{datas.today_record.match_group_name}})</view>
           </view>
           <view class="info">
@@ -106,9 +107,6 @@
 
 <view class="days_stock">
   <view class="title">每日持股
-    <navigator hover-class="none" url="../day/day?id={{id}}&player_id={{player_id}}">
-          查看更多  <image mode="widthFix" src="../../images/right_icon.png"></image>
-    </navigator>
   </view>
   <view  class="stock" wx:for='{{stockList}}' wx:if="{{index<3}}">
     <navigator hover-class="none">
@@ -139,5 +137,10 @@
                  class="img" src="{{i}}"></image>
     </view>
   </view>
+  <view class="look_all">
+    <navigator hover-class="none" url="../day/day?id={{id}}&player_id={{player_id}}">
+          查看全部
+    </navigator>
+  </view>
 </view>
 

+ 10 - 0
pages/today/today.wxss

@@ -144,6 +144,16 @@ ec-canvas {
   background: #fff;
   padding: 30rpx;
 }
+
+.look_all{
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  background-color: #E90001;
+  height: 88rpx;
+  color: #fff;
+}
+
 .stock{
   border-bottom: 1px solid #f5f5f5;
   padding-bottom: 30rpx;

+ 0 - 7
pages/upload/upload.js

@@ -26,13 +26,6 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onShow(){
-    $api.getMyStyle().then(res => {
-      if (!res.data.data.init_fund) {
-        wx.navigateTo({
-          url: '../style/style',
-        })
-      }
-    })
     if (!this.data.freshen) {
       return;
     }

+ 7 - 5
pages/upload/upload.wxml

@@ -44,13 +44,15 @@
 
         <text>交作业须知:</text>
         <text>1、用户代码为系统身份认证,请牢记并严格保密。</text>
-        <text>2、帐户有资金进出,请联系QQ客服调整除权。</text>
+        <text>2、帐户有资金进出,请联系顽主微信调整除权。</text>
         <text>3、为方便交流学习,选手间交割单系统内互相可见。</text>
-        <text>4、有特殊原因不能公开持仓截图,请跟QQ客服备注。</text>
+        <text>4、有特殊原因不能公开持仓截图,请跟顽主微信备注。</text>
         <text>5、连续3天未交作业,无特殊原因将被视为退赛。</text>
-        <text>6、重新归赛请跟QQ客服申请,并提供请假期间的银证记录。</text>
+        <text>6、重新归赛请跟顽主微信申请,并提供请假期间的银证记录。</text>
+        <text>7、数据提交有误可直接修改,再点击上传。</text>
     </view>
 
-    <button wx:if='{{!change}}' disable='{{disable}}' bindtap="post">上传</button>
-    <button wx:else  bindtap="post" disable='{{disable}}'>修改</button>
+    <button bindtap="post">上传</button>
+    <!-- <button wx:if='{{!change}}' disable='{{disable}}' bindtap="post">上传</button>
+    <button wx:else  bindtap="post" disable='{{disable}}'>修改</button> -->
 </form>

+ 8 - 1
pages/upload/upload.wxss

@@ -74,6 +74,7 @@ picker{
 }
 .tips{
   margin-top: 32rpx;
+  margin-bottom: 200rpx;
 }
 .tips text{
   display: block;
@@ -81,16 +82,22 @@ picker{
   font-size: 24rpx;
   line-height: 40rpx;
 }
+
+
+
 form button:not([size='mini']){
   background: #D94B24;
   color: #fff;
-  width: 100%;
+  width: 90%;
   height: 88rpx;
   line-height: 88rpx;
   padding: 0;
   font-size: 32rpx;
   border-radius: 8rpx;
   margin-top: 50rpx;
+  position: fixed;
+  bottom: 0;
+  margin-bottom: 10rpx;
 }
 .upload{
   width: 220rpx;

+ 33 - 14
pages/user/user.js

@@ -12,7 +12,9 @@ Page({
     usercode: '',
     openid: '',
     info: {},
-    userinfo:{}
+    userinfo:{},
+    todayinfo:{},
+    todayMoney:'',
   },
 
   /**
@@ -30,20 +32,28 @@ Page({
         usercode: res.data.data.usercode,
         userinfo: res.data.data
       })
-      if (res.data.data.need_fill){
-        wx.navigateTo({
-          url: '../style/style',
-        })
-      }
     })
     .catch(err=>{
       this.setData({
         userinfo: {}
       })
     })
+  },
 
-    
+  getTodayData() {
+    $api.getMineLatest().then(res=>{
+      this.setData({
+        todayinfo: res.data.data,
+        todayMoney:((res.data.data.today_fund - res.data.data.yesterday_fund)*10000).toFixed(2)
+      })
+    })
+    .catch(err=>{
+      this.setData({
+        todayinfo: {}
+      })
+    })
   },
+
   inputchange(e) {
     this.setData({
       usercode: e.detail.value
@@ -118,6 +128,10 @@ Page({
                   data: res.data.data,
                 })
                 _this.getUserData()
+                
+                wx.switchTab({
+                  url: '../index/index',
+                })
               })
               .catch(err=>{
                 wx.hideLoading();
@@ -135,6 +149,14 @@ Page({
 
   },
 
+  onCustomerService(){
+    wx.openCustomerServiceChat({
+      extInfo: {url: 'https://work.weixin.qq.com/kfid/kfcc1bd2a8bddad1dfb'},
+      corpId: 'wwc4de479c81db4706',
+      success(res) {}
+    })
+  },
+
   /**
    * 生命周期函数--监听页面初次渲染完成
    */
@@ -146,13 +168,8 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onShow: function () {
-    $api.getMyStyle().then(res => {
-      if (!res.data.data.init_fund) {
-        wx.navigateTo({
-          url: '../style/style',
-        })
-      }
-    })
+    this.getTodayData()
+
   },
 
   /**
@@ -189,4 +206,6 @@ Page({
   onShareAppMessage: function () {
 
   }
+
+
 })

+ 35 - 7
pages/user/user.wxml

@@ -7,24 +7,51 @@
             <view>{{userinfo.username}}</view>
             <text wx:if='{{userinfo.id}}'>代码:{{usercode}}</text>
         </view>
+        <navigator url="../today/today?id={{todayinfo.match_id}}&record_id={{todayinfo.id}}&player_id={{todayinfo.player_id}}" class="mine">我的主页</navigator>
       </view>
-      <view style="padding:0 30rpx;background:#fff;">
-        <navigator hover-class="none"  class="item" url="../style/style">
-            我的风格  <image mode="widthFix" src="../../images/right_icon.png"></image>
+      <view class="today">
+      <navigator hover-class="none"  url="../change/change">
+      
+      <view class="money">
+        <text class="{{todayMoney[0]=='-' ?'down':'up'}}">¥{{todayMoney}}  </text>
+        <text class="{{todayinfo.today_income[0]=='-' ?'todaydown':'todayup'}}">{{todayinfo.today_income}}</text>
+        <text class="today_text">今日收益</text>
+      </view>
+      <view class="date">
+        <text>日期 <text>{{todayinfo.stock_date}}</text> </text>
+        <text>排名 <text>{{todayinfo.group_rank}}</text> </text>
+      </view>
+      <view class="date">
+        <text>资产 <text>{{todayinfo.today_fund}}w</text> </text>
+        <text >总收益 <text class="{{todayinfo.total_income[0]=='-' ?'down':'up'}}"> {{todayinfo.total_income}}</text></text>
+      </view>
+      </navigator>
+      <view class="msg">
+        <view><image mode="widthFix" src="../../images/msg.png"></image>3355</view>
+        <view><image mode="widthFix" src="../../images/zan.png"></image>3355</view>
+      </view>
+      </view>
+      <view class="list" style="padding:0 30rpx;background:#fff;">
+        <navigator hover-class="none"  class="item">
+            咨询顽主
+              <button class="contactus" open-type="contact"></button>
+              <image mode="widthFix" src="../../images/right_icon.png"></image>
         </navigator>
-        <navigator hover-class="none"  class="item" url="../follow/follow">
+        <!-- <navigator hover-class="none"  class="item" url="../follow/follow">
             我的关注  <image mode="widthFix" src="../../images/right_icon.png"></image>
         </navigator>
         <navigator hover-class="none"  class="item" url="../mymatch/mymatch">
             我的比赛  <image mode="widthFix" src="../../images/right_icon.png"></image>
-        </navigator>
+        </navigator> -->
         <navigator hover-class="none" style="border:none"  class="item" url="../aboutus/aboutus">
             关于我们  <image mode="widthFix" src="../../images/right_icon.png"></image>
         </navigator>
       </view>  
-      <navigator hover-class="none"  class="item logout" bindtap="logout">
+      <!-- <navigator hover-class="none"  class="item logout" bindtap="logout">
             退出登录  <image mode="widthFix" src="../../images/right_icon.png"></image>
-        </navigator> 
+        </navigator>  -->
+
+  
 </view>
 <!-- 未登录 -->
 <view class="no_login" wx:else>
@@ -37,4 +64,5 @@
         <input bindinput='inputchange' placeholder="请输入您的代码" value="{{usercode}}"></input>
         <button bindtap="login">登录</button>
       </view>
+      <button class="contactus" open-type="contact">咨询</button>
 </view>

+ 113 - 3
pages/user/user.wxss

@@ -1,7 +1,7 @@
 /* pages/user/user.wxss */
 page{
   background: #F4F6F8;
-  position: fixed;
+  /* position: fixed; */
 }
 
 .avatar{
@@ -19,7 +19,8 @@ page{
 .name view{
   font-size: 32rpx;
   color: #FFF;
-  font-weight: 400;
+  font-weight: bold;
+  margin-bottom: 12rpx;
 }
 .name text{
   font-size: 28rpx;
@@ -32,10 +33,25 @@ page{
   display: flex;
   padding: 30rpx;
 }
+.mine{
+  border: 1px solid #fff;
+  color: #fff;
+  font-size: 28rpx;
+  border-radius: 8rpx;
+  padding:0 8rpx;
+  line-height: 48rpx;
+  position: absolute;
+  right: 30rpx;
+  height: 48rpx;
+  top: 0;
+  bottom: 0;
+  margin: auto;
+}
 .item{
   line-height: 108rpx;
   font-size: 32rpx;
   border-bottom: 1px solid #F5F5F5;
+  position: relative;
 }
 .logout{
   margin-top:15rpx;
@@ -72,7 +88,7 @@ page{
 }
 .no_login{
   height: 100vh;
-  background: #fff;
+  background: #F4F6F8;
   text-align: center;
   padding: 30% 70rpx 0;
 }
@@ -83,4 +99,98 @@ page{
 }
 .title{
   font-size: 32rpx;
+}
+
+.today{
+  margin: 30rpx 30rpx;
+  background: #fff;
+  border-radius: 8rpx;
+  box-shadow: 0 0 10px 0px rgba(51, 51, 51, 0.1);
+  overflow: hidden;
+}
+.today navigator{
+  padding: 24rpx;
+}
+.today .money{
+  margin: 0rpx 0rpx 30rpx;
+  font-size: 48rpx;
+}
+.today .date{
+  margin: 15rpx 0rpx;
+  font-size: 28rpx;
+}
+.date>text{
+  color: rgba(156, 156, 156, 1);
+  font-size: 28rpx;
+  display: inline-block;
+  width: 49%;
+}
+.date text text{
+  color: rgba(51, 51, 51, 1);
+  font-weight: 400;
+  margin-left: 45rpx;
+  font-size: 28rpx;
+}
+.today .money .todaydown{
+  font-size: 28rpx;
+  /* margin-left: 20rpx !important; */
+  color: #07B20B !important;
+}
+
+.today .money .todayup{
+  font-size: 32rpx;
+  /* margin-left: 20rpx !important; */
+  color: #E90001 !important;
+}
+
+
+
+.contactus{
+  background: none;
+  width: 100% !important;
+  text-align:center;
+  position: absolute;
+  height: 100%;
+  top: 0;
+  left: 0;
+}
+.up,.down{
+  font-size: 40rpx;
+  font-weight: bold;
+}
+.date .up,.date .down{
+  font-size: 28rpx;
+  font-weight: 400;
+  margin-left: 20rpx !important; 
+}
+.today_text{
+  display: block;
+  font-size: 28rpx;
+  color: rgba(156, 156, 156, 1);
+}
+.msg{
+  background: rgba(247, 247, 247, 1);
+  display: flex;
+  border-top: 1px solid rgba(171, 171, 171, 0.2);
+}
+.msg view{
+  width: 50%;
+  text-align: center;
+  font-size: 28rpx;
+  line-height: 100rpx; 
+}
+.msg view:first-child{
+  border-right: 1px solid rgba(171, 171, 171, 0.2);
+}
+.msg image{
+  width: 32rpx;
+  position: relative;
+  top: 5rpx;
+  left: -10rpx;
+}
+.list{
+  margin: 0 30rpx;
+  border-radius: 8rpx;
+  box-shadow: 0 0 10px 0px rgba(51, 51, 51, 0.1);
+  overflow: hidden;
 }

+ 10 - 22
project.config.json

@@ -1,7 +1,8 @@
 {
-  "description": "项目配置文件",
+  "description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
   "packOptions": {
-    "ignore": []
+    "ignore": [],
+    "include": []
   },
   "setting": {
     "urlCheck": true,
@@ -30,40 +31,27 @@
       "disablePlugins": [],
       "outputPath": ""
     },
-    "enableEngineNative": false,
     "useIsolateContext": false,
     "userConfirmedBundleSwitch": false,
     "packNpmManually": false,
     "packNpmRelationList": [],
     "minifyWXSS": true,
     "disableUseStrict": false,
+    "minifyWXML": true,
     "showES6CompileOption": false,
     "useCompilerPlugins": false,
-    "minifyWXML": true
+    "ignoreUploadUnusedFiles": true,
+    "useStaticServer": true
   },
   "compileType": "miniprogram",
   "libVersion": "2.15.0",
   "appid": "wxb299e10e65157301",
   "projectname": "newwzb_xcx",
-  "debugOptions": {
-    "hidedInDevtools": []
-  },
-  "isGameTourist": false,
   "simulatorType": "wechat",
   "simulatorPluginLibVersion": {},
-  "condition": {
-    "search": {
-      "list": []
-    },
-    "conversation": {
-      "list": []
-    },
-    "game": {
-      "currentL": -1,
-      "list": []
-    },
-    "miniprogram": {
-      "list": []
-    }
+  "condition": {},
+  "editorSetting": {
+    "tabIndent": "insertSpaces",
+    "tabSize": 2
   }
 }

+ 3 - 3
utils/api.js

@@ -5,8 +5,8 @@ const FORM = 'FORM';
 const DELETE = 'DELETE';
 
 // const baseURL = 'https://wx.scxjc.club';
-const baseURL = 'https://www.hunanwanzhu.com';
-
+// const baseURL = 'https://www.hunanwanzhu.com';
+const baseURL = 'https://api.hunanwanzhu.com';
 
 function request(method, url, data) {
   var token='';
@@ -132,7 +132,7 @@ const API = {
   getHotFollow: (data) => request(GET, `/api/wx/v2/hot/follow/list`, data),
   getCalendar: (data) => request(GET, `/api/wx/v2/player/match/calendar`, data),
   getMatchList: (data) => request(GET, `/api/wx/v2/match/list`, data),
-  
+  getMineLatest: (data) => request(GET, `/api/wx/v2/mine/latest`, data),
   
 }; 
 module.exports = {