tanyanfei пре 2 година
родитељ
комит
d389fb5be5

+ 1 - 1
pages/homepage/homepage.js

@@ -28,7 +28,7 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-    
+    console.log(options)
     
     // options.id = 7, options.record_id = 29014
     // options.id = 9, options.player_id = 3520

+ 3 - 2
pages/homepage/homepage.wxml

@@ -26,8 +26,9 @@
     <text>城市</text>重庆
   </view> -->
   <view>
-    <text>跟踪股票</text>
-    <block wx:for="{{datas.stock_follow}}">{{item}}   </block>
+    <text>我的自选</text>
+    <block wx:if="{{datas.stock_follow.length<=0}}">无</block>
+    <block wx:for="{{datas.stock_follow}}">{{item}} </block>
   </view>
 </view>
 <view class="style" style="margin: 0;">

+ 10 - 7
pages/index/index.js

@@ -46,7 +46,7 @@ Page({
         })
       })
     })
-    // this.getFollow()
+    this.getFollow()
    
     
     
@@ -327,6 +327,9 @@ Page({
     })
   },
   onShow: function (e) {
+    let pages = getCurrentPages();
+    let currentPage = pages[pages.length - 1];
+    console.log(pages)
     //判断是否报名
     $api.getAuthinfo().then(res=>{
       if(res.data.data.role==0){
@@ -336,15 +339,15 @@ Page({
       }
     })
     this.setData({
-      followList:[],
+      // followList:[],
       defendList:[],
       winList:[],
       hotFollowList:[],
       hotbuyList:[],
       championList:[],
       explist:[],
-      page:1,
-      total:-1,
+      // page:1,
+      // total:-1,
       page1: 1,
       total1: 0,
       page2: 1,
@@ -353,9 +356,9 @@ Page({
       total3: 0
     })
     switch(this.data.cur){
-      case 0:
-        this.getFollow()
-        break;
+      // case 0:
+      //   this.getFollow()
+      //   break;
       case 1:
         this.getHot()
         break;

+ 2 - 2
pages/index/index.wxml

@@ -27,8 +27,8 @@
               </view>
               <view class="content">{{item.experience}}</view>
               <view class="imgs">
-                <image wx:for='{{item.today_stock_img}}' wx:for-item='i'  bindtap="preview" data-src='{{i}}' data-urls='{{item.today_stock_img}}'
-                 class="img" src="{{i}}"></image>
+                <image wx:for='{{item.today_stock_img}}' wx:for-item='i'  catchtap="preview" data-src='{{i}}' data-urls='{{item.today_stock_img}}'
+                 class="img" src="{{i}}"  mode="heightFix"></image>
               </view> 
               <view class="recomment">
                   <image mode="widthFix" src="../../images/msg.png"></image>

+ 3 - 3
pages/stock/stock.wxml

@@ -17,14 +17,14 @@
   <view class="tab">
       <view bindtap="tab" data-id='0' class="{{cur==0?'act':''}}">留言 {{comment_count}} <text></text></view>
       <view bindtap="tab"   data-id='1' class="{{cur==1?'act':''}}">今日持仓 {{info.list.length}}<text></text></view>
-      <view bindtap="tab"   data-id='2' class="{{cur==2?'act':''}}">跟踪 {{myList.length}}<text></text></view>
+      <view bindtap="tab"   data-id='2' class="{{cur==2?'act':''}}">自选 {{myList.length}}<text></text></view>
   </view>
   <scroll-view bindtap="blur"  scroll-y='{{true}}' style="height:calc(100vh - 380rpx);background: #fff;padding: 30rpx;">
     <view class="content" wx:if='{{cur==0}}'>
         <view class="_list" wx:for="{{comment_list}}">
-          <image src="{{item.user_avatar}}" ></image>
+          <navigator url="../homepage/homepage?player_id={{item.player_id}}"><image src="{{item.user_avatar}}" ></image></navigator>
             <view class="msg">
-                <text class="_name">{{item.user_name}}</text>
+                <navigator url="../homepage/homepage?player_id={{item.player_id}}" class="_name">{{item.user_name}}</navigator>
                 <view class="_content">{{item.content}}</view>
                 <view class="answer" wx:if="{{item.children.length>0}}">
                     <view  wx:for="{{item.children}}" wx:for-item='i'>

+ 1 - 1
pages/stock/stock.wxss

@@ -171,7 +171,7 @@ image{
   padding-left: 80rpx;
   margin-bottom: 24rpx;
 }
-._list>image{
+._list>navigator>image,._list>image{
   width: 64rpx;
   height: 64rpx;
   position: absolute;

+ 1 - 1
pages/today/today.wxml

@@ -17,7 +17,7 @@
       <view class="num">{{datas.today_record.group_rank}}</view>
       排名
     </view>
-    <view class="today_income">{{datas.today_record.today_income_fund}} 
+    <view class="today_income {{datas.today_record.today_income[0]=='-' ?'down':'up'}}">{{datas.today_record.today_income_fund}} 
       <text  class="{{datas.today_record.today_income[0]=='-' ?'down':'up'}}">{{datas.today_record.today_income}}</text>
     </view>
     <view class="label">今日收益</view>

+ 1 - 1
pages/today/today.wxss

@@ -97,7 +97,7 @@ ec-canvas {
   border-radius: 72rpx 0 0 72rpx;
   overflow: hidden;
   font-size: 24rpx;
-  text-align: right;
+  text-align: center;
 }
 .jp{
     width: 72rpx;

+ 7 - 0
pages/upload/upload.js

@@ -212,6 +212,13 @@ Page({
     })
   },
   post(){
+    if (this.data.role == 1) {
+      wx.showToast({
+        icon: 'none',
+        title: '游客不能提交作业'
+      })
+      return
+    }
     if (!this.data.need_fill) {
       var parm = {
         stock_date: this.data.stock_date,

+ 3 - 2
pages/upload/upload.wxml

@@ -1,10 +1,11 @@
 <form bindtap="blur">
     <view class="label" >持仓日期   {{stock_date}}</view>
     <view class="note">交作业时间:15:00-15:30</view>
+    <navigator wx:if="{{role == 2}}" class="change" url="../change/change">今日资金有出入?点此处申报</navigator>
     <view class="label">今日净资产<text class="note">(单位:万)</text>  </view>
     <input type='digit' value="{{today_fund}}" bindinput="fundChange1" placeholder="请输入今日净资产"></input>
     <text style="color:red;font-weight:500">万</text>
-    <navigator wx:if="{{role == 2}}" class="change" url="../change/change">今日资金有出入?</navigator>
+    
     <block wx:if='{{!is_markt}}'>
     <view class="label">今日持股<text class="note">(空仓请留空不填)</text></view>
     <view class="info" wx:for='{{stock}}' >
@@ -52,7 +53,7 @@
         <text>7、数据提交有误可直接修改,再点击上传。</text>
     </view>
     
-    <button wx:if="{{role == 2}}"  bindtap="post">上传</button>
+    <button   bindtap="post">上传</button>
     <!-- <button wx:else disabled>上传</button> -->
     
     <!-- <button wx:if='{{!change}}' disable='{{disable}}' bindtap="post">上传</button>

+ 1 - 1
pages/upload/upload.wxss

@@ -97,7 +97,7 @@ picker{
   text-decoration: underline;
   /* border: 1px solid #D94B24; */
   display: inline;
-  margin-left: 20rpx;
+  /* margin-left: 20rpx; */
 }
 
 form button:not([size='mini']){

+ 56 - 56
project.config.json

@@ -1,58 +1,58 @@
 {
-  "description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
-  "packOptions": {
-    "ignore": [],
-    "include": []
-  },
-  "setting": {
-    "urlCheck": true,
-    "es6": true,
-    "enhance": true,
-    "postcss": true,
-    "preloadBackgroundData": false,
-    "minified": true,
-    "newFeature": true,
-    "coverView": true,
-    "nodeModules": false,
-    "autoAudits": false,
-    "showShadowRootInWxmlPanel": true,
-    "scopeDataCheck": false,
-    "uglifyFileName": false,
-    "checkInvalidKey": true,
-    "checkSiteMap": true,
-    "uploadWithSourceMap": true,
-    "compileHotReLoad": false,
-    "lazyloadPlaceholderEnable": false,
-    "useMultiFrameRuntime": true,
-    "useApiHook": true,
-    "useApiHostProcess": true,
-    "babelSetting": {
-      "ignore": [],
-      "disablePlugins": [],
-      "outputPath": ""
-    },
-    "enableEngineNative": false,
-    "useIsolateContext": false,
-    "userConfirmedBundleSwitch": false,
-    "packNpmManually": false,
-    "packNpmRelationList": [],
-    "minifyWXSS": true,
-    "disableUseStrict": false,
-    "minifyWXML": true,
-    "showES6CompileOption": false,
-    "useCompilerPlugins": false,
-    "useStaticServer": true,
-    "ignoreUploadUnusedFiles": true
-  },
-  "compileType": "miniprogram",
-  "libVersion": "2.15.0",
-  "appid": "wxb299e10e65157301",
-  "projectname": "newwzb_xcx",
-  "simulatorType": "wechat",
-  "simulatorPluginLibVersion": {},
-  "editorSetting": {
-    "tabIndent": "insertSpaces",
-    "tabSize": 2
-  },
-  "condition": {}
+	"description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
+	"packOptions": {
+		"ignore": [],
+		"include": []
+	},
+	"setting": {
+		"urlCheck": true,
+		"es6": true,
+		"enhance": true,
+		"postcss": true,
+		"preloadBackgroundData": false,
+		"minified": true,
+		"newFeature": true,
+		"coverView": true,
+		"nodeModules": false,
+		"autoAudits": false,
+		"showShadowRootInWxmlPanel": true,
+		"scopeDataCheck": false,
+		"uglifyFileName": false,
+		"checkInvalidKey": true,
+		"checkSiteMap": true,
+		"uploadWithSourceMap": true,
+		"compileHotReLoad": false,
+		"lazyloadPlaceholderEnable": false,
+		"useMultiFrameRuntime": true,
+		"useApiHook": true,
+		"useApiHostProcess": true,
+		"babelSetting": {
+			"ignore": [],
+			"disablePlugins": [],
+			"outputPath": ""
+		},
+		"enableEngineNative": false,
+		"useIsolateContext": false,
+		"userConfirmedBundleSwitch": false,
+		"packNpmManually": false,
+		"packNpmRelationList": [],
+		"minifyWXSS": true,
+		"disableUseStrict": false,
+		"minifyWXML": true,
+		"showES6CompileOption": false,
+		"useCompilerPlugins": false,
+		"useStaticServer": true,
+		"ignoreUploadUnusedFiles": true
+	},
+	"compileType": "miniprogram",
+	"libVersion": "2.15.0",
+	"appid": "wxb299e10e65157301",
+	"projectname": "newwzb_xcx",
+	"simulatorType": "wechat",
+	"simulatorPluginLibVersion": {},
+	"editorSetting": {
+		"tabIndent": "insertSpaces",
+		"tabSize": 2
+	},
+	"condition": {}
 }