System.php 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: qisse
  5. * Date: 2017/6/27
  6. * Time: 20:02
  7. */
  8. namespace app\mobile\logic;
  9. use app\core\model\BankPlatform;
  10. use app\core\model\User;
  11. use think\Config;
  12. use tool\Common;
  13. class System extends Base
  14. {
  15. public function getBankList()
  16. {
  17. $list = BankPlatform::with(['bank'])->where([
  18. 'platform'=>Config::get('platform.default_pay_gateway')
  19. ])->select();
  20. if($list->isEmpty()) {
  21. return Common::rm(1, '操作成功', [
  22. 'bankList'=>[]
  23. ]);
  24. }
  25. $list->hidden([
  26. 'status','platform','bankID'
  27. ]);
  28. return Common::rm(1, '操作成功', [
  29. 'bankList'=>$list
  30. ]);
  31. }
  32. public function getConfig() {
  33. $config = [
  34. 'bankBandMax'=>1,//至多绑定银行卡数量,
  35. 'loanAgreementUrl'=>$this->h5RootUrl().'/mobile/h5/contract?######',//借款协议url,
  36. 'riskBulletinUrl'=>$this->h5RootUrl().'/mobile/h5/risk?######',//风险揭示书url,
  37. 'rechargeUrl'=>$this->h5RootUrl().'/mobile/h5/userRecharge?######',//充值url,
  38. 'drawcashUrl'=>$this->h5RootUrl().'/mobile/h5/userDrawcash?######',//提现url,
  39. 'userInvitationUrl'=>$this->h5RootUrl().'/mobile/h5/userInvitationPage?######',//邀请注册url
  40. 'activeUrl'=>$this->h5RootUrl().'/mobile/h5/activeList?######',//活动模块url
  41. 'customerUrl'=>'http://www.baidu.com?######',//联系客服
  42. 'aboutUsUrl'=>$this->h5RootUrl().'/mobile/h5/about?######',//关于我们
  43. 'regAgreementUrl'=>$this->h5RootUrl().'/mobile/h5/regAgreement?######',//注册协议,
  44. 'startPageImage'=>'http://slb.dahengdian.com/jiaqiancaifu/2018/03/06/c3a9BiOrwf.png',//注册协议,
  45. 'userExtNav'=>[
  46. [
  47. 'icon'=>'',
  48. 'text'=>'',
  49. 'link'=>'http://www.baidu.com?######'
  50. ]
  51. ],
  52. 'stat'=>[
  53. 'userRegCount'=>User::where([
  54. 'isForged'=>0
  55. ])->count()
  56. ],//注册协议
  57. 'companyInfo'=>[
  58. 'name'=>'浙江尊珂投资管理有限公司'
  59. ],//注册协议
  60. ];
  61. return Common::rm(1, '操作成功', [
  62. 'config'=>$config
  63. ]);
  64. }
  65. public function getUpgradeInfo() {
  66. return Common::rm(1, '操作成功', [
  67. 'versionName'=>'2.0.0',
  68. 'isForce'=>1,
  69. 'downloadAndroid'=>'http://gyxz.exmmw.cn/hk/rj_yx1/aiba.apk',
  70. 'downloadIOS'=>'http://gyxz.exmmw.cn/hk/rj_yx1/aiba.apk',
  71. 'day'=>5
  72. ]);
  73. }
  74. public function getUpgradeInfoForIOS() {
  75. return Common::rm(1, '操作成功', [
  76. 'versionName'=>'2.1.0',
  77. 'versionContent'=>[
  78. '1、更新了11231',
  79. '2、更新了21212312',
  80. '3、更新了333333'
  81. ],
  82. 'channels'=>[
  83. '20180308'
  84. ],
  85. 'download'=>'https://itunes.apple.com/cn/app/id1338057758?mt=8'
  86. ]);
  87. }
  88. }