118 lines
4.1 KiB
PHP
118 lines
4.1 KiB
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use App\Models\Order;
|
|
use App\Models\{Setting, ShareBg};
|
|
use Illuminate\Database\Seeder;
|
|
|
|
class AppSettingSeeder extends Seeder
|
|
{
|
|
/**
|
|
* Run the database seeds.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function run()
|
|
{
|
|
Setting::truncate();
|
|
Setting::truncate();
|
|
foreach ([
|
|
'app'=> [
|
|
'value'=> [
|
|
'app_name' => '子春生',
|
|
'ios_link' => '',
|
|
'android_link' => '',
|
|
'merchant_link' => '',
|
|
'order_payment_expires_at' => 1800,
|
|
'order_auto_complete_days' => 7,
|
|
'sale_after_expire_days' => 7,
|
|
'sign_click_points' => 5,
|
|
'sign_click_continue' => 7,
|
|
'sign_click_continue_points' => 10,
|
|
'article_help' => 1,
|
|
'article_agreement' => 2,
|
|
'article_health' => 3,
|
|
'article_about_us' => env('APP_URL', '').'/h5/articles/1',
|
|
'article_user_promotion_agreement' => env('APP_URL', '').'/h5/articles/2',
|
|
'article_user_hide_agreement' => env('APP_URL', '').'/h5/articles/3',
|
|
'invite_uri' => '',
|
|
'search_hot_keys' => '搜索热词,分词1,分词2,分词3',
|
|
],
|
|
'remarks' => '系统配置',
|
|
],
|
|
'withdraw' => [
|
|
'value'=>[
|
|
'threshold_amount'=>0,
|
|
'rate'=>'0.00',
|
|
],
|
|
],
|
|
'ios' => [
|
|
'value'=> [
|
|
'v'=>0,
|
|
'is_verify'=> false,
|
|
'wallet_show'=> true,
|
|
'pay_way' => [
|
|
Order::PAY_WAY_WXPAY,
|
|
Order::PAY_WAY_ALIPAY,
|
|
Order::PAY_WAY_WALLET,
|
|
Order::PAY_WAY_BALANCE,
|
|
],
|
|
],
|
|
'remarks' => 'Ios配置',
|
|
],
|
|
'android' => [
|
|
'value'=> [
|
|
'v'=>0,
|
|
'is_verify'=> false,
|
|
'wallet_show'=> true,
|
|
'pay_way' => [
|
|
Order::PAY_WAY_WXPAY,
|
|
Order::PAY_WAY_ALIPAY,
|
|
Order::PAY_WAY_WALLET,
|
|
Order::PAY_WAY_BALANCE,
|
|
],
|
|
],
|
|
'remarks' => 'Android配置',
|
|
],
|
|
'kuaidi100' => [
|
|
'value' => [
|
|
'is_use' => true,
|
|
'callback_uri' => env('APP_URL', '').'/callback/kuaidi100',
|
|
'app_key' => 'BTvgbjti4727',
|
|
'customer' => '064109188EC4D85DA655DFC342144C6A',
|
|
'secret' => '1bd287d1981749f2a30ea74cac0ab99c',
|
|
'userid' => 'ec0b6ec7729d4f22824cfd3c519dd45b',
|
|
],
|
|
'remarks' => '快递100配置',
|
|
],
|
|
'unipush' => [
|
|
'value' =>[
|
|
'is_use' => true,
|
|
'mall_app_id' => 'iikmCoESID8bC1LhOPG1r8',
|
|
'mall_app_key' => 'JX33P0wP8bAQprI953hpN6',
|
|
'mall_app_secret' => 'a3u3B6lXjq6fPTBlOGiOc9',
|
|
'mall_master_secret' => 'MAxmqomwo597xJeDuMCvx1',
|
|
'merchant_is_use' => true,
|
|
'merchant_app_id' => '5bvlKxO8RK7lCTc9DINcx5',
|
|
'merchant_app_key' => 'qrPLowCchvArbpMKoPlMV1',
|
|
'merchant_app_secret' => '5k36Jo49EAAGBDvR0cFqG3',
|
|
'merchant_master_secret' => 'HCB87uFoF18iWsKHf7VY57',
|
|
],
|
|
'remarks' => '个推配置',
|
|
]
|
|
] as $key => $values) {
|
|
Setting::firstOrCreate(['key' => $key], $values);
|
|
}
|
|
|
|
// 分享背景图
|
|
ShareBg::create([
|
|
'image' => '',
|
|
'x' => 0,
|
|
'y' => 0,
|
|
'size' => 0,
|
|
'is_use' => 1,
|
|
]);
|
|
}
|
|
}
|