|
@@ -34,20 +34,19 @@ Page({
|
|
|
type:options.type?options.type:'',
|
|
|
id: id,
|
|
|
record_id: record_id,
|
|
|
- player_id: options.player_id ? options.player_id:'',
|
|
|
user_id: options.user_id ? options.user_id:'',
|
|
|
- cur_user_id:options.cur_user_id
|
|
|
})
|
|
|
+ console.log(this.data,11111111111)
|
|
|
if(options.type){
|
|
|
wx.setNavigationBarTitle({
|
|
|
title: '我的主页',
|
|
|
})
|
|
|
}
|
|
|
- $api.getAuthinfo().then(res=>{
|
|
|
- this.setData({
|
|
|
- user_id:res.data.data.id
|
|
|
- })
|
|
|
- })
|
|
|
+ // $api.getAuthinfo().then(res=>{
|
|
|
+ // this.setData({
|
|
|
+ // user_id:res.data.data.id
|
|
|
+ // })
|
|
|
+ // })
|
|
|
$api.getMatchList().then(res=>{
|
|
|
let l = res.data.data.length - 1;
|
|
|
|
|
@@ -61,10 +60,8 @@ Page({
|
|
|
|
|
|
},
|
|
|
getDays(){
|
|
|
- // match_id player_id month: "2021-12"
|
|
|
$api.getCalendar({
|
|
|
- player_id: this.data.player_id,
|
|
|
- user_id:this.data.cur_user_id,
|
|
|
+ user_id:this.data.user_id,
|
|
|
match_id:this.data.id,
|
|
|
month: this.data.date
|
|
|
}).then(res=>{
|
|
@@ -103,11 +100,11 @@ Page({
|
|
|
if (this.data.id) {
|
|
|
data.id = this.data.id
|
|
|
}
|
|
|
- if (this.data.player_id) {
|
|
|
- data.player_id = this.data.player_id
|
|
|
+ if (this.data.user_id) {
|
|
|
+ data.user_id = this.data.user_id
|
|
|
}
|
|
|
- if (this.data.cur_user_id) {
|
|
|
- data.user_id = this.data.cur_user_id
|
|
|
+ if (this.data.user_id) {
|
|
|
+ data.user_id = this.data.user_id
|
|
|
}
|
|
|
if (this.data.record_id) {
|
|
|
// data.record_id = this.data.record_id
|
|
@@ -118,10 +115,9 @@ Page({
|
|
|
datas: res.data.data,
|
|
|
date: stock_date[0] + '-' + stock_date[1],
|
|
|
is_follow: res.data.data.is_follow,
|
|
|
- player_id: res.data.data.today_record.player_id,
|
|
|
+ // user_id: res.data.data.today_record.user_id,
|
|
|
followers:res.data.data.followers,
|
|
|
fans:res.data.data.fans,
|
|
|
- // id: res.data.data.match.id,
|
|
|
ec: {
|
|
|
onInit: initChart
|
|
|
},
|
|
@@ -140,7 +136,7 @@ Page({
|
|
|
|
|
|
//每日持股
|
|
|
var parm={
|
|
|
- id: this.data.id, player_id: this.data.player_id?data.player_id:o,user_id: this.data.cur_user_id?this.data.cur_user_id:null
|
|
|
+ id: this.data.id, user_id: this.data.user_id?data.user_id:o,user_id: this.data.user_id?this.data.user_id:null
|
|
|
}
|
|
|
$api.getRecordList(parm).then(res=>{
|
|
|
this.setData({
|
|
@@ -199,7 +195,7 @@ Page({
|
|
|
},
|
|
|
followPlayer(e){
|
|
|
let action = e.target.dataset.action;
|
|
|
- $api.follow({ follow_id: this.data.player_id, action:action}).then(res=>{
|
|
|
+ $api.follow({ follow_id: this.data.user_id, action:action}).then(res=>{
|
|
|
wx.showToast({
|
|
|
title: action?'取消成功':'已关注',
|
|
|
})
|
|
@@ -222,7 +218,7 @@ Page({
|
|
|
* 生命周期函数--监听页面显示
|
|
|
*/
|
|
|
onShow: function () {
|
|
|
- if(this.data.player_id){
|
|
|
+ if(this.data.user_id){
|
|
|
this.getData();
|
|
|
}
|
|
|
},
|