CurrencyController.php
2.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
class Home_CurrencyController extends QLib_Controller_Home_Action
{
public function init()
{
$this->QLayoutTitle()->headTitle('YOHO币使用记录');
$this->QLayoutScript()->offsetSetFile(60, $this->_js('jqueryui'))->offsetSetFile(61, $this->_js('global'))->offsetSetFile(62,$this->_js('user_main'))->offsetSetFile(63,$this->_js('currency'));
$this->QLayoutLink()->offsetSetStylesheet(25, $this->_css('common'))->offsetSetStylesheet(26, $this->_css('myyoho'))->offsetSetStylesheet(27, $this->_css('jqueryuicss'));
}
public function indexAction(){
$checkedList = QINOperations_Models_Showthing_Client::getCanReturnByUid($this->uid);
$recommendList = QINOperations_Models_Showthing_Client::getCanReturnByUid($this->uid, 2);
$this->view->recommend = $recommend = count($recommendList);
$this->view->checked = $checked = count($checkedList);
$this->view->total = (($recommend*5) + ($checked*5));
$this->view->page = $page = $this->helpPaging("yohojs")->setFJs('getCurrency')->setTotal(QINPassport_Models_Yohocoinlog_Client::getTotalByUID($this->uid))->setSize(10);
$this->view->list = $list = QINPassport_Models_Yohocoinlog_Client::getUserList($this->uid, $page->getOffset(), $page->getSize());
}
public function listAction(){
$this->_helper->layout()->disableLayout();
$this->view->page = $page = $this->helpPaging("yohojs")->setFJs('getCurrency')->setTotal(QINPassport_Models_Yohocoinlog_Client::getTotalByUID($this->uid))->setSize(10);
$this->view->list = $list = QINPassport_Models_Yohocoinlog_Client::getUserList($this->uid, $page->getOffset(), $page->getSize());
}
/**
* 获取yoho币
*/
public function getyohocoinAction() {
$num = QINPassport_Currency::getCurYohoCoin($this->uid);
$this->helpJsonResult(200, 'yoho币数量', array('num' => $num));
}
public function yohoshowAction()
{
$checkedList = QINOperations_Models_Showthing_Client::getCanReturnByUid($this->uid);
$recommendList = QINOperations_Models_Showthing_Client::getCanReturnByUid($this->uid, 2);
$this->view->recommend = count($recommendList);
$this->view->checked = count($checkedList);
}
}