12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- <?php
- $account_id = Dever::input('id');
- $show = false;
- $account_setting = [];
- if ($account_id) {
- $account = Dever::db('account', 'api')->find($account_id);
- $setting = Dever::db('platform_setting', 'api')->select(['platform_id' => $account['platform_id']]);
- if ($setting) {
- $show = true;
- foreach ($setting as $k => $v) {
- $account_setting[] = ['platform_setting_name' => $v['name'], 'platform_setting_id' => $v['id'], 'value' => ''];
- }
- }
- }
- return [
- 'list' => [
- 'field' => [
- 'id',
- 'name',
- 'key',
- 'app_id' => [
- 'show' => 'Dever::call("api/app-find", "{app_id}")["name"]',
- ],
- 'platform_id' => [
- 'show' => 'Dever::call("api/platform-find", "{platform_id}")["name"]',
- ],
- 'cdate',
- ],
- 'button' => [
- '新增' => ['fastadd', 'name,key,app_platform'],
- ],
- 'data_button' => [
- '设置' => ['edit', 'name,key,app_platform_name,api/account_setting'],
- '证书' => ['route', [
- 'path' => 'api_manage/account_cert',
- 'param' => [
- 'set' => ['account_id' => 'id', 'menu' => 'api_manage/account', 'parent' => 'api_manage/account'],
- ],
- ]],
- ],
- 'search' => [
- 'name',
- 'key',
- 'app_platform' => [
- 'type' => 'cascader',
- 'remote' => 'api/manage.getAppPlatform',
- ],
- ],
- ],
- 'update' => [
- 'field' => [
- 'name' => [
- 'rules' => true,
- ],
- 'key',
- 'app_platform' => [
- 'desc' => '【提交后不能更改】',
- 'rules' => true,
- 'type' => 'cascader',
- 'remote' => 'api/manage.getAppPlatform',
- 'remote_default' => false,
- ],
- 'app_platform_name' => [
- 'name' => '平台与应用',
- 'type' => 'show',
- 'default' => 'Dever::call("api/app.getAppPlatform", ["{app_id}", "{platform_id}"])',
- ],
- 'api/account_setting' => [
- 'show' => $show,
- 'name' => '平台参数配置',
- 'where' => ['account_id' => 'id'],
- 'default' => $account_setting,
- ],
- ],
- 'check' => 'key',
- 'start' => ['manage/common.updateKey', 'api/account.update'],
- ],
- ];
|