QrcodeData.class.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. namespace Cas\Controller;
  3. use KIF\Core\Request;
  4. use Cas\Module\LotteryEventsTypeInvitation;
  5. use Cas\Dao\LotteryEvents;
  6. use Cas\Dao\LotteryEventsForms;
  7. /**
  8. *
  9. * 二维码数据
  10. *
  11. */
  12. class QrcodeData extends Controller {
  13. public function doInvitation() {
  14. $uid = Request::g('uid');
  15. $events_id = Request::g('events_id');
  16. $token = Request::g('token');
  17. $formsId = Request::g('formsId');
  18. $objLotteryEventsTypeInvitation = new LotteryEventsTypeInvitation($uid, $events_id);
  19. if ($token != $objLotteryEventsTypeInvitation->getQrcodeUrlToken()) {
  20. self::fail_exit('token有效性认证失败');
  21. }
  22. $objLotteryEventsForms = new LotteryEventsForms();
  23. $formData = $objLotteryEventsForms->get($formsId);
  24. $objLotteryEvents = new LotteryEvents();
  25. $event = $objLotteryEvents->get($events_id);
  26. # 表单类型数据
  27. $formType = array();
  28. foreach ($event['forms'] as $tmpForms) {
  29. $formType[] = $tmpForms['name'];
  30. }
  31. $this->tpl = 'qrcode_invitation';
  32. $this->setOutput('title', '用户信息');
  33. $this->setOutput('formData', $formData);
  34. $this->setOutput('formType', $formType);
  35. $this->setOutput('notShowWeixinShare', true);
  36. }
  37. public function display() {
  38. return $this->render();
  39. }
  40. }