account_cert.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. $account_id = Dever::input('set')['account_id'] ?? 0;
  3. if (!$account_id) {
  4. $account_id = Dever::input('field')['account_id'] ?? 0;
  5. }
  6. $account = Dever::db('account', 'api')->find($account_id);
  7. return array
  8. (
  9. 'list' => array
  10. (
  11. 'where' => array('account_id' => $account_id),
  12. 'field' => array
  13. (
  14. 'id',
  15. 'platform_cert_id' => array
  16. (
  17. 'show' => 'Dever::call("api/app.getCertName", "{platform_cert_id}")',
  18. ),
  19. 'number',
  20. 'cdate',
  21. ),
  22. 'data_button' => array
  23. (
  24. '编辑' => array('fastedit', array('account_id' => $account_id)),
  25. ),
  26. 'button' => array
  27. (
  28. '新增' => array('fastadd', array('account_id' => $account_id)),
  29. ),
  30. 'search' => array
  31. (
  32. 'account_id' => 'hidden',
  33. 'number',
  34. ),
  35. ),
  36. 'update' => array
  37. (
  38. 'desc' => '有的证书会自动同步,无需手动添加,如微信支付的平台证书',
  39. 'field' => array
  40. (
  41. 'account_id' => 'hidden',
  42. 'platform_cert_id' => array
  43. (
  44. 'rules' => true,
  45. 'type' => 'select',
  46. 'option' => 'Dever::call("api/app.getCert", '.$account['platform_id'].')',
  47. //'remote' => 'api/manage.getCertName',
  48. //'remote_default' => false,
  49. ),
  50. 'number' => array
  51. (
  52. 'rules' => true,
  53. ),
  54. 'public' => array
  55. (
  56. //'rules' => true,
  57. 'type' => 'textarea',
  58. ),
  59. 'private' => array
  60. (
  61. //'rules' => true,
  62. 'type' => 'textarea',
  63. ),
  64. ),
  65. ),
  66. );