select([])->fetchAll(); $result = array(); $result[] = array ( 'id' => 'root', 'name' => '全部集团', 'children' => $data, ); return $result; } public function update($data) { if ($data['mobile']) { $database = '"2_' . $data['id'] . '"'; $db = Dever::db('group_user', '', 'default', array('database' => $database)); $info = $db->find(1); if (!$info) { $password = '123456'; $insert['name'] = Str::hide($data['mobile']); $insert['mobile'] = $data['mobile']; $insert['role'] = 1; $insert += Dever::load('common')->createPwd($password); $db->insert($insert); } } } }