作者 zhl

Merge remote-tracking branch 'origin/master' into zhl

  1 +<?php
  2 +/**
  3 + * @remark :
  4 + * @name :GeoWritingTaskController.php
  5 + * @author :lyh
  6 + * @method :post
  7 + * @time :2025/10/25 10:40
  8 + */
  9 +
  10 +namespace App\Http\Controllers\Aside\Geo;
  11 +
  12 +use App\Http\Controllers\Aside\BaseController;
  13 +
  14 +/**
  15 + * @remark :文章任务(收集数据)
  16 + * @name :GeoWritingTaskController
  17 + * @author :lyh
  18 + * @method :post
  19 + * @time :2025/10/25 10:40
  20 + */
  21 +class GeoWritingTaskController extends BaseController
  22 +{
  23 + /**
  24 + * @remark :文章任务列表
  25 + * @name :lists
  26 + * @author :lyh
  27 + * @method :post
  28 + * @time :2025/10/25 10:41
  29 + */
  30 + public function lists(){
  31 +
  32 + }
  33 +}
  1 +<?php
  2 +/**
  3 + * @remark :
  4 + * @name :GeoWritingsController.php
  5 + * @author :lyh
  6 + * @method :post
  7 + * @time :2025/10/25 10:41
  8 + */
  9 +
  10 +namespace App\Http\Controllers\Aside\Geo;
  11 +
  12 +use App\Http\Controllers\Aside\BaseController;
  13 +
  14 +/**
  15 + * @remark :geo文章
  16 + * @name :GeoWritingsController
  17 + * @author :lyh
  18 + * @method :post
  19 + * @time :2025/10/25 10:41
  20 + */
  21 +class GeoWritingsController extends BaseController
  22 +{
  23 +
  24 +}
@@ -20,6 +20,7 @@ use App\Models\Com\UpdateLog; @@ -20,6 +20,7 @@ use App\Models\Com\UpdateLog;
20 use App\Models\Devops\ServerConfig; 20 use App\Models\Devops\ServerConfig;
21 use App\Models\Devops\ServersIp; 21 use App\Models\Devops\ServersIp;
22 use App\Models\Domain\DomainCreateTask; 22 use App\Models\Domain\DomainCreateTask;
  23 +use App\Models\Domain\DomainInfo;
