作者 lyh

gx

@@ -147,7 +147,6 @@ class ComController extends BaseController @@ -147,7 +147,6 @@ class ComController extends BaseController
147 } 147 }
148 148
149 public function ceshi(){ 149 public function ceshi(){
150 - date_default_timezone_set('Asia/Shanghai');  
151 $arr = []; 150 $arr = [];
152 $inquiry_list = (new FormGlobalsoApi())->getInquiryList('https://demomark.globalso.com/','',1,100000000); 151 $inquiry_list = (new FormGlobalsoApi())->getInquiryList('https://demomark.globalso.com/','',1,100000000);
153 //总数 152 //总数
@@ -155,9 +154,11 @@ class ComController extends BaseController @@ -155,9 +154,11 @@ class ComController extends BaseController
155 //数据详情 154 //数据详情
156 $data = $inquiry_list['data']['data']; 155 $data = $inquiry_list['data']['data'];
157 // 获取上个月的开始时间 156 // 获取上个月的开始时间
158 - $startTime = Carbon::now()->subMonth()->startOfMonth(); 157 + date_default_timezone_set('Asia/Shanghai');
  158 + $currentDateTime = Carbon::now();
  159 + $startTime = $currentDateTime->subMonth()->startOfMonth();
159 // 获取上个月的结束时间 160 // 获取上个月的结束时间
160 - $endTime = Carbon::now()->subMonth()->endOfMonth(); 161 + $endTime = $currentDateTime->subMonth()->endOfMonth();
161 $arr['month_total'] = 0; 162 $arr['month_total'] = 0;
162 $countryArr = []; 163 $countryArr = [];
163 foreach ($data as $v){ 164 foreach ($data as $v){