1
This commit is contained in:
@@ -211,6 +211,14 @@ class Promotion extends Base
|
||||
$insert['frequency'] = $data['frequency'];
|
||||
$insert['is_end'] = 1;
|
||||
$insert['ctime'] = time();
|
||||
//定义开始发送的页码
|
||||
if(isset($data['beginPage'])&&$data['beginPage']!=1){
|
||||
$f = [];
|
||||
for ($i=1;$i<$data['beginPage'];$i++){
|
||||
$f[] = $i;
|
||||
}
|
||||
$insert['pushed'] = json_encode($f);
|
||||
}
|
||||
$this->promotion_obj->insert($insert);
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
@@ -363,7 +371,7 @@ class Promotion extends Base
|
||||
|
||||
public function mytest()
|
||||
{
|
||||
$this->autoPushPromotion(6);
|
||||
$this->autoPushPromotion(49);
|
||||
}
|
||||
|
||||
public function mytest1()
|
||||
@@ -390,13 +398,21 @@ class Promotion extends Base
|
||||
// $l['email'] = "751475802@qq.com";
|
||||
// $l['name'] = "wangjinlei";
|
||||
// $l['type'] = "ash";
|
||||
// $l['major'] = 75;
|
||||
// $l['id'] = 35;
|
||||
// $l1['email'] = "2714044218@qq.com";
|
||||
// $l1['name'] = "liuna";
|
||||
// $l1['type'] = "ash";
|
||||
// $l1['major'] = 76;
|
||||
// $l1['id'] = 36;
|
||||
// $l2['email'] = "crc@tmrjournals.com";
|
||||
// $l2['name'] = "xinyv";
|
||||
// $l2['type'] = "ash";
|
||||
// $l2['major'] = 77;
|
||||
// $l2['id'] = 35;
|
||||
// $list[] = $l;
|
||||
// $list[] = $l1;
|
||||
// $list[] = $l2;
|
||||
|
||||
//组合模版
|
||||
$template = $pro_info['template'];
|
||||
@@ -414,7 +430,7 @@ class Promotion extends Base
|
||||
//发送邮件
|
||||
foreach ($list as $v) {
|
||||
$template1 = $template;
|
||||
$template1 = str_replace("{{user_major}}", $this->getMajorOne($v['major']), $template1);
|
||||
$template1 = str_replace("{{user_major}}",strtolower($this->getMajorOne($v['major'])) , $template1);
|
||||
$template1 = str_replace("{{user_name}}", $v['name'], $template1);
|
||||
$template1 = str_replace("{{unsubscribe}}", "https://submission.tmrjournals.com/api/Promotion/NoEmail?lib=" . $v['type'] . "&id=" . $v['id'], $template1);
|
||||
$email_title = $pro_info['email_title'];
|
||||
|
||||
Reference in New Issue
Block a user