diff --git a/beike/Admin/Routes/admin.php b/beike/Admin/Routes/admin.php index 406a41de..4b3d99e7 100644 --- a/beike/Admin/Routes/admin.php +++ b/beike/Admin/Routes/admin.php @@ -32,13 +32,13 @@ Route::prefix($adminName) // 商品分类 Route::middleware('can:categories_index')->get('categories/autocomplete', [Controllers\CategoryController::class, 'autocomplete'])->name('categories.autocomplete'); - Route::middleware('can:categories_show')->get('categories/{id}/name', [Controllers\CategoryController::class, 'name'])->name('categories.name'); + Route::middleware('can:categories_show')->get('categories/{category}/name', [Controllers\CategoryController::class, 'name'])->name('categories.name'); Route::middleware('can:categories_index')->get('categories', [Controllers\CategoryController::class, 'index'])->name('categories.index'); Route::middleware('can:categories_create')->get('categories/create', [Controllers\CategoryController::class, 'create'])->name('categories.create'); Route::middleware('can:categories_create')->post('categories', [Controllers\CategoryController::class, 'store'])->name('categories.store'); - Route::middleware('can:categories_update')->get('categories/{id}/edit', [Controllers\CategoryController::class, 'edit'])->name('categories.edit'); - Route::middleware('can:categories_update')->put('categories/{id}', [Controllers\CategoryController::class, 'update'])->name('categories.update'); - Route::middleware('can:categories_delete')->delete('categories/{id}', [Controllers\CategoryController::class, 'destroy'])->name('categories.destroy'); + Route::middleware('can:categories_update')->get('categories/{category}/edit', [Controllers\CategoryController::class, 'edit'])->name('categories.edit'); + Route::middleware('can:categories_update')->put('categories/{category}', [Controllers\CategoryController::class, 'update'])->name('categories.update'); + Route::middleware('can:categories_delete')->delete('categories/{category}', [Controllers\CategoryController::class, 'destroy'])->name('categories.destroy'); // 客户 diff --git a/beike/Shop/Http/Resources/Account/WishlistDetail.php b/beike/Shop/Http/Resources/Account/WishlistDetail.php index ea9f2941..d6d4cd2a 100644 --- a/beike/Shop/Http/Resources/Account/WishlistDetail.php +++ b/beike/Shop/Http/Resources/Account/WishlistDetail.php @@ -23,12 +23,13 @@ class WishlistDetail extends JsonResource $product = $this->product; $masterSku = $product->master_sku; $image = $this->product->image ?: $masterSku->image; + $productName = $product->description->name ?? ''; $data = [ 'id' => $this->id, 'product_id' => $this->product_id, 'image' => image_resize($image), - 'product_name' => $product->description->name, + 'product_name' => sub_string($productName,24), 'price' => currency_format($masterSku->price) ]; diff --git a/public/build/beike/admin/css/bootstrap.css b/public/build/beike/admin/css/bootstrap.css index 96ae70a4..d1270bf0 100644 --- a/public/build/beike/admin/css/bootstrap.css +++ b/public/build/beike/admin/css/bootstrap.css @@ -9351,7 +9351,7 @@ textarea.form-control-lg { .was-validated .form-control:valid, .form-control.is-valid { border-color: #71c20b; padding-right: calc(1.5em + 0.75rem); - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2371c20b' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e"); + background-image: none; background-repeat: no-repeat; background-position: right calc(0.375em + 0.1875rem) center; background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); @@ -9371,7 +9371,7 @@ textarea.form-control-lg { } .was-validated .form-select:valid:not([multiple]):not([size]), .was-validated .form-select:valid:not([multiple])[size="1"], .form-select.is-valid:not([multiple]):not([size]), .form-select.is-valid:not([multiple])[size="1"] { padding-right: 4.125rem; - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"), url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2371c20b' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e"); + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"), none; background-position: right 0.75rem center, center right 2.25rem; background-size: 16px 12px, calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); } @@ -17013,7 +17013,17 @@ textarea.form-control-lg { box-shadow: none; } -.was-validated .form-control:valid, .form-control.is-valid { +.was-validated .form-control:valid, +.was-validated .form-select:valid { border-color: #e2e2e2; - background-image: none; +} +.was-validated .form-check-input:valid { + border-color: rgba(0, 0, 0, 0.25); +} +.was-validated .form-check-input:valid:checked { + background-color: #fd560f; + border-color: #fd560f; +} +.was-validated .form-check-input:valid ~ .form-check-label { + color: inherit; } diff --git a/public/build/beike/shop/default/css/bootstrap.css b/public/build/beike/shop/default/css/bootstrap.css index 98ea70be..350b0928 100644 --- a/public/build/beike/shop/default/css/bootstrap.css +++ b/public/build/beike/shop/default/css/bootstrap.css @@ -9352,7 +9352,7 @@ textarea.form-control-lg { .was-validated .form-control:valid, .form-control.is-valid { border-color: #71c20b; padding-right: calc(1.5em + 0.92rem); - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2371c20b' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e"); + background-image: none; background-repeat: no-repeat; background-position: right calc(0.375em + 0.23rem) center; background-size: calc(0.75em + 0.46rem) calc(0.75em + 0.46rem); @@ -9372,7 +9372,7 @@ textarea.form-control-lg { } .was-validated .form-select:valid:not([multiple]):not([size]), .was-validated .form-select:valid:not([multiple])[size="1"], .form-select.is-valid:not([multiple]):not([size]), .form-select.is-valid:not([multiple])[size="1"] { padding-right: 4.125rem; - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"), url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2371c20b' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e"); + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"), none; background-position: right 0.75rem center, center right 2.25rem; background-size: 16px 12px, calc(0.75em + 0.46rem) calc(0.75em + 0.46rem); } @@ -17043,7 +17043,17 @@ textarea.form-control-lg { color: #212529; } -.was-validated .form-control:valid, .form-control.is-valid { +.was-validated .form-control:valid, +.was-validated .form-select:valid { border-color: #ced4da; - background-image: none; +} +.was-validated .form-check-input:valid { + border-color: rgba(0, 0, 0, 0.25); +} +.was-validated .form-check-input:valid:checked { + background-color: #fd560f; + border-color: #fd560f; +} +.was-validated .form-check-input:valid ~ .form-check-label { + color: inherit; } diff --git a/resources/beike/admin/css/bootstrap/bootstrap.scss b/resources/beike/admin/css/bootstrap/bootstrap.scss index d5a0c5f9..65540a8a 100644 --- a/resources/beike/admin/css/bootstrap/bootstrap.scss +++ b/resources/beike/admin/css/bootstrap/bootstrap.scss @@ -13,12 +13,13 @@ $success: #71c20b; $info: #1a8eff; $body-bg: #f9fbfd; -$font-family-base: 'poppins', sans-serif; -$border-radius: 0; +$font-family-base: 'poppins', +sans-serif; +$border-radius: 0; $btn-border-radius: 0; $btn-border-radius-sm: 0; $btn-border-radius-lg: 0; -$input-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); // $btn-border-width: 0; $font-size-base: 0.82rem; @@ -26,10 +27,10 @@ $form-check-input-width: 1.2em; $form-switch-width: 2.6em; $link-decoration: none; $link-color: #1890ff; -$form-floating-input-padding-t: 1.325rem; -$form-floating-input-padding-b: .625rem; -$form-floating-padding-y: .9rem; -$form-floating-height: 50px; +$form-floating-input-padding-t: 1.325rem; +$form-floating-input-padding-b: .625rem; +$form-floating-padding-y: .9rem; +$form-floating-height: 50px; $btn-focus-width: 0; $table-border-color: #e9ecef; $border-color: #e8e8e8; @@ -37,13 +38,16 @@ $input-border-color: #e2e2e2; $badge-border-radius: 2px; $text-muted: #95aac9; +$form-feedback-icon-valid: none; +$form-feedback-icon-valid-color: inherit; + $alert-padding-y: 0.5rem; @import './bootstrap-icons'; @import 'node_modules/bootstrap-5.1.3/scss/bootstrap'; // @import 'node_modules/bootstrap/scss/bootstrap'; -.table > :not(:first-child) { +.table> :not(:first-child) { border-top: none; } @@ -71,7 +75,26 @@ $alert-padding-y: 0.5rem; } } -.was-validated .form-control:valid, .form-control.is-valid { - border-color: $input-border-color; - background-image: none; +.was-validated { + .form-control, + .form-select { + &:valid { + border-color: $input-border-color; + } + } + + .form-check-input { + &:valid { + border-color: rgba(#000, .25); + + &:checked { + background-color: $primary; + border-color: $primary; + } + + &~.form-check-label { + color: inherit; + } + } + } } \ No newline at end of file diff --git a/resources/beike/admin/views/components/header.blade.php b/resources/beike/admin/views/components/header.blade.php index b3e207ab..16791b2f 100644 --- a/resources/beike/admin/views/components/header.blade.php +++ b/resources/beike/admin/views/components/header.blade.php @@ -26,10 +26,10 @@ -