66 lines
1.5 KiB
PHP
66 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace app\admin\controller\order;
|
|
|
|
use app\common\controller\Backend;
|
|
|
|
/**
|
|
* 分销配置
|
|
*/
|
|
class Config extends Backend
|
|
{
|
|
|
|
/**
|
|
* AttachmentGroup模型对象
|
|
* @var \app\admin\model\attachment\AttachmentGroup
|
|
*/
|
|
protected $model = null;
|
|
|
|
protected $configName = 'order';
|
|
|
|
public function _initialize()
|
|
{
|
|
parent::_initialize();
|
|
|
|
\app\common\model\fill\Handle::check('app_config',$this->configName);
|
|
}
|
|
|
|
/**
|
|
* 获取配置
|
|
* @return mixed
|
|
*/
|
|
public function getConfig(){
|
|
$data = \app\common\model\app\Config::getConfig($this->configName);
|
|
|
|
$data['order_timeout_close_url'] = $this->getOrderTimeoutCloseUrl();
|
|
|
|
return $this->success("获取成功",$data);
|
|
}
|
|
|
|
|
|
/**
|
|
* 获取订单超时取消地址
|
|
* @return string
|
|
*/
|
|
public function getOrderTimeoutCloseUrl(){
|
|
global $_W;
|
|
if(\app\common\library\Platform::getSystemType() == 'single'){
|
|
return $_W['siteroot'].'/index.php?i='.$_W['uniacid'].'&route=callback/order/ordertimeoutclose';
|
|
}else{
|
|
return $_W['siteroot'].'/app/index.php?i='.$_W['uniacid'].'&c=entry&m=tuzi_v1&do=index&route=callback/order/ordertimeoutclose';
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 获取配置
|
|
* @return mixed
|
|
*/
|
|
public function setConfig(){
|
|
$row = $this->request->post("row/a", [], 'trim');
|
|
$data = \app\common\model\app\Config::setConfig($this->configName,$row);
|
|
return $this->success("保存成功",$data);
|
|
}
|
|
|
|
|
|
}
|