作者 chencheng

kaquan-0704-1

... ... @@ -257,10 +257,15 @@ class Wechat extends Api
$w1['user_id'] = $my_user_id;
//$w1['verification_store_id'] = $param['store_id'];
$role = Db::name('verification_staff')->where($w1)->find();
if(in_array($role['type'],['1','3'])){
if(in_array($role['type'],['0','1','3'])){
return $this->error('我是代理不记录');
}
//是否已经存在双边关系
$sw['id'] = $param['share_id'];
$share_idInfo = Db::name('user')->where($sw)->find();
if($share_idInfo['pid'] == $my_user_id){
return $this->error('是我的下线,不记录');
}
Db::name('user')->where($w)->update(['pid'=>$param['share_id'],'updatetime'=>$time]);
return $this->success('更新关系');
}else{
... ...