Browse Source

接口调整

lizhen_gitee 6 months ago
parent
commit
5a71c3557d

+ 5 - 0
application/company/controller/Jianceproject.php

@@ -72,6 +72,11 @@ class Jianceproject extends Apic
             'weigh'      => input('weigh',$id),
         ];
 
+        if($data['pid'] == 0){
+            $data['info'] = '';
+            $data['type'] = 1;
+        }
+
         Db::name($this->table)->where('id',$id)->update($data);
 
         $this->success();

+ 1 - 1
application/company/controller/Yuejian.php

@@ -103,7 +103,7 @@ class Yuejian extends Apic
             $$key['status0'] = isset($$key[0]) ? $$key[0] : 0;
             $$key['status1'] = isset($$key[1]) ? $$key[1] : 0;
             $$key['total']   = $$key['status0'] + $$key['status1'];
-            $$key['bili'] = ($$key['total'] == 0 ? 0 : bcdiv($$key['status1'],$$key['total'],2)) . '%';
+            $$key['bili'] = ( $$key['total'] == 0 ? 0 : bcmul(bcdiv($$key['status1'],$$key['total'],4),100,2) ) . '%';
 
             $month_data[$key] = $$key;
         }