toArray(), null, 'key'); Cache::tag('cache')->set($cacheKey, $data); } return array_merge_multiple($self->defaultData(), $data); } /** * 获取设置项信息 * @param $key * @return null|static * @throws \think\exception\DbException */ public static function detail($key) { return static::get(compact('key')); } /** * 默认配置 * @return array */ public function defaultData() { return [ 'basic' => [ 'key' => 'basic', 'describe' => '基础设置', 'values' => [ // 是否开启分销 'is_dealer' => '0', 'order' => [ // 秒杀订单未支付n分钟后自动关闭 'order_close' => '10', ] ] ] ]; } }