最新服务器上的版本,以后用这个
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
/**
 * Created by PhpStorm
 * User: 风哀伤
 * Date: 2021/1/14
 * Time: 11:26 上午
 * @copyright: ©2020 浙江禾匠信息科技
 * @link: http://www.zjhejiang.com
 */
 
namespace app\jobs;
 
 
use app\core\mail\SendMail;
use app\models\Mall;
use yii\queue\JobInterface;
 
class MailJob extends BaseJob implements JobInterface
{
    /**
     * @var SendMail $class
     */
    public $class;
 
    public $view;
    public $params;
 
    public function execute($queue)
    {
        $this->setRequest();
        $this->class->job($this->view, $this->params);
    }
}