فهرست منبع

Merge branch 'dev' of http://git.bocai108.com:10180/Ethan/Customer-Service into dev

Ethan 6 سال پیش
والد
کامیت
8ea85d272a

+ 4 - 0
application/admin/controller/Robot.php

@@ -199,6 +199,10 @@ class Robot extends Base
         Loader::import('PHPExcel.PHPExcel.PHPExcel_Cell');
         //获取表单上传文件
         $file = request()->file('excel');
+        if(empty($file)){
+            return json(['code' => -4, 'data' => '', 'msg' => '请先上传文件']);
+        }
+
         $info = $file->validate(['ext' => 'xlsx'])->move(ROOT_PATH . 'public' . DS . 'uploads');
         //上传验证后缀名,以及上传之后移动的地址
         if ($info) {

+ 4 - 0
application/admin/controller/Sensitivec.php

@@ -173,6 +173,10 @@ class Sensitivec extends Base
         Loader::import('PHPExcel.PHPExcel.PHPExcel_Cell');
         //获取表单上传文件
         $file = request()->file('excel');
+        if(empty($file)){
+            return json(['code' => -4, 'data' => '', 'msg' => '请先上传文件']);
+        }
+
         $info = $file->validate(['ext' => 'xlsx'])->move(ROOT_PATH . 'public' . DS . 'uploads');
         //上传验证后缀名,以及上传之后移动的地址
         if ($info) {

+ 0 - 1
application/admin/controller/System.php

@@ -173,7 +173,6 @@ class System extends Base
         if(request()->isAjax()){
 
             $param = input('param.');
-
             $limit = $param['pageSize'];
             $offset = ($param['pageNumber'] - 1) * $limit;
 

+ 4 - 0
application/admin/controller/Words.php

@@ -173,6 +173,10 @@ class Words extends Base
         Loader::import('PHPExcel.PHPExcel.PHPExcel_Cell');
         //获取表单上传文件
         $file = request()->file('excel');
+        if(empty($file)){
+            return json(['code' => -4, 'data' => '', 'msg' => '请先上传文件']);
+        }
+
         $info = $file->validate(['ext' => 'xlsx'])->move(ROOT_PATH . 'public' . DS . 'uploads');
         //上传验证后缀名,以及上传之后移动的地址
         if ($info) {

+ 14 - 14
application/admin/view/system/wordslog.html

@@ -174,20 +174,20 @@
             var start = $('#start').val();
             var end = $('#end').val();
 
-//            if('' == start){
-//                layer.tips("输入开始时间", '#start');
-//                return false;
-//            }
-//
-//            if('' == end){
-//                layer.tips("输入结束时间", '#end');
-//                return false;
-//            }
-//
-//            if(start > end){
-//                layer.msg('开始时间不能大于结束时间');
-//                return false;
-//            }
+            if('' == start){
+                layer.tips("输入开始时间", '#start');
+                return false;
+            }
+
+            if('' == end){
+                layer.tips("输入结束时间", '#end');
+                return false;
+            }
+
+            if(start > end){
+                layer.msg('开始时间不能大于结束时间');
+                return false;
+            }
 
             initTable();
         });