service = WxAppConfigService::getInstance(); $this->insertField = ['code', 'name', 'app_id']; $this->updateField = ['id']; $this->notRequest = [ 'app_secret', 'mch_id', 'mch_key', 'mch_serial_no', 'mch_private_key', 'platform_public_key', 'notify_url', 'template_code', 'remark', 'name', 'app_id', ]; } /** * 启用/停用 * @Method POST */ public function status(): JsonResponse { return jok( $this->service->status(request()->post('id'), request()->post('status')), '操作成功' ); } /** * 按 .env 引导创建/更新一条应用壳子(不含 AppSecret) * @Method POST */ public function initFromEnv(): JsonResponse { return jok($this->service->initFromEnv(), '初始化成功'); } }