|
@@ -13,6 +13,9 @@ Page({
|
|
|
mydata:{},
|
|
|
date:'2021-11',
|
|
|
days:[],
|
|
|
+ match:[],
|
|
|
+ index:0,
|
|
|
+ id:'',
|
|
|
ec: {
|
|
|
onInit: null
|
|
|
},
|
|
@@ -26,7 +29,7 @@ Page({
|
|
|
*/
|
|
|
onLoad: function (options) {
|
|
|
|
|
|
-
|
|
|
+
|
|
|
// options.id = 7, options.record_id = 29014
|
|
|
// options.id = 9, options.player_id = 3520
|
|
|
id = options.id?options.id:null, record_id = options.record_id?options.record_id:null
|
|
@@ -41,7 +44,16 @@ Page({
|
|
|
title: '我的主页',
|
|
|
})
|
|
|
}
|
|
|
- this.getData();
|
|
|
+ $api.getMatchList().then(res=>{
|
|
|
+ let l = res.data.data.length - 1;
|
|
|
+ this.setData({
|
|
|
+ match:res.data.data,
|
|
|
+ index: l,
|
|
|
+ id: res.data.data[l].id
|
|
|
+ })
|
|
|
+ this.getData();
|
|
|
+ })
|
|
|
+
|
|
|
},
|
|
|
getDays(){
|
|
|
// match_id player_id month: "2021-12"
|
|
@@ -68,6 +80,14 @@ Page({
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ bindChange(e) {
|
|
|
+ let match=this.data.match;
|
|
|
+ this.setData({
|
|
|
+ index: e.detail.value,
|
|
|
+ id: match[e.detail.value].id
|
|
|
+ })
|
|
|
+ this.getData()
|
|
|
+ },
|
|
|
getData(){
|
|
|
wx.showNavigationBarLoading();
|
|
|
var data = {}
|
|
@@ -105,6 +125,7 @@ Page({
|
|
|
.catch(err=>{
|
|
|
wx.hideNavigationBarLoading()
|
|
|
})
|
|
|
+
|
|
|
//每日持股
|
|
|
var parm={
|
|
|
id: this.data.id, player_id: this.data.player_id?data.player_id:o
|