23 use App\Models\Domain\DomainInfo as DomainInfoModel; 24 use App\Models\Domain\DomainInfo as DomainInfoModel;
24 use App\Models\Geo\GeoArticle; 25 use App\Models\Geo\GeoArticle;
25 use App\Models\Geo\GeoConf; 26 use App\Models\Geo\GeoConf;
@@ -225,7 +226,7 @@ class ProjectController extends BaseController @@ -225,7 +226,7 @@ class ProjectController extends BaseController
225 if($this->map['domain_type'] == 'domain'){ 226 if($this->map['domain_type'] == 'domain'){
226 $parsedUrl = parse_url($this->map['domain_search']); 227 $parsedUrl = parse_url($this->map['domain_search']);
227 $this->map['domain_search'] = $parsedUrl['host'] ?? $this->map['domain_search']; 228 $this->map['domain_search'] = $parsedUrl['host'] ?? $this->map['domain_search'];
228 - $ids = DomainInfo::where('domain', 'like', '%'.$this->map['domain_search'].'%')->pluck('id')->toArray(); 229 + $ids = DomainInfoModel::where('domain', 'like', '%'.$this->map['domain_search'].'%')->pluck('id')->toArray();
229 $query->whereIn('gl_project_deploy_optimize.domain', $ids); 230 $query->whereIn('gl_project_deploy_optimize.domain', $ids);
230 }else{ 231 }else{
231 $query->where('gl_project_deploy_build.test_domain','like','%'.$this->map['domain_search'].'%'); 232 $query->where('gl_project_deploy_build.test_domain','like','%'.$this->map['domain_search'].'%');
@@ -447,23 +448,6 @@ class ProjectController extends BaseController @@ -447,23 +448,6 @@ class ProjectController extends BaseController
447 if(!empty($item['extend_type'])){ 448 if(!empty($item['extend_type'])){
448 $item['type'] = $item['extend_type']; 449 $item['type'] = $item['extend_type'];
449 } 450 }
450 - $domainModel = new DomainInfoModel();  
451 - $item['domain'] = !empty($item['domain']) ? $domainModel->getDomain($item['domain']) : '';  
452 - $item['uuid'] = TicketProject::where('table_id', $item['id'])->where('project_cate', 2)->value('uuid') ?? null;  
453 - $item['friend_id'] = ProjectAssociation::where('project_id', $item['id'])->where('status', ProjectAssociation::STATUS_NORMAL)->where('binding_app', ProjectAssociation::ENTERPRISE_WECHAT)->value('friend_id') ?? null;  
454 - $planMap = Project::planMap();  
455 - $seoPlanMap = Project::seoMap();  
456 - $item['plan'] = $planMap[$item['plan']] ?? '';  
457 - $item['seo_plan'] = $seoPlanMap[$item['seo_plan']] ?? '';  
458 - $item['autologin_code'] = getAutoLoginCode($item['id']);  
459 - $item['created_at'] = date('Y年m月d日', strtotime($item['cooperate_date']));  
460 - $item['product_num'] = $data['product'] ?? 0;  
461 - $item['keyword_num'] = $data['key'] ?? 0;  
462 - $item['article_num'] = ($data['blog'] ?? 0) + ($data['news'] ?? 0);  
463 - $item['task_finish_num'] = Task::getNumByProjectId($item['id'], Task::STATUS_DOWN);  
464 - $item['task_pending_num'] = Task::getNumByProjectId($item['id'], [Task::STATUS_DONGING, Task::STATUS_WAIT]);  
465 - $item['collect_time'] = $item['is_upgrade'] ? UpdateLog::getProjectUpdate($item['id']) : '';  
466 - $item['channel'] = Channel::getChannelText($item['channel']['user_id'] ?? 0);  
467 $manageModel = new ManageHr(); 451 $manageModel = new ManageHr();
468 //geo项目 452 //geo项目
469 if(($item['plan'] == 0) && ($item['seo_plan'] != 0)){ 453 if(($item['plan'] == 0) && ($item['seo_plan'] != 0)){
@@ -487,6 +471,23 @@ class ProjectController extends BaseController @@ -487,6 +471,23 @@ class ProjectController extends BaseController
487 $item['optimize_assist'] = $manageModel->getName($item['optimize_assist_mid']); 471 $item['optimize_assist'] = $manageModel->getName($item['optimize_assist_mid']);
488 $item['optimize_tech'] = $manageModel->getName($item['optimize_tech_mid']); 472 $item['optimize_tech'] = $manageModel->getName($item['optimize_tech_mid']);
489 $item['quality_mid_name'] = $manageModel->getName($item['quality_mid']); 473 $item['quality_mid_name'] = $manageModel->getName($item['quality_mid']);
  474 + $planMap = Project::planMap();
  475 + $seoPlanMap = Project::seoMap();
  476 + $item['plan'] = $planMap[$item['plan']] ?? '';
  477 + $item['seo_plan'] = $seoPlanMap[$item['seo_plan']] ?? '';
  478 + $domainModel = new DomainInfoModel();
  479 + $item['domain'] = !empty($item['domain']) ? $domainModel->getDomain($item['domain']) : '';
  480 + $item['uuid'] = TicketProject::where('table_id', $item['id'])->where('project_cate', 2)->value('uuid') ?? null;
  481 + $item['friend_id'] = ProjectAssociation::where('project_id', $item['id'])->where('status', ProjectAssociation::STATUS_NORMAL)->where('binding_app', ProjectAssociation::ENTERPRISE_WECHAT)->value('friend_id') ?? null;
  482 + $item['autologin_code'] = getAutoLoginCode($item['id']);
  483 + $item['created_at'] = date('Y年m月d日', strtotime($item['cooperate_date']));
  484 + $item['product_num'] = $data['product'] ?? 0;
  485 + $item['keyword_num'] = $data['key'] ?? 0;
  486 + $item['article_num'] = ($data['blog'] ?? 0) + ($data['news'] ?? 0);
  487 + $item['task_finish_num'] = Task::getNumByProjectId($item['id'], Task::STATUS_DOWN);
  488 + $item['task_pending_num'] = Task::getNumByProjectId($item['id'], [Task::STATUS_DONGING, Task::STATUS_WAIT]);
  489 + $item['collect_time'] = $item['is_upgrade'] ? UpdateLog::getProjectUpdate($item['id']) : '';
  490 + $item['channel'] = Channel::getChannelText($item['channel']['user_id'] ?? 0);
490 return $item; 491 return $item;
491 } 492 }
492 493
  1 +<?php
  2 +/**
  3 + * @remark :
  4 + * @name :GeoWritingsLogic.php
  5 + * @author :lyh
  6 + * @method :post
  7 + * @time :2025/10/25 10:43
  8 + */
  9 +
  10 +namespace App\Http\Logic\Aside\Geo;
  11 +
  12 +use App\Http\Logic\Aside\BaseLogic;
  13 +use App\Models\Geo\GeoWritings;
  14 +
  15 +/**
  16 + * @remark :文章任务
  17 + * @name :GeoWritingsLogic
  18 + * @author :lyh
  19 + * @method :post
  20 + * @time :2025/10/25 10:44
  21 + */
  22 +class GeoWritingsLogic extends BaseLogic
  23 +{
  24 + public function __construct()
  25 + {
  26 + parent::__construct();
  27 + $this->param = $this->requestAll;
  28 + $this->model = new GeoWritings();
  29 + }
  30 +}
  1 +<?php
  2 +/**
  3 + * @remark :
  4 + * @name :GeoWritingsTaskLogic.php
  5 + * @author :lyh
  6 + * @method :post
  7 + * @time :2025/10/25 10:45
  8 + */
  9 +
  10 +namespace App\Http\Logic\Aside\Geo;
  11 +
  12 +use App\Http\Logic\Aside\BaseLogic;
  13 +use App\Models\Geo\GeoWritings;
  14 +use App\Models\Geo\GeoWritingsTask;
  15 +
  16 +class GeoWritingsTaskLogic extends BaseLogic
  17 +{
  18 + public function __construct()
  19 + {
  20 + parent::__construct();
  21 + $this->param = $this->requestAll;
  22 + $this->model = new GeoWritingsTask();
  23 + }
  24 +}
  1 +<?php
  2 +/**
  3 + * @remark :
  4 + * @name :GeoWritingsTask.php
  5 + * @author :lyh
  6 + * @method :post
  7 + * @time :2025/10/25 10:47
  8 + */
  9 +
  10 +namespace App\Models\Geo;
  11 +
  12 +use App\Models\Base;
  13 +
  14 +/**
  15 + * @remark :文章生成任务
  16 + * @name :GeoWritingsTask
  17 + * @author :lyh
  18 + * @method :post
  19 + * @time :2025/10/25 10:48
  20 + */
  21 +class GeoWritingsTask extends Base
  22 +{
  23 + protected $table = 'gl_project_geo_writings_task';
  24 +}
@@ -5,7 +5,6 @@ namespace App\Models\Inquiry; @@ -5,7 +5,6 @@ namespace App\Models\Inquiry;
5 use App\Helper\Arr; 5 use App\Helper\Arr;
6 use App\Helper\FormGlobalsoApi; 6 use App\Helper\FormGlobalsoApi;
7 use App\Models\Base; 7 use App\Models\Base;
8 -use App\Utils\LogUtils;  
9 use Illuminate\Database\Eloquent\SoftDeletes; 8 use Illuminate\Database\Eloquent\SoftDeletes;
10 use Illuminate\Support\Facades\DB; 9 use Illuminate\Support\Facades\DB;
11 use Illuminate\Support\Facades\Log; 10 use Illuminate\Support\Facades\Log;
@@ -42,7 +41,7 @@ class InquiryFormData extends Base @@ -42,7 +41,7 @@ class InquiryFormData extends Base
42 * @author zbj 41 * @author zbj
43 * @date 2023/12/4 42 * @date 2023/12/4
44 */ 43 */
45 - public static function saveData($form_id, $domain, $ip, $country, $referer, $user_agent, $submit_at, $data, $traffic = 0){ 44 + public static function saveData($form_id, $domain, $ip, $country, $referer, $user_agent, $submit_at, $data, $project_id, $traffic = 0){
46 if(!empty($data['email'])){ 45 if(!empty($data['email'])){
47 $data['email'] = str_replace(' ', '', $data['email']); 46 $data['email'] = str_replace(' ', '', $data['email']);
48 } 47 }
@@ -96,6 +95,14 @@ class InquiryFormData extends Base @@ -96,6 +95,14 @@ class InquiryFormData extends Base
96 } 95 }
97 } 96 }
98 $res = (new FormGlobalsoApi())->submitInquiry($ip, $referer, $submit_at, $data, $traffic); 97 $res = (new FormGlobalsoApi())->submitInquiry($ip, $referer, $submit_at, $data, $traffic);
  98 + //自定义推送
  99 + if($project_id == 3870) { //走这里发送的,关杰那边也要取消发送邮件
  100 + list($mobile, $email) = self::SpecialMailPhone($referer);
  101 + Log::channel('inquiry')->info('自定义推送', [$mobile, $email]);
  102 + $body = self::specialInquiryTemplate($data['name'], $data['email'], $data['phone'] ?? "", $data['message'], $domain, $ip, $country);
  103 + (new FormGlobalsoApi())->customizeInquiryEmail($email, '询盘客户<' . $data['name'] . '>', $body, $ip, $referer, $submit_at);
  104 + (new FormGlobalsoApi())->customizeInquirySms($mobile, $country, $domain);
  105 + }
