diff --git a/app/Common/function.php b/app/Common/function.php index a5e94dd..e8ed61e 100644 --- a/app/Common/function.php +++ b/app/Common/function.php @@ -1284,4 +1284,17 @@ function checkIsNumber($data) return false; } - +// 车牌号校验 +function isCarLicense($license) +{ + if (empty($license)) { + return false; + } + $regular = "/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/u"; + preg_match($regular, $license, $match); + if (isset($match[0])) { + return true; + } + + return false; +} diff --git a/app/Http/Controllers/Admin/AdminController.php b/app/Http/Controllers/Admin/AdminController.php index 436fb6a..75c03e9 100644 --- a/app/Http/Controllers/Admin/AdminController.php +++ b/app/Http/Controllers/Admin/AdminController.php @@ -107,7 +107,7 @@ class AdminController extends CommonController if(!empty($_POST["username"])){$data['username'] = $map['username'] = $_POST["username"];}else{error_jump('用户名不能为空');exit;}//用户名 if(!empty($_POST["oldpwd"])){$map['pwd'] = md5($_POST["oldpwd"]);}else{error_jump('旧密码错误');exit;} if($_POST["newpwd"]==$_POST["newpwd2"]){$data['pwd'] = md5($_POST["newpwd"]);}else{error_jump('密码错误');exit;} - if($_POST["oldpwd"]==$_POST["newpwd"]){error_jump('新旧密码不能一致!');exit;} + if($_POST["oldpwd"]==$_POST["newpwd"]){error_jump('新旧密码不能一致');exit;} $User = object_to_array(DB::table("admin")->where($map)->first(), 1); diff --git a/app/Http/Controllers/Admin/AdminRoleController.php b/app/Http/Controllers/Admin/AdminRoleController.php index b917d66..9c8458b 100644 --- a/app/Http/Controllers/Admin/AdminRoleController.php +++ b/app/Http/Controllers/Admin/AdminRoleController.php @@ -110,7 +110,7 @@ class AdminRoleController extends CommonController //角色权限设置视图 public function permissions() { - if(!empty($_GET["id"])){$data['role_id'] = $_GET["id"];}else{error_jump('您访问的页面不存在或已被删除!');} + if(!empty($_GET["id"])){$data['role_id'] = $_GET["id"];}else{error_jump('您访问的页面不存在或已被删除');} $menu = []; $access = model('Access')->getAll(['role_id'=>$data['role_id']]); diff --git a/app/Http/Controllers/Admin/ArticleController.php b/app/Http/Controllers/Admin/ArticleController.php index 842a9c9..03f1216 100644 --- a/app/Http/Controllers/Admin/ArticleController.php +++ b/app/Http/Controllers/Admin/ArticleController.php @@ -236,7 +236,7 @@ class ArticleController extends CommonController //推荐文章 public function recommendarc() { - if(!empty($_GET["id"])){$id = $_GET["id"];}else{error_jump("您访问的页面不存在或已被删除!");} //if(preg_match('/[0-9]*/',$id)){}else{exit;} + if(!empty($_GET["id"])){$id = $_GET["id"];}else{error_jump("您访问的页面不存在或已被删除");} //if(preg_match('/[0-9]*/',$id)){}else{exit;} $data['tuijian'] = 1; diff --git a/app/Http/Controllers/Admin/CategoryController.php b/app/Http/Controllers/Admin/CategoryController.php index 1fb50df..a036cd2 100644 --- a/app/Http/Controllers/Admin/CategoryController.php +++ b/app/Http/Controllers/Admin/CategoryController.php @@ -60,7 +60,7 @@ class CategoryController extends CommonController if(DB::table('arctype')->insert($_POST)) { - success_jump('添加成功!'); + success_jump('添加成功'); } else { @@ -91,7 +91,7 @@ class CategoryController extends CommonController if(DB::table('arctype')->where('id', $id)->update($_POST)) { - success_jump('修改成功!', route('admin_category')); + success_jump('修改成功', route('admin_category')); } else { @@ -119,7 +119,7 @@ class CategoryController extends CommonController } else { - error_jump('栏目下的文章删除失败!'); + error_jump('栏目下的文章删除失败'); } } else diff --git a/app/Http/Controllers/Admin/CommonController.php b/app/Http/Controllers/Admin/CommonController.php index 6ffd75f..d24d33e 100644 --- a/app/Http/Controllers/Admin/CommonController.php +++ b/app/Http/Controllers/Admin/CommonController.php @@ -39,7 +39,7 @@ class CommonController extends Controller if(!$check) { - error_jump('你没有权限访问,请联系管理员!', route('admin')); + error_jump('你没有权限访问,请联系管理员', route('admin')); } } } diff --git a/app/Http/Controllers/Admin/GoodsBrandController.php b/app/Http/Controllers/Admin/GoodsBrandController.php index a1d6714..c142fc5 100644 --- a/app/Http/Controllers/Admin/GoodsBrandController.php +++ b/app/Http/Controllers/Admin/GoodsBrandController.php @@ -27,7 +27,7 @@ class GoodsBrandController extends CommonController if(DB::table("goods_brand")->insert($_POST)) { - success_jump('添加成功!', route('admin_goodsbrand')); + success_jump('添加成功', route('admin_goodsbrand')); } else { @@ -60,7 +60,7 @@ class GoodsBrandController extends CommonController if(DB::table('goods_brand')->where('id', $id)->update($_POST)) { - success_jump('修改成功!', route('admin_goodsbrand')); + success_jump('修改成功', route('admin_goodsbrand')); } else { diff --git a/app/Http/Controllers/Admin/GoodsController.php b/app/Http/Controllers/Admin/GoodsController.php index 714ba0e..2f89615 100644 --- a/app/Http/Controllers/Admin/GoodsController.php +++ b/app/Http/Controllers/Admin/GoodsController.php @@ -101,7 +101,7 @@ class GoodsController extends CommonController DB::table('goods_img')->insert($tmp); } - success_jump('添加成功!', route('admin_goods')); + success_jump('添加成功', route('admin_goods')); } else { @@ -175,11 +175,11 @@ class GoodsController extends CommonController DB::table('goods_img')->insert($tmp); } - success_jump('修改成功!', route('admin_goods')); + success_jump('修改成功', route('admin_goods')); } else { - error_jump('修改失败!'); + error_jump('修改失败'); } } diff --git a/app/Http/Controllers/Admin/GoodstypeController.php b/app/Http/Controllers/Admin/GoodstypeController.php index 3e7a1a6..9b6f23a 100644 --- a/app/Http/Controllers/Admin/GoodstypeController.php +++ b/app/Http/Controllers/Admin/GoodstypeController.php @@ -61,7 +61,7 @@ class GoodsTypeController extends CommonController if(DB::table("goods_type")->insert($_POST)) { - success_jump('添加成功!', route('admin_goodstype')); + success_jump('添加成功', route('admin_goodstype')); } else { @@ -92,7 +92,7 @@ class GoodsTypeController extends CommonController if(DB::table("goods_type")->where('id', $id)->update($_POST)) { - success_jump('修改成功!', route('admin_goodstype')); + success_jump('修改成功', route('admin_goodstype')); } else { @@ -120,7 +120,7 @@ class GoodsTypeController extends CommonController } else { - error_jump('分类下的商品删除失败!'); + error_jump('分类下的商品删除失败'); } } else diff --git a/app/Http/Controllers/Admin/IndexController.php b/app/Http/Controllers/Admin/IndexController.php index 4e291bd..a55735a 100644 --- a/app/Http/Controllers/Admin/IndexController.php +++ b/app/Http/Controllers/Admin/IndexController.php @@ -27,7 +27,7 @@ class IndexController extends CommonController public function upconfig() { cache()->forget('sysconfig'); //删除缓存 - success_jump('更新成功!'); + success_jump('更新成功'); } //更新缓存 @@ -35,6 +35,6 @@ class IndexController extends CommonController { cache()->forget('sysconfig'); //删除缓存 dir_delete(storage_path().'/framework/cache/data/'); - success_jump('更新成功!'); + success_jump('更新成功'); } } diff --git a/app/Http/Controllers/Admin/KeywordController.php b/app/Http/Controllers/Admin/KeywordController.php index d709ece..630799a 100644 --- a/app/Http/Controllers/Admin/KeywordController.php +++ b/app/Http/Controllers/Admin/KeywordController.php @@ -28,7 +28,7 @@ class KeywordController extends CommonController unset($_POST["_token"]); if(DB::table('keyword')->insert($_POST)) { - success_jump("添加成功!", route('admin_keyword')); + success_jump("添加成功", route('admin_keyword')); } else { @@ -54,11 +54,11 @@ class KeywordController extends CommonController unset($_POST["_token"]); if(DB::table('keyword')->where('id', $id)->update($_POST)) { - success_jump('修改成功!', route('admin_keyword')); + success_jump('修改成功', route('admin_keyword')); } else { - error_jump('修改失败!'); + error_jump('修改失败'); } } diff --git a/app/Http/Controllers/Admin/KuaidiController.php b/app/Http/Controllers/Admin/KuaidiController.php index 1aed316..7635126 100644 --- a/app/Http/Controllers/Admin/KuaidiController.php +++ b/app/Http/Controllers/Admin/KuaidiController.php @@ -37,7 +37,7 @@ class KuaidiController extends CommonController if(DB::table('kuaidi')->insert(array_filter($_POST))) { - success_jump('添加成功!', route('admin_kuaidi')); + success_jump('添加成功', route('admin_kuaidi')); } else { @@ -59,11 +59,11 @@ class KuaidiController extends CommonController if(DB::table('kuaidi')->where('id', $id)->update($_POST)) { - success_jump('修改成功!', route('admin_kuaidi')); + success_jump('修改成功', route('admin_kuaidi')); } else { - error_jump('修改失败!'); + error_jump('修改失败'); } } diff --git a/app/Http/Controllers/Admin/LoginController.php b/app/Http/Controllers/Admin/LoginController.php index 41e8a87..041acb6 100644 --- a/app/Http/Controllers/Admin/LoginController.php +++ b/app/Http/Controllers/Admin/LoginController.php @@ -60,7 +60,7 @@ class LoginController extends BaseController { session_unset(); session_destroy();// 退出登录,清除session - success_jump('退出成功!', route('home')); + success_jump('退出成功', route('home')); } //密码恢复 @@ -71,11 +71,11 @@ class LoginController extends BaseController if(DB::table('admin')->where('id', 1)->update($data)) { - success_jump('密码恢复成功!', route('admin_login')); + success_jump('密码恢复成功', route('admin_login')); } else { - error_jump('密码恢复失败!', route('home')); + error_jump('密码恢复失败', route('home')); } } diff --git a/app/Http/Controllers/Admin/MenuController.php b/app/Http/Controllers/Admin/MenuController.php index 5b75c0b..855acc2 100644 --- a/app/Http/Controllers/Admin/MenuController.php +++ b/app/Http/Controllers/Admin/MenuController.php @@ -39,7 +39,7 @@ class MenuController extends CommonController { DB::table('access')->insert(['role_id' => 1, 'menu_id' => $menuid]); - success_jump('添加成功!', route('admin_menu')); + success_jump('添加成功', route('admin_menu')); } else { @@ -66,11 +66,11 @@ class MenuController extends CommonController unset($_POST["_token"]); if(DB::table('menu')->where('id', $id)->update($_POST)) { - success_jump('修改成功!', route('admin_menu')); + success_jump('修改成功', route('admin_menu')); } else { - error_jump('修改失败!'); + error_jump('修改失败'); } } diff --git a/app/Http/Controllers/Admin/OrderController.php b/app/Http/Controllers/Admin/OrderController.php index 3dd4567..d4e3171 100644 --- a/app/Http/Controllers/Admin/OrderController.php +++ b/app/Http/Controllers/Admin/OrderController.php @@ -134,7 +134,7 @@ class OrderController extends CommonController if(Order::insert($_POST)) { - success_jump('添加成功!', route('admin_order')); + success_jump('添加成功', route('admin_order')); } else { @@ -167,7 +167,7 @@ class OrderController extends CommonController if(Order::where('id', $id)->update($_POST)) { - success_jump('修改成功!', route('admin_order')); + success_jump('修改成功', route('admin_order')); } else { diff --git a/app/Http/Controllers/Admin/PageController.php b/app/Http/Controllers/Admin/PageController.php index 1da0b42..ac61267 100644 --- a/app/Http/Controllers/Admin/PageController.php +++ b/app/Http/Controllers/Admin/PageController.php @@ -27,7 +27,7 @@ class PageController extends CommonController if(DB::table("page")->insert($_POST)) { - success_jump('添加成功!'); + success_jump('添加成功'); } else { @@ -61,7 +61,7 @@ class PageController extends CommonController if(DB::table('page')->where('id', $id)->update($_POST)) { - success_jump('修改成功!', route('admin_page')); + success_jump('修改成功', route('admin_page')); } else { diff --git a/app/Http/Controllers/Admin/SearchController.php b/app/Http/Controllers/Admin/SearchController.php index 6a75a03..84d1b7b 100644 --- a/app/Http/Controllers/Admin/SearchController.php +++ b/app/Http/Controllers/Admin/SearchController.php @@ -25,7 +25,7 @@ class Search extends Base if(db('search')->insert($_POST)) { - $this->success('添加成功!', FLADMIN.'/Search' , 1); + $this->success('添加成功', FLADMIN.'/Search' , 1); } else { @@ -57,11 +57,11 @@ class Search extends Base if(db('search')->where("id=$id")->update($_POST)) { - $this->success('修改成功!', FLADMIN.'/Search' , 1); + $this->success('修改成功', FLADMIN.'/Search' , 1); } else { - $this->error('修改失败!', FLADMIN.'/Search/edit?id='.$_POST["id"] , 3); + $this->error('修改失败', FLADMIN.'/Search/edit?id='.$_POST["id"] , 3); } } diff --git a/app/Http/Controllers/Admin/SearchwordController.php b/app/Http/Controllers/Admin/SearchwordController.php index fcfef9e..420d55f 100644 --- a/app/Http/Controllers/Admin/SearchwordController.php +++ b/app/Http/Controllers/Admin/SearchwordController.php @@ -33,7 +33,7 @@ class SearchwordController extends CommonController if($insertId = DB::table('searchword')->insertGetId($_POST)) { - success_jump('添加成功!', route('admin_searchword')); + success_jump('添加成功', route('admin_searchword')); } else { @@ -63,11 +63,11 @@ class SearchwordController extends CommonController if(DB::table('searchword')->where('id', $id)->update($_POST)) { - success_jump('修改成功!', route('admin_searchword')); + success_jump('修改成功', route('admin_searchword')); } else { - error_jump('修改失败!'); + error_jump('修改失败'); } } diff --git a/app/Http/Controllers/Admin/SysconfigController.php b/app/Http/Controllers/Admin/SysconfigController.php index d8b3ec1..89a5a4e 100644 --- a/app/Http/Controllers/Admin/SysconfigController.php +++ b/app/Http/Controllers/Admin/SysconfigController.php @@ -42,7 +42,7 @@ class SysconfigController extends CommonController if($_POST['varname']!="" && DB::table('sysconfig')->insert($_POST)) { cache()->forget('sysconfig'); //删除缓存 - success_jump('添加成功!', route('admin_sysconfig')); + success_jump('添加成功', route('admin_sysconfig')); } else { @@ -83,7 +83,7 @@ class SysconfigController extends CommonController if(DB::table('sysconfig')->where('id', $id)->update($_POST)) { cache()->forget('sysconfig'); //删除缓存 - success_jump('更新成功!', route('admin_sysconfig')); + success_jump('更新成功', route('admin_sysconfig')); } else { diff --git a/app/Http/Controllers/Admin/TagController.php b/app/Http/Controllers/Admin/TagController.php index 25889d5..f5916a8 100644 --- a/app/Http/Controllers/Admin/TagController.php +++ b/app/Http/Controllers/Admin/TagController.php @@ -49,7 +49,7 @@ class TagController extends CommonController } } - success_jump('添加成功!', route('admin_tag')); + success_jump('添加成功', route('admin_tag')); } else { @@ -125,11 +125,11 @@ class TagController extends CommonController DB::table("taglist")->where('tid', $id)->delete(); } - success_jump('修改成功!', route('admin_tag')); + success_jump('修改成功', route('admin_tag')); } else { - error_jump('修改失败!'); + error_jump('修改失败'); } } diff --git a/app/Http/Controllers/Admin/UserController.php b/app/Http/Controllers/Admin/UserController.php index 7c20f3c..3d00819 100644 --- a/app/Http/Controllers/Admin/UserController.php +++ b/app/Http/Controllers/Admin/UserController.php @@ -102,7 +102,7 @@ class UserController extends CommonController if(DB::table('user')->insert($_POST)) { - success_jump('添加成功!', route('admin_user')); + success_jump('添加成功', route('admin_user')); } else { @@ -124,11 +124,11 @@ class UserController extends CommonController unset($_POST["_token"]); if(DB::table('user')->where('id', $id)->update($_POST)) { - success_jump('修改成功!', route('admin_user')); + success_jump('修改成功', route('admin_user')); } else { - error_jump('修改失败!'); + error_jump('修改失败'); } } diff --git a/app/Http/Controllers/Admin/UserRankController.php b/app/Http/Controllers/Admin/UserRankController.php index 30cd2c8..babce7c 100644 --- a/app/Http/Controllers/Admin/UserRankController.php +++ b/app/Http/Controllers/Admin/UserRankController.php @@ -40,7 +40,7 @@ class UserRankController extends CommonController if(DB::table('user_rank')->insert(array_filter($_POST))) { - success_jump('添加成功!', route('admin_userrank')); + success_jump('添加成功', route('admin_userrank')); } else { @@ -65,11 +65,11 @@ class UserRankController extends CommonController if(DB::table('user_rank')->where('id', $id)->update($_POST) !== false) { - success_jump('修改成功!', route('admin_userrank')); + success_jump('修改成功', route('admin_userrank')); } else { - error_jump('修改失败!'); + error_jump('修改失败'); } } diff --git a/app/Http/Controllers/Admin/UserWithdrawController.php b/app/Http/Controllers/Admin/UserWithdrawController.php index d5d0059..00968f2 100644 --- a/app/Http/Controllers/Admin/UserWithdrawController.php +++ b/app/Http/Controllers/Admin/UserWithdrawController.php @@ -46,11 +46,11 @@ class UserWithdrawController extends CommonController unset($_POST["_token"]); if(DB::table('user_withdraw')->where('id', $id)->update($_POST)) { - success_jump('修改成功!', route('admin_user')); + success_jump('修改成功', route('admin_user')); } else { - error_jump('修改失败!'); + error_jump('修改失败'); } } diff --git a/app/Http/Controllers/Admin/WeixinMenuController.php b/app/Http/Controllers/Admin/WeixinMenuController.php index 09e0a64..4be3937 100644 --- a/app/Http/Controllers/Admin/WeixinMenuController.php +++ b/app/Http/Controllers/Admin/WeixinMenuController.php @@ -59,7 +59,7 @@ class WeixinMenuController extends CommonController if(DB::table('weixin_menu')->insert($_POST)) { - success_jump('添加成功!'); + success_jump('添加成功'); } else { @@ -89,7 +89,7 @@ class WeixinMenuController extends CommonController if(DB::table('weixin_menu')->where('id', $id)->update($_POST)) { - success_jump('修改成功!', route('admin_weixinmenu')); + success_jump('修改成功', route('admin_weixinmenu')); } else { @@ -206,6 +206,6 @@ class WeixinMenuController extends CommonController $wechat_menu->create_menu($jsonmenu); - success_jump('修改菜单,生成后,不会立即显示,有24小时的缓存,除非你取消关注,然后重新关注!', route('admin_weixinmenu'),5); + success_jump('修改菜单,生成后,不会立即显示,有24小时的缓存,除非你取消关注,然后重新关注', route('admin_weixinmenu'),5); } } \ No newline at end of file diff --git a/public/css/style.css b/public/css/style.css index 42ef295..0898f23 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -15,7 +15,7 @@ a{color:#313131;text-decoration:none;}a:hover{text-decoration:none;color:#22ac38 .pul{margin-right:-15px;font-family:"Microsoft Yahei";}.pul a:hover .title{text-decoration:underline;} .pul li{background-color: #fff;float:left;overflow:hidden;margin-right:15px;margin-bottom:15px;border:1px solid #dcdcdc;}.pul li a:hover{text-decoration:none;} .pul li img{width:308px;height:308px;display:block;margin-bottom:10px;} -.pul li .title{overflow:hidden;white-space:nowrap;width:293px;height:20px;margin:0 5px 2px 10px;font-weight:400;display: block;color: #333;font-size: 14px;line-height: 15px;} +.pul li .title{overflow:hidden;white-space:nowrap;width:290px;height:20px;margin:0 8px 2px 10px;font-weight:400;display: block;color: #333;font-size: 14px;line-height: 15px;} .pul li .desc{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:288px;margin:0 10px 5px 10px;font-size: 12px;line-height: 16px;padding: 0;color: #999;height: 20px;} .pul li .desc .price-point{display: inline-block;font-weight: 400;color: #e61414;} .pul .item-prices{height: 50px;}.pul .red{background-color: #e61414;}.pul .green{background-color: #26a96d;}