Commit 85c5f324 authored by hangjun83's avatar hangjun83

乐妍

parent 3e46a3b2
......@@ -75,6 +75,17 @@ class ThridApiPlatformSeeder extends Seeder
'platform_status' => '1',
'platform_token' => '',
],
[
'platform_name' => 'leyan',
'platform_title' => '乐研',
'platform_url' => 'http://update.leyan.com.cn',
'platform_desc' => '',
'platform_icon' => '',
'platform_params' => '',
'platform_type' => 'third',
'platform_status' => '1',
'platform_token' => '',
],
];
......@@ -134,15 +145,24 @@ class ThridApiPlatformSeeder extends Seeder
],
]);
break;
case "leyan" :
$platform['platform_params'] = json_encode([
'username' => 'chemmall',
'password' => 'chemmall01',
]);
break;
}
//$platform['platform_type'] = 'third';
$platform['platform_status'] = '1';
$platform['platform_token'] = $this->randomFromDevice(16);
$platform['created_at'] = date('Y-m-d H:i:s',time());
$platform['updated_at'] = date('Y-m-d H:i:s',time());
$thirdApiPlatformRepo->updateOrCreate(['platform_name' => $platform['platform_name']],$platform);
$result = $thirdApiPlatformRepo->findWhere(['platform_name' => $platform['platform_name']]);
$result = $result->toArray();
if(!$result){
//$platform['platform_type'] = 'third';
$platform['platform_status'] = '1';
$platform['platform_token'] = $this->randomFromDevice(16);
$platform['created_at'] = date('Y-m-d H:i:s',time());
$platform['updated_at'] = date('Y-m-d H:i:s',time());
$thirdApiPlatformRepo->updateOrCreate(['platform_name' => $platform['platform_name']],$platform);
}
}
DB::commit();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment