Jonlin 6 년 전
부모
커밋
06223e2d55
3개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 1
      app/Http/Controllers/AppController.php
  2. 1 1
      resources/views/app/appxq.blade.php
  3. 2 1
      resources/views/app/upload.blade.php

+ 1 - 1
app/Http/Controllers/AppController.php

@@ -400,7 +400,7 @@ class AppController extends BaseController
             $entension = $file->getClientOriginalExtension();   //上传文件的后缀.
             $newName = md5(date('Ymdhis') . $clientName) . "." . $entension;    //定义      上传文件的新名称
             $path = $file->move('/uploads', $newName);    //把缓存文件移动到指定文件夹
-            var_dump($path);die;
+            //var_dump($path);die;
             $db = DB::table('admin_app')->insert(['app_title' => $fileextension, 'app_id' => $fileextension, 'filesize' => $filesize, 'a_title' => $fileextension, 'path' => $path]);
             if ($db > 0) {
                 return redirect('/apps');

+ 1 - 1
resources/views/app/appxq.blade.php

@@ -531,7 +531,7 @@
                                 <div class="role" onclick="copy(this)">
                                     <span style="margin-top: 35px; color: #ccc;padding: 0px;line-height: 30px; text-align: center; ">+</span>
                                 </div>
-                                <button style='width: 60px; height: 30; margin-top: 71px;color: #ffffff;background-color: #4395FF;border-radius: 4px;' type="submit">提交</button>
+                                <button style='width: 60px; height: 30; margin-top: 71px;margin-left: 40px;color: #ffffff;background-color: #4395FF;border-radius: 4px;' type="submit">提交</button>
                             </form>
     
                             <script>

+ 2 - 1
resources/views/app/upload.blade.php

@@ -64,7 +64,8 @@
                                     <input type="file" name="picture">
                                 </div> -->
                                 <div class="up_box flex_center flex_row " >
-                                    <input type="file" class="input_file" name="file0"  id="file0"  />
+                                    <input type="file" class="input_file" name="picture"  id="file0"  />
+                                    <input type="hidden" name="_token" value="<?php echo csrf_token(); ?>">
                                     <label for="file0" style="margin-bottom: 0;">
                                     <img id="img0" src="/static/admin/images/upload.jpg"  class="btn_img">
                                     </label>