wip
This commit is contained in:
parent
6053e67915
commit
67be2fd9fa
|
|
@ -2254,6 +2254,7 @@ $(function () {
|
|||
|
||||
$(document).on('click', '.quantity-wrap .right i', function (event) {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
var input = $(this).parent().siblings('input');
|
||||
|
||||
if ($(this).hasClass('bi-chevron-up')) {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,11 @@
|
|||
|
||||
@section('content')
|
||||
|
||||
@dump($errors)
|
||||
{{-- @dump($errors) --}}
|
||||
|
||||
{{-- @if (session('success'))
|
||||
<x-admin-alert type="success" msg="{{ session('success') }}" class="mt-4" />
|
||||
@endif --}}
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body h-min-600">
|
||||
|
|
@ -24,21 +28,24 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
@foreach ($pages_format as $page)
|
||||
<tr>
|
||||
<td>{{ $page['id'] }}</td>
|
||||
<td><div title="{{ $page['title'] ?? '' }}">{{ $page['title_format'] ?? '' }}</div></td>
|
||||
<td>{{ $page['active'] }}</td>
|
||||
<td>{{ $page['created_at'] }}</td>
|
||||
<td>{{ $page['updated_at'] }}</td>
|
||||
<td class="text-end">
|
||||
<a href="{{ admin_route('pages.edit', [$page['id']]) }}" class="btn btn-outline-secondary btn-sm">编辑</a>
|
||||
{{-- <form action="{{ admin_route('pages.destroy', [$page['id']]) }}" method="post" class="d-inline-block">
|
||||
<tr>
|
||||
<td>{{ $page['id'] }}</td>
|
||||
<td>
|
||||
<div title="{{ $page['title'] ?? '' }}">{{ $page['title_format'] ?? '' }}</div>
|
||||
</td>
|
||||
<td>{{ $page['active'] }}</td>
|
||||
<td>{{ $page['created_at'] }}</td>
|
||||
<td>{{ $page['updated_at'] }}</td>
|
||||
<td class="text-end">
|
||||
<a href="{{ admin_route('pages.edit', [$page['id']]) }}" class="btn btn-outline-secondary btn-sm">编辑</a>
|
||||
{{-- <form action="{{ admin_route('pages.destroy', [$page['id']]) }}" method="post" class="d-inline-block">
|
||||
{{ method_field('delete') }}
|
||||
{{ csrf_field() }}
|
||||
</form> --}}
|
||||
<button class="btn btn-outline-danger btn-sm delete-btn" type='button' data-id="{{ $page['id'] }}">删除</button>
|
||||
</td>
|
||||
</tr>
|
||||
<button class="btn btn-outline-danger btn-sm delete-btn" type='button'
|
||||
data-id="{{ $page['id'] }}">删除</button>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
@ -60,7 +67,7 @@
|
|||
btn: ['取消', '确定'],
|
||||
area: ['400px'],
|
||||
btn2: () => {
|
||||
$http.delete(`pages/${id}`).then((res) => {
|
||||
$http.delete(`pages/${id}`).then((res) => {
|
||||
layer.msg(res.message);
|
||||
window.location.reload();
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
$(document).on('click', '.quantity-wrap .right i', function(event) {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
|
||||
let input = $(this).parent().siblings('input')
|
||||
|
||||
if ($(this).hasClass('bi-chevron-up')) {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
<div class="col-12 col-md-9">@include('shared.steps', ['steps' => 1])</div>
|
||||
</div>
|
||||
|
||||
@dump($errors)
|
||||
{{-- @dump($errors) --}}
|
||||
|
||||
<div class="row mt-5" v-if="products.length">
|
||||
<div class="col-12 col-md-9">
|
||||
|
|
@ -38,11 +38,10 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="product, index in products" :key="index" @click="checkedCartTr(index)"
|
||||
:class="product.selected ? 'active' : ''">
|
||||
<tr v-for="product, index in products" :key="index" :class="product.selected ? 'active' : ''">
|
||||
<td>
|
||||
<div class="d-flex align-items-center p-image">
|
||||
<input class="form-check-input" type="checkbox" v-model="product.selected">
|
||||
<input class="form-check-input" type="checkbox" @change="checkedCartTr(index)" v-model="product.selected">
|
||||
<img :src="product.image" class="img-fluid">
|
||||
</div>
|
||||
</td>
|
||||
|
|
@ -144,7 +143,7 @@
|
|||
|
||||
quantityChange(quantity, cart_id) {
|
||||
const self = this;
|
||||
$http.put(`/carts/${cart_id}`, {quantity: quantity}).then((res) => {
|
||||
$http.put(`/carts/${cart_id}`, {quantity: quantity}, {hload: true}).then((res) => {
|
||||
this.setUpdateData(res);
|
||||
})
|
||||
},
|
||||
|
|
@ -158,7 +157,7 @@
|
|||
},
|
||||
|
||||
checkedCartTr(index) {
|
||||
this.products[index].selected = !this.products[index].selected;
|
||||
// this.products[index].selected = !this.products[index].selected;
|
||||
this.selectedBtnSelected();
|
||||
},
|
||||
|
||||
|
|
@ -166,7 +165,7 @@
|
|||
const self = this;
|
||||
const cart_ids = this.products.filter(e => e.selected).map(x => x.cart_id)
|
||||
|
||||
$http.post(`/carts/select`, {cart_ids: cart_ids}).then((res) => {
|
||||
$http.post(`/carts/select`, {cart_ids: cart_ids}, {hload: true}).then((res) => {
|
||||
this.setUpdateData(res);
|
||||
})
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue