Ejemplo n.º 1
0
 public function listSellTradesAction()
 {
     $sell_trades = array();
     $trade = new Trade();
     $temp_trades = $trade->listTrade(TradeConst::TRADE_OP_TYPE_SELL);
     if (!empty($temp_trades)) {
         foreach ($temp_trades as $tinfo) {
             array_push($sell_trades, explode('|', $tinfo));
         }
     }
     $this->assign('sell_trades', $sell_trades);
     $this->display();
 }
Ejemplo n.º 2
0
 public function viewPicAction()
 {
     $session = session('login');
     if (empty($session)) {
         $this->redirect('Test/login');
     }
     $user_id = $session['id'];
     $trade = new Trade();
     $order_id = I('get.order_id');
     if (empty($order_id)) {
         $this->error('参数错误');
     }
     $order_info = $trade->getOrderInfo($order_id);
     if (empty($order_info) || empty($order_info['photo_id'])) {
         $this->error('系统错误');
     }
     $photo = D('Attach')->find($order_info['photo_id']);
     $this->assign('photo', $photo);
     $this->display();
 }