You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
|
<?php
|
|
|
|
|
|
namespace App\Services\SupplyDemand;
|
|
|
|
|
|
use App\Models\Config;
|
|
|
|
|
|
class Settings
|
|
|
|
|
|
{
|
|
|
|
|
|
public const DEFAULTS = [
|
|
|
|
|
|
'detail_tip' => '该需求目前由系统代管,发布人将在开班并完成账号绑定后陆续回复。',
|
|
|
|
|
|
'chat_tip' => '目前为系统接管中,您的对接消息将被保存,待发布人完成账号绑定后处理。',
|
|
|
|
|
|
'sent_tip' => '对接信息已提交,请耐心等待回复。',
|
|
|
|
|
|
'sms_content' => '您在STBC小程序发布的对接需求有新的对接,请登录小程序,在“校友权益—供需对接—我的私信”中查看并回复。',
|
|
|
|
|
|
'sms_enabled' => '1', 'sms_interval_minutes' => '30', 'sms_daily_limit' => '3',
|
|
|
|
|
|
];
|
|
|
|
|
|
public static function all() {
|
|
|
|
|
|
$data = self::DEFAULTS;
|
|
|
|
|
|
foreach ($data as $k => $default) {
|
|
|
|
|
|
$value = Config::getValueByKey('supply_demand_' . $k);
|
|
|
|
|
|
if ($value !== null) $data[$k] = $value;
|
|
|
|
|
|
}
|
|
|
|
|
|
return $data;
|
|
|
|
|
|
}
|
|
|
|
|
|
public static function tips() { return array_intersect_key(self::all(), array_flip(['detail_tip', 'chat_tip', 'sent_tip'])); }
|
|
|
|
|
|
}
|