1688 landing page

This commit is contained in:
edmondlang
2022-08-10 23:58:18 +08:00
parent 49032484f3
commit 770bb9340f
5 changed files with 56 additions and 4 deletions
@@ -56,6 +56,9 @@ class CreateCustomerLogic extends AbstractControllerLogic
/** @var GenerateEmailVerificationAttemptProcessor */
private $generateEmailVerificationAttemptProcessor;
/** @var AssignSegmentProcessor */
private $assignCompanyToSegmentProcessor;
/**
* CreateCustomerLogic constructor.
* @param CreateUserProcessor $createUserProcessor
@@ -65,8 +68,9 @@ class CreateCustomerLogic extends AbstractControllerLogic
* @param AssignSegmentProcessor $assignSegmentProcessor
* @param AuthenticationProcessor $authenticationProcessor
* @param GenerateEmailVerificationAttemptProcessor $generateEmailVerificationAttemptProcessor
* @param AssignSegmentProcessor $assignCompanyToSegmentProcessor
*/
public function __construct(CreateUserProcessor $createUserProcessor, CreateCompanyProcessor $createCompanyProcessor, CreateContactProcessor $createContactProcessor, AssignEmployeeProcessor $assignEmployeeProcessor, AssignSegmentProcessor $assignSegmentProcessor, AuthenticationProcessor $authenticationProcessor, GenerateEmailVerificationAttemptProcessor $generateEmailVerificationAttemptProcessor)
public function __construct(CreateUserProcessor $createUserProcessor, CreateCompanyProcessor $createCompanyProcessor, CreateContactProcessor $createContactProcessor, AssignEmployeeProcessor $assignEmployeeProcessor, AssignSegmentProcessor $assignSegmentProcessor, AuthenticationProcessor $authenticationProcessor, GenerateEmailVerificationAttemptProcessor $generateEmailVerificationAttemptProcessor, AssignSegmentProcessor $assignCompanyToSegmentProcessor)
{
$this->createUserProcessor = $createUserProcessor;
$this->createCompanyProcessor = $createCompanyProcessor;
@@ -75,6 +79,7 @@ class CreateCustomerLogic extends AbstractControllerLogic
$this->assignSegmentProcessor = $assignSegmentProcessor;
$this->authenticationProcessor = $authenticationProcessor;
$this->generateEmailVerificationAttemptProcessor = $generateEmailVerificationAttemptProcessor;
$this->assignCompanyToSegmentProcessor = $assignCompanyToSegmentProcessor;
}
/**
@@ -94,6 +99,12 @@ class CreateCustomerLogic extends AbstractControllerLogic
/** @var Company $company */
$company = $this->createCompanyProcessor->execute($request, BusinessType::IMPORTER, $request->input('type') === CompanyType::COMPANY_BUSINESS ? CompanyType::COMPANY_BUSINESS : CompanyType::PERSONAL_BUSINESS, ApprovalStatus::PENDING_SUBMISSION);
if ($request->input('label')) {
foreach (json_decode($request->input('label')) as $label) {
$this->assignCompanyToSegmentProcessor->execute($company, $label);
}
}
$this->createContactProcessor->execute($request, $company);
$Object = new EmploymentObject($company, $user);
@@ -182,6 +182,7 @@
phone: '',
password: '',
password_confirmation: '',
label: '',
}
}
},
@@ -204,7 +205,15 @@
},
submitForm(){
this.step === 2 ? this.submit(this.route('api.account.registration.register'), 'post', 'registrationSection', false, false) : this.changeStep('next');
// this.step === 2 ? this.submit(this.route('api.account.registration.register'), 'post', 'registrationSection', false, false) : this.changeStep('next');
if (this.step === 2) {
const params = new URLSearchParams(window.location.search)
this.parameters.label = params.get('label');
this.submit(this.route('api.account.registration.register'), 'post', 'registrationSection', false, false);
} else {
this.changeStep('next');
}
}
},
mixins: [registrationFormValidation]
+2 -2
View File
@@ -5,8 +5,8 @@ export default {
(this.$store.getters.isAuthenticated && !this.isProtectedRoute()&& !this.isWithTokenRoute()) ? window.location.href = this.route('dashboard') : '';
},
isProtectedRoute(){
const unprotectedRoutes = [this.route('login'), this.route('signup'), this.route('account.email.verification')];
return !unprotectedRoutes.includes(window.location.href);
const unprotectedRoutes = [this.route('login'), this.route('signup'), this.route('account.email.verification'), this.route('landing_page')];
return !unprotectedRoutes.includes(window.location.href.split('?')[0]);
},
isWithTokenRoute(){
return window.location.href.includes(this.route('account.password.reset'));
@@ -0,0 +1,28 @@
@extends('layouts.base_login')
@section('inner_content')
<transition-component group enter-class="animate__animated animate__fadeInRightBig animate__faster" leave-class="animate__animated animate__fadeOutRightBig">
<div class="row" key="1">
<div class="col-12 col-md p-l-0 p-r-0 p-t-15 p-b-15">
<div class="h-100 bg-white">
<div class="row padding-30">
<div class="col-6 text-center">
<div>
<h1 class="mt-0">Landing template for startups</h1>
<p>Our landing page template works on all devices, so you only have to set it up once, and get beautiful results forever.</p>
<a href="{{ route('signup') }}?label=[18]" class="btn btn-sm p-l-30 p-r-30 btn-primary bold v-align-middle b-rad-none all-caps m-t-10">Sign Up Now</a>
</div>
</div>
<div class="col-6">
<div class="row">
<div class="col">
<iframe width="100%" height="auto" src="https://www.youtube.com/embed/6OQG50XnAOg" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</transition-component>
@endsection
+4
View File
@@ -36,6 +36,10 @@ Route::get('/signup', function () {
return view('pages.accounts.sign_up');
})->name('signup');
Route::get('/landing-page', function () {
return view('pages.landing_page');
})->name('landing_page');
Route::get('/account/email/verification/{token}', function ($token) {
return view('pages.accounts.email_verified', ['token' => $token]);
})->name('account.email.verification');