From b93e241931ad086ab8a747bb46933f043bc52a69 Mon Sep 17 00:00:00 2001 From: catsworld <519418441@qq.com> Date: Mon, 12 Jun 2017 14:41:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E4=B8=80=E4=BA=9B?= =?UTF-8?q?=E7=BB=86=E8=8A=82=E6=96=B9=E9=9D=A2=E7=9A=84=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20=E6=B7=BB=E5=8A=A0=E4=BA=86SSO=E5=BC=95?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.example | 2 ++ app/Http/Controllers/AuthController.php | 8 +++-- resources/views/auth/login.blade.php | 1 + resources/views/auth/ssoGuide.blade.php | 15 ++++++++ resources/views/good/goodInfo.blade.php | 46 +++++++++++-------------- resources/views/layout/header.blade.php | 31 +++++++++-------- resources/views/layout/master.blade.php | 2 +- resources/views/user/user.blade.php | 3 +- resources/views/welcome.blade.php | 16 +++++---- 9 files changed, 73 insertions(+), 51 deletions(-) create mode 100644 resources/views/auth/ssoGuide.blade.php diff --git a/.env.example b/.env.example index 2e1a250..1067703 100644 --- a/.env.example +++ b/.env.example @@ -28,3 +28,5 @@ MAIL_PORT=2525 MAIL_USERNAME=null MAIL_PASSWORD=null MAIL_ENCRYPTION=null + +ALLOW_REG=false diff --git a/app/Http/Controllers/AuthController.php b/app/Http/Controllers/AuthController.php index d1a166c..9a67659 100644 --- a/app/Http/Controllers/AuthController.php +++ b/app/Http/Controllers/AuthController.php @@ -98,12 +98,16 @@ class AuthController extends Controller public function showRegister() { - return View::make('auth.register'); + if (!env('ALLOW_REG', false)){ + return View::make('auth.ssoGuide'); + }else{ + return View::make('auth.register'); + } } public function register(RegisterRequest $request) { - if (!env('ALLOW_REG', true)) { + if (!env('ALLOW_REG', false)) { abort(404); } $input = $request->all(); diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index 215a5ab..97d5970 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -20,6 +20,7 @@ {!! csrf_field() !!} + diff --git a/resources/views/auth/ssoGuide.blade.php b/resources/views/auth/ssoGuide.blade.php new file mode 100644 index 0000000..a0b065c --- /dev/null +++ b/resources/views/auth/ssoGuide.blade.php @@ -0,0 +1,15 @@ +@extends('layout.master') + +@section('title', "注册") + +@section('content') + +
+
+   先锋市场当前仅面向校内人员使用。若你是初次使用本网站服务,请点击下面的按钮,前往校园统一身份认证服务平台使用学号登录。该平台登录密码为你在未修改时的校园卡密码。初次登录后,你可以为自己设置一个用户名,或者绑定你的邮箱,以使用它们进行登录。你也可以再次使用校卡平台进行快捷登录。 +
校园统一身份认证服务平台
+
+
+ + +@endsection \ No newline at end of file diff --git a/resources/views/good/goodInfo.blade.php b/resources/views/good/goodInfo.blade.php index 414cecd..ec52a3c 100644 --- a/resources/views/good/goodInfo.blade.php +++ b/resources/views/good/goodInfo.blade.php @@ -34,11 +34,25 @@
-

{{ $good->good_name }}

+

+ {{ $good->good_name }} + + @if(isset($inFvlst)) + @if(count($inFvlst) == 0) + ☆ + @endif + @if(count($inFvlst) != 0) + ★ + @endif + @else + ☆ + @endif + +

¥{{ $good->price }}

-
+
@if(($good->user_id) != Session::get('user_id'))
@@ -50,8 +64,7 @@
@endif -
-
+

(库存:{{ $good->count }}件)

@if($good->user_id == Session::get('user_id') || Session::get('is_admin') == 2)
@@ -64,29 +77,12 @@
@endif -

(库存:{{ $good->count }}件)

- @if(isset($inFvlst)) -
- {!! csrf_field() !!} - @if(count($inFvlst) == 0) - - @endif - @if(count($inFvlst) != 0) - - @endif -
- @else - - @endif
@@ -113,11 +109,11 @@ url: "/good/{{ $good->id }}/add_favlist", data: str_data, success: function (msg) { - $('.fav_smt.fav_smt-small').val('取消收藏QAQ'); + $('.fav_smt.fav_smt-small').text('★'); $jQuery_NEW('.fav_smt.fav_smt-small').attr('onclick', 'del_favlist()'); //what's this? interesting $jQuery_NEW('.fav_smt.fav_smt-small').attr('style', 'width:100%;color:white;padding-left:0;padding-right:0'); - $('.fav_smt.fav_smt-medium').val('取消收藏QAQ'); + $('.fav_smt.fav_smt-medium').text('★'); $jQuery_NEW('.fav_smt.fav_smt-medium').attr('onclick', 'del_favlist()'); } }); @@ -132,9 +128,9 @@ url: "/good/{{ $good->id }}/del_favlist", data: str_data, success: function (msg) { - $('.fav_smt.fav_smt-small').val('收藏OvO'); + $('.fav_smt.fav_smt-small').text('☆'); $jQuery_NEW('.fav_smt.fav_smt-small').attr('onclick', 'add_favlist()'); - $('.fav_smt.fav_smt-medium').val('收藏OvO'); + $('.fav_smt.fav_smt-medium').text('☆'); $jQuery_NEW('.fav_smt.fav_smt-medium').attr('onclick', 'add_favlist()'); } }); diff --git a/resources/views/layout/header.blade.php b/resources/views/layout/header.blade.php index 08d079c..630f174 100644 --- a/resources/views/layout/header.blade.php +++ b/resources/views/layout/header.blade.php @@ -5,7 +5,7 @@
-
+
@@ -64,7 +67,7 @@