1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- /**
- * OrderController.php UTF-8
- *
- *
- * @date : 2018/6/6 14:59
- *
- * @license 这不是一个自由软件,未经授权不许任何使用和传播。
- * @author : luowei <lw@huosdk.com>
- * @version : HUOSDK 8.0
- */
- namespace h5wap\wap\controller;
- use h5wap\common\controller\V2BaseController;
- use huo\controller\member\Member;
- use huo\controller\pay\Order;
- use huolib\constant\OrderConst;
- use think\Cache;
- use think\Session;
- class OrderController extends V2BaseController {
- public function _initialize() {
- parent::_initialize();
- $this->checkLogin();
- }
- /**
- * 充值记录
- * http://doc.1tsdk.com/138?page_id=3445
- * 【域名】/cfloat/order/list
- */
- public function index() {
- $_user_info = (new Member())->getMemInfo($this->mem_id);
- $this->assign('user_info', $_user_info);
- return $this->fetch('order/index');
- }
- public function getOrderList() {
- $_page = get_val($this->rq_data, 'page', 0); /* 页码 默认为1 代表第一页 1 */
- $_offset = get_val($this->rq_data, 'offset', 10); /* 每页显示数量 默认为10 */
- $_status = get_val($this->rq_data, 'status', 2); /*显示成功的*/
- $_map = [];
- $_order_status = array_keys(OrderConst::getPayStatusMsg(0, true));
- if (in_array($_status, $_order_status)) {
- $_map['status'] = $_status;
- }
- $_page = $_page.','.$_offset;
- $_data = (new Order())->getMemOrderList($this->mem_id, $_map, $_page);
- $this->returnData($_data);
- }
- }
|