|
@@ -11,6 +11,7 @@ Page({
|
|
*/
|
|
*/
|
|
data: {
|
|
data: {
|
|
datas:{},
|
|
datas:{},
|
|
|
|
+ total_money:0,
|
|
user_id:'',
|
|
user_id:'',
|
|
match_id:'',
|
|
match_id:'',
|
|
date:'',
|
|
date:'',
|
|
@@ -94,8 +95,10 @@ Page({
|
|
records = res.data.data.records
|
|
records = res.data.data.records
|
|
today_stock = res.data.data.today_record.today_stock
|
|
today_stock = res.data.data.today_record.today_stock
|
|
console.log(records,2323)
|
|
console.log(records,2323)
|
|
|
|
+ let tmoney = ((res.data.data.today_record.today_fund - res.data.data.today_record.init_fund)*10000).toFixed(0)
|
|
this.setData({
|
|
this.setData({
|
|
datas: res.data.data,
|
|
datas: res.data.data,
|
|
|
|
+ total_money:tmoney,
|
|
date: stock_date[0] + '-' + stock_date[1],
|
|
date: stock_date[0] + '-' + stock_date[1],
|
|
ec: {
|
|
ec: {
|
|
onInit: initChart
|
|
onInit: initChart
|
|
@@ -104,9 +107,26 @@ Page({
|
|
// onInit: initChart1
|
|
// onInit: initChart1
|
|
// }
|
|
// }
|
|
})
|
|
})
|
|
|
|
+
|
|
|
|
|
|
this.getDays()
|
|
this.getDays()
|
|
wx.hideNavigationBarLoading()
|
|
wx.hideNavigationBarLoading()
|
|
|
|
+ wx.setNavigationBarTitle({
|
|
|
|
+ title: res.data.data.userinfo.username,
|
|
|
|
+ })
|
|
|
|
+ if(this.data.total_money >= 0){
|
|
|
|
+ wx.setNavigationBarColor({
|
|
|
|
+ backgroundColor: '#D94B24',
|
|
|
|
+ frontColor: '#ffffff',
|
|
|
|
+ })
|
|
|
|
+ } else{
|
|
|
|
+ wx.setNavigationBarColor({
|
|
|
|
+ backgroundColor: '#07B20B',
|
|
|
|
+ frontColor: '#ffffff',
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
})
|
|
})
|
|
.catch(err=>{
|
|
.catch(err=>{
|
|
wx.hideNavigationBarLoading()
|
|
wx.hideNavigationBarLoading()
|
|
@@ -114,6 +134,10 @@ Page({
|
|
|
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ toThousandFilter(num) {
|
|
|
|
+ return (+num || 0).toString().replace(/^-?\d+/g, m => m.replace(/(?=(?!\b)(\d{3})+$)/g, ','))
|
|
|
|
+ },
|
|
|
|
+
|
|
getDays(){
|
|
getDays(){
|
|
$api.getCalendar({
|
|
$api.getCalendar({
|
|
user_id:this.data.user_id,
|
|
user_id:this.data.user_id,
|