feat/task1-c-wallet
parent
d12b59cedf
commit
7f71091554
|
|
@ -53,7 +53,7 @@ class Theme extends Common
|
|||
$this->assign('data_list', ThemeService::ThemeList());
|
||||
|
||||
// 默认主题
|
||||
$theme = cache('cache_common_default_theme_data');
|
||||
$theme = MyC('common_default_theme', 'default', true);
|
||||
$this->assign('theme', empty($theme) ? 'default' : $theme);
|
||||
return $this->fetch('index');
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ return [
|
|||
// 默认模板渲染规则 1 解析为小写+下划线 2 全部转换小写 3 保持操作方法
|
||||
'auto_rule' => 1,
|
||||
// 模板路径
|
||||
'view_path' => APP_PATH.'index'.DS.'view'.DS.strtolower(MyC('cache_common_default_theme_data', 'default')).DS,
|
||||
'view_path' => APP_PATH.'index'.DS.'view'.DS.strtolower(MyC('common_default_theme', 'default', true)).DS,
|
||||
// 模板后缀
|
||||
'view_suffix' => 'html',
|
||||
// 模板文件名分隔符
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ class Common extends Controller
|
|||
public function ViewInit()
|
||||
{
|
||||
// 主题
|
||||
$default_theme = strtolower(MyC('cache_common_default_theme_data', 'default'));
|
||||
$default_theme = strtolower(MyC('common_default_theme', 'default', true));
|
||||
$this->assign('default_theme', $default_theme);
|
||||
|
||||
// 当前操作名称
|
||||
|
|
|
|||
|
|
@ -109,20 +109,7 @@ class ConfigService
|
|||
{
|
||||
$data['home_user_reg_state'] = explode(',', $data['home_user_reg_state']);
|
||||
}
|
||||
|
||||
cache($key, $data);
|
||||
|
||||
// 时区
|
||||
if(isset($data['common_timezone']))
|
||||
{
|
||||
cache('cache_common_timezone_data', $data['common_timezone']);
|
||||
}
|
||||
|
||||
// 默认模板
|
||||
if(isset($data['common_default_theme']))
|
||||
{
|
||||
cache('cache_common_default_theme_data', $data['common_default_theme']);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -179,8 +179,7 @@ class ThemeService
|
|||
}
|
||||
|
||||
// 默认主题
|
||||
$theme = cache('cache_common_default_theme_data');
|
||||
$theme = empty($theme) ? 'default' : $theme;
|
||||
$theme = MyC('common_default_theme', 'default', true);
|
||||
|
||||
// 不能删除正在使用的主题
|
||||
if($theme == $id)
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ class UserService
|
|||
$v['avatar'] = config('images_host').$v['avatar'];
|
||||
}
|
||||
} else {
|
||||
$v['avatar'] = config('images_host').'/static/index/'.strtolower(MyC('cache_common_default_theme_data', 'default')).'/images/default-user-avatar.jpg';
|
||||
$v['avatar'] = config('images_host').'/static/index/'.strtolower(MyC('common_default_theme', 'default', true)).'/images/default-user-avatar.jpg';
|
||||
}
|
||||
|
||||
// 注册时间
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ return [
|
|||
// 默认JSONP处理方法
|
||||
'var_jsonp_handler' => 'callback',
|
||||
// 默认时区
|
||||
'default_timezone' => 'Asia/Shanghai',
|
||||
'default_timezone' => MyC('common_timezone', 'Asia/Shanghai', true),
|
||||
// 是否开启多语言
|
||||
'lang_switch_on' => false,
|
||||
// 默认全局过滤方法 用逗号分隔多个
|
||||
|
|
@ -157,18 +157,12 @@ return [
|
|||
// 前台顶部导航
|
||||
'cache_common_home_nav_footer_key' => 'cache_common_home_nav_footer_data',
|
||||
|
||||
// 时区
|
||||
'cache_common_timezone_key' => 'cache_common_timezone_data',
|
||||
|
||||
// 默认模板
|
||||
'cache_common_default_theme_key' => 'cache_common_default_theme_data',
|
||||
|
||||
// 频道缓存 array(id => name)
|
||||
'cache_home_channel_key' => 'cache_home_channel_data',
|
||||
|
||||
|
||||
// 图片host, 数据库图片地址以/Public/...开头
|
||||
'IMAGE_HOST' => substr(__MY_URL__, 0, -1),
|
||||
'images_host' => substr(__MY_URL__, 0, -1),
|
||||
|
||||
// 开启U带域名
|
||||
'url_domain_deploy' => true,
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -110,7 +110,7 @@ $(function()
|
|||
html += '<ul class="plug-file-upload-view spec-images-view-'+index+'" data-form-name="spec_images['+index+']" data-max-number="1" data-dialog-type="images">';
|
||||
html += '<li>';
|
||||
html += '<input type="text" name="spec_images['+index+']" data-validation-message="请上传规格图片" required />';
|
||||
html += '<img src="'+__image_host__+'/static/admin/default/images/default-images.png" />';
|
||||
html += '<img src="'+__images_host__+'/static/admin/default/images/default-images.png" />';
|
||||
html += '<i>×</i>';
|
||||
html += '</li>';
|
||||
html += '</ul>';
|
||||
|
|
|
|||
Loading…
Reference in New Issue