Merge branch 'master' of http://47.244.231.31:8099/zhl/globalso-v6
正在显示
13 个修改的文件
包含
63 行增加
和
62 行删除
| @@ -106,7 +106,7 @@ class Count extends Command | @@ -106,7 +106,7 @@ class Count extends Command | ||
| 106 | * @method :post | 106 | * @method :post |
| 107 | * @time :2023/6/14 15:40 | 107 | * @time :2023/6/14 15:40 |
| 108 | */ | 108 | */ |
| 109 | - public function pv_num($yesterday,$domain){ | 109 | + public function pv_num($yesterday){ |
| 110 | $pv = DB::connection('custom_mysql')->table('gl_customer_visit_item')->whereDate('updated_date', $yesterday)->count(); | 110 | $pv = DB::connection('custom_mysql')->table('gl_customer_visit_item')->whereDate('updated_date', $yesterday)->count(); |
| 111 | return $pv; | 111 | return $pv; |
| 112 | } | 112 | } |
| @@ -117,7 +117,7 @@ class Count extends Command | @@ -117,7 +117,7 @@ class Count extends Command | ||
| 117 | * @method :post | 117 | * @method :post |
| 118 | * @time :2023/6/14 15:40 | 118 | * @time :2023/6/14 15:40 |
| 119 | */ | 119 | */ |
| 120 | - public function ip_num($yesterday,$domain){ | 120 | + public function ip_num($yesterday){ |
| 121 | $ip = DB::connection('custom_mysql')->table('gl_customer_visit')->whereDate('updated_date', $yesterday)->count(); | 121 | $ip = DB::connection('custom_mysql')->table('gl_customer_visit')->whereDate('updated_date', $yesterday)->count(); |
| 122 | return $ip; | 122 | return $ip; |
| 123 | } | 123 | } |
| @@ -107,7 +107,7 @@ class CountDate extends Command | @@ -107,7 +107,7 @@ class CountDate extends Command | ||
| 107 | * @method :post | 107 | * @method :post |
| 108 | * @time :2023/6/14 15:40 | 108 | * @time :2023/6/14 15:40 |
| 109 | */ | 109 | */ |
| 110 | - public function pv_num($yesterday,$domain){ | 110 | + public function pv_num($yesterday){ |
| 111 | $pv = DB::connection('custom_mysql')->table('gl_customer_visit_item')->whereDate('updated_date', $yesterday)->count(); | 111 | $pv = DB::connection('custom_mysql')->table('gl_customer_visit_item')->whereDate('updated_date', $yesterday)->count(); |
| 112 | return $pv; | 112 | return $pv; |
| 113 | } | 113 | } |
| @@ -118,7 +118,7 @@ class CountDate extends Command | @@ -118,7 +118,7 @@ class CountDate extends Command | ||
| 118 | * @method :post | 118 | * @method :post |
| 119 | * @time :2023/6/14 15:40 | 119 | * @time :2023/6/14 15:40 |
| 120 | */ | 120 | */ |
| 121 | - public function ip_num($yesterday,$domain){ | 121 | + public function ip_num($yesterday){ |
| 122 | $ip = DB::connection('custom_mysql')->table('gl_customer_visit')->whereDate('updated_date', $yesterday)->count(); | 122 | $ip = DB::connection('custom_mysql')->table('gl_customer_visit')->whereDate('updated_date', $yesterday)->count(); |
| 123 | return $ip; | 123 | return $ip; |
| 124 | } | 124 | } |
| @@ -179,9 +179,9 @@ class RelayInquiry extends Command | @@ -179,9 +179,9 @@ class RelayInquiry extends Command | ||
| 179 | foreach ($inquiry as $key=>$val) { | 179 | foreach ($inquiry as $key=>$val) { |
| 180 | $this->output('询盘ID:' . $val->id); | 180 | $this->output('询盘ID:' . $val->id); |
| 181 | //询盘时间超过2小时 就不处理了 | 181 | //询盘时间超过2小时 就不处理了 |
| 182 | - if(time() - strtotime($val->inquiry_date) > 7200){ | 182 | + if(time() - strtotime($val->inquiry_date) > 259200){ |
| 183 | $val->status = ReInquiryForm::STATUS_FORGO; | 183 | $val->status = ReInquiryForm::STATUS_FORGO; |
| 184 | - $val->remark = '超时2小时未处理!'; | 184 | + $val->remark = '超时72小时未处理!'; |
| 185 | $val->save(); | 185 | $val->save(); |
| 186 | continue; | 186 | continue; |
| 187 | } | 187 | } |
| @@ -355,7 +355,8 @@ class RelayInquiry extends Command | @@ -355,7 +355,8 @@ class RelayInquiry extends Command | ||
| 355 | // 推送消息 消息内容小于10个字符, 使用内置询盘内容 | 355 | // 推送消息 消息内容小于10个字符, 使用内置询盘内容 |
| 356 | $message = $form->message; | 356 | $message = $form->message; |
| 357 | $message_id = 0; | 357 | $message_id = 0; |
| 358 | - if (strlen($message) < 10) { | 358 | + // 通过字符数量区分, 改成完全获取内置询盘内容 |
| 359 | + if (true) { | ||
| 359 | $use_ids = ReInquiryDetail::where(['re_website' => $domain])->where('status', '<>', ReInquiryDetail::STATUS_FAIL)->pluck('text_id')->toArray(); | 360 | $use_ids = ReInquiryDetail::where(['re_website' => $domain])->where('status', '<>', ReInquiryDetail::STATUS_FAIL)->pluck('text_id')->toArray(); |
| 360 | $text = ReInquiryText::whereNotIn('id', $use_ids)->where('status', ReInquiryText::STATUS_USABLE)->inRandomOrder()->first(); | 361 | $text = ReInquiryText::whereNotIn('id', $use_ids)->where('status', ReInquiryText::STATUS_USABLE)->inRandomOrder()->first(); |
| 361 | $message = $text->content; | 362 | $message = $text->content; |
| @@ -16,6 +16,7 @@ use App\Models\HomeCount\MonthCount; | @@ -16,6 +16,7 @@ use App\Models\HomeCount\MonthCount; | ||
| 16 | use App\Models\Inquiry\InquiryFormData; | 16 | use App\Models\Inquiry\InquiryFormData; |
| 17 | use App\Models\Project\Project; | 17 | use App\Models\Project\Project; |
| 18 | use App\Models\Visit\Visit; | 18 | use App\Models\Visit\Visit; |
| 19 | +use App\Models\Visit\VisitItem; | ||
| 19 | use App\Services\ProjectServer; | 20 | use App\Services\ProjectServer; |
| 20 | use Illuminate\Console\Command; | 21 | use Illuminate\Console\Command; |
| 21 | use Illuminate\Support\Facades\DB; | 22 | use Illuminate\Support\Facades\DB; |
| @@ -137,14 +138,12 @@ class MonthAllCount extends Command | @@ -137,14 +138,12 @@ class MonthAllCount extends Command | ||
| 137 | * @time :2024/1/8 11:02 | 138 | * @time :2024/1/8 11:02 |
| 138 | */ | 139 | */ |
| 139 | public function pv_ip(&$arr,$start,$end,$project_id){ | 140 | public function pv_ip(&$arr,$start,$end,$project_id){ |
| 140 | - $pv_ip = DB::table('gl_count') | ||
| 141 | - ->where(['project_id'=>$project_id]) | ||
| 142 | - ->where('date','>=',$start.' 00:00:00') | ||
| 143 | - ->where('date','<=',$end.' 23:59:59') | ||
| 144 | - ->select(DB::raw('SUM(pv_num) as pv_num'), DB::raw('SUM(ip_num) as ip_num'),DB::raw('SUM(inquiry_num) as inquiry_num')) | ||
| 145 | - ->first(); | ||
| 146 | - $arr['pv'] = $pv_ip->pv_num; | ||
| 147 | - $arr['ip'] = $pv_ip->ip_num; | 141 | + $arr['pv'] = (new VisitItem()) |
| 142 | + ->where('updated_date','>=',$start.' 00:00:00') | ||
| 143 | + ->where('updated_date','<=',$end.' 23:59:59')->count(); | ||
| 144 | + $arr['ip'] = (new Visit()) | ||
| 145 | + ->where('updated_date','>=',$start.' 00:00:00') | ||
| 146 | + ->where('updated_date','<=',$end.' 23:59:59')->count(); | ||
| 148 | if($arr['ip'] != 0){ | 147 | if($arr['ip'] != 0){ |
| 149 | $arr['rate'] = round((($arr['month_total'] ?? 0) / $arr['ip']) * 10,2); | 148 | $arr['rate'] = round((($arr['month_total'] ?? 0) / $arr['ip']) * 10,2); |
| 150 | } | 149 | } |
| @@ -14,6 +14,8 @@ use App\Models\Com\UpdateOldInfo; | @@ -14,6 +14,8 @@ use App\Models\Com\UpdateOldInfo; | ||
| 14 | use App\Models\Domain\DomainInfo; | 14 | use App\Models\Domain\DomainInfo; |
| 15 | use App\Models\Inquiry\InquiryFormData; | 15 | use App\Models\Inquiry\InquiryFormData; |
| 16 | use App\Models\Project\Project; | 16 | use App\Models\Project\Project; |
| 17 | +use App\Models\Visit\Visit; | ||
| 18 | +use App\Models\Visit\VisitItem; | ||
| 17 | use App\Services\ProjectServer; | 19 | use App\Services\ProjectServer; |
| 18 | use Illuminate\Console\Command; | 20 | use Illuminate\Console\Command; |
| 19 | use Illuminate\Support\Facades\DB; | 21 | use Illuminate\Support\Facades\DB; |
| @@ -159,14 +161,12 @@ class MonthCount extends Command | @@ -159,14 +161,12 @@ class MonthCount extends Command | ||
| 159 | * @time :2024/1/8 11:02 | 161 | * @time :2024/1/8 11:02 |
| 160 | */ | 162 | */ |
| 161 | public function pv_ip(&$arr,$start,$end,$project_id){ | 163 | public function pv_ip(&$arr,$start,$end,$project_id){ |
| 162 | - $pv_ip = DB::table('gl_count') | ||
| 163 | - ->where(['project_id'=>$project_id]) | ||
| 164 | - ->where('date','>=',$start.' 00:00:00') | ||
| 165 | - ->where('date','<=',$end.' 23:59:59') | ||
| 166 | - ->select(DB::raw('SUM(pv_num) as pv_num'), DB::raw('SUM(ip_num) as ip_num'),DB::raw('SUM(inquiry_num) as inquiry_num')) | ||
| 167 | - ->first(); | ||
| 168 | - $arr['pv'] = $pv_ip->pv_num; | ||
| 169 | - $arr['ip'] = $pv_ip->ip_num; | 164 | + $arr['pv'] = (new VisitItem()) |
| 165 | + ->where('updated_date','>=',$start.' 00:00:00') | ||
| 166 | + ->where('updated_date','<=',$end.' 23:59:59')->count(); | ||
| 167 | + $arr['ip'] = (new Visit()) | ||
| 168 | + ->where('updated_date','>=',$start.' 00:00:00') | ||
| 169 | + ->where('updated_date','<=',$end.' 23:59:59')->count(); | ||
| 170 | if($arr['ip'] != 0){ | 170 | if($arr['ip'] != 0){ |
| 171 | $arr['rate'] = round((($arr['month_total'] ?? 0) / $arr['ip']) * 10,2); | 171 | $arr['rate'] = round((($arr['month_total'] ?? 0) / $arr['ip']) * 10,2); |
| 172 | } | 172 | } |
| @@ -14,6 +14,8 @@ use App\Models\Com\UpdateOldInfo; | @@ -14,6 +14,8 @@ use App\Models\Com\UpdateOldInfo; | ||
| 14 | use App\Models\Domain\DomainInfo; | 14 | use App\Models\Domain\DomainInfo; |
| 15 | use App\Models\Inquiry\InquiryFormData; | 15 | use App\Models\Inquiry\InquiryFormData; |
| 16 | use App\Models\Project\Project; | 16 | use App\Models\Project\Project; |
| 17 | +use App\Models\Visit\Visit; | ||
| 18 | +use App\Models\Visit\VisitItem; | ||
| 17 | use App\Services\ProjectServer; | 19 | use App\Services\ProjectServer; |
| 18 | use Illuminate\Console\Command; | 20 | use Illuminate\Console\Command; |
| 19 | use Illuminate\Support\Facades\DB; | 21 | use Illuminate\Support\Facades\DB; |
| @@ -160,14 +162,12 @@ class MonthCountDate extends Command | @@ -160,14 +162,12 @@ class MonthCountDate extends Command | ||
| 160 | * @time :2024/1/8 11:02 | 162 | * @time :2024/1/8 11:02 |
| 161 | */ | 163 | */ |
| 162 | public function pv_ip(&$arr,$start,$end,$project_id){ | 164 | public function pv_ip(&$arr,$start,$end,$project_id){ |
| 163 | - $pv_ip = DB::table('gl_count') | ||
| 164 | - ->where(['project_id'=>$project_id]) | ||
| 165 | - ->where('date','>=',$start.' 00:00:00') | ||
| 166 | - ->where('date','<=',$end.' 23:59:59') | ||
| 167 | - ->select(DB::raw('SUM(pv_num) as pv_num'), DB::raw('SUM(ip_num) as ip_num'),DB::raw('SUM(inquiry_num) as inquiry_num')) | ||
| 168 | - ->first(); | ||
| 169 | - $arr['pv'] = $pv_ip->pv_num; | ||
| 170 | - $arr['ip'] = $pv_ip->ip_num; | 165 | + $arr['pv'] = (new VisitItem()) |
| 166 | + ->where('updated_date','>=',$start.' 00:00:00') | ||
| 167 | + ->where('updated_date','<=',$end.' 23:59:59')->count(); | ||
| 168 | + $arr['ip'] = (new Visit()) | ||
| 169 | + ->where('updated_date','>=',$start.' 00:00:00') | ||
| 170 | + ->where('updated_date','<=',$end.' 23:59:59')->count(); | ||
| 171 | if($arr['ip'] != 0){ | 171 | if($arr['ip'] != 0){ |
| 172 | $arr['rate'] = round((($arr['month_total'] ?? 0) / $arr['ip']) * 10,2); | 172 | $arr['rate'] = round((($arr['month_total'] ?? 0) / $arr['ip']) * 10,2); |
| 173 | } | 173 | } |
| @@ -16,6 +16,7 @@ use App\Models\HomeCount\MonthCount; | @@ -16,6 +16,7 @@ use App\Models\HomeCount\MonthCount; | ||
| 16 | use App\Models\Inquiry\InquiryFormData; | 16 | use App\Models\Inquiry\InquiryFormData; |
| 17 | use App\Models\Project\Project; | 17 | use App\Models\Project\Project; |
| 18 | use App\Models\Visit\Visit; | 18 | use App\Models\Visit\Visit; |
| 19 | +use App\Models\Visit\VisitItem; | ||
| 19 | use App\Services\ProjectServer; | 20 | use App\Services\ProjectServer; |
| 20 | use Illuminate\Console\Command; | 21 | use Illuminate\Console\Command; |
| 21 | use Illuminate\Support\Carbon; | 22 | use Illuminate\Support\Carbon; |
| @@ -133,14 +134,12 @@ class MonthProjectCount extends Command | @@ -133,14 +134,12 @@ class MonthProjectCount extends Command | ||
| 133 | * @time :2024/1/8 11:02 | 134 | * @time :2024/1/8 11:02 |
| 134 | */ | 135 | */ |
| 135 | public function pv_ip(&$arr,$start,$end,$project_id){ | 136 | public function pv_ip(&$arr,$start,$end,$project_id){ |
| 136 | - $pv_ip = DB::table('gl_count') | ||
| 137 | - ->where(['project_id'=>$project_id]) | ||
| 138 | - ->where('date','>=',$start.' 00:00:00') | ||
| 139 | - ->where('date','<=',$end.' 23:59:59') | ||
| 140 | - ->select(DB::raw('SUM(pv_num) as pv_num'), DB::raw('SUM(ip_num) as ip_num'),DB::raw('SUM(inquiry_num) as inquiry_num')) | ||
| 141 | - ->first(); | ||
| 142 | - $arr['pv'] = $pv_ip->pv_num; | ||
| 143 | - $arr['ip'] = $pv_ip->ip_num; | 137 | + $arr['pv'] = (new VisitItem()) |
| 138 | + ->where('updated_date','>=',$start.' 00:00:00') | ||
| 139 | + ->where('updated_date','<=',$end.' 23:59:59')->count(); | ||
| 140 | + $arr['ip'] = (new Visit()) | ||
| 141 | + ->where('updated_date','>=',$start.' 00:00:00') | ||
| 142 | + ->where('updated_date','<=',$end.' 23:59:59')->count(); | ||
| 144 | if($arr['ip'] != 0){ | 143 | if($arr['ip'] != 0){ |
| 145 | $arr['rate'] = round(($arr['month_total'] / $arr['ip']) * 10,2); | 144 | $arr['rate'] = round(($arr['month_total'] / $arr['ip']) * 10,2); |
| 146 | } | 145 | } |
| @@ -38,6 +38,7 @@ class AdsController extends BaseController | @@ -38,6 +38,7 @@ class AdsController extends BaseController | ||
| 38 | $industry = trim($request->input('industry')); | 38 | $industry = trim($request->input('industry')); |
| 39 | $ad_id = trim($request->input('ad_id')); | 39 | $ad_id = trim($request->input('ad_id')); |
| 40 | $status = $request->input('status', ''); | 40 | $status = $request->input('status', ''); |
| 41 | + $page_size = intval($request->input('row', '20')); | ||
| 41 | $result = ReInquiryTask::when($ad_id, function ($query, $ads_id) { | 42 | $result = ReInquiryTask::when($ad_id, function ($query, $ads_id) { |
| 42 | return $query->where('ad_id', 'like', '%' . $ads_id . '%'); | 43 | return $query->where('ad_id', 'like', '%' . $ads_id . '%'); |
| 43 | }) | 44 | }) |
| @@ -53,7 +54,7 @@ class AdsController extends BaseController | @@ -53,7 +54,7 @@ class AdsController extends BaseController | ||
| 53 | } | 54 | } |
| 54 | }) | 55 | }) |
| 55 | ->orderBy('id', 'desc') | 56 | ->orderBy('id', 'desc') |
| 56 | - ->paginate(); | 57 | + ->paginate($page_size); |
| 57 | 58 | ||
| 58 | $relay_site_total = 0; | 59 | $relay_site_total = 0; |
| 59 | foreach ($result as $item){ | 60 | foreach ($result as $item){ |
| @@ -166,6 +167,7 @@ class AdsController extends BaseController | @@ -166,6 +167,7 @@ class AdsController extends BaseController | ||
| 166 | $ad_name = $request->input('ad_name'); | 167 | $ad_name = $request->input('ad_name'); |
| 167 | $ad_id = $request->input('ad_id'); | 168 | $ad_id = $request->input('ad_id'); |
| 168 | $country = $request->input('country'); | 169 | $country = $request->input('country'); |
| 170 | + $page_size = intval($request->input('row', '20')); | ||
| 169 | $result = ReInquiryForm::when($status, function ($query, $status) { | 171 | $result = ReInquiryForm::when($status, function ($query, $status) { |
| 170 | return $query->where('status', $status); | 172 | return $query->where('status', $status); |
| 171 | }) | 173 | }) |
| @@ -179,7 +181,7 @@ class AdsController extends BaseController | @@ -179,7 +181,7 @@ class AdsController extends BaseController | ||
| 179 | return $query->where('country', 'like', '%' . $country . '%'); | 181 | return $query->where('country', 'like', '%' . $country . '%'); |
| 180 | }) | 182 | }) |
| 181 | ->orderBy('inquiry_date', 'desc') | 183 | ->orderBy('inquiry_date', 'desc') |
| 182 | - ->paginate(); | 184 | + ->paginate($page_size); |
| 183 | return $this->response('success', Code::SUCCESS, $result); | 185 | return $this->response('success', Code::SUCCESS, $result); |
| 184 | } | 186 | } |
| 185 | 187 |
| @@ -36,7 +36,7 @@ class ServersIpLogic extends BaseLogic | @@ -36,7 +36,7 @@ class ServersIpLogic extends BaseLogic | ||
| 36 | public function infoServersIp(){ | 36 | public function infoServersIp(){ |
| 37 | $info = $this->model->read(['id'=>$this->param['id']]); | 37 | $info = $this->model->read(['id'=>$this->param['id']]); |
| 38 | $projectModel = new Project(); | 38 | $projectModel = new Project(); |
| 39 | - $info['project_title'] = $projectModel->formatQuery(['serve_id'=>$info['id']])->pluck('title')->toArray(); | 39 | + $info['project_title'] = $projectModel->formatQuery(['serve_id'=>$info['id'],'delete_status'=>0])->pluck('title')->toArray(); |
| 40 | return $this->success($info); | 40 | return $this->success($info); |
| 41 | } | 41 | } |
| 42 | 42 |
| @@ -185,12 +185,12 @@ class CustomTemplateLogic extends BaseLogic | @@ -185,12 +185,12 @@ class CustomTemplateLogic extends BaseLogic | ||
| 185 | $this->param['html_style'] = "<style id='globalsojs-styles'></style>"; | 185 | $this->param['html_style'] = "<style id='globalsojs-styles'></style>"; |
| 186 | } | 186 | } |
| 187 | } | 187 | } |
| 188 | + if($this->param['url'] == 'news' || $this->param['url'] == 'product' || $this->param['url'] == 'blog'){ | ||
| 189 | + $this->fail('不允许修改路由为:'.$this->param['url']); | ||
| 190 | + } | ||
| 188 | $this->param['project_id'] = $this->user['project_id']; | 191 | $this->param['project_id'] = $this->user['project_id']; |
| 189 | $id = $this->model->addReturnId($this->param); | 192 | $id = $this->model->addReturnId($this->param); |
| 190 | $route = RouteMap::setRoute($this->param['url'], RouteMap::SOURCE_PAGE, $id, $this->user['project_id']); | 193 | $route = RouteMap::setRoute($this->param['url'], RouteMap::SOURCE_PAGE, $id, $this->user['project_id']); |
| 191 | - if($route == 'news' || $route == 'product' || $route == 'blog'){ | ||
| 192 | - $this->fail('不允许修改路由为:'.$this->param['url']); | ||
| 193 | - } | ||
| 194 | $this->addUpdateNotify(RouteMap::SOURCE_PAGE,$route); | 194 | $this->addUpdateNotify(RouteMap::SOURCE_PAGE,$route); |
| 195 | $this->model->edit(['url'=>$route],['id'=>$id]); | 195 | $this->model->edit(['url'=>$route],['id'=>$id]); |
| 196 | } | 196 | } |
| @@ -47,6 +47,9 @@ class RankDataLogic extends BaseLogic | @@ -47,6 +47,9 @@ class RankDataLogic extends BaseLogic | ||
| 47 | $project = (new ProjectLogic())->getProjectInfo($project_id); | 47 | $project = (new ProjectLogic())->getProjectInfo($project_id); |
| 48 | $domain_info = (new DomainInfoLogic)->getDomainInfo($project_id); | 48 | $domain_info = (new DomainInfoLogic)->getDomainInfo($project_id); |
| 49 | $rank = RankData::where('project_id', $project_id)->first(); | 49 | $rank = RankData::where('project_id', $project_id)->first(); |
| 50 | + if(empty($rank) && ($project['deploy_optimize']['api_no'] != 0)){ | ||
| 51 | + $data['langs_status'] = 1; | ||
| 52 | + } | ||
| 50 | $rank_week = RankWeek::where('project_id', $project_id)->first(); | 53 | $rank_week = RankWeek::where('project_id', $project_id)->first(); |
| 51 | $recomm_domain = RecommDomain::where('project_id', $project_id)->first(); | 54 | $recomm_domain = RecommDomain::where('project_id', $project_id)->first(); |
| 52 | $external_links = ExternalLinks::where('project_id', $project_id)->first(); | 55 | $external_links = ExternalLinks::where('project_id', $project_id)->first(); |
| @@ -86,9 +89,6 @@ class RankDataLogic extends BaseLogic | @@ -86,9 +89,6 @@ class RankDataLogic extends BaseLogic | ||
| 86 | //小语种列表 | 89 | //小语种列表 |
| 87 | $quanqiusou_api = new QuanqiusouApi(); | 90 | $quanqiusou_api = new QuanqiusouApi(); |
| 88 | $lang_data = $quanqiusou_api->getLangRankData($api_no); | 91 | $lang_data = $quanqiusou_api->getLangRankData($api_no); |
| 89 | - if(empty($lang_data)){ | ||
| 90 | - $data['langs_status'] = 1; | ||
| 91 | - } | ||
| 92 | $lang_data = Arr::setValueToKey($lang_data, 'language'); | 92 | $lang_data = Arr::setValueToKey($lang_data, 'language'); |
| 93 | $data['langs'] = []; | 93 | $data['langs'] = []; |
| 94 | $languageModel = new MinorLanguages(); | 94 | $languageModel = new MinorLanguages(); |
| @@ -334,23 +334,22 @@ class TranslateLogic extends BaseLogic | @@ -334,23 +334,22 @@ class TranslateLogic extends BaseLogic | ||
| 334 | $page = $arr[1]; | 334 | $page = $arr[1]; |
| 335 | $route = $arr[0]; | 335 | $route = $arr[0]; |
| 336 | } | 336 | } |
| 337 | - if(in_array($route,['products','news','blog'])){ | ||
| 338 | - //固定路由 | ||
| 339 | - $data['page'] = $page; | ||
| 340 | - $data['is_list'] = 1; | ||
| 341 | - if($route == 'products'){ | ||
| 342 | - $data['source'] = 2; | ||
| 343 | - }elseif ($route == 'news'){ | ||
| 344 | - $data['source'] = 4; | ||
| 345 | - }else{ | ||
| 346 | - $data['source'] = 3; | ||
| 347 | - } | ||
| 348 | - return $this->success($data); | ||
| 349 | - } | ||
| 350 | - | ||
| 351 | $routeModel = new RouteMap(); | 337 | $routeModel = new RouteMap(); |
| 352 | $routeInfo = $routeModel->read(['route'=>$route]); | 338 | $routeInfo = $routeModel->read(['route'=>$route]); |
| 353 | if($routeInfo === false){ | 339 | if($routeInfo === false){ |
| 340 | + if(in_array($route,['products','news','blog'])){ | ||
| 341 | + //固定路由 | ||
| 342 | + $data['page'] = $page; | ||
| 343 | + $data['is_list'] = 1; | ||
| 344 | + if($route == 'products'){ | ||
| 345 | + $data['source'] = 2; | ||
| 346 | + }elseif ($route == 'news'){ | ||
| 347 | + $data['source'] = 4; | ||
| 348 | + }else{ | ||
| 349 | + $data['source'] = 3; | ||
| 350 | + } | ||
| 351 | + return $this->success($data); | ||
| 352 | + } | ||
| 354 | return $data; | 353 | return $data; |
| 355 | } | 354 | } |
| 356 | $data = $this->resultData($routeInfo,$data); | 355 | $data = $this->resultData($routeInfo,$data); |
-
请 注册 或 登录 后发表评论