2019-09-06 23:53:10 +08:00

30 lines
690 B
PHP
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace wstmart\common\model;
/**
* ============================================================================
* 系统配置类
*/
class SysConfigs extends Base{
/**
* 获取商城配置文件
*/
public function loadConfigs(){
$rs = $this->field('fieldCode,fieldValue')->order("parentId asc,fieldSort asc")->select();
$configs = array();
if(count($rs)>0){
foreach ($rs as $key=>$v){
if($v['fieldCode']=="hotSearchs"){
$fieldValue = str_replace("",",",$v['fieldValue']);
$configs[$v['fieldCode']] = explode(",",$fieldValue);
}else{
$configs[$v['fieldCode']] = $v['fieldValue'];
}
}
}
unset($rs);
return $configs;
}
}