From 7de72813c10f43a36e981b1bb71bd45227c471bc Mon Sep 17 00:00:00 2001 From: Anyon Date: Fri, 6 Nov 2020 09:59:00 +0800 Subject: [PATCH] Update Center.php --- app/data/controller/api/auth/Center.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/data/controller/api/auth/Center.php b/app/data/controller/api/auth/Center.php index 707a441f8..cf8f24d07 100644 --- a/app/data/controller/api/auth/Center.php +++ b/app/data/controller/api/auth/Center.php @@ -35,12 +35,14 @@ class Center extends Auth 'base_weight.default' => '', 'base_birthday.default' => '', ]); - foreach ($data as $key => $vo) if ($vo === '') unset($data[$key]); + foreach ($data as $key => $vo) { + if ($vo === '') unset($data[$key]); + } if (empty($data)) $this->error('没有需要修改的数据!'); if ($this->app->db->name($this->table)->where(['id' => $this->mid])->update($data) !== false) { - $this->success('更新会员资料成功!', $this->getMember()); + $this->success('更新资料成功!', $this->getMember()); } else { - $this->error('更新会员资料失败!'); + $this->error('更新资料失败!'); } }