增加管理员设置客服电话
This commit is contained in:
@@ -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, '管理员未设置手机号');
|
||||
}
|
||||
|
||||
@@ -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'),
|
||||
|
||||
@@ -17,6 +17,12 @@
|
||||
<input type="text" placeholder="输入手机号" value="<?=$this->data['mobile']?$this->data['mobile']:''?>" name="mobile"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label class="am-para-label">客服号:</label>
|
||||
<div class="am-para-input">
|
||||
<input type="text" placeholder="输入客服号" value="<?=$this->data['kf_mobile']?$this->data['kf_mobile']:''?>" name="kf_mobile"/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="am-form-group">
|
||||
<label class="am-para-label">状态:</label>
|
||||
<div class="am-para-inline w150">
|
||||
|
||||
Reference in New Issue
Block a user