From ba34208fa270772ba53d2e9c00a4613bad6886d4 Mon Sep 17 00:00:00 2001 From: lcc <805383944@qq.com> Date: Mon, 15 Sep 2025 23:25:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=AE=A1=E7=90=86=E5=91=98?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=AE=A2=E6=9C=8D=E7=94=B5=E8=AF=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/controllers/Common.php | 2 +- admin/controllers/sys/admin/Admin.php | 8 ++++++-- admin/views/sys/admin/edit.php | 6 ++++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/admin/controllers/Common.php b/admin/controllers/Common.php index fe44fb7b..9c24a1b1 100644 --- a/admin/controllers/Common.php +++ b/admin/controllers/Common.php @@ -870,7 +870,7 @@ class Common extends CI_Controller return $this->show_json(SYS_CODE_FAIL, '手机不存在!'); } $user = $this->sys_admin_model->get(['id' => $this->uid]); - $user_mobile = $user['mobile']; + $user_mobile = $user['kf_mobile'] ?: $user['mobile']; if (!$user_mobile) { return $this->show_json(SYS_CODE_FAIL, '管理员未设置手机号'); } diff --git a/admin/controllers/sys/admin/Admin.php b/admin/controllers/sys/admin/Admin.php index bc13dfa4..045520ad 100644 --- a/admin/controllers/sys/admin/Admin.php +++ b/admin/controllers/sys/admin/Admin.php @@ -3,7 +3,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); class Admin extends HD_Controller { - public function __construct() + public function __construct() { parent::__construct(); $this->load->model('sys/Sys_admin_model','sysAdmin'); @@ -89,7 +89,7 @@ class Admin extends HD_Controller { //获取已选门店 if($json['biz_id']){ $ids = implode(',',$json['biz_id']); - $where = [ + $where = [ "id in ($ids)" => null ]; $this->data['selectBiz'] = $this->biz_model->select($where,'','','','id,biz_name as title'); @@ -98,6 +98,7 @@ class Admin extends HD_Controller { $this->data['role_id'] = $data['role_id']; $this->data['belong_id'] = $json['belong_id']; $this->data['mobile'] = $data['mobile']; + $this->data['kf_mobile'] = $data['kf_mobile']; $this->data['id'] = $id; $this->load->vars('url','edit'); $this->show_view('/sys/admin/edit'); @@ -149,6 +150,7 @@ class Admin extends HD_Controller { 'other_json' => json_encode($other_json,JSON_UNESCAPED_UNICODE), 'password' => password_hash($input['password1'],PASSWORD_BCRYPT), 'c_time' => time(), + 'kf_mobile' => $input['kf_mobile'], ]; $this->sysAdmin->add($insert); return $this->show_json(SYS_CODE_SUCCESS,'新增成功!'); @@ -171,6 +173,7 @@ class Admin extends HD_Controller { 'mobile' => $input['mobile'], 'role_id' => $input['role'], 'other_json' => json_encode($other_json,JSON_UNESCAPED_UNICODE), + 'kf_mobile' => $input['kf_mobile'], ]; if($this->sysAdmin->update($upd,['id' => $input['id']])) { return $this->show_json(SYS_CODE_SUCCESS,'修改成功!'); @@ -258,6 +261,7 @@ class Admin extends HD_Controller { 'id' => $this->input->post('id'), 'username' => trim($this->input->post('username')), 'mobile' => trim($this->input->post('mobile')), + 'kf_mobile' => trim($this->input->post('kf_mobile')), 'status' => $this->input->post('status'), 'role' => $this->input->post('role'), 'belong_id' => $this->input->post('belong_id'), diff --git a/admin/views/sys/admin/edit.php b/admin/views/sys/admin/edit.php index c5b9c93a..489916b6 100644 --- a/admin/views/sys/admin/edit.php +++ b/admin/views/sys/admin/edit.php @@ -17,6 +17,12 @@ +
+ +
+ +
+