...
|
...
|
@@ -100,8 +100,8 @@ class Attestation extends Api |
|
|
$res['createtime'] = time();
|
|
|
Db::name('farm')->insertGetId($res);
|
|
|
|
|
|
//修改用户表中用户的身份
|
|
|
Db::name('user')->where('id',$user_id)->update(['identity'=>2]);
|
|
|
//修改用户表中用户的身份 并且 将用户积分加4
|
|
|
Db::name('user')->where('id',$user_id)->update(['identity'=>2,'score'=>4]);
|
|
|
|
|
|
if($data){
|
|
|
$this->success('入驻成功');
|
...
|
...
|
@@ -193,7 +193,7 @@ class Attestation extends Api |
|
|
Db::name('farm')->insertGetId($res);
|
|
|
|
|
|
//修改用户表中用户的身份
|
|
|
Db::name('user')->where('id',$user_id)->update(['identity'=>3]);
|
|
|
Db::name('user')->where('id',$user_id)->update(['identity'=>3,'score'=>4]);
|
|
|
|
|
|
if($data){
|
|
|
$this->success('入驻成功');
|
...
|
...
|
@@ -461,12 +461,14 @@ class Attestation extends Api |
|
|
$where['status'] = ['eq',1];
|
|
|
$data = Db::name('government')
|
|
|
->where($where)
|
|
|
->find();
|
|
|
->select();
|
|
|
if(empty($data)){
|
|
|
$this->error('暂无机构');
|
|
|
}
|
|
|
$res['id'] = $data['id'];
|
|
|
$res['institution'] = $data['address'];
|
|
|
foreach ($data as $v){
|
|
|
$res['id'] = $v['id'];
|
|
|
$res['institution'] = $v['address'];
|
|
|
}
|
|
|
$this->success('success',$res);
|
|
|
}
|
|
|
|
...
|
...
|
|