rabin пре 2 месеци
родитељ
комит
378a48c67e
4 измењених фајлова са 16 додато и 10 уклоњено
  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']);
             if ($spec) {
                 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']));
                     if ($result) {
                         $data['field'][$spec[$k][2]] = $result;
@@ -117,9 +117,9 @@ class Update extends Page
             if ($remote) {
                 $info = array();
                 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')) {
-                        $result = Dever::call($v[1], array($m), 'api');
+                        $result = Dever::call($v[1], array($m, $this->db->config['load'], false), 'api');
                         if ($result) {
                             $this->setUpdate($info, $data, $result);
                         }
@@ -186,11 +186,11 @@ class Update extends Page
                     $data['field'][$k] = $v;
                 }
                 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'])) {
                         
                     } 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) {
                             $this->setUpdate($info, $data, $result);
                         }

+ 4 - 2
lib/Page.php

@@ -402,7 +402,7 @@ class Page extends Auth
             if ($value['config']['method'] == 2) {
                 $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';
             $value['set'] = Dever::url('image/manage.set', $upload);
             if (isset($value['multiple']) && $value['multiple']) {
@@ -465,7 +465,9 @@ class Page extends Auth
         if (isset($value['option']) && $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') {
                 $value['value'] = $value['value'] ? explode(',', $value['value']) : array();
             }

+ 2 - 2
manage/core.php

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

+ 5 - 1
manage/menu.php

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