123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- <?php
- namespace h5wap\wap\controller;
- use h5wap\common\controller\V2BaseController;
- use huo\controller\lottery\Lottery;
- use huo\controller\member\Member;
- use huo\controller\posts\Posts;
- use huo\controller\shop\Award;
- use huolib\constant\MemItgConst;
- use huolib\constant\NewsConst;
- use huolib\status\CommonStatus;
- use think\Session;
- class LotteryController extends V2BaseController {
- public function _initialize() {
- parent::_initialize();
- }
-
- public function index() {
- $_act_id = $this->request->param('act_id/d', 0);
- if (empty($_act_id)) {
- $_data['code'] = CommonStatus::INVALID_PARAMS;
- $_data['msg'] = CommonStatus::getMsg(CommonStatus::INVALID_PARAMS);
- $_data['data'] = null;
- return $this->returnData($_data);
- }
- $_user_info = (new Member())->getMemInfo($this->mem_id);
- $this->assign('userinfo', $_user_info);
-
- $_activity_draw = (new Lottery())->getDetail($this->mem_id, $_act_id);
- $this->assign('activity_draw', $_activity_draw['data']);
- return $this->fetch('lottery/index');
- }
-
- public function draw() {
- $this->checkLogin();
- $_mem_id = $this->mem_id;
-
- $_act_id = $this->request->param('act_id/d', NewsConst::SHOP_DRAW_ACT_ID);
- $_lottery_class = new Lottery();
- $_rs = $_lottery_class->draw($_mem_id, $_act_id);
- $this->returnData($_rs);
- }
- }
|