瀏覽代碼

2023-5-22-1 新增服务区-2

yingzi 1 年之前
父節點
當前提交
28f97985e2
共有 1 個文件被更改,包括 8 次插入6 次删除
  1. 8 6
      app/system/controller/Member.php

+ 8 - 6
app/system/controller/Member.php

@@ -691,14 +691,16 @@ class Member extends BaseController
      * @return \app\model\api\InfoAudit|void
      */
     public function setAuthShow($uid){
-        $show = InfoAudit::where('uid',$uid)->column('is_show');
-        if($show == 0){
-            $show = 1;
+        $show = InfoAudit::where('uid',$uid)->find();
+        $is_show =$show['is_show'];
+
+        if($is_show == 0){
+            $chen_show = 1;
         }
-        if($show == 1){
-            $show = 0;
+        else{
+            $chen_show = 0;
         }
-        $res = InfoAudit::where('uid',$uid)->update(['is_show'=>$show]);
+        $res = InfoAudit::where('uid',$uid)->update(['is_show'=>$chen_show]);
         if($res)return app('json')->success('OK');
 
     }