This commit is contained in:
pushuo 2022-07-05 11:53:06 +08:00
parent ea7fc90c3a
commit 95c7326bbc
8 changed files with 157 additions and 9 deletions

View File

@ -54,7 +54,6 @@ class OrderController extends Controller
{
$customer = current_customer();
$order = OrderRepo::getOrderByNumber($number, $customer);
dd($order);
return view('account/order_success', ['data' => $order]);
return view('account/order_success', ['order' => $order]);
}
}

View File

@ -670,3 +670,43 @@ body.page-checkout .radio-line-wrap .radio-line-item .right .title {
.el-input__inner {
border-radius: 0 !important;
}
body.page-order-success .order-wrap .card-body {
padding: 3rem;
padding-left: 7rem;
}
body.page-order-success .order-wrap .card-body .order-top {
border-bottom: 1px solid #eee;
padding-bottom: 2.7rem;
margin-bottom: 2.7rem;
display: flex;
justify-content: center;
}
body.page-order-success .order-wrap .card-body .order-top .left {
margin-top: -6px;
}
body.page-order-success .order-wrap .card-body .order-top .left i {
color: #4caf50;
font-size: 80px;
line-height: 1;
}
body.page-order-success .order-wrap .card-body .order-top .right {
flex: 1;
margin-left: 2rem;
}
body.page-order-success .order-wrap .card-body .order-top .right .table {
margin-bottom: 0;
}
body.page-order-success .order-wrap .card-body .order-top .right .order-title {
margin-bottom: 1.2rem;
font-weight: 400;
}
body.page-order-success .order-wrap .card-body .order-top .right .order-info {
padding: 0.7rem;
background-color: #fffaf0;
border: 1px solid #ffe1ad;
}
body.page-order-success .order-wrap .card-body .order-bottom {
margin-left: calc(2rem + 80px);
line-height: 2;
}

View File

@ -6976,7 +6976,7 @@ sup {
}
a {
color: #1f1f1f;
color: #3480e7;
text-decoration: none;
}
a:hover {
@ -10210,7 +10210,7 @@ textarea.form-control-lg {
.btn-link {
font-weight: 400;
color: #1f1f1f;
color: #3480e7;
text-decoration: none;
}
.btn-link:hover {
@ -10681,7 +10681,7 @@ textarea.form-control-lg {
.nav-link {
display: block;
padding: 0.5rem 1rem;
color: #1f1f1f;
color: #3480e7;
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}
@media (prefers-reduced-motion: reduce) {
@ -11541,7 +11541,7 @@ textarea.form-control-lg {
.page-link {
position: relative;
display: block;
color: #1f1f1f;
color: #3480e7;
background-color: #fff;
border: 1px solid #dee2e6;
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;

View File

@ -17,3 +17,4 @@ $primary: #fd560f;
@import './cart';
@import './page-checkout';
@import './element-ui';
@import './order-success';

View File

@ -35,7 +35,7 @@ $input-btn-font-size: 0.9rem;
// $input-btn-padding-x: .75rem !default;
$link-decoration: none;
$link-color: #1f1f1f;
$link-color: #3480e7;
$link-hover-color: $primary;
$btn-focus-box-shadow: 0 0 11px 0 rgba($color: $primary, $alpha: .1);
$input-btn-focus-box-shadow: 0 0 11px 0 rgba($color: $primary, $alpha: .1);

View File

@ -0,0 +1,53 @@
@charset "UTF-8";
body.page-order-success {
.order-wrap {
.card-body {
padding: 3rem;
padding-left: 7rem;
.order-top {
border-bottom: 1px solid #eee;
padding-bottom: 2.7rem;
margin-bottom: 2.7rem;
display: flex;
justify-content: center; // flex-end | center | space-between
.left {
margin-top: -6px;
i {
color: #4caf50;
font-size: 80px;
line-height: 1;
}
}
.right {
flex: 1;
margin-left: 2rem;
.table {
margin-bottom: 0;
}
.order-title {
margin-bottom: 1.2rem;
font-weight: 400;
}
.order-info {
padding: .7rem;
background-color: #fffaf0;
border: 1px solid #ffe1ad;
}
}
}
.order-bottom {
margin-left: calc(2rem + 80px);
line-height: 2;
}
}
}
}

View File

@ -0,0 +1,56 @@
@extends('layout.master')
@section('body-class', 'page-order-success')
@section('content')
<div class="container">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Library</li>
</ol>
</nav>
<div class="row justify-content-center mb-5">
<div class="col-12 col-md-9">@include('shared.steps', ['steps' => 3])</div>
</div>
<div class="card order-wrap">
<div class="card-body">
<div class="order-top">
<div class="left">
<i class="bi bi-check2-circle"></i>
</div>
<div class="right">
<h3 class="order-title">恭喜您,订单生成成功!</h3>
<div class="order-info">
<table class="table table-borderless">
<tbody>
<tr>
<td>订单编号:<span class="fw-bold">{{ $order['number'] }}</span></td>
<td>应付金额:<span class="fw-bold">{{ $order['total'] }}</span></td>
</tr>
<tr>
<td>支付方式:<span class="fw-bold">{{ $order['payment_method_name'] }}</span></td>
<td><a href="/">查看订单详情</a></td>
</tr>
</tbody>
</table>
</div>
<div class="text-muted mt-4">温馨提示:温馨提示温馨提示温馨提示温馨提示温馨提示温馨提示温馨提示</div>
<div class="mt-3">您还可以:<a href="/">继续采购</a></div>
</div>
</div>
<div class="order-bottom">
<div class="text-muted">如果您在订单过程中有任何问题,可以随时联系我们客服人员:</div>
<div>Emaill: ceshi@opencart.cn</div>
<div>服务热线: +86 1878017xxxx</div>
</div>
</div>
</div>
</div>
@endsection
@push('add-scripts')
<script></script>
@endpush

View File

@ -288,8 +288,7 @@
checkedBtnCheckoutConfirm() {
$http.post('/checkout/confirm', this.form).then((res) => {
location = 'orders/' + res.number + '/success&type=create'
location = 'orders/' + res.number + '/success?type=create'
})
}
}