|
...
|
...
|
@@ -41,6 +41,27 @@ class AyrShareLogic extends BaseLogic |
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @name :AyrVerify(验证参数)
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/6/7 11:52
|
|
|
|
*/
|
|
|
|
public function AyrVerify(){
|
|
|
|
if(isset($this->param['id'])){
|
|
|
|
$info = $this->model->read(['name'=>$this->param['name'],'id'=>['!=',$this->param['id']]]);
|
|
|
|
if($info !== false){
|
|
|
|
$this->fail('当前名称已存在');
|
|
|
|
}
|
|
|
|
}else{
|
|
|
|
$count = $this->model->where(['project_id'=>$this->user['project_id']])->count();
|
|
|
|
if($count > $this->model::COUNT){
|
|
|
|
$this->fail('当前账户只允许添加3个账号');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return $this->success();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @name :(创建账号并绑定写入数据库)ayr_add
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
...
|
...
|
@@ -56,9 +77,8 @@ class AyrShareLogic extends BaseLogic |
|
|
|
'project_id'=>$this->user['project_id'],
|
|
|
|
'name'=>$this->param['name'],
|
|
|
|
];
|
|
|
|
$info = $this->model->read(['name'=>$this->param['name']]);
|
|
|
|
if($info !== false){
|
|
|
|
$rs = $this->model->edit($param,['id'=>$info['id']]);
|
|
|
|
if(isset($this->param['id'])){
|
|
|
|
$rs = $this->model->edit($param,['id'=>$this->param['id']]);
|
|
|
|
}else{
|
|
|
|
$rs = $this->model->add($param);
|
|
|
|
}
|
|
...
|
...
|
@@ -112,36 +132,6 @@ class AyrShareLogic extends BaseLogic |
|
|
|
return $this->success();
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @name :(根据hash获取图片详情)save_info_info
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/5/10 15:01
|
|
|
|
*/
|
|
|
|
public function save_img_info($hash){
|
|
|
|
$imageModel = new ImageModel();
|
|
|
|
$info = $imageModel->read(['hash'=>$hash]);
|
|
|
|
if($info === false){
|
|
|
|
$this->fail('error');
|
|
|
|
}
|
|
|
|
return $this->success($info);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @name :(根据hash视频详情)save_info_info
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/5/10 15:01
|
|
|
|
*/
|
|
|
|
public function save_file_info($hash){
|
|
|
|
$fileModel = new FileModel();
|
|
|
|
$info = $fileModel->read(['hash'=>$hash]);
|
|
|
|
if($info === false){
|
|
|
|
$this->fail('error');
|
|
|
|
}
|
|
|
|
return $this->success($info);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @name :(更新图片库)save_img
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
...
|
...
|
|