99 Log::channel('inquiry')->info('询盘发送邮件', [$data, $res]); 106 Log::channel('inquiry')->info('询盘发送邮件', [$data, $res]);
100 if(!$res){ 107 if(!$res){
101 throw new \Exception('询盘发送邮件失败'); 108 throw new \Exception('询盘发送邮件失败');
@@ -118,6 +125,119 @@ class InquiryFormData extends Base @@ -118,6 +125,119 @@ class InquiryFormData extends Base
118 } 125 }
119 126
120 /** 127 /**
  128 + * 获取推送邮箱和手机号
  129 + * 邮件地址和手机号 根据链接匹配,没匹配到随机取一个邮件和手机号
  130 + * @param $referer
  131 + * @author zbj
  132 + * @date 2025/10/25
  133 + */
  134 + public static function SpecialMailPhone($referer)
  135 + {
  136 + $mail_mobile_map = [
  137 + 'luchfitness' => [15262817624, 'Sales02@luchfitness.com'],
  138 + 'modernsporting' => [13073258707,'sales@modernsporting.com'],
  139 + 'liveupsports' => [18355892630,'sales@liveupsports.com'],
  140 + 'topflor' => [13912296731,'alan@topflor.cn'],
  141 + ];
  142 + $url_map = [
  143 + 'luchfitness' => [
  144 + 'https://www.ntsportgoods.com/supplier/nantong-luch-fitness-co-ltd',
  145 + 'https://www.ntsportgoods.com/benches-machines-luch-fitness/',
  146 + 'https://www.ntsportgoods.com/free-weight-luch-fitness/',
  147 + 'https://www.ntsportgoods.com/functional-training-luch-fitness/s/',
  148 + 'https://www.ntsportgoods.com/studio-exercise-luch-fitness/',
  149 + 'https://www.ntsportgoods.com/commercial-gym-half-power-rack-for-strength-training-product',
  150 + 'https://www.ntsportgoods.com/heavy-duty-fitness-flat-bench-for-home-commercial-gym-product',
  151 + 'https://www.ntsportgoods.com/durable-gym-dumbbell-flat-bench-for-weight-training-product',
  152 + 'https://www.ntsportgoods.com/rubber-colored-bumper-plate-for-olympic-weightlifting-product',
  153 + 'https://www.ntsportgoods.com/urethane-competition-bumper-plate-for-strength-training-product',
  154 + 'https://www.ntsportgoods.com/10-pair-dumbbell-storage-rack-for-commercial-gyms-product',
  155 + 'https://www.ntsportgoods.com/tpu-coated-dumbbells-for-home-and-commercial-fitness-product',
  156 + 'https://www.ntsportgoods.com/urethane-weight-plate-for-powerlifting-strength-gym-product',
  157 + 'https://www.ntsportgoods.com/iphifun-cpu-weight-plate-for-professional-training-product',
  158 + 'https://www.ntsportgoods.com/men-s-weightlifting-barbell-bar-for-strength-training-product',
  159 + 'https://www.ntsportgoods.com/women-s-weightlifting-barbell-bar-for-olympic-lifts-product',
  160 + 'https://www.ntsportgoods.com/steel-competition-kettlebell-for-functional-training-product',
  161 + 'https://www.ntsportgoods.com/adjustable-strength-jump-plyo-boxes-for-gym-training-product',
  162 + 'https://www.ntsportgoods.com/commercial-soft-plyo-box-for-functional-gym-training-product',
  163 + 'https://www.ntsportgoods.com/power-training-weight-bull-bag-for-strength-workout-product',
  164 + 'https://www.ntsportgoods.com/pu-leather-power-bag-for-functional-strength-training-product',
  165 + 'https://www.ntsportgoods.com/abdominal-muscle-mat-for-core-and-sit-up-training-product',
  166 + 'https://www.ntsportgoods.com/gymnastics-training-mat-for-fitness-and-yoga-workout-product',
  167 + 'https://www.ntsportgoods.com/adjustable-bench-stepper-for-aerobic-and-strength-gym-product',
  168 + 'https://www.ntsportgoods.com/rubber-body-pump-set-for-cardio-and-strength-training-product',
  169 + 'https://www.ntsportgoods.com/balance-training-yoga-ball-for-core-stability-workout-product',
  170 + 'https://www.ntsportgoods.com/pull-up-resistance-band-for-strength-and-stretching-product',
  171 + ],
  172 + 'modernsporting' => [
  173 + 'https://www.ntsportgoods.com/supplier/nantong-modern-sporting-industrial-co-ltdhttps://www.ntsportgoods.com/barbell-bars-modern-sporting/',
  174 + 'https://www.ntsportgoods.com/storage-racks-modern-sporting/',
  175 + 'https://www.ntsportgoods.com/dumbbells-modern-sporting/',
  176 + 'https://www.ntsportgoods.com/rubber-plates-modern-sporting/',
  177 + 'https://www.ntsportgoods.com/training-handles-modern-sporting/https://www.ntsportgoods.com/md4137-201cm-weightlifting-beginner-bar-product',
  178 + 'https://www.ntsportgoods.com/md4143-220cm-hybrid-training-bar-product',
  179 + 'https://www.ntsportgoods.com/md4149-powder-coated-pentagon-bar-product',
  180 + 'https://www.ntsportgoods.com/gym-home-10-pairs-dumbbell-rack-stand-md6242-product',
  181 + 'https://www.ntsportgoods.com/10-pairs-dumbbell-rack-for-home-gym-workouts-md6247-product',
  182 + 'https://www.ntsportgoods.com/10-pairs-dumbbell-storage-rack-for-gym-home-md6250-product',
  183 + 'https://www.ntsportgoods.com/urethane-dumbbells-set-for-strength-training-md2117-product',
  184 + 'https://www.ntsportgoods.com/md2123-rubber-coated-studio-dumbbells-product',
  185 + 'https://www.ntsportgoods.com/md2135-12-side-tpu-coated-dumbbells-product',
  186 + 'https://www.ntsportgoods.com/rubber-bumper-plates-for-weightlifting-gym-use-md1056-product',
  187 + 'https://www.ntsportgoods.com/high-quality-rubber-bumper-plates-for-gym-lifting-md1057-product',
  188 + 'https://www.ntsportgoods.com/md1058-competition-weight-plates-product',
  189 + 'https://www.ntsportgoods.com/tricep-press-down-bar-for-cable-machines-strength-md5128-product',
  190 + 'https://www.ntsportgoods.com/md5132-tricep-press-down-bar-product',
  191 + 'https://www.ntsportgoods.com/md5132-tricep-press-down-bar-product',
  192 + ],
  193 + 'liveupsports' => [
  194 + 'https://www.ntsportgoods.com/supplier/nantong-liveup-sports-co-ltd/',
  195 + 'https://www.ntsportgoods.com/yoga-pilates-liveup-sports/',
  196 + 'https://www.ntsportgoods.com/training-equipment-liveup-sports/',
  197 + 'https://www.ntsportgoods.com/gym-racks-and-equipment-liveup-sports/',
  198 + 'https://www.ntsportgoods.com/20-25-30cm-pvc-customised-pilates-stability-exercise-ball-inflatable-soft-mini-pilates-small-yoga-bal-product/',
  199 + 'https://www.ntsportgoods.com/55-65-75cm-bloom-workout-fitness-exercise-balance-gym-abs-anti-burst-yoga-ball-anti-slip-swiss-pilates-ball-product/',
  200 + 'https://www.ntsportgoods.com/bodybuilding-fitness-exercise-custom-logo-gym-yoga-latex-hip-resistance-bands-loop-bands-set-product/',
  201 + 'https://www.ntsportgoods.com/bloom-2080x4-5cm-natural-latex-loop-yoga-elastic-stretch-long-resistance-bands-exercise-band-product/',
  202 + 'https://www.ntsportgoods.com/custom-logo-manufacturer-high-quality-eco-friendly-fitness-pilates-anti-slip-3-10mm-pu-rubber-tpe-cork-nbr-pvc-printed-yoga-mat-product/',
  203 + 'https://www.ntsportgoods.com/custom-professional-manufacture-cheap-solid-cast-iron-dumbbell-weights-rubber-hex-dumbbell-sets-5-100lb-product/',
  204 + 'https://www.ntsportgoods.com/professional-wholesale-custom-logo-free-weight-colored-rubber-bumper-gym-weight-barbell-plates-with-kg-mark-product/',
  205 + 'https://www.ntsportgoods.com/gym-equipment-free-weights-fitness-12-sided-weightlifting-exercise-barbell-weight-lifting-polyurethane-fixed-barbell-product/',
  206 + 'https://www.ntsportgoods.com/livepro-high-quality-steel-fitness-equipment-training-competition-gym-power-weightlifting-20kg-barbell-bar-product/',
  207 + 'https://www.ntsportgoods.com/livepro-gym-commercial-equipment-fitness-storage-system-professional-multifunctional-training-frame-gym-storage-rack-product/',
  208 + 'https://www.ntsportgoods.com/livepro-commercial-floor-mount-free-standing-cross-training-gym-rigs-multi-functional-training-rack-fitness-gym-rig-product/',
  209 + 'https://www.ntsportgoods.com/livepro-oem-odm-fitness-equipment-multi-functional-trainer-smith-machine-station-home-using-gym-full-frame-cage-squat-power-rack-product/',
  210 + ],
  211 + 'topflor' => [
  212 + 'https://www.ntsportgoods.com/supplier/nantong-topflor-co-ltd/',
  213 + 'https://www.ntsportgoods.com/sports-flooring-topflor/',
  214 + 'https://www.ntsportgoods.com/healthcare-flooring-topflor/',
  215 + 'https://www.ntsportgoods.com/gym-flooring-topflor/',
  216 + 'https://www.ntsportgoods.com/sprint-track-turf-for-high-performance-indoor-and-outdoor-training-product/',
  217 + 'https://www.ntsportgoods.com/durable-gym-rubber-flooring-with-shock-absorption-and-slip-resistance-product/',
  218 + 'https://www.ntsportgoods.com/interlocking-gym-flooring-tilesinterlocking-gym-flooring-tiles-product/',
  219 + 'https://www.ntsportgoods.com/premium-hospital-vinyl-flooring-with-anti-bacterial-and-easy-clean-surface-product/',
  220 + 'https://www.ntsportgoods.com/high-performance-healthcare-flooring-for-safe-and-hygienic-environments-product/',
  221 + 'https://www.ntsportgoods.com/homogeneous-vinyl-flooring-with-high-durability-and-low-maintenance-product/',
  222 + 'https://www.ntsportgoods.com/clinic-vinyl-flooring-with-anti-bacterial-and-wear-resistant-properties-product/',
  223 + 'https://www.ntsportgoods.com/medical-pvc-flooring-with-anti-slip-hygienic-and-durable-features-product/',
  224 + 'https://www.ntsportgoods.com/professional-badminton-court-pvc-sports-flooring-with-high-grip-and-shock-absorption-product/',
  225 + 'https://www.ntsportgoods.com/indoor-basketball-sports-flooring-with-superior-ball-bounce-and-player-comfort-product/',
  226 + 'https://www.ntsportgoods.com/multi-sport-indoor-pvc-flooring-for-volleyball-handball-badminton-and-fitness-product/',
  227 + 'https://www.ntsportgoods.com/durable-multi-purpose-sports-flooring-for-schools-gyms-and-community-centers-product/',
  228 + 'https://www.ntsportgoods.com/high-performance-multi-use-indoor-sports-flooring-with-easy-maintenance-product/',
  229 + ],
  230 +
  231 + ];
  232 + foreach ($url_map as $k=>$urls) {
  233 + if(in_array($referer, $urls)) {
  234 + return $mail_mobile_map[$k];
  235 + }
  236 + }
  237 + return $mail_mobile_map[array_rand($mail_mobile_map)];
  238 + }
  239 +
  240 + /**
121 * 特殊项目 邮件模版 241 * 特殊项目 邮件模版
122 * FIXME 后期有多个特殊项目,需要按照项目ID设置模板 242 * FIXME 后期有多个特殊项目,需要按照项目ID设置模板
123 * @param $name 243 * @param $name
@@ -128,7 +248,7 @@ class InquiryFormData extends Base @@ -128,7 +248,7 @@ class InquiryFormData extends Base
128 * @param $country 248 * @param $country
129 * @return string 249 * @return string
130 */ 250 */
131 - public static function specialInquiryTemplate($name, $email, $phone, $message, $domain, $country) 251 + public static function specialInquiryTemplate($name, $email, $phone, $message, $domain, $ip, $country)
132 { 252 {
133 $template = " 253 $template = "
134 客户姓名:$name 254 客户姓名:$name
@@ -139,7 +259,7 @@ class InquiryFormData extends Base @@ -139,7 +259,7 @@ class InquiryFormData extends Base
139 $message 259 $message
140 -------------------------------------------------------------------- 260 --------------------------------------------------------------------
141 发送询盘网址: $domain 261 发送询盘网址: $domain
142 -客户IP地址: [ip] 262 +客户IP地址: $ip
143 IP所在国家/地区: $country 263 IP所在国家/地区: $country
144 --------------------------------------------------------------------"; 264 --------------------------------------------------------------------";
145 return $template; 265 return $template;
@@ -283,7 +283,7 @@ class SyncSubmitTaskService @@ -283,7 +283,7 @@ class SyncSubmitTaskService
283 283
284 $data['referer'] = $this->handle_referer($data['referer']); 284 $data['referer'] = $this->handle_referer($data['referer']);
285 285
286 - $id = InquiryFormData::saveData($form_id, $data['domain'], $data['ip'], $data['country'], $data['referer'], $data['user_agent'], $data['submit_at'], $data['data'], $traffic); 286 + $id = InquiryFormData::saveData($form_id, $data['domain'], $data['ip'], $data['country'], $data['referer'], $data['user_agent'], $data['submit_at'], $data['data'], $data['project_id'], $traffic);
287 287
288 288
289 //转化询盘 289 //转化询盘