TenantPayConfig.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | likeadmin快速开发前后端分离管理后台(PHP版)
  4. // +----------------------------------------------------------------------
  5. // | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
  6. // | 开源版本可自由商用,可去除界面版权logo
  7. // | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
  8. // | github下载:https://github.com/likeshop-github/likeadmin
  9. // | 访问官网:https://www.likeadmin.cn
  10. // | likeadmin团队 版权所有 拥有最终解释权
  11. // +----------------------------------------------------------------------
  12. // | author: likeadminTeam
  13. // +----------------------------------------------------------------------
  14. namespace app\common\model\pay;
  15. use app\common\enum\PayEnum;
  16. use app\common\model\BaseModel;
  17. use app\common\service\FileService;
  18. class TenantPayConfig extends BaseModel
  19. {
  20. // 设置json类型字段
  21. protected $json = ['config'];
  22. // 设置JSON数据返回数组
  23. protected $jsonAssoc = true;
  24. /**
  25. * @notes 支付图标获取器 - 路径添加域名
  26. * @param $value
  27. * @return string
  28. * @author ljj
  29. * @date 2021/7/28 2:12 下午
  30. */
  31. public function getIconAttr($value)
  32. {
  33. return empty($value) ? '' : FileService::getFileUrl($value);
  34. }
  35. /**
  36. * @notes 支付方式名称获取器
  37. * @param $value
  38. * @param $data
  39. * @return string|string[]
  40. * @author ljj
  41. * @date 2021/7/31 2:24 下午
  42. */
  43. public function getPayWayNameAttr($value,$data)
  44. {
  45. return PayEnum::getPayDesc($data['pay_way']);
  46. }
  47. }