|
@@ -35,6 +35,7 @@ use App\Models\Template\BTemplateCom; |
|
@@ -35,6 +35,7 @@ use App\Models\Template\BTemplateCom; |
|
35
|
use App\Services\AmazonS3Service;
|
35
|
use App\Services\AmazonS3Service;
|
|
36
|
use App\Services\ProjectServer;
|
36
|
use App\Services\ProjectServer;
|
|
37
|
use App\Utils\EncryptUtils;
|
37
|
use App\Utils\EncryptUtils;
|
|
|
|
38
|
+use GuzzleHttp\Exception\GuzzleException;
|
|
38
|
use Illuminate\Console\Command;
|
39
|
use Illuminate\Console\Command;
|
|
39
|
use Illuminate\Support\Facades\DB;
|
40
|
use Illuminate\Support\Facades\DB;
|
|
40
|
use Illuminate\Support\Facades\Schema;
|
41
|
use Illuminate\Support\Facades\Schema;
|
|
@@ -56,6 +57,20 @@ class Demo extends Command |
|
@@ -56,6 +57,20 @@ class Demo extends Command |
|
56
|
*/
|
57
|
*/
|
|
57
|
protected $description = 'demo';
|
58
|
protected $description = 'demo';
|
|
58
|
|
59
|
|
|
|
|
60
|
+ public function handle(){
|
|
|
|
61
|
+ $domain = "https://www.xawellauto.com/";
|
|
|
|
62
|
+ $token = md5($domain.date("Y-m-d"));
|
|
|
|
63
|
+ $url = "https://form.globalso.com/api/external-interface/domain_con/15243d63ed5a5738?domain=$domain&token=$token&source=1,2,3,4&num=15";
|
|
|
|
64
|
+ try {
|
|
|
|
65
|
+ $res = http_get($url,['charset=utf-8']);
|
|
|
|
66
|
+ } catch (\Exception | GuzzleException $e) {
|
|
|
|
67
|
+ errorLog('提交询盘信息失败', $domain, $e);
|
|
|
|
68
|
+ return false;
|
|
|
|
69
|
+ }
|
|
|
|
70
|
+ echo date('Y-m-d H:i:s') . '数据:'.json_encode($res) . PHP_EOL;
|
|
|
|
71
|
+ return true;
|
|
|
|
72
|
+ }
|
|
|
|
73
|
+
|
|
59
|
// public function handle(){
|
74
|
// public function handle(){
|
|
60
|
// $projectModel = new Project();
|
75
|
// $projectModel = new Project();
|
|
61
|
// $list = $projectModel->list(['id'=>503]);
|
76
|
// $list = $projectModel->list(['id'=>503]);
|
|
@@ -89,26 +104,26 @@ class Demo extends Command |
|
@@ -89,26 +104,26 @@ class Demo extends Command |
|
89
|
// DB::disconnect('custom_mysql');
|
104
|
// DB::disconnect('custom_mysql');
|
|
90
|
// }
|
105
|
// }
|
|
91
|
// }
|
106
|
// }
|
|
92
|
- public function handle(){
|
|
|
|
93
|
- ProjectServer::useProject(503);
|
|
|
|
94
|
- $newsCate = new NewsCategory();
|
|
|
|
95
|
- $newsList = $newsCate->list();
|
|
|
|
96
|
- foreach ($newsList as $v){
|
|
|
|
97
|
- $data = [
|
|
|
|
98
|
- 'name'=>$v['name'],
|
|
|
|
99
|
- 'status'=>0,
|
|
|
|
100
|
- 'sort'=>$v['sort'],
|
|
|
|
101
|
- 'pid'=>$v['pid'],
|
|
|
|
102
|
- 'route'=>$v['alias'],
|
|
|
|
103
|
- 'project_id'=>503,
|
|
|
|
104
|
- 'operator_id'=>$v['operator_id'],
|
|
|
|
105
|
- 'create_id'=>1101,
|
|
|
|
106
|
- 'module_id'=>10,
|
|
|
|
107
|
- ];
|
|
|
|
108
|
- $moduleCateModel = new CustomModuleCategory();
|
|
|
|
109
|
- $id = $moduleCateModel->addReturnId($data);
|
|
|
|
110
|
- RouteMap::setRoute($v['alias'],RouteMap::SOURCE_MODULE_CATE,$id,503);
|
|
|
|
111
|
- }
|
|
|
|
112
|
- DB::disconnect('custom_mysql');
|
|
|
|
113
|
- }
|
107
|
+// public function handle(){
|
|
|
|
108
|
+// ProjectServer::useProject(503);
|
|
|
|
109
|
+// $newsCate = new NewsCategory();
|
|
|
|
110
|
+// $newsList = $newsCate->list();
|
|
|
|
111
|
+// foreach ($newsList as $v){
|
|
|
|
112
|
+// $data = [
|
|
|
|
113
|
+// 'name'=>$v['name'],
|
|
|
|
114
|
+// 'status'=>0,
|
|
|
|
115
|
+// 'sort'=>$v['sort'],
|
|
|
|
116
|
+// 'pid'=>$v['pid'],
|
|
|
|
117
|
+// 'route'=>$v['alias'],
|
|
|
|
118
|
+// 'project_id'=>503,
|
|
|
|
119
|
+// 'operator_id'=>$v['operator_id'],
|
|
|
|
120
|
+// 'create_id'=>1101,
|
|
|
|
121
|
+// 'module_id'=>10,
|
|
|
|
122
|
+// ];
|
|
|
|
123
|
+// $moduleCateModel = new CustomModuleCategory();
|
|
|
|
124
|
+// $id = $moduleCateModel->addReturnId($data);
|
|
|
|
125
|
+// RouteMap::setRoute($v['alias'],RouteMap::SOURCE_MODULE_CATE,$id,503);
|
|
|
|
126
|
+// }
|
|
|
|
127
|
+// DB::disconnect('custom_mysql');
|
|
|
|
128
|
+// }
|
|
114
|
} |
129
|
} |