RoleController.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. /**
  3. * RoleController.php UTF-8
  4. * 角色上报
  5. *
  6. * @date : 2018/1/16 16:51
  7. *
  8. * @license 这不是一个自由软件,未经授权不许任何使用和传播。
  9. * @author : wuyonghong <wyh@huosdk.com>
  10. * @version : HUOSDK 8.0
  11. */
  12. namespace api\apple\controller\v8;
  13. use api\common\controller\AppleApiBaseController;
  14. use huo\controller\member\Role;
  15. use think\Request;
  16. class RoleController extends AppleApiBaseController {
  17. public function __construct(Request $request = null) {
  18. parent::__construct($request);
  19. }
  20. public function _initialize() {
  21. parent::_initialize();
  22. }
  23. /**
  24. * 上传角色信息
  25. * http://doc.1tsdk.com/138?page_id=2907
  26. * 【域名】/v8/user/uprole
  27. */
  28. public function save() {
  29. $this->checkLogin();
  30. $_game_rq = $this->setGameData();
  31. $_role_rq = $this->setRoleData();
  32. $_mem_rq = $this->setMemData();
  33. $_mem_rq->setMemId($this->mem_id);
  34. $_device_rq = $this->setDeviceData();
  35. $_role_class = new Role();
  36. $_rs = $_role_class->insertLog($_mem_rq, $_role_rq, $_game_rq, 0.00, $_device_rq);
  37. if (false !== $_rs) {
  38. $this->success(lang('SUCCESS'));
  39. }
  40. $this->error(lang('ERROR'));
  41. }
  42. }