rabin 3 months ago
parent
commit
378a48c67e
4 changed files with 16 additions and 10 deletions
  1. 5 5
      api/Page/Update.php
  2. 4 2
      lib/Page.php
  3. 2 2
      manage/core.php
  4. 5 1
      manage/menu.php

+ 5 - 5
api/Page/Update.php

@@ -80,7 +80,7 @@ class Update extends Page
             $this->setInfo($info, $data, $remote, $show, $source, $default, 1, $this->config['field']);
             $this->setInfo($info, $data, $remote, $show, $source, $default, 1, $this->config['field']);
             if ($spec) {
             if ($spec) {
                 foreach ($spec as $k => $v) {
                 foreach ($spec as $k => $v) {
-                    $data['update'][$spec[$k][0]]['remote'] = Dever::url($spec[$k][1]);
+                    $data['update'][$spec[$k][0]]['remote'] = Dever::url($spec[$k][1], array('value' => '', 'table' => $this->db->config['load'], 'id' => false));
                     $result = Dever::call($spec[$k][1], array($spec[$k][3], $spec[$k][4], $this->info['id']));
                     $result = Dever::call($spec[$k][1], array($spec[$k][3], $spec[$k][4], $this->info['id']));
                     if ($result) {
                     if ($result) {
                         $data['field'][$spec[$k][2]] = $result;
                         $data['field'][$spec[$k][2]] = $result;
@@ -117,9 +117,9 @@ class Update extends Page
             if ($remote) {
             if ($remote) {
                 $info = array();
                 $info = array();
                 foreach ($remote as $k => $v) {
                 foreach ($remote as $k => $v) {
-                    $data['update'][$v[0]]['remote'] = Dever::url($v[1]);
+                    $data['update'][$v[0]]['remote'] = Dever::url($v[1], array('value' => '', 'table' => $this->db->config['load'], 'id' => false));
                     if (isset($v[2]) && isset($data['option'][$v[2]]) && $data['option'][$v[2]] && $m = Dever::issets($data['option'][$v[2]][0], 'id')) {
                     if (isset($v[2]) && isset($data['option'][$v[2]]) && $data['option'][$v[2]] && $m = Dever::issets($data['option'][$v[2]][0], 'id')) {
-                        $result = Dever::call($v[1], array($m), 'api');
+                        $result = Dever::call($v[1], array($m, $this->db->config['load'], false), 'api');
                         if ($result) {
                         if ($result) {
                             $this->setUpdate($info, $data, $result);
                             $this->setUpdate($info, $data, $result);
                         }
                         }
@@ -186,11 +186,11 @@ class Update extends Page
                     $data['field'][$k] = $v;
                     $data['field'][$k] = $v;
                 }
                 }
                 if (isset($remote[$k])) {
                 if (isset($remote[$k])) {
-                    $data['update'][$remote[$k][0]]['remote'] = Dever::url($remote[$k][1]);
+                    $data['update'][$remote[$k][0]]['remote'] = Dever::url($remote[$k][1], array('value' => '', 'table' => $this->db->config['load'], 'id' => false));
                     if ($field[$k]['type'] == 'cascader' && !isset($field[$k]['option'])) {
                     if ($field[$k]['type'] == 'cascader' && !isset($field[$k]['option'])) {
                         
                         
                     } else {
                     } else {
-                        $result = Dever::call($remote[$k][1], array($v), 'api');
+                        $result = Dever::call($remote[$k][1], array($v, $this->db->config['load'], $info['id'] ?? false), 'api');
                         if ($result) {
                         if ($result) {
                             $this->setUpdate($info, $data, $result);
                             $this->setUpdate($info, $data, $result);
                         }
                         }

+ 4 - 2
lib/Page.php

@@ -402,7 +402,7 @@ class Page extends Auth
             if ($value['config']['method'] == 2) {
             if ($value['config']['method'] == 2) {
                 $value['yun'] = true;
                 $value['yun'] = true;
             }
             }
-            $value['url'] = Dever::url('upload/save.act', $upload);
+            $value['url'] = Dever::url('upload/save.act', $upload, true);
             $upload['wh'] = $value['wh'] ?? '500*500';
             $upload['wh'] = $value['wh'] ?? '500*500';
             $value['set'] = Dever::url('image/manage.set', $upload);
             $value['set'] = Dever::url('image/manage.set', $upload);
             if (isset($value['multiple']) && $value['multiple']) {
             if (isset($value['multiple']) && $value['multiple']) {
@@ -465,7 +465,9 @@ class Page extends Auth
         if (isset($value['option']) && $value['option']) {
         if (isset($value['option']) && $value['option']) {
             $this->db->config['option'][$value['key']] = $value['option'];
             $this->db->config['option'][$value['key']] = $value['option'];
         }
         }
-        if ($option = $this->db->value($value['key'])) {
+        $send = $this->info;
+        $send['table'] = $this->db->config['load'];
+        if ($option = $this->db->value($value['key'], false, 'id,name', $send)) {
             if ($value['type'] == 'checkbox') {
             if ($value['type'] == 'checkbox') {
                 $value['value'] = $value['value'] ? explode(',', $value['value']) : array();
                 $value['value'] = $value['value'] ? explode(',', $value['value']) : array();
             }
             }

+ 2 - 2
manage/core.php

@@ -44,9 +44,9 @@ return array
         'set' => array
         'set' => array
         (
         (
             # 菜单名称
             # 菜单名称
-            'name' => '配置',
+            'name' => '平台',
             # 菜单图标
             # 菜单图标
-            'icon' => 'settings-line',
+            'icon' => 'flood-line',
             # 菜单排序 正序
             # 菜单排序 正序
             'sort' => '100',
             'sort' => '100',
             # 所属系统模块 模块key,一般只需主菜单填写module
             # 所属系统模块 模块key,一般只需主菜单填写module

+ 5 - 1
manage/menu.php

@@ -84,7 +84,11 @@ return array
                 'control' => true,
                 'control' => true,
             ),
             ),
             'link',
             'link',
-            'icon' => 'icon',
+            'icon' => array
+            (
+                'type' => 'icon',
+                'search' => true,
+            ),
             'sort',
             'sort',
             'show' => array
             'show' => array
             (
             (