mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-02-22 17:50:27 +00:00
添加注释
This commit is contained in:
parent
81c156b516
commit
310804ac9c
@ -17,10 +17,15 @@ class FormBuilder extends Form
|
|||||||
* @param $title
|
* @param $title
|
||||||
* @param array $field
|
* @param array $field
|
||||||
* @param $url
|
* @param $url
|
||||||
* @param $jscallback null 不执行 1 父级刷新 2 父级刷新关闭弹框 str 自定义
|
* @param $jscallback $f.submitStatus({loading: false}); 成功按钮状态false
|
||||||
|
* 1 父级刷新 不能再提交
|
||||||
|
* 2 父级刷新关闭弹框 不能再提交 成功关闭
|
||||||
|
* 3 父页面刷新可以重复添加 可以再次提交
|
||||||
|
* 4 不能再提交
|
||||||
|
* str 自定义
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public static function make_post_form($title,array $field,$url,$jscallback = 1){
|
public static function make_post_form($title,array $field,$url,$jscallback = 2){
|
||||||
$form = Form::create($url);//提交地址
|
$form = Form::create($url);//提交地址
|
||||||
$form->setMethod('POST');//提交方式
|
$form->setMethod('POST');//提交方式
|
||||||
$form->components($field);//表单字段
|
$form->components($field);//表单字段
|
||||||
@ -33,6 +38,12 @@ class FormBuilder extends Form
|
|||||||
case 2:
|
case 2:
|
||||||
$js = 'parent.$(".J_iframe:visible")[0].contentWindow.location.reload(); setTimeout(function(){parent.layer.close(parent.layer.getFrameIndex(window.name));},2000);';//提交成功父级页面刷新并关闭当前页面
|
$js = 'parent.$(".J_iframe:visible")[0].contentWindow.location.reload(); setTimeout(function(){parent.layer.close(parent.layer.getFrameIndex(window.name));},2000);';//提交成功父级页面刷新并关闭当前页面
|
||||||
break;
|
break;
|
||||||
|
case 3:
|
||||||
|
$js = 'parent.$(".J_iframe:visible")[0].contentWindow.location.reload();$r.btn.disabled(false);$r.btn.finish();';//提交成功父级页面刷新继续添加
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
$js = '$r.btn.disabled(false);$r.btn.finish();';//提交成功不能再提交
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
$js = $jscallback;
|
$js = $jscallback;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -12,11 +12,21 @@ use app\admin\model\system\SystemGroupData;
|
|||||||
|
|
||||||
class GroupDataService
|
class GroupDataService
|
||||||
{
|
{
|
||||||
|
/**获取单个组数据
|
||||||
|
* @param $config_name
|
||||||
|
* @param int $limit
|
||||||
|
* @return array|bool|false|\PDOStatement|string|\think\Model
|
||||||
|
*/
|
||||||
public static function getGroupData($config_name,$limit = 0)
|
public static function getGroupData($config_name,$limit = 0)
|
||||||
{
|
{
|
||||||
return SystemGroupData::getGroupData($config_name,$limit);
|
return SystemGroupData::getGroupData($config_name,$limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**获取单个值
|
||||||
|
* @param $config_name
|
||||||
|
* @param int $limit
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
public static function getData($config_name,$limit = 0)
|
public static function getData($config_name,$limit = 0)
|
||||||
{
|
{
|
||||||
return SystemGroupData::getAllValue($config_name,$limit);
|
return SystemGroupData::getAllValue($config_name,$limit);
|
||||||
|
|||||||
@ -35,6 +35,31 @@ class RoutineTemplateService{
|
|||||||
if($tempKey == '')return '';
|
if($tempKey == '')return '';
|
||||||
return Db::name('RoutineTemplate')->where('tempkey',$tempKey)->where('status',1)->value('tempid');
|
return Db::name('RoutineTemplate')->where('tempkey',$tempKey)->where('status',1)->value('tempid');
|
||||||
}
|
}
|
||||||
|
/**服务进度通知
|
||||||
|
* @param array $data
|
||||||
|
* @param null $url
|
||||||
|
* @param string $defaultColor
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public static function sendAdminNoticeTemplate(array $data,$url = null,$defaultColor = '')
|
||||||
|
{
|
||||||
|
// $adminIds = explode(',',trim(SystemConfigService::get('site_store_admin_uids')));
|
||||||
|
// $kefuIds = ServiceModel::where('notify',1)->column('uid');
|
||||||
|
// if(empty($adminIds[0])){
|
||||||
|
// $adminList = array_unique($kefuIds);
|
||||||
|
// }else{
|
||||||
|
// $adminList = array_unique(array_merge($adminIds,$kefuIds));
|
||||||
|
// }
|
||||||
|
// if(!is_array($adminList) || empty($adminList)) return false;
|
||||||
|
// foreach ($adminList as $uid){
|
||||||
|
// try{
|
||||||
|
// $openid = WechatUser::uidToOpenid($uid);
|
||||||
|
// }catch (\Exception $e){
|
||||||
|
// continue;
|
||||||
|
// }
|
||||||
|
// self::sendTemplate($openid,self::ADMIN_NOTICE,$data,$url,$defaultColor);
|
||||||
|
// }
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 获取小程序模板库所有标题列表
|
* 获取小程序模板库所有标题列表
|
||||||
* @param string $accessToken
|
* @param string $accessToken
|
||||||
|
|||||||
@ -10,26 +10,45 @@ namespace service;
|
|||||||
|
|
||||||
use app\admin\model\system\SystemConfig;
|
use app\admin\model\system\SystemConfig;
|
||||||
|
|
||||||
|
/** 获取系统配置服务类
|
||||||
|
* Class SystemConfigService
|
||||||
|
* @package service
|
||||||
|
*/
|
||||||
class SystemConfigService
|
class SystemConfigService
|
||||||
{
|
{
|
||||||
protected static $configList = null;
|
protected static $configList = null;
|
||||||
|
|
||||||
|
/**获取系统配置
|
||||||
|
* @param $key
|
||||||
|
* @return mixed|null
|
||||||
|
*/
|
||||||
public static function config($key)
|
public static function config($key)
|
||||||
{
|
{
|
||||||
if(self::$configList === null) self::$configList = self::getAll();
|
if(self::$configList === null) self::$configList = self::getAll();
|
||||||
return isset(self::$configList[$key]) ? self::$configList[$key] : null;
|
return isset(self::$configList[$key]) ? self::$configList[$key] : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**获取单个配置效率更高
|
||||||
|
* @param $key
|
||||||
|
* @return bool|mixed
|
||||||
|
*/
|
||||||
public static function get($key)
|
public static function get($key)
|
||||||
{
|
{
|
||||||
return SystemConfig::getValue($key);
|
return SystemConfig::getValue($key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 获取多个配置
|
||||||
|
* @param $keys ',' 隔开
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
public static function more($keys)
|
public static function more($keys)
|
||||||
{
|
{
|
||||||
return SystemConfig::getMore($keys);
|
return SystemConfig::getMore($keys);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**获取全部配置
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
public static function getAll()
|
public static function getAll()
|
||||||
{
|
{
|
||||||
return SystemConfig::getAllConfig()?:[];
|
return SystemConfig::getAllConfig()?:[];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user