wip
This commit is contained in:
parent
0c74fc87eb
commit
9fe3037f6d
|
|
@ -10,13 +10,17 @@ class Select extends Component
|
|||
public string $value;
|
||||
public string $title;
|
||||
public array $options;
|
||||
public string $key;
|
||||
public string $label;
|
||||
|
||||
public function __construct(string $name, string $value, string $title, array $options)
|
||||
public function __construct(string $name, string $value, string $title, array $options, ?string $key = 'value', ?string $label = 'label')
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->title = $title;
|
||||
$this->value = $value;
|
||||
$this->options = $options;
|
||||
$this->key = $key;
|
||||
$this->label = $label;
|
||||
}
|
||||
|
||||
public function render()
|
||||
|
|
|
|||
|
|
@ -319,6 +319,7 @@
|
|||
|
||||
.help-text {
|
||||
color: #B2B2B2;
|
||||
margin-top: 4px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -620,7 +620,7 @@ footer .footer-bottom {
|
|||
margin-left: -5px;
|
||||
}
|
||||
.product-wrap .image .button-wrap button:hover {
|
||||
background-color: rgba(0, 0, 0, 0.726);
|
||||
background-color: rgb(70, 70, 70);
|
||||
}
|
||||
.product-wrap .image .button-wrap button:hover span {
|
||||
opacity: 1;
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@
|
|||
|
||||
.help-text {
|
||||
color: #B2B2B2;
|
||||
margin-top: 4px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<div class="row g-3 mb-3">
|
||||
<label for="" class="wp-200 col-form-label text-end opacity-75">{{ $title ?? '' }}</label>
|
||||
<label for="" class="wp-200 col-form-label text-end">{{ $title ?? '' }}</label>
|
||||
<div class="col-auto wp-200-">
|
||||
{{ $slot }}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<x-admin::form.row :title="$title">
|
||||
<select class="form-select wp-200 me-3" name="{{ $name }}">
|
||||
@foreach ($options as $option)
|
||||
<option value="{{ $option['value'] }}" {{ $option['value'] == $value ? 'selected': '' }}>{{ $option['label'] }}</option>
|
||||
<option value="{{ $option[$key] }}" {{ $option[$key] == $value ? 'selected': '' }}>{{ $option[$label] }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
{{ $slot }}
|
||||
|
|
|
|||
|
|
@ -204,6 +204,7 @@
|
|||
const ordersChart = new Chart(orders, {
|
||||
type: 'line',
|
||||
data: {
|
||||
// labels: Array.from({length: 30}, (v, k) => k + 1),
|
||||
labels: {!! $order_trends['latest_month']->pluck('date') !!},
|
||||
datasets: [{
|
||||
// label: ["订单数"],
|
||||
|
|
@ -211,6 +212,7 @@
|
|||
backgroundColor : gradient, // Put the gradient here as a fill color
|
||||
borderColor : "#4da4f9",
|
||||
borderWidth: 2,
|
||||
// data: Array.from({length: 30}, () => Math.floor(Math.random() * 23.7)),
|
||||
data: {!! $order_trends['latest_month']->pluck('total') !!},
|
||||
// borderDash: [],
|
||||
responsive: true,
|
||||
|
|
|
|||
|
|
@ -21,83 +21,39 @@
|
|||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<div class="text-muted font-size-12 lh-base">默认国家设置</div>
|
||||
<div class="help-text font-size-12 lh-base">默认国家设置</div>
|
||||
</div>
|
||||
<div>
|
||||
<select class="form-select wp-200 zones-select" name="zone_id" aria-label="Default select example"></select>
|
||||
<div class="text-muted font-size-12 lh-base">默认省份设置</div>
|
||||
<div class="help-text font-size-12 lh-base">默认省份设置</div>
|
||||
</div>
|
||||
</div>
|
||||
</x-admin::form.row>
|
||||
|
||||
<x-admin::form.row title="默认语言">
|
||||
<select class="form-select wp-200 me-3" name="locale" aria-label="Default select example">
|
||||
@foreach ($languages as $language)
|
||||
<option
|
||||
value="{{ $language->code }}"
|
||||
{{ $language->code == system_setting('base.locale', 'zh_cn') ? 'selected': '' }}>
|
||||
{{ $language->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<div class="text-muted font-size-12 lh-base">默认语言设置</div>
|
||||
</x-admin::form.row>
|
||||
<x-admin-form-select title="默认语言" name="locale" :value="old('locale', system_setting('base.locale', 'zh_cn'))" :options="$languages->toArray()" key="code" label="name">
|
||||
<div class="help-text font-size-12 lh-base">默认语言设置</div>
|
||||
</x-admin-form-select>
|
||||
|
||||
<x-admin::form.row title="默认货币">
|
||||
<select class="form-select wp-200 me-3" name="currency" aria-label="Default select example">
|
||||
@foreach ($currencies as $currency)
|
||||
<option
|
||||
value="{{ $currency->code }}"
|
||||
{{ $currency->code == system_setting('base.currency', 'USD') ? 'selected': '' }}>
|
||||
{{ $currency->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<div class="text-muted font-size-12 lh-base">默认货币设置</div>
|
||||
</x-admin::form.row>
|
||||
<x-admin-form-select title="默认货币" name="currency" :value="old('currency', system_setting('base.currency', 'USD'))" :options="$currencies->toArray()" key="code" label="name">
|
||||
<div class="help-text font-size-12 lh-base">默认货币设置</div>
|
||||
</x-admin-form-select>
|
||||
|
||||
<x-admin-form-input name="admin_name" title="后台目录" value="{{ old('admin_name', system_setting('base.admin_name', 'admin')) }}">
|
||||
<div class="text-muted font-size-12 lh-base">管理后台目录,默认为admin</div>
|
||||
<div class="help-text font-size-12 lh-base">管理后台目录,默认为admin</div>
|
||||
</x-admin-form-input>
|
||||
|
||||
{{-- <x-admin::form.row title="模版主题">
|
||||
<select class="form-select wp-200 me-3" name="theme" aria-label="Default select example">
|
||||
@foreach ($themes as $theme)
|
||||
<option
|
||||
value="{{ $theme['value'] }}"
|
||||
{{ $theme['value'] == system_setting('base.theme', 'default') ? 'selected': '' }}>
|
||||
{{ $theme['label'] }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<div class="text-muted font-size-12 lh-base">主题模板选择</div>
|
||||
</x-admin::form.row> --}}
|
||||
|
||||
<x-admin-form-select title="模版主题" name="theme" :value="old('theme', system_setting('base.theme', 'default'))" :options="$themes">
|
||||
<div class="text-muted font-size-12 lh-base">主题模板选择</div>
|
||||
<div class="help-text font-size-12 lh-base">主题模板选择</div>
|
||||
</x-admin-form-select>
|
||||
|
||||
<x-admin-form-switch name="tax" title="启用税费" value="{{ old('tax', system_setting('base.tax', '0')) }}">
|
||||
<div class="text-muted font-size-12 lh-base">是否启用税费计算</div>
|
||||
<div class="help-text font-size-12 lh-base">是否启用税费计算</div>
|
||||
</x-admin-form-switch>
|
||||
|
||||
<x-admin-form-select title="税费地址" name="tax_address" :value="old('tax_address', system_setting('base.address', 'shipping'))" :options="$tax_address">
|
||||
<div class="text-muted font-size-12 lh-base">按什么地址计算税费</div>
|
||||
<div class="help-text font-size-12 lh-base">按什么地址计算税费</div>
|
||||
</x-admin-form-select>
|
||||
|
||||
{{-- <x-admin::form.row title="税费地址">
|
||||
<select class="form-select wp-200 me-3" name="tax_address" aria-label="Default select example">
|
||||
@foreach ($tax_address as $address)
|
||||
<option
|
||||
value="{{ $address['value'] }}"
|
||||
{{ $address['value'] == system_setting('base.address', 'shipping') ? 'selected': '' }}>
|
||||
{{ $address['label'] }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<div class="text-muted font-size-12 lh-base">按什么地址计算税费</div>
|
||||
</x-admin::form.row> --}}
|
||||
|
||||
<x-admin::form.row title="">
|
||||
<button type="submit" class="btn btn-primary mt-4">提交</button>
|
||||
</x-admin::form.row>
|
||||
|
|
@ -113,7 +69,6 @@
|
|||
// 获取身份
|
||||
const getZones = (country_id) => {
|
||||
$http.get(`countries/${country_id}/zones`).then((res) => {
|
||||
console.log(res);
|
||||
if (res.data.zones.length > 0) {
|
||||
$('select[name="zone_id"]').html('');
|
||||
res.data.zones.forEach((zone) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue