xjc 2 years ago
parent
commit
5baaf76c1d
2 changed files with 6 additions and 3 deletions
  1. 5 2
      pages/homepage/homepage.js
  2. 1 1
      pages/homepage/homepage.wxml

+ 5 - 2
pages/homepage/homepage.js

@@ -9,6 +9,7 @@ Page({
    * 页面的初始数据
    */
   data: {
+    datas:{},
     mydata:{},
     date:'2021-11',
     days:[],
@@ -28,7 +29,7 @@ Page({
 
     // options.id = 7, options.record_id = 29014
     // options.id = 9, options.player_id = 3520
-    id = options.id, record_id = options.record_id
+    id = options.id?options.id:null, record_id = options.record_id?options.record_id:null
     this.setData({
       type:options.type?options.type:'',
       id: id,
@@ -95,6 +96,8 @@ Page({
           onInit: initChart1
         }
       })
+      console.log(this.datas,22222222222222)
+
       records = res.data.data.records
       today_stock = res.data.data.today_record.today_stock
       this.getDays()
@@ -105,7 +108,7 @@ Page({
     })
     //每日持股
     var parm={
-      id: data.id, player_id: this.data.player_id
+      id: data.id?data.id:0, player_id: this.data.player_id?data.player_id:o
     }
     $api.getRecordList(parm).then(res=>{
         this.setData({

+ 1 - 1
pages/homepage/homepage.wxml

@@ -3,7 +3,7 @@
     <view class="name">
       {{datas.today_record.username}}
       <view class="fans">
-          <text>{{fans}}</text>粉丝
+          <text>{{fans}}</text>粉丝12
           <navigator url="../follow/follow" style="display: inline-block;"><text style="margin-left: 20rpx;">{{followers}}</text>关注</navigator>
       </view>
     </view>