|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Logic\Bside\Setting;
|
|
|
|
|
|
|
|
use App\Http\Logic\Bside\BaseLogic;
|
|
|
|
use App\Models\WebSetting\WebSettingReceiving;
|
|
|
|
use App\Models\WebSetting\WebSettingText;
|
|
|
|
|
|
|
|
class WebSettingReceivingLogic extends BaseLogic
|
|
|
|
{
|
|
|
|
public function __construct()
|
|
|
|
{
|
|
|
|
parent::__construct();
|
|
|
|
$this->model = new WebSettingReceiving();
|
|
|
|
$this->param = $this->requestAll;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @name :(列表数据)setting_receiving_lists
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/5/8 16:17
|
|
|
|
*/
|
|
|
|
public function setting_receiving_lists(){
|
|
|
|
$lists = $this->model->list(['project_id'=>$this->user['project_id']]);
|
|
|
|
return $this->success($lists);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @name :(设置收信账号)setting_receiving_save
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/5/8 16:26
|
|
|
|
*/
|
|
|
|
public function setting_receiving_save(){
|
|
|
|
try {
|
|
|
|
$this->model->del(['project_id'=>$this->user['project_id']]);
|
|
|
|
foreach ($this->param['data'] as $k => $v){
|
|
|
|
$v['project_id'] = $this->user['project_id'];
|
|
|
|
$this->param['data'][$k] = $v;
|
|
|
|
}
|
|
|
|
$this->model->add($this->param['data']);
|
|
|
|
}catch (\Exception $e){
|
|
|
|
$this->fail('error');
|
|
|
|
}
|
|
|
|
return $this->success();
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|