mirror of
https://gitee.com/ShopeX/OMS
synced 2026-03-23 02:45:33 +08:00
55 lines
1.2 KiB
PHP
55 lines
1.2 KiB
PHP
<?php
|
||
/**
|
||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||
* See LICENSE file for license details.
|
||
*/
|
||
|
||
/**
|
||
* 自动确认设置
|
||
*
|
||
* @author hzjsq@msn.com
|
||
* @version 0.1b
|
||
*/
|
||
|
||
class omeauto_config_setting {
|
||
|
||
/**
|
||
*
|
||
*/
|
||
public function saveAutoCnf($cnf) {
|
||
|
||
$cnfString = serialize($cnf);
|
||
app::get('omeauto')->setConf('auto.setting', $cnfString);
|
||
}
|
||
|
||
/**
|
||
* 获得当前设置内容
|
||
*
|
||
* @param void
|
||
* @return Array
|
||
*/
|
||
function getAutoCnf() {
|
||
$autoCnf = app::get('ome')->getConf('auto.setting');
|
||
|
||
if (empty($autoCnf)) {
|
||
return $this->_defaultAutoCnf();
|
||
} else {
|
||
if (!is_array($autoCnf) || empty($autoCnf)) {
|
||
return $this->_defaultAutoCnf();
|
||
} else {
|
||
return $autoCnf;
|
||
}
|
||
}
|
||
}
|
||
|
||
/**
|
||
* 获取缺省设置
|
||
*
|
||
* @param void
|
||
* @return Array
|
||
*/
|
||
private function _defaultAutoCnf() {
|
||
|
||
return array('bufferTime' => '30', 'autoCod' => 'N', 'chkNoPayOrder' => 'Y', 'chkMemo' => 'Y', 'chkCustom' => 'Y', 'chkProduct' => 'N', 'autoDelivery' => 'Y', 'combineMember' => 'N', 'chkShipAddress' => 'N');
|
||
}
|
||
} |