asJson([ 'code' => 0, 'msg' => 'success', 'data' => json_decode($tabbar['value'], true), ]); } public function actionSet() { try { $tabbar = post_params('tabbar', []); Option::set('tabbar', json_encode($tabbar, JSON_UNESCAPED_UNICODE), 0, 'saas'); return $this->asJson([ 'code' => 0, 'msg' => 'success' ]); } catch (\Exception $e) { return $this->asJson([ 'code' => 1, 'msg' => '保存失败' ]); } } }