PlatformUser.php 1014 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. namespace app\index\model;
  3. use\think\Model;
  4. use think\Session;
  5. use think\cache\driver\Redis;
  6. use think\Loader;
  7. use think\Cache;
  8. class PlatformUser extends Model
  9. {
  10. /**
  11. * 添加平台验证码
  12. */
  13. public function addPlatformUser($data)
  14. {
  15. // 添加平台验证码
  16. $addPlatformUser = $this->insert($data);
  17. }//end addPlatformUser()
  18. /**
  19. * 查询验证码
  20. */
  21. public function selectPlatformUser($platformWhere)
  22. {
  23. // 添加验证码
  24. $platform = $this
  25. ->field('code_key, code_time')
  26. ->where($platformWhere)
  27. ->find();
  28. return [
  29. 'code' => 1,
  30. 'msg' => '',
  31. 'data' => $platform,
  32. ];
  33. }//end addCode()
  34. /**
  35. * 删除验证码
  36. */
  37. public function delPlatformUser($platformWhere)
  38. {
  39. // 删除验证码
  40. $platform = $this
  41. ->where($platformWhere)
  42. ->delect();
  43. }//end delPlatformUser()
  44. }