|
@@ -121,6 +121,10 @@ class ComController extends BaseController |
|
@@ -121,6 +121,10 @@ class ComController extends BaseController |
|
121
|
if($is_comment != 1){
|
121
|
if($is_comment != 1){
|
|
122
|
$info['role_menu'] = trim(str_replace(',55,',',',','.$info['role_menu'].','),',');
|
122
|
$info['role_menu'] = trim(str_replace(',55,',',',','.$info['role_menu'].','),',');
|
|
123
|
}
|
123
|
}
|
|
|
|
124
|
+ $is_blogs = $this->getIsBlog();
|
|
|
|
125
|
+ if($is_blogs != 1){
|
|
|
|
126
|
+ $info['role_menu'] = trim(str_replace(',57,',',',','.$info['role_menu'].','),',');
|
|
|
|
127
|
+ }
|
|
124
|
$this->map = [
|
128
|
$this->map = [
|
|
125
|
'status'=>0,
|
129
|
'status'=>0,
|
|
126
|
'is_role'=>0,
|
130
|
'is_role'=>0,
|
|
@@ -165,6 +169,10 @@ class ComController extends BaseController |
|
@@ -165,6 +169,10 @@ class ComController extends BaseController |
|
165
|
if($is_comment != 1){
|
169
|
if($is_comment != 1){
|
|
166
|
$data[] = 55;
|
170
|
$data[] = 55;
|
|
167
|
}
|
171
|
}
|
|
|
|
172
|
+ $is_ai_blog = $this->getIsAiBlog();
|
|
|
|
173
|
+ if($is_ai_blog != 1){
|
|
|
|
174
|
+ $data[] = 57;
|
|
|
|
175
|
+ }
|
|
168
|
if(!empty($data)){
|
176
|
if(!empty($data)){
|
|
169
|
$this->map['id'] = ['not in',$data];
|
177
|
$this->map['id'] = ['not in',$data];
|
|
170
|
}
|
178
|
}
|
|
@@ -236,7 +244,7 @@ class ComController extends BaseController |
|
@@ -236,7 +244,7 @@ class ComController extends BaseController |
|
236
|
|
244
|
|
|
237
|
|
245
|
|
|
238
|
public function getIsSubscribe(){
|
246
|
public function getIsSubscribe(){
|
|
239
|
- return $this->project['is_subscribe'];
|
247
|
+ return $this->project['is_subscribe'] ?? 0;
|
|
240
|
}
|
248
|
}
|
|
241
|
|
249
|
|
|
242
|
/**
|
250
|
/**
|
|
@@ -251,26 +259,33 @@ class ComController extends BaseController |
|
@@ -251,26 +259,33 @@ class ComController extends BaseController |
|
251
|
}
|
259
|
}
|
|
252
|
|
260
|
|
|
253
|
/**
|
261
|
/**
|
|
|
|
262
|
+ * @remark :是否开启了ai——blog
|
|
|
|
263
|
+ * @name :getIsAiBlog
|
|
|
|
264
|
+ * @author :lyh
|
|
|
|
265
|
+ * @method :post
|
|
|
|
266
|
+ * @time :2025/2/19 9:39
|
|
|
|
267
|
+ */
|
|
|
|
268
|
+ public function getIsAiBlog(){
|
|
|
|
269
|
+ return $this->user['is_ai_blog'] ?? 0;
|
|
|
|
270
|
+ }
|
|
|
|
271
|
+
|
|
|
|
272
|
+
|
|
|
|
273
|
+ /**
|
|
254
|
* @name :登录用户编辑资料/修改密码
|
274
|
* @name :登录用户编辑资料/修改密码
|
|
255
|
* @author :liyuhang
|
275
|
* @author :liyuhang
|
|
256
|
* @method
|
276
|
* @method
|
|
257
|
*/
|
277
|
*/
|
|
258
|
public function edit_info(){
|
278
|
public function edit_info(){
|
|
259
|
$this->request->validate([
|
279
|
$this->request->validate([
|
|
260
|
-// 'oldPassword'=>'required',
|
|
|
|
261
|
'password' => 'required',
|
280
|
'password' => 'required',
|
|
262
|
'confirm'=>'required',
|
281
|
'confirm'=>'required',
|
|
263
|
], [
|
282
|
], [
|
|
264
|
-// 'oldPassword.required' => '请输入原密码',
|
|
|
|
265
|
'password.required' => '请输入新密码',
|
283
|
'password.required' => '请输入新密码',
|
|
266
|
'confirm.required' => '请再次输入新密码',
|
284
|
'confirm.required' => '请再次输入新密码',
|
|
267
|
]);
|
285
|
]);
|
|
268
|
//查询员密码是否正确
|
286
|
//查询员密码是否正确
|
|
269
|
$userModel = new User();
|
287
|
$userModel = new User();
|
|
270
|
$info = $userModel->read(['id'=>$this->user['id']]);
|
288
|
$info = $userModel->read(['id'=>$this->user['id']]);
|
|
271
|
-// if($info['password'] != base64_encode(md5($this->param['oldPassword']))){
|
|
|
|
272
|
-// $this->response('原密码错误',Code::USER_ERROR);
|
|
|
|
273
|
-// }
|
|
|
|
274
|
if($this->param['password'] != $this->param['confirm']){
|
289
|
if($this->param['password'] != $this->param['confirm']){
|
|
275
|
$this->response('两次密码不一致');
|
290
|
$this->response('两次密码不一致');
|
|
276
|
}
|
291
|
}
|
|
@@ -408,7 +423,6 @@ class ComController extends BaseController |
|
@@ -408,7 +423,6 @@ class ComController extends BaseController |
|
408
|
*/
|
423
|
*/
|
|
409
|
public function month_counts(){
|
424
|
public function month_counts(){
|
|
410
|
shell_exec('php artisan month_project '.$this->user['project_id']);
|
425
|
shell_exec('php artisan month_project '.$this->user['project_id']);
|
|
411
|
-// Artisan::call('month_project '.$this->user['project_id']);
|
|
|
|
412
|
$this->response('重新刷新中,请稍后刷新查询');
|
426
|
$this->response('重新刷新中,请稍后刷新查询');
|
|
413
|
}
|
427
|
}
|
|
414
|
} |
428
|
} |