Merge branch 'dev' of https://guangdagit.com/beike/beikeshop into dev
This commit is contained in:
commit
c07de5c130
|
|
@ -3,6 +3,7 @@ APP_ENV=local
|
||||||
APP_KEY=
|
APP_KEY=
|
||||||
APP_DEBUG=true
|
APP_DEBUG=true
|
||||||
APP_URL=http://localhost
|
APP_URL=http://localhost
|
||||||
|
APP_TIMEZONE=RPC
|
||||||
|
|
||||||
LOG_CHANNEL=stack
|
LOG_CHANNEL=stack
|
||||||
LOG_DEPRECATIONS_CHANNEL=null
|
LOG_DEPRECATIONS_CHANNEL=null
|
||||||
|
|
@ -54,4 +55,4 @@ MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
||||||
|
|
||||||
# 前端热更新, PROXY: vhost or path, HOST: 多设备实时
|
# 前端热更新, PROXY: vhost or path, HOST: 多设备实时
|
||||||
MIX_PROXY=beikeshop.test
|
MIX_PROXY=beikeshop.test
|
||||||
MIX_HOST=192.168.0.122
|
MIX_HOST=192.168.0.122
|
||||||
|
|
|
||||||
|
|
@ -97,12 +97,12 @@ class PagesController
|
||||||
*
|
*
|
||||||
* @param Request $request
|
* @param Request $request
|
||||||
* @param int $pageId
|
* @param int $pageId
|
||||||
* @return RedirectResponse
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function destroy(Request $request, int $pageId)
|
public function destroy(Request $request, int $pageId): array
|
||||||
{
|
{
|
||||||
PageRepo::deleteById($pageId);
|
PageRepo::deleteById($pageId);
|
||||||
return redirect()->to(admin_route('pages.index'));
|
return json_success(trans('common.deleted_success'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ class CustomerResource extends JsonResource
|
||||||
'id' => $this->id,
|
'id' => $this->id,
|
||||||
'name' => $this->name,
|
'name' => $this->name,
|
||||||
'email' => $this->email,
|
'email' => $this->email,
|
||||||
'status' => $this->status ? '启用' : '禁用',
|
'status' => $this->status,
|
||||||
'avatar' => image_resize($this->avatar),
|
'avatar' => image_resize($this->avatar),
|
||||||
'from' => $this->from,
|
'from' => $this->from,
|
||||||
'customer_group_name' => $this->customerGroup->description->name ?? '',
|
'customer_group_name' => $this->customerGroup->description->name ?? '',
|
||||||
|
|
|
||||||
|
|
@ -93,6 +93,12 @@ class OrderRepo
|
||||||
$builder->where('created_at', '<', $end);
|
$builder->where('created_at', '<', $end);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$status = $filters['status'] ?? '';
|
||||||
|
if ($status) {
|
||||||
|
$builder->where('status', $status);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return $builder;
|
return $builder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,11 @@ class OrderController extends Controller
|
||||||
*/
|
*/
|
||||||
public function index(Request $request): View
|
public function index(Request $request): View
|
||||||
{
|
{
|
||||||
$orders = OrderRepo::getListByCustomer(current_customer());
|
$filters = [
|
||||||
|
'customer' => current_customer(),
|
||||||
|
'status' => $request->get('status')
|
||||||
|
];
|
||||||
|
$orders = OrderRepo::filterOrders($filters);
|
||||||
$data = [
|
$data = [
|
||||||
'orders' => OrderList::collection($orders),
|
'orders' => OrderList::collection($orders),
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ return [
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'debug' => (bool) env('APP_DEBUG', false),
|
'debug' => (bool)env('APP_DEBUG', false),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
@ -67,7 +67,7 @@ return [
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'timezone' => 'UTC',
|
'timezone' => env('APP_TIMEZONE', 'UTC'),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -101,8 +101,8 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4">
|
<div class="col-4">
|
||||||
<el-form-item prop="city_id">
|
<el-form-item prop="city">
|
||||||
<el-input v-model="dialogAddress.form.city_id" placeholder="输入 city"></el-input>
|
<el-input v-model="dialogAddress.form.city" placeholder="输入城市"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -158,7 +158,7 @@
|
||||||
country_id: @json((int)system_setting('base.country_id')),
|
country_id: @json((int)system_setting('base.country_id')),
|
||||||
zipcode: '',
|
zipcode: '',
|
||||||
zone_id: '',
|
zone_id: '',
|
||||||
city_id: '',
|
city: '',
|
||||||
address_1: '',
|
address_1: '',
|
||||||
address_2: '',
|
address_2: '',
|
||||||
}
|
}
|
||||||
|
|
@ -193,9 +193,9 @@
|
||||||
message: '请选择省份',
|
message: '请选择省份',
|
||||||
trigger: 'blur'
|
trigger: 'blur'
|
||||||
}, ],
|
}, ],
|
||||||
city_id: [{
|
city: [{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请填写 city',
|
message: '请填写城市',
|
||||||
trigger: 'blur'
|
trigger: 'blur'
|
||||||
}, ],
|
}, ],
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,11 +29,11 @@
|
||||||
<td>{{ $page['updated_at'] }}</td>
|
<td>{{ $page['updated_at'] }}</td>
|
||||||
<td class="text-end">
|
<td class="text-end">
|
||||||
<a href="{{ admin_route('pages.edit', [$page['id']]) }}" class="btn btn-outline-secondary btn-sm">编辑</a>
|
<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">
|
{{-- <form action="{{ admin_route('pages.destroy', [$page['id']]) }}" method="post" class="d-inline-block">
|
||||||
{{ method_field('delete') }}
|
{{ method_field('delete') }}
|
||||||
{{ csrf_field() }}
|
{{ csrf_field() }}
|
||||||
<button class="btn btn-outline-danger btn-sm">删除</button>
|
</form> --}}
|
||||||
</form>
|
<button class="btn btn-outline-danger btn-sm delete-btn" type='button' data-id="{{ $page['id'] }}">删除</button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
@ -45,3 +45,24 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
|
@push('footer')
|
||||||
|
<script>
|
||||||
|
$('.delete-btn').click(function(event) {
|
||||||
|
const id = $(this).data('id');
|
||||||
|
const self = $(this);
|
||||||
|
|
||||||
|
layer.confirm('确定要删除角色吗?', {
|
||||||
|
title: "提示",
|
||||||
|
btn: ['取消', '确定'],
|
||||||
|
area: ['400px'],
|
||||||
|
btn2: () => {
|
||||||
|
$http.delete(`pages/${id}`).then((res) => {
|
||||||
|
layer.msg(res.message);
|
||||||
|
window.location.reload();
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
@endpush
|
||||||
|
|
|
||||||
|
|
@ -152,13 +152,13 @@
|
||||||
<th v-for="(variant, index) in form.variables" :key="'pv-header-' + index">
|
<th v-for="(variant, index) in form.variables" :key="'pv-header-' + index">
|
||||||
@{{ variant.name[current_language_code] || 'No name' }}
|
@{{ variant.name[current_language_code] || 'No name' }}
|
||||||
</th>
|
</th>
|
||||||
<th width="106px">image</th>
|
<th width="106px">图片</th>
|
||||||
<th>model</th>
|
<th>型号</th>
|
||||||
<th>sku</th>
|
<th>sku</th>
|
||||||
<th>price</th>
|
<th>价格</th>
|
||||||
<th>orgin price</th>
|
<th>原价</th>
|
||||||
<th>cost price</th>
|
<th>成本价</th>
|
||||||
<th>quantity</th>
|
<th>数量</th>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="(sku, skuIndex) in form.skus" :key="skuIndex">
|
<tr v-for="(sku, skuIndex) in form.skus" :key="skuIndex">
|
||||||
|
|
@ -207,12 +207,12 @@
|
||||||
|
|
||||||
<template v-if="!editing.isVariable">
|
<template v-if="!editing.isVariable">
|
||||||
<input type="hidden" value="{{ old('skus.0.image', $product->skus[0]->image ?? '') }}" name="skus[0][image]">
|
<input type="hidden" value="{{ old('skus.0.image', $product->skus[0]->image ?? '') }}" name="skus[0][image]">
|
||||||
<x-admin-form-input name="skus[0][model]" title="model" :value="old('skus.0.model', $product->skus[0]->model ?? '')" />
|
<x-admin-form-input name="skus[0][model]" title="型号" :value="old('skus.0.model', $product->skus[0]->model ?? '')" />
|
||||||
<x-admin-form-input name="skus[0][sku]" title="sku" :value="old('skus.0.sku', $product->skus[0]->sku ?? '')" />
|
<x-admin-form-input name="skus[0][sku]" title="sku" :value="old('skus.0.sku', $product->skus[0]->sku ?? '')" />
|
||||||
<x-admin-form-input name="skus[0][price]" title="price" :value="old('skus.0.price', $product->skus[0]->price ?? '')" />
|
<x-admin-form-input name="skus[0][price]" title="价格" :value="old('skus.0.price', $product->skus[0]->price ?? '')" />
|
||||||
<x-admin-form-input name="skus[0][origin_price]" title="origin_price" :value="old('skus.0.origin_price', $product->skus[0]->origin_price ?? '')" />
|
<x-admin-form-input name="skus[0][origin_price]" title="原价" :value="old('skus.0.origin_price', $product->skus[0]->origin_price ?? '')" />
|
||||||
<x-admin-form-input name="skus[0][cost_price]" title="cost_price" :value="old('skus.0.cost_price', $product->skus[0]->cost_price ?? '')" />
|
<x-admin-form-input name="skus[0][cost_price]" title="成本价" :value="old('skus.0.cost_price', $product->skus[0]->cost_price ?? '')" />
|
||||||
<x-admin-form-input name="skus[0][quantity]" title="quantity" :value="old('skus.0.quantity', $product->skus[0]->quantity ?? '')" />
|
<x-admin-form-input name="skus[0][quantity]" title="数量" :value="old('skus.0.quantity', $product->skus[0]->quantity ?? '')" />
|
||||||
<input type="hidden" name="skus[0][variants]" placeholder="variants" value="">
|
<input type="hidden" name="skus[0][variants]" placeholder="variants" value="">
|
||||||
<input type="hidden" name="skus[0][position]" placeholder="position" value="0">
|
<input type="hidden" name="skus[0][position]" placeholder="position" value="0">
|
||||||
<input type="hidden" name="skus[0][is_default]" placeholder="is_default" value="1">
|
<input type="hidden" name="skus[0][is_default]" placeholder="is_default" value="1">
|
||||||
|
|
|
||||||
|
|
@ -24,9 +24,9 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<p class="lead">{{ __('shop/login.already') }}</p>
|
<p class="lead">{{ __('shop/login.already') }}</p>
|
||||||
<p class="text-muted">Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis
|
{{-- <p class="text-muted">Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis
|
||||||
egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit
|
egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit
|
||||||
amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p> --}}
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<el-form-item label="{{ __('shop/login.email') }}" prop="email">
|
<el-form-item label="{{ __('shop/login.email') }}" prop="email">
|
||||||
|
|
@ -53,10 +53,10 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<p class="lead">{{ __('shop/login.not_already') }}</p>
|
<p class="lead">{{ __('shop/login.not_already') }}</p>
|
||||||
<p class="text-muted">With registration with us new world of fashion, fantastic discounts and much more opens to
|
{{-- <p class="text-muted">With registration with us new world of fashion, fantastic discounts and much more opens to
|
||||||
you! The whole process will not take you more than a minute!</p>
|
you! The whole process will not take you more than a minute!</p>
|
||||||
<p class="text-muted">If you have any questions, please feel free to <a href="/contact">contact us</a>, our
|
<p class="text-muted">If you have any questions, please feel free to <a href="/contact">contact us</a>, our
|
||||||
customer service center is working for you 24/7.</p>
|
customer service center is working for you 24/7.</p> --}}
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<el-form ref="registerForm" :model="registerForm" :rules="registeRules">
|
<el-form ref="registerForm" :model="registerForm" :rules="registeRules">
|
||||||
|
|
|
||||||
|
|
@ -74,11 +74,15 @@
|
||||||
|
|
||||||
<div class="col-sm-6 mb-4">
|
<div class="col-sm-6 mb-4">
|
||||||
<label class="form-label">退换原因</label>
|
<label class="form-label">退换原因</label>
|
||||||
<select class="form-select" name="rma_reason_id">
|
<select class="form-select {{ $errors->has('rma_reason_id') ? 'is-invalid' : '' }}" name="rma_reason_id">
|
||||||
@foreach ($reasons as $item)
|
@foreach ($reasons as $item)
|
||||||
<option value="{{ $item['id'] }}" {{ $item['id'] == old('opened', '') ? 'selected': '' }}>{{ $item['name'] }}</option>
|
<option value="{{ $item['id'] }}" {{ $item['id'] == old('opened', '') ? 'selected': '' }}>{{ $item['name'] }}</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@if ($errors->has('rma_reason_id'))
|
||||||
|
<span class="invalid-feedback" role="alert">{{ $errors->first('rma_reason_id') }}</span>
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12 "></div>
|
<div class="col-12 "></div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue