From cc37076c20d4ba8195d598e190ceeff450c1208e Mon Sep 17 00:00:00 2001 From: wanghongjun <1445693971@qq.com> Date: Wed, 11 Jun 2025 17:46:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A5=BD=E6=9C=89=E5=A4=87=E6=B3=A8=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5=E4=B8=BA=E7=A9=BA=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/enterprise/controller/Friend.php | 7 ++++--- config/usms.php | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 config/usms.php diff --git a/app/enterprise/controller/Friend.php b/app/enterprise/controller/Friend.php index a61ce2c..9245f27 100644 --- a/app/enterprise/controller/Friend.php +++ b/app/enterprise/controller/Friend.php @@ -161,11 +161,12 @@ class Friend extends BaseController // 设置好友备注 public function setNickname() { - $param = $this->request->param(); - if(!$param['nickname']){ + $nickname = $this->request->param('nickname',''); + $friend_id = $this->request->param('friend_id',''); + if(!$friend_id){ return warning(lang('system.notNull')); } - FriendModel::update(['nickname'=>$param['nickname']],['friend_id'=>$param['friend_id']]); + FriendModel::update(['nickname'=>$nickname],['friend_id'=>$friend_id]); return success(lang('system.editOk')); } diff --git a/config/usms.php b/config/usms.php new file mode 100644 index 0000000..25d5b8d --- /dev/null +++ b/config/usms.php @@ -0,0 +1,20 @@ + +// +---------------------------------------------------------------------- +return [ + //API秘钥之公钥 可在后台查找 + 'PUBLIC_KEY' => '', + //API秘钥之私钥 可在后台查找 + 'PRIVATE_KEY' => '', + //项目ID 登录Ucloud后台可以查找 + 'PROJECT_ID' => '', + //API通信地址 + 'BASE_URL' => 'https://api.ucloud.cn', +]; \ No newline at end of file