response()->alert()->error('参数有误'); } $payChannel = ShopPayChannel::find($id); if (!$payChannel) { return $this->response()->alert()->error('数据不存在!'); } $token = Arr::get($input, 'ali_face_app_auth_token'); if (!$token) { return $this->response()->alert()->error('token 必填!'); } $payChannel->ali_face_app_auth_token = $token; $payChannel->save(); return $this->response()->success("设置成功")->refresh(); } public function form() { $id = $this->payload['id']; $payChannel = ShopPayChannel::find($id); if (!$payChannel) { return $this->response()->alert()->error('数据不存在!'); } $this->display('shop_name','店铺编号')->value($payChannel->shop->shop_sn); $this->display('alipay','支付宝账号')->value($payChannel->alipay); $this->display('pay_channel','支付宝渠道')->value($payChannel->channel_name); $this->text('ali_face_app_auth_token', '支付宝Token')->required(); $this->hidden('id')->value($id); } }