|
@@ -138,6 +138,7 @@ class Index extends Api
|
|
public function unlockProgress(){
|
|
public function unlockProgress(){
|
|
$type = input('type');
|
|
$type = input('type');
|
|
$uid = $this->auth->id;
|
|
$uid = $this->auth->id;
|
|
|
|
+ $uid==input('nid')?$this->error('违规操作'):'';
|
|
if($type > 1) {
|
|
if($type > 1) {
|
|
$user = Unlockprogress::where(['uid'=>$this->auth->id,'nid'=>input('nid')])->find();
|
|
$user = Unlockprogress::where(['uid'=>$this->auth->id,'nid'=>input('nid')])->find();
|
|
if(isset($user)){
|
|
if(isset($user)){
|
|
@@ -310,7 +311,7 @@ class Index extends Api
|
|
}
|
|
}
|
|
//查看
|
|
//查看
|
|
$look = Like::get(['uid'=>$this->auth->id,'nid'=>input('id')]);
|
|
$look = Like::get(['uid'=>$this->auth->id,'nid'=>input('id')]);
|
|
- if(!$look){
|
|
|
|
|
|
+ if(!$look && $this->auth->id!=input('id')){
|
|
$look = [
|
|
$look = [
|
|
'uid'=>$this->auth->id,
|
|
'uid'=>$this->auth->id,
|
|
'nid'=>input('id'),
|
|
'nid'=>input('id'),
|
|
@@ -333,6 +334,7 @@ class Index extends Api
|
|
*/
|
|
*/
|
|
public function like(){
|
|
public function like(){
|
|
$uid = $this->auth->id;
|
|
$uid = $this->auth->id;
|
|
|
|
+ $uid==input('nid')?$this->error('不可喜欢自己'):'';
|
|
if($this->auth->score > 0){
|
|
if($this->auth->score > 0){
|
|
$data = [
|
|
$data = [
|
|
'uid'=>$uid,
|
|
'uid'=>$uid,
|
|
@@ -377,6 +379,7 @@ class Index extends Api
|
|
* @param (name="id",description='解锁用户id')
|
|
* @param (name="id",description='解锁用户id')
|
|
*/
|
|
*/
|
|
public function unlockWx(){
|
|
public function unlockWx(){
|
|
|
|
+ $this->auth->id==input('id')?$this->error('违规操作'):'';
|
|
$cost = config('site.expenditure_grain')['申请认识支出'];
|
|
$cost = config('site.expenditure_grain')['申请认识支出'];
|
|
if($cost>$this->auth->money)$this->error('余额不足');
|
|
if($cost>$this->auth->money)$this->error('余额不足');
|
|
$apply_=Apply::where(['nid'=>input('id'),'status'=>0])->find();
|
|
$apply_=Apply::where(['nid'=>input('id'),'status'=>0])->find();
|