mirror of https://gitee.com/karson/fastadmin.git
parent
ed0da37370
commit
4e657d1f25
|
|
@ -158,7 +158,7 @@ class Ajax extends Backend
|
|||
$weighdata[$v[$prikey]] = $v[$field];
|
||||
}
|
||||
$position = array_search($changeid, $ids);
|
||||
$desc_id = $sour[$position]; //移动到目标的ID值,取出所处改变前位置的值
|
||||
$desc_id = isset($sour[$position]) ? $sour[$position] : end($sour); //移动到目标的ID值,取出所处改变前位置的值
|
||||
$sour_id = $changeid;
|
||||
$weighids = array();
|
||||
$temp = array_values(array_diff_assoc($ids, $sour));
|
||||
|
|
|
|||
|
|
@ -16,6 +16,12 @@ class AuthRule extends Model
|
|||
|
||||
protected static function init()
|
||||
{
|
||||
self::beforeWrite(function ($row) {
|
||||
if (isset($_POST['row']) && is_array($_POST['row']) && isset($_POST['row']['condition'])) {
|
||||
$originRow = $_POST['row'];
|
||||
$row['condition'] = $originRow['condition'] ?? '';
|
||||
}
|
||||
});
|
||||
self::afterWrite(function ($row) {
|
||||
Cache::rm('__menu__');
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue