123456789101112131415161718192021222324252627282930 |
- <?php
- namespace App\Servers;
- use App\Models\Config;
- class ConfigServer
- {
- // 今日MUC价格
- static public function mucDay()
- {
- $muc = Config::where('key', 'muc')->first()->{'value'};
- $mucDay = sprintf('%.2f', ($muc + (mt_rand(0,15) * $muc / 1000)));
- Config::where('key', 'day_muc')->update(['value' => $mucDay]);
- Config::where('key', 'muc')->update(['value' => $mucDay]);
- }
- // 静态收益千分币(33 / 10000) - (50 / 10000)
- static public function jtDay()
- {
- $start = config('muc.day_jt_radio_start', '33');
- $end = config('muc.day_jt_radio_end', '50');
- $radio = mt_rand($start, $end);
- Config::where('key', 'day_jt_radio')->update(['value' => $radio]);
- }
- }
|