|
...
|
...
|
@@ -121,6 +121,10 @@ class ComController extends BaseController |
|
|
|
if($is_comment != 1){
|
|
|
|
$info['role_menu'] = trim(str_replace(',55,',',',','.$info['role_menu'].','),',');
|
|
|
|
}
|
|
|
|
$is_blogs = $this->getIsBlog();
|
|
|
|
if($is_blogs != 1){
|
|
|
|
$info['role_menu'] = trim(str_replace(',57,',',',','.$info['role_menu'].','),',');
|
|
|
|
}
|
|
|
|
$this->map = [
|
|
|
|
'status'=>0,
|
|
|
|
'is_role'=>0,
|
|
...
|
...
|
@@ -165,6 +169,10 @@ class ComController extends BaseController |
|
|
|
if($is_comment != 1){
|
|
|
|
$data[] = 55;
|
|
|
|
}
|
|
|
|
$is_ai_blog = $this->getIsAiBlog();
|
|
|
|
if($is_ai_blog != 1){
|
|
|
|
$data[] = 57;
|
|
|
|
}
|
|
|
|
if(!empty($data)){
|
|
|
|
$this->map['id'] = ['not in',$data];
|
|
|
|
}
|
|
...
|
...
|
@@ -236,7 +244,7 @@ class ComController extends BaseController |
|
|
|
|
|
|
|
|
|
|
|
public function getIsSubscribe(){
|
|
|
|
return $this->project['is_subscribe'];
|
|
|
|
return $this->project['is_subscribe'] ?? 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
...
|
...
|
@@ -251,26 +259,33 @@ class ComController extends BaseController |
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :是否开启了ai——blog
|
|
|
|
* @name :getIsAiBlog
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2025/2/19 9:39
|
|
|
|
*/
|
|
|
|
public function getIsAiBlog(){
|
|
|
|
return $this->user['is_ai_blog'] ?? 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @name :登录用户编辑资料/修改密码
|
|
|
|
* @author :liyuhang
|
|
|
|
* @method
|
|
|
|
*/
|
|
|
|
public function edit_info(){
|
|
|
|
$this->request->validate([
|
|
|
|
// 'oldPassword'=>'required',
|
|
|
|
'password' => 'required',
|
|
|
|
'confirm'=>'required',
|
|
|
|
], [
|
|
|
|
// 'oldPassword.required' => '请输入原密码',
|
|
|
|
'password.required' => '请输入新密码',
|
|
|
|
'confirm.required' => '请再次输入新密码',
|
|
|
|
]);
|
|
|
|
//查询员密码是否正确
|
|
|
|
$userModel = new User();
|
|
|
|
$info = $userModel->read(['id'=>$this->user['id']]);
|
|
|
|
// if($info['password'] != base64_encode(md5($this->param['oldPassword']))){
|
|
|
|
// $this->response('原密码错误',Code::USER_ERROR);
|
|
|
|
// }
|
|
|
|
if($this->param['password'] != $this->param['confirm']){
|
|
|
|
$this->response('两次密码不一致');
|
|
|
|
}
|
|
...
|
...
|
@@ -408,7 +423,6 @@ class ComController extends BaseController |
|
|
|
*/
|
|
|
|
public function month_counts(){
|
|
|
|
shell_exec('php artisan month_project '.$this->user['project_id']);
|
|
|
|
// Artisan::call('month_project '.$this->user['project_id']);
|
|
|
|
$this->response('重新刷新中,请稍后刷新查询');
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|