作者 郭盛
1 个管道 的构建 通过 耗费 1 秒

修改验证密码

... ... @@ -365,10 +365,23 @@ class Create extends Api
if(empty($pwd)){
$this->error('缺少必要参数');
}
//判断该条数据是否为空 如果为空给出提示
$data = Db::name('savemes')->where('id',$id)->find();
if(empty($data)){
$this->error('参数错误,没有该条数据');
//文件类型
$file_type = $this->request->param('file_type');
if(empty($file_type)){
$this->error('缺少必要参数');
}
if($file_type == 1){
$data = Db::name('folder')->where('id',$id)->find();
if(empty($data)){
$this->error('参数错误,没有该条数据');
}
}elseif ($file_type == 2){
//判断该条数据是否为空 如果为空给出提示
$data = Db::name('savemes')->where('id',$id)->find();
if(empty($data)){
$this->error('参数错误,没有该条数据');
}
}
//判断用户的密码
$user = Db::name('user')->where('id',$data['user_id'])->find();
... ...