xiaoyi il y a 2 mois
Parent
commit
8b3ae75db6

BIN
.DS_Store


+ 0 - 6
app.js

@@ -7,12 +7,6 @@ App({
     wx.setStorageSync('logs', logs)
 
     console.log('app start')
-    // 登录
-    wx.login({
-      success: res => {
-        // 发送 res.code 到后台换取 openId, sessionKey, unionId
-      }
-    })
   },
   globalData: {
     userInfo: null,

BIN
images/.DS_Store


BIN
images/page1.png


BIN
images/start.png


BIN
images/wz.jpg


+ 2 - 2
pages/apply/apply.wxml

@@ -38,11 +38,11 @@
           <text>免费参赛:在比赛券商开户参赛,可永久免报名费,佣金低-网速快-网上开户几分钟完成,兼容同花顺-通达信,已开通创业板权限的可转签,具体操作请站内</text>
           <navigator url="../message/message"><text class="change" >咨询我们</text></navigator>
           <text>
-          其他免费参赛选手:历届小组前三,倒数前三,腰斩选手,种子选手,直接报名</text>
+          其他免费参赛选手:在一届完整比赛中,拿过小组前三,倒数前三,或者账号腰斩,中途未退赛。</text>
         </view>
         <view class="title title1">6、退赛</view>
         <view class="date">
-          <text>参赛一周内申请退赛可退报名费(请联系客服处理,24小时内退回),比赛系统帐户收回</text>
+          <text>开赛后五个交易日内申请退赛可退报名费(请联系客服处理,24小时内退回),比赛系统帐户收回</text>
         </view>
 
         

+ 2 - 2
pages/change/change.js

@@ -114,7 +114,7 @@ Page({
           return
         }
 
-        if (data.out_fund >= 2000){
+        if (data.out_fund >= 5000){
           wx.showToast({
             icon: 'none',
             title: '今日转出资金单位为万'
@@ -122,7 +122,7 @@ Page({
           return
         }
 
-        if (data.in_fund >= 2000){
+        if (data.in_fund >= 5000){
           wx.showToast({
             icon: 'none',
             title: '今日转入资金单位为万'

+ 1 - 1
pages/change/change.json

@@ -1,3 +1,3 @@
 {
-  "navigationBarTitleText": "初始资金修改"
+  "navigationBarTitleText": "出入金提交"
 }

+ 3 - 3
pages/change/change.wxml

@@ -2,17 +2,17 @@
 
 <view class="item">
     <label>今日转出资金</label>
-    <input bindinput="outchange" type='digit' placeholder-style="color:rgba(203, 203, 203, 1)"  placeholder="请填写"/>
+    <input bindinput="outchange" type='digit' placeholder-style="color:rgba(203, 203, 203, 1)"  placeholder="单位是万"/>
     <text class="note">(单位:万)</text>
 </view>
 <view class="item">
     <label>今日转入资金</label>
-    <input bindinput="inchange" type='digit' placeholder-style="color:rgba(203, 203, 203, 1)"   placeholder="请填写"/>
+    <input bindinput="inchange" type='digit' placeholder-style="color:rgba(203, 203, 203, 1)"   placeholder="单位是万"/>
     <text class="note">(单位:万)</text>
 </view>
 <view class="item">
     <label>今日总资产</label>
-    <input bindinput="todaychange" type='digit' placeholder-style="color:rgba(203, 203, 203, 1)"  placeholder="请填写"/>
+    <input bindinput="todaychange" type='digit' placeholder-style="color:rgba(203, 203, 203, 1)"  placeholder="单位是万"/>
     <text class="note">(单位:万)</text>
 </view>
 <text style="color:rgb(128, 128, 128);font-size:28rpx">注意:1.融资账户填净资产 2.这里填资金进出后的总资产</text>

+ 22 - 1
pages/index/index.js

@@ -310,12 +310,33 @@ Page({
     $api.getCangweiList({match_id:mid}).then(res=>{
       var cangwei = [];
       var records = res.data.data.list
+
+      var max = 0;
+      var min = 1000;
+
+      for (let i = 0; i < records.length; i++) {
+        let y = records[i].today_cangwei_avg.replace('%', '')
+        if(y > max){
+          max = y;
+        }
+
+        if(y < min){
+          min = y;
+        }
+
+      }
+
+      var ratio = max - min;
+
+
       for (let i = 0; i < records.length; i++) {
         let date = records[i].stock_date.split('-');
         let y = records[i].today_cangwei_avg.replace('%', '')
+        let h = (y-min)*(200/ratio) + 200/ratio
         cangwei.push({
           date:date[1] + '/' + date[2],
-          data:Number(y)
+          data:Number(y),
+          height:Number(h)
         })
       }
         this.setData({

+ 5 - 5
pages/index/index.wxml

@@ -127,13 +127,13 @@
   </view>
 </view>
 
-<view class="up-down-view" style="padding: 25rpx;">
+<view class="up-down-view" style="padding: 20rpx;">
   <view class="article-title" > 当日人均仓位</view>
-  <scroll-view scroll-x 	scroll-left='{{cangwei.length*45}}'  style="padding: 0;" wx:if="{{cangwei.length > 1}}">
-       <view class="bar-content" style="{{'width:'+cangwei.length*45+'px'}}">
-          <view wx:for="{{cangwei}}" class="bar-item" style="{{'height:'+item.data+'%'}}">
+  <scroll-view scroll-x 	scroll-left='{{cangwei.length*40}}'  style="padding: 0;" wx:if="{{cangwei.length > 1}}">
+       <view class="bar-content" style="{{'width:'+cangwei.length*20+'px'}}">
+          <view wx:for="{{cangwei}}" class="bar-item">
             <text>{{item.data}}%</text>
-            <view ></view>
+            <view style="{{'height:'+item.height+'px'}}"></view>
             <text>{{item.date}}</text>
           </view>
        </view>

+ 6 - 4
pages/index/index.wxss

@@ -745,17 +745,19 @@ ec-canvas {
 .bar-content{
   display: flex;
   align-items: flex-end;
-  height:300rpx;
+  height:100%;
 }
 .bar-item{
-  margin-right: 20rpx;
+  margin-right: 15rpx;
   text-align: center;
   width: 35px;
+  /* height: 100%; */
 }
 .bar-item text{
-  font-size: 20rpx;
+  font-size: 18rpx;
+  text-align: center;
 }
 .bar-item view{
-    height:60%;
+    /* height:50%; */
     background-color: #85D6CB;
 }

+ 45 - 45
pages/rethink/rethink.js

@@ -1,66 +1,66 @@
 // pages/rethink/rethink.js
 Page({
 
-    /**
-     * 页面的初始数据
-     */
-    data: {
+  /**
+   * 页面的初始数据
+   */
+  data: {
 
-    },
+  },
 
-    /**
-     * 生命周期函数--监听页面加载
-     */
-    onLoad: function (options) {
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
 
-    },
+  },
 
-    /**
-     * 生命周期函数--监听页面初次渲染完成
-     */
-    onReady: function () {
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
 
-    },
+  },
 
-    /**
-     * 生命周期函数--监听页面显示
-     */
-    onShow: function () {
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
 
-    },
+  },
 
-    /**
-     * 生命周期函数--监听页面隐藏
-     */
-    onHide: function () {
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
 
-    },
+  },
 
-    /**
-     * 生命周期函数--监听页面卸载
-     */
-    onUnload: function () {
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
 
-    },
+  },
 
-    /**
-     * 页面相关事件处理函数--监听用户下拉动作
-     */
-    onPullDownRefresh: function () {
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
 
-    },
+  },
 
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom: function () {
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
 
-    },
+  },
 
-    /**
-     * 用户点击右上角分享
-     */
-    onShareAppMessage: function () {
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
 
-    }
+  }
 })

+ 0 - 3
pages/rethink/rethink.json

@@ -1,3 +0,0 @@
-{
-  "navigationBarTitleText": "今日反思"
-}

+ 2 - 14
pages/rethink/rethink.wxml

@@ -1,14 +1,2 @@
-<view class="list">
-    <image src="../../images/page1.png" ></image>
-    <view class="msg">
-        <text class="name">茂名哥</text>
-        <view>资产:187w(总收益 <label class="up">80%</label>  |  今日收益 <label class="up">80%</label>)</view>
-    </view>
-</view>
-<view class="content">北交所11月12日宣布,目前各项准备工作均已就绪,定于11月15日正式开市。截至11月12日,累计有210万户投资者预约开通北交所合格投资者权限,开市后合计可参与北交所交易的投资者超400万户。</view>
-<view class="comment">
-    <image mode="widthFix" src="../../images/msg.png"></image>
-    <text>2365</text>
-    <image mode="widthFix" src="../../images/zan.png"></image>
-    <text>2365</text>
-</view>
+<!--pages/rethink/rethink.wxml-->
+<text>pages/rethink/rethink.wxml</text>

+ 0 - 44
pages/rethink/rethink.wxss

@@ -1,44 +0,0 @@
-/* pages/rethink/rethink.wxss */
-page{
-    padding: 30rpx 30rpx 160rpx;
-}
-.list{
-    position: relative;
-    padding-left: 80rpx;
-    margin-bottom: 24rpx;
-}
-.list>image{
-    width: 64rpx;
-    height: 64rpx;
-    position: absolute;
-    left: 0;
-    top: 0;
-    border-radius: 100%;
-}
-.content,.name{
-    font-size: 30rpx;
-    line-height: 48rpx;
-    color: #333;
-}
-.msg view{
-    color: #666;
-    font-size: 28rpx;
-}
-.msg view label{
-    font-size: 28rpx;
-}
-.comment{
-    padding:  24rpx 0;
-    border-bottom: 1px solid rgba(245, 245, 245, 1);
-}
-.comment image{
-    width: 32rpx;
-    margin-right: 10rpx;
-    position: relative;
-    top: 5rpx;
-}
-.comment text{
-    color: #999;
-    font-size: 28rpx;
-    margin-right: 40rpx;
-}

+ 1 - 0
pages/upload/upload.wxml

@@ -60,6 +60,7 @@
         <text>3、连续3天未交作业,无特殊原因将被视为退赛。</text>
         <text>4、重新归赛请联系我们,提交请假期间的银证转账记录。</text>
         <text>5、数据提交有误可直接修改,再点击上传。</text>
+        <text>6、禁止上传群聊天记录一类的显摆资料,谨防上当</text>
     </view>
     
     <button wx:if="{{role == 2}}" disabled='{{disable}}'  bindtap="post">提交</button>

+ 29 - 0
pages/user/user.js

@@ -63,6 +63,35 @@ Page({
     })
   },
 
+  deleteShow(){
+    wx.showModal({
+      title: '删除作业',
+      content: '如有出入金请先申报除权再重新提交作业',
+      complete: (res) => {
+        if (res.cancel) {
+          
+        }
+    
+        if (res.confirm) {
+          this.deleteData()
+        }
+      }
+    })
+  },
+
+  deleteData(){
+    var data={
+      user_id:this.data.todayinfo.user_id,
+      match_id:this.data.todayinfo.match_id,
+      stock_date:this.data.todayinfo.stock_date
+    }
+    $api.deleteTodayData(data).then(res=>{
+      this.setData({
+        todayinfo:{}
+      })
+    })
+  },
+
 
   logout() {
     wx.removeStorage({

+ 3 - 4
pages/user/user.wxml

@@ -26,10 +26,9 @@
         <text >总收益 <text class="{{todayinfo.total_income[0]=='-' ?'down':'up'}}"> {{todayinfo.total_income}}</text></text>
       </view>
       </navigator>
-      <navigator class="msg"  hover-class="none"  bind:tap="pushToday" data-match_id="{{todayinfo.match_id}}" data-record_id="{{todayinfo.id}}" data-user_id = "{{todayinfo.user_id}}">
-        <view ><image mode="widthFix" src="../../images/msg.png"></image>{{todayinfo.comments_count}}</view>
-        <view><image mode="widthFix" src="../../images/zan.png"></image>{{todayinfo.zan_count}}</view>
-      </navigator>
+      <view>
+        <button class="deletebtn" style="width: 180rpx;margin-right: 20rpx;" bind:tap="deleteShow">删除</button>
+      </view>
       </view>
 
 

+ 9 - 0
pages/user/user.wxss

@@ -261,4 +261,13 @@ page{
   font-size: 30rpx;
   color: rgb(128, 128, 128);
   margin: 30rpx;
+}
+
+.deletebtn{
+  font-size: 28rpx;
+  height: 70rpx;
+  color: white;
+  background-color: #E90001;
+  margin-bottom: 20rpx;
+  float: right;
 }

+ 1 - 0
utils/api.js

@@ -227,6 +227,7 @@ const API = {
   contentCheck: (data) => request(POST, `/api/wx/v3/msg/content/check`, data),
   getMatchGroupList: (data) => request(GET, `/api/wx/v3/match/group/list`, data),
   getCangweiList: (data) => request(GET, `/api/wx/v3/match/cangwei/avg/allday`, data),
+  deleteTodayData: (data) => request(DELETE, `/api/wx/v3/userstock/delete`, data),
   initUser:() => initUser(),
   checkUser:() => checkUser(),
   checkUserRole:() => checkUserRole(),