$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$info=M('credit_data')->where('uid='.$uid.$string)->order('id desc')->select();
//$info=M('credit_data')->where('uid=391')->order('id desc')->select();
//echo $type;exit;
//var_dump($uid);
//var_dump($info);
//var_dump(M('credit_data')->getLastSql());
foreach($info as $key=>$val){
$cTime=date('Y年m月',$val['cTime']);//-------------------->将查出的每个年月日,以年月分离出来,做为新数组的下标
$info[$key]['cTime']=date('Y-m-d H:i:s',$val['cTime']);
if($type==1){
if($val['score']){
$val['codeinfo']=$val['score']; //魅分
$val['cTime'] = $info[$key]['cTime'];
$list[$cTime][]=$val; //------------------>将查出的每个年月日,以年月分离出来,做为新数组的下标
}
}
//echo $type;exit;
if($type==2){
//echo $val['experience'];
if($val['experience']){
$val['codeinfo']=$val['experience']; //魅币
$val['cTime'] = $info[$key]['cTime'];
$list[$cTime][]=$val;
}
}
if($type==3){
if($val['use_int']){
$val['codeinfo']=$val['use_int']; //积分
$val['cTime'] = $info[$key]['cTime'];
$list[$cTime][]=$val;
}
}
}
//var_dump($info);
//var_dump($list);
//exit;
$this->assign('listinfo',$list);