Authored by 周少峰

modify yohocoin

@@ -829,74 +829,11 @@ class HomeController extends AbstractAction @@ -829,74 +829,11 @@ class HomeController extends AbstractAction
829 $this->setNavHeader('YOHO币', true, false); 829 $this->setNavHeader('YOHO币', true, false);
830 $page = $this->get('page', 1); 830 $page = $this->get('page', 1);
831 $size = $this->get('size', 10); 831 $size = $this->get('size', 10);
832 - //$currency = UserModel::getYohoCoinLists($this->_uid,$page,$size);  
833 - $currency = UserModel::getYohoCoinLists(3965746,$page,$size);  
834 - print_r($currency);exit;  
835 - $currency = array(  
836 - array(  
837 - 'title' => '购买商品 Nike XXXXXX 运动鞋',  
838 - 'time' => '2015.11.23 12:45:33',  
839 - 'count' => '+943'  
840 - ),  
841 - array(  
842 - 'title' => '购买商品 Nike 运动鞋',  
843 - 'time' => '2015.11.23 12:45:33',  
844 - 'count' => '+943'  
845 - ),  
846 - array(  
847 - 'title' => '购买商品 Nike XXXXXX 运动鞋运动鞋运动鞋运动鞋运动鞋运动鞋',  
848 - 'time' => '2015.11.23 12:45:33',  
849 - 'count' => '+943'  
850 - ),  
851 - array(  
852 - 'title' => '购买商品 Nike XXXXXX 运动鞋',  
853 - 'time' => '2015.11.23 12:45:33',  
854 - 'count' => '+943'  
855 - ),  
856 - array(  
857 - 'title' => '购买商品 Nike XXXXXX 运动鞋',  
858 - 'time' => '2015.11.23 12:45:33',  
859 - 'count' => '+943'  
860 - ),  
861 - array(  
862 - 'title' => '购买商品 Nike XXXXXX 运动鞋',  
863 - 'time' => '2015.11.23 12:45:33',  
864 - 'count' => '+943'  
865 - ),  
866 - array(  
867 - 'title' => '购买商品 Nike XXXXXX 运动鞋',  
868 - 'time' => '2015.11.23 12:45:33',  
869 - 'count' => '+943'  
870 - ),  
871 - array(  
872 - 'title' => '购买商品 Nike XXXXXX 运动鞋',  
873 - 'time' => '2015.11.23 12:45:33',  
874 - 'count' => '+943'  
875 - ),  
876 - array(  
877 - 'title' => '购买商品 Nike XXXXXX 运动鞋',  
878 - 'time' => '2015.11.23 12:45:33',  
879 - 'count' => '+943'  
880 - ),  
881 - array(  
882 - 'title' => '购买商品 Nike XXXXXX 运动鞋',  
883 - 'time' => '2015.11.23 12:45:33',  
884 - 'count' => '+943'  
885 - ),  
886 - array(  
887 - 'title' => '购买商品 Nike XXXXXX 运动鞋',  
888 - 'time' => '2015.11.23 12:45:33',  
889 - 'count' => '+943'  
890 - ),  
891 - array(  
892 - 'title' => '购买商品 Nike XXXXXX 运动鞋',  
893 - 'time' => '2015.11.23 12:45:33',  
894 - 'count' => '+943'  
895 - )  
896 - );  
897 - 832 + //$data = UserModel::getYohoCoinLists($this->_uid,$page,$size);
  833 + $data = UserModel::getYohoCoinLists(3965746,$page,$size);
898 $this->_view->display('currency-detail', array( 834 $this->_view->display('currency-detail', array(
899 - 'currency' => $currency, 835 + 'currency' => $data['list'],
  836 + 'money' => $data['money'],
900 'pageFooter' => true, 837 'pageFooter' => true,
901 'currencyDetailPage' => true 838 'currencyDetailPage' => true
902 )); 839 ));
@@ -369,7 +369,7 @@ class UserModel @@ -369,7 +369,7 @@ class UserModel
369 $yohoCoin = UserData::yohoCoinData($uid, $page, $limit, 'post'); 369 $yohoCoin = UserData::yohoCoinData($uid, $page, $limit, 'post');
370 // 处理YOHO币数据 370 // 处理YOHO币数据
371 $coinList = $yohoCoin['data']['coinlist']; 371 $coinList = $yohoCoin['data']['coinlist'];
372 - $result['many'] = $yohoCoin['data']['total']; 372 + $data['money'] = $yohoCoin['data']['total'];
373 foreach($coinList as $key => $val){ 373 foreach($coinList as $key => $val){
374 $result[$key]['title'] = $val['message']; 374 $result[$key]['title'] = $val['message'];
375 $result[$key]['time'] = $val['date']; 375 $result[$key]['time'] = $val['date'];
@@ -378,7 +378,8 @@ class UserModel @@ -378,7 +378,8 @@ class UserModel
378 } 378 }
379 $result[$key]['count'] = $val['num']; 379 $result[$key]['count'] = $val['num'];
380 } 380 }
381 - return $result; 381 + $data['list'] = $result;
  382 + return $data;
382 } 383 }
383 384
384 /** 385 /**