account_cert.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 [
  8. 'list' => [
  9. 'where' => ['account_id' => $account_id],
  10. 'field' => [
  11. 'id',
  12. 'platform_cert_id' => [
  13. 'show' => 'Dever::call("api/app.getCertName", "{platform_cert_id}")',
  14. ],
  15. 'number',
  16. 'cdate',
  17. ],
  18. 'data_button' => [
  19. '编辑' => ['fastedit', ['account_id' => $account_id]],
  20. ],
  21. 'button' => [
  22. '新增' => ['fastadd', ['account_id' => $account_id]],
  23. ],
  24. 'search' => [
  25. 'account_id' => 'hidden',
  26. 'number',
  27. ],
  28. ],
  29. 'update' => [
  30. 'desc' => '有的证书会自动同步,无需手动添加,如微信支付的平台证书',
  31. 'field' => [
  32. 'account_id' => 'hidden',
  33. 'platform_cert_id' => [
  34. 'rules' => true,
  35. 'type' => 'select',
  36. 'option' => 'Dever::call("api/app.getCert", '.$account['platform_id'].')',
  37. //'remote' => 'api/manage.getCertName',
  38. //'remote_default' => false,
  39. ],
  40. 'number' => [
  41. 'rules' => true,
  42. ],
  43. 'public' => [
  44. //'rules' => true,
  45. 'type' => 'textarea',
  46. ],
  47. 'private' => [
  48. //'rules' => true,
  49. 'type' => 'textarea',
  50. ],
  51. ],
  52. ],
  53. ];