MyController.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2013-2019 http://www.thinkcmf.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  8. // +----------------------------------------------------------------------
  9. // | Author: 老猫 <thinkcmf@126.com>
  10. // +----------------------------------------------------------------------
  11. namespace app\matchmaker\controller;
  12. use app\matchmaker\model\MatchmakerModel;
  13. class MyController extends MatchmakerBaseController
  14. {
  15. public function index()
  16. {
  17. $data['matchmaker'] = $this->matchmaker;
  18. $data['matchmaker']['avatar'] = cmf_get_image_url($data['matchmaker']['avatar']);
  19. return $this->fetch('',$data);
  20. }
  21. public function info()
  22. {
  23. $data['matchmaker'] = $this->matchmaker;
  24. $data['matchmaker']['avatar'] = cmf_get_image_url($data['matchmaker']['avatar']);
  25. return $this->fetch('',$data);
  26. }
  27. public function infoPost()
  28. {
  29. $data = $this->request->post();
  30. MatchmakerModel::update($data);
  31. $this->success();
  32. }
  33. }