Init Repo

This commit is contained in:
root
2019-09-06 23:53:10 +08:00
commit f0ef89dfbb
7905 changed files with 914138 additions and 0 deletions

View File

@ -0,0 +1,29 @@
<?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;
}
}