Browse Source

内部使用oa后台

gogs 1 year ago
parent
commit
613578ebbb
2 changed files with 5 additions and 1 deletions
  1. 1 1
      app/Http/Controllers/Api/DeviceController.php
  2. 4 0
      routes/api.php

+ 1 - 1
app/Http/Controllers/Api/DeviceController.php

@@ -145,7 +145,7 @@ class DeviceController extends Controller
                 // 保存图片路径(可以存储到数据库等)
                 $imagePath = $destinationPath . '/' . $filename;
                 KqList::where('devid',$data['devid'])->where('flow_id',$data['id'])->update([
-                    'pic' => $imagePath
+                    'pic' => explode('.',$filename)[0]
                 ]);
                 $return = [
                     'devid' => $data['devid'],

+ 4 - 0
routes/api.php

@@ -41,4 +41,8 @@ Route::group(['middleware'=> ['checkLogin']],function ($route){
     $route->any('roleDetail', 'Api\EmployeeController@roleDetail');
     $route->any('roleMenu', 'Api\EmployeeController@roleMenu');
 
+
+    $route->any('kqList', 'Api\KqController@kqCollect');
+    $route->any('kqCollect', 'Api\KqController@kqCollect');
+
 });