42 lines
2.0 KiB
PHP
42 lines
2.0 KiB
PHP
<?php
|
|
/**
|
|
* AKSRT_Admin_Schema_Shop_Shipping_Config section schema.
|
|
*
|
|
* @package AKSRT
|
|
*/
|
|
|
|
defined('ABSPATH') || exit;
|
|
|
|
class AKSRT_Admin_Schema_Shop_Shipping_Config {
|
|
|
|
public static function build(): array {
|
|
return [
|
|
'key' => 'shipping-config',
|
|
'title' => '物流配置',
|
|
'version' => '1.0.0',
|
|
'option_key' => 'aksrt_settings',
|
|
'groups' => [
|
|
['key' => 'address', 'title' => '收货地址', 'fields' => [
|
|
['key' => 'shop_manual_address', 'label' => '手动填写收货地址', 'type' => 'switch', 'default' => false],
|
|
]],
|
|
['key' => 'express', 'title' => '快递查询', 'fields' => [
|
|
['key' => 'shop_express_api_sdk', 'label' => '快递查询接口', 'type' => 'select', 'default' => 'kuaidi100', 'options' => [
|
|
['label' => '快递100', 'value' => 'kuaidi100'],
|
|
['label' => '阿里云', 'value' => 'aliyun'],
|
|
['label' => '快递鸟', 'value' => 'kdniao'],
|
|
]],
|
|
['key' => 'shop_express_query_interval', 'label' => '查询刷新间隔(分钟)', 'type' => 'number', 'default' => 60, 'min' => 30, 'max' => 240],
|
|
]],
|
|
['key' => 'credentials', 'title' => '接口凭据', 'fields' => [
|
|
['key' => 'shop_express_kdniao_opt', 'label' => '快递鸟凭据', 'type' => 'textarea', 'default' => ''],
|
|
['key' => 'shop_express_kuaidi100_opt', 'label' => '快递100凭据', 'type' => 'textarea', 'default' => ''],
|
|
['key' => 'shop_express_aliyun_opt', 'label' => '阿里云凭据', 'type' => 'textarea', 'default' => ''],
|
|
]],
|
|
['key' => 'companies', 'title' => '物流公司', 'fields' => [
|
|
['key' => 'shop_shipping_company', 'label' => '物流公司列表', 'type' => 'textarea', 'default' => ''],
|
|
]],
|
|
],
|
|
];
|
|
}
|
|
}
|