变量更新
parent
ff474703dd
commit
d12b59cedf
|
|
@ -128,7 +128,7 @@ class Common extends Controller
|
|||
$this->assign('admin', $this->admin);
|
||||
|
||||
// 图片host地址
|
||||
$this->assign('image_host', config('IMAGE_HOST'));
|
||||
$this->assign('images_host', config('images_host'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -375,7 +375,7 @@ class Coupon extends Common
|
|||
}
|
||||
if(empty($user['avatar']))
|
||||
{
|
||||
$user['avatar'] = config('IMAGE_HOST').'Public/Common/Images/user-img-md.gif';
|
||||
$user['avatar'] = config('images_host').'Public/Common/Images/user-img-md.gif';
|
||||
}
|
||||
$this->ajaxReturn('操作成功', 0, $user);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@
|
|||
<ul class="plug-file-upload-view slide-images_url-images-view" data-form-name="images_url" data-max-number="1" data-delete="0" data-dialog-type="images">
|
||||
<li>
|
||||
<input type="text" name="images_url" value="{{if !empty($data['images_url'])}}{{$data.images_url}}{{/if}}" data-validation-message="请上传图片" required />
|
||||
<img src="{{if !empty($data['images_url'])}}{{$data.images_url}}{{else /}}{{$image_host}}/static/admin/default/images/default-images.png{{/if}}" />
|
||||
<img src="{{if !empty($data['images_url'])}}{{$data.images_url}}{{else /}}{{$images_host}}/static/admin/default/images/default-images.png{{/if}}" />
|
||||
</li>
|
||||
</ul>
|
||||
<div class="plug-file-upload-submit" data-view-tag="ul.slide-images_url-images-view">+上传图片</div>
|
||||
|
|
@ -67,7 +67,7 @@
|
|||
<label>背景色</label>
|
||||
<input type="hidden" name="bg_color" value="{{if !empty($data)}}{{$data.bg_color}}{{/if}}" />
|
||||
<button class="am-btn am-btn-default colorpicker-submit bg-color-tag am-btn-block bk-cr-white t-r" type="button" data-input-tag="button.bg-color-tag" data-color-tag="input[name='bg_color']" data-color-style="background-color" {{if !empty($data)}} style="background-color:{{$data.bg_color}};"{{/if}}>
|
||||
<img src="{{$image_host}}/static/common/images/colorpicker.png" />
|
||||
<img src="{{$images_host}}/static/common/images/colorpicker.png" />
|
||||
</button>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
<input type="text" name="title" placeholder="标题" minlength="2" maxlength="60" data-validation-message="标题长度 2~60 个字符" class="am-form-field am-radius" {{if !empty($data)}} value="{{$data.title}}" {{/if}} {{if !empty($data['title_color'])}} style="color:{{$data.title_color}};" {{/if}} required />
|
||||
<span class="am-input-group-btn">
|
||||
<button class="am-btn am-btn-default colorpicker-submit" type="button" data-input-tag="input[name='title']" data-color-tag="input[name='title_color']">
|
||||
<img src="{{$image_host}}/static/common/images/colorpicker.png" />
|
||||
<img src="{{$images_host}}/static/common/images/colorpicker.png" />
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
<!-- list start -->
|
||||
<div id="tree" class="m-t-15">
|
||||
<div class="m-t-30 t-c">
|
||||
<img src="{{$image_host}}/static/common/images/loading.gif" />
|
||||
<img src="{{$images_host}}/static/common/images/loading.gif" />
|
||||
<p>处理中...</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
<!-- list start -->
|
||||
<div id="tree" class="m-t-15">
|
||||
<div class="m-t-30 t-c">
|
||||
<img src="{{$image_host}}/static/common/images/loading.gif" />
|
||||
<img src="{{$images_host}}/static/common/images/loading.gif" />
|
||||
<p>处理中...</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@
|
|||
</span>
|
||||
</div>
|
||||
<div class="am-form-group data-success none">
|
||||
<img class="am-img-thumbnail am-circle fl" src="{{$image_host}}/Public/Common/Images/user-img-md.gif" />
|
||||
<img class="am-img-thumbnail am-circle fl" src="{{$images_host}}/Public/Common/Images/user-img-md.gif" />
|
||||
<div class="base fl">
|
||||
<p class="base-username"></p>
|
||||
<p class="base-nickname"></p>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
<ul class="plug-file-upload-view express-icon-images-view" data-form-name="icon" data-max-number="1" data-dialog-type="images">
|
||||
<li>
|
||||
<input type="hidden" name="icon" value="" />
|
||||
<img src="{{$image_host}}/static/admin/default/images/default-images.png" />
|
||||
<img src="{{$images_host}}/static/admin/default/images/default-images.png" />
|
||||
<i>×</i>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
@ -51,9 +51,9 @@
|
|||
<!-- save win end -->
|
||||
|
||||
<!-- list start -->
|
||||
<div id="tree" class="m-t-15" data-additional='[{"field":"icon", "value":"", "type":"input"}, {"field":"icon_url", "value":"{{$image_host}}/static/admin/default/images/default-images.png", "type":"attr", "tag":"ul.express-icon-images-view li img", "style":"src"}]'>
|
||||
<div id="tree" class="m-t-15" data-additional='[{"field":"icon", "value":"", "type":"input"}, {"field":"icon_url", "value":"{{$images_host}}/static/admin/default/images/default-images.png", "type":"attr", "tag":"ul.express-icon-images-view li img", "style":"src"}]'>
|
||||
<div class="m-t-30 t-c">
|
||||
<img src="{{$image_host}}/static/common/images/loading.gif" />
|
||||
<img src="{{$images_host}}/static/common/images/loading.gif" />
|
||||
<p>处理中...</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@
|
|||
<input type="text" name="title" placeholder="标题名称" minlength="2" maxlength="60" data-validation-message="标题名称格式 2~60 个字符" class="am-form-field am-radius" {{if !empty($data)}} value="{{$data.title}}" {{/if}} {{if !empty($data['title_color'])}} style="color:{{$data.title_color}};" {{/if}} required />
|
||||
<span class="am-input-group-btn">
|
||||
<button class="am-btn am-btn-default colorpicker-submit" type="button" data-input-tag="input[name='title']" data-color-tag="input[name='title_color']">
|
||||
<img src="{{$image_host}}/static/common/images/colorpicker.png" />
|
||||
<img src="{{$images_host}}/static/common/images/colorpicker.png" />
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
<ul class="plug-file-upload-view goods-category-icon-images-view" data-form-name="icon" data-max-number="1" data-dialog-type="images">
|
||||
<li>
|
||||
<input type="hidden" name="icon" value="" />
|
||||
<img src="{{$image_host}}/static/admin/default/images/default-images.png" />
|
||||
<img src="{{$images_host}}/static/admin/default/images/default-images.png" />
|
||||
<i>×</i>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
<ul class="plug-file-upload-view goods-category-big_images-images-view" data-form-name="big_images" data-max-number="1" data-dialog-type="images">
|
||||
<li>
|
||||
<input type="hidden" name="big_images" value="" />
|
||||
<img src="{{$image_host}}/static/admin/default/images/default-images.png" />
|
||||
<img src="{{$images_host}}/static/admin/default/images/default-images.png" />
|
||||
<i>×</i>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
@ -45,7 +45,7 @@
|
|||
<label>背景色</label>
|
||||
<input type="hidden" name="bg_color" value="" />
|
||||
<button class="am-btn am-btn-default colorpicker-submit bg-color-tag am-btn-block bk-cr-white t-r" type="button" data-input-tag="button.bg-color-tag" data-color-tag="input[name='bg_color']" data-color-style="background-color">
|
||||
<img src="{{$image_host}}/static/common/images/colorpicker.png" />
|
||||
<img src="{{$images_host}}/static/common/images/colorpicker.png" />
|
||||
</button>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
|
|
@ -88,9 +88,9 @@
|
|||
<!-- save win end -->
|
||||
|
||||
<!-- list start -->
|
||||
<div id="tree" class="m-t-15" data-rank="3" data-additional='[{"field":"bg_color", "value":"", "type":"input"}, {"field":"bg_color", "value":"", "type":"css", "tag":"button.colorpicker-submit", "style":"background-color"}, {"field":"icon", "value":"", "type":"input"}, {"field":"icon_url", "value":"{{$image_host}}/static/admin/default/images/default-images.png", "type":"attr", "tag":"ul.goods-category-icon-images-view li img", "style":"src"}, {"field":"big_images", "value":"", "type":"input"}, {"field":"big_images_url", "value":"{{$image_host}}/static/admin/default/images/default-images.png", "type":"attr", "tag":"ul.goods-category-big_images-images-view li img", "style":"src"}, {"field":"vice_name", "value":"", "type":"input"}, {"field":"describe", "value":"", "type":"textarea"}, {"field":"is_home_recommended", "value":"0", "type":"input"}]'>
|
||||
<div id="tree" class="m-t-15" data-rank="3" data-additional='[{"field":"bg_color", "value":"", "type":"input"}, {"field":"bg_color", "value":"", "type":"css", "tag":"button.colorpicker-submit", "style":"background-color"}, {"field":"icon", "value":"", "type":"input"}, {"field":"icon_url", "value":"{{$images_host}}/static/admin/default/images/default-images.png", "type":"attr", "tag":"ul.goods-category-icon-images-view li img", "style":"src"}, {"field":"big_images", "value":"", "type":"input"}, {"field":"big_images_url", "value":"{{$images_host}}/static/admin/default/images/default-images.png", "type":"attr", "tag":"ul.goods-category-big_images-images-view li img", "style":"src"}, {"field":"vice_name", "value":"", "type":"input"}, {"field":"describe", "value":"", "type":"textarea"}, {"field":"is_home_recommended", "value":"0", "type":"input"}]'>
|
||||
<div class="m-t-30 t-c">
|
||||
<img src="{{$image_host}}/static/common/images/loading.gif" />
|
||||
<img src="{{$images_host}}/static/common/images/loading.gif" />
|
||||
<p>处理中...</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -17,6 +17,6 @@
|
|||
{{/if}}
|
||||
</head>
|
||||
<script type="text/javascript">
|
||||
var __image_host__ = '{{$image_host}}';
|
||||
var __images_host__ = '{{$images_host}}';
|
||||
</script>
|
||||
<body>
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
<!-- list start -->
|
||||
<div id="tree" class="m-t-15">
|
||||
<div class="m-t-30 t-c">
|
||||
<img src="{{$image_host}}/static/common/images/loading.gif" />
|
||||
<img src="{{$images_host}}/static/common/images/loading.gif" />
|
||||
<p>处理中...</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@
|
|||
<!-- list start -->
|
||||
<div id="tree" class="m-t-15" data-additional='[{"field":"min_price", "value":"0", "type":"input"}, {"field":"max_price", "value":"0", "type":"input"}]'>
|
||||
<div class="m-t-30 t-c">
|
||||
<img src="{{$image_host}}/static/common/images/loading.gif" />
|
||||
<img src="{{$images_host}}/static/common/images/loading.gif" />
|
||||
<p>处理中...</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@
|
|||
<ul class="plug-file-upload-view slide-images_url-images-view" data-form-name="images_url" data-max-number="1" data-delete="0" data-dialog-type="images">
|
||||
<li>
|
||||
<input type="text" name="images_url" value="{{if !empty($data['images_url'])}}{{$data.images_url}}{{/if}}" data-validation-message="请上传图片" required />
|
||||
<img src="{{if !empty($data['images_url'])}}{{$data.images_url}}{{else /}}{{$image_host}}/static/admin/default/images/default-images.png{{/if}}" />
|
||||
<img src="{{if !empty($data['images_url'])}}{{$data.images_url}}{{else /}}{{$images_host}}/static/admin/default/images/default-images.png{{/if}}" />
|
||||
</li>
|
||||
</ul>
|
||||
<div class="plug-file-upload-submit" data-view-tag="ul.slide-images_url-images-view">+上传图片</div>
|
||||
|
|
@ -63,7 +63,7 @@
|
|||
<label>背景色</label>
|
||||
<input type="hidden" name="bg_color" value="{{if !empty($data)}}{{$data.bg_color}}{{/if}}" />
|
||||
<button class="am-btn am-btn-default colorpicker-submit bg-color-tag am-btn-block bk-cr-white t-r" type="button" data-input-tag="button.bg-color-tag" data-color-tag="input[name='bg_color']" data-color-style="background-color" {{if !empty($data)}} style="background-color:{{$data.bg_color}};"{{/if}}>
|
||||
<img src="{{$image_host}}/static/common/images/colorpicker.png" />
|
||||
<img src="{{$images_host}}/static/common/images/colorpicker.png" />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ class Common extends Controller
|
|||
$this->assign('is_footer', 1);
|
||||
|
||||
// 图片host地址
|
||||
$this->assign('image_host', config('IMAGE_HOST'));
|
||||
$this->assign('images_host', config('images_host'));
|
||||
|
||||
// 标题
|
||||
$this->assign('home_seo_site_title', MyC('home_seo_site_title'));
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
<div class="am-u-sm-3">
|
||||
<a href="{{:url('index/category/index')}}">
|
||||
<div class="nav-icon mini-nav-goods-category">
|
||||
<img src="{{$image_host}}/static/{{$module_name}}/{{$default_theme}}/images/home-mini-nav-category-icon.png" />
|
||||
<img src="{{$images_host}}/static/{{$module_name}}/{{$default_theme}}/images/home-mini-nav-category-icon.png" />
|
||||
</div>
|
||||
<div class="mini-nav-title">分类</div>
|
||||
</a>
|
||||
|
|
@ -34,7 +34,7 @@
|
|||
<div class="am-u-sm-3">
|
||||
<a {{if empty($user)}}href="javascript:;" class="login-event"{{else /}} href="{{:url('index/Cart/index')}}"{{/if}}>
|
||||
<div class="nav-icon mini-nav-cart">
|
||||
<img src="{{$image_host}}/static/{{$module_name}}/{{$default_theme}}/images/home-mini-nav-cart-icon.png" />
|
||||
<img src="{{$images_host}}/static/{{$module_name}}/{{$default_theme}}/images/home-mini-nav-cart-icon.png" />
|
||||
</div>
|
||||
<div class="mini-nav-title">购物车</div>
|
||||
</a>
|
||||
|
|
@ -42,7 +42,7 @@
|
|||
<div class="am-u-sm-3">
|
||||
<a {{if empty($user)}}href="javascript:;" class="login-event"{{else /}} href="{{:url('index/order/index')}}"{{/if}}>
|
||||
<div class="nav-icon mini-nav-order">
|
||||
<img src="{{$image_host}}/static/{{$module_name}}/{{$default_theme}}/images/home-mini-nav-order-icon.png" />
|
||||
<img src="{{$images_host}}/static/{{$module_name}}/{{$default_theme}}/images/home-mini-nav-order-icon.png" />
|
||||
</div>
|
||||
<div class="mini-nav-title">订单</div>
|
||||
</a>
|
||||
|
|
@ -50,7 +50,7 @@
|
|||
<div class="am-u-sm-3">
|
||||
<a {{if empty($user)}}href="javascript:;" class="login-event"{{else /}} href="{{:url('index/user/index')}}"{{/if}}>
|
||||
<div class="nav-icon mini-nav-user">
|
||||
<img src="{{$image_host}}/static/{{$module_name}}/{{$default_theme}}/images/home-mini-nav-user-icon.png" />
|
||||
<img src="{{$images_host}}/static/{{$module_name}}/{{$default_theme}}/images/home-mini-nav-user-icon.png" />
|
||||
</div>
|
||||
<div class="mini-nav-title">我的</div>
|
||||
</a>
|
||||
|
|
@ -62,7 +62,7 @@
|
|||
<div class="mod-vip">
|
||||
<div class="m-baseinfo">
|
||||
<a href="{{if !empty($user)}}{{:url('index/user/index')}}{{else /}}javascript:;{{/if}}" target="_blank">
|
||||
<img src="{{if !empty($user['avatar'])}}{{$user.avatar}}{{else /}}{{$image_host}}/static/{{$module_name}}/{{$default_theme}}/images/default-user-avatar.jpg{{/if}}" class="user-avatar" />
|
||||
<img src="{{if !empty($user['avatar'])}}{{$user.avatar}}{{else /}}{{$images_host}}/static/{{$module_name}}/{{$default_theme}}/images/default-user-avatar.jpg{{/if}}" class="user-avatar" />
|
||||
</a>
|
||||
<em>
|
||||
<span class="s-name">
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@
|
|||
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-title" content="{{:MyC('home_site_name')}}">
|
||||
<link rel="apple-touch-icon" href="{{$image_host}}{{:MyC('home_site_desktop_icon')}}">
|
||||
<link rel="apple-touch-icon-precomposed" href="{{$image_host}}{{:MyC('home_site_desktop_icon')}}">
|
||||
<link rel="apple-touch-icon" href="{{$images_host}}{{:MyC('home_site_desktop_icon')}}">
|
||||
<link rel="apple-touch-icon-precomposed" href="{{$images_host}}{{:MyC('home_site_desktop_icon')}}">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/common/lib/assets/css/amazeui.css?v={{:MyC('home_static_cache_version')}}" />
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/common/lib/amazeui-switch/amazeui.switch.css?v={{:MyC('home_static_cache_version')}}" />
|
||||
|
|
@ -33,6 +33,7 @@
|
|||
var __public__ = '{{$Think.__MY_ROOT__}}';
|
||||
var __default_theme__ = '{{$default_theme}}';
|
||||
var __modal_login_url__ = '{{:Url('index/user/modallogininfo')}}';
|
||||
var __images_host__ = '{{$images_host}}';
|
||||
var __user_id__ = {{if empty($user['id'])}}0{{else /}}{{$user.id}}{{/if}};
|
||||
</script>
|
||||
</head>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
</ul>
|
||||
<div class="nav-extra {{if empty($user)}}login-event{{/if}}">
|
||||
<a href="{{if empty($user)}}javascript:;{{else /}}{{:url('index/user/index')}}{{/if}}">
|
||||
<img src="{{if !empty($user['avatar'])}}{{$user.avatar}}{{else /}}{{$image_host}}/static/{{$module_name}}/{{$default_theme}}/images/default-user-avatar.jpg{{/if}}" class="nav-user" />
|
||||
<img src="{{if !empty($user['avatar'])}}{{$user.avatar}}{{else /}}{{$images_host}}/static/{{$module_name}}/{{$default_theme}}/images/default-user-avatar.jpg{{/if}}" class="nav-user" />
|
||||
<b></b>
|
||||
<span>我的商城</span>
|
||||
<i class="am-icon-angle-right"></i>
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@
|
|||
<div class="nav-search white">
|
||||
<div class="logo">
|
||||
<a href="{{$Think.__MY_URL__}}">
|
||||
<img src="{{$image_host}}{{:MyC('home_site_logo_wap')}}" alt="{{:MyC('home_seo_site_title')}}" />
|
||||
<img src="{{$images_host}}{{:MyC('home_site_logo_wap')}}" alt="{{:MyC('home_seo_site_title')}}" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="logo-big">
|
||||
<a href="{{$Think.__MY_URL__}}">
|
||||
<img src="{{$image_host}}{{:MyC('home_site_logo')}}" alt="{{:MyC('home_seo_site_title')}}" />
|
||||
<img src="{{$images_host}}{{:MyC('home_site_logo')}}" alt="{{:MyC('home_seo_site_title')}}" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
<input type="hidden" name="max_file_size" value="{{:MyC('home_max_limit_image', 2048000)}}" />
|
||||
<div class="cropper-images-view">
|
||||
<div class="img-container am-fl user-avatar-img-container">
|
||||
<img src="{{$image_host}}/static/{{$module_name}}/{{$default_theme}}/images/default-user-avatar.jpg" alt="Picture" />
|
||||
<img src="{{$images_host}}/static/{{$module_name}}/{{$default_theme}}/images/default-user-avatar.jpg" alt="Picture" />
|
||||
</div>
|
||||
<div class="img-preview preview-lg am-fl am-radius user-avatar-img-preview am-hide-sm-only"></div>
|
||||
<div class="img-preview preview-md am-fl am-radius user-avatar-img-preview "></div>
|
||||
|
|
|
|||
|
|
@ -1541,7 +1541,7 @@ class AlipayLifeService
|
|||
if(!empty($data))
|
||||
{
|
||||
$common_is_enable_tips = lang('common_is_enable_tips');
|
||||
$image_host = config('IMAGE_HOST');
|
||||
$images_host = config('images_host');
|
||||
foreach($data as &$v)
|
||||
{
|
||||
// 是否启用
|
||||
|
|
@ -1558,7 +1558,7 @@ class AlipayLifeService
|
|||
if(isset($v['logo']))
|
||||
{
|
||||
$v['logo_old'] = $v['logo'];
|
||||
$v['logo'] = empty($v['logo']) ? '' : $image_host.$v['logo'];
|
||||
$v['logo'] = empty($v['logo']) ? '' : $images_host.$v['logo'];
|
||||
}
|
||||
|
||||
// 时间
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class AppNavService
|
|||
$common_platform_type = lang('common_platform_type');
|
||||
$common_is_enable_tips = lang('common_is_enable_tips');
|
||||
$common_app_event_type = lang('common_app_event_type');
|
||||
$image_host = config('IMAGE_HOST');
|
||||
$images_host = config('images_host');
|
||||
foreach($data as &$v)
|
||||
{
|
||||
// 是否启用
|
||||
|
|
@ -62,7 +62,7 @@ class AppNavService
|
|||
if(isset($v['images_url']))
|
||||
{
|
||||
$v['images_url_old'] = $v['images_url'];
|
||||
$v['images_url'] = empty($v['images_url']) ? '' : $image_host.$v['images_url'];
|
||||
$v['images_url'] = empty($v['images_url']) ? '' : $images_host.$v['images_url'];
|
||||
}
|
||||
|
||||
// 时间
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class BannerService
|
|||
$banner = Db::name('Slide')->field('name,images_url,event_value,event_type,bg_color')->where(['platform'=>APPLICATION_CLIENT_TYPE, 'is_enable'=>1])->order('sort asc')->select();
|
||||
if(!empty($banner))
|
||||
{
|
||||
$images_host = config('IMAGE_HOST');
|
||||
$images_host = config('images_host');
|
||||
foreach($banner as &$v)
|
||||
{
|
||||
$v['images_url_old'] = $v['images_url'];
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ class BrandService
|
|||
if(!empty($data))
|
||||
{
|
||||
$common_is_enable_tips = lang('common_is_enable_tips');
|
||||
$image_host = config('IMAGE_HOST');
|
||||
$images_host = config('images_host');
|
||||
foreach($data as &$v)
|
||||
{
|
||||
// 是否启用
|
||||
|
|
@ -55,7 +55,7 @@ class BrandService
|
|||
if(isset($v['logo']))
|
||||
{
|
||||
$v['logo_old'] = $v['logo'];
|
||||
$v['logo'] = empty($v['logo']) ? '' : $image_host.$v['logo'];
|
||||
$v['logo'] = empty($v['logo']) ? '' : $images_host.$v['logo'];
|
||||
}
|
||||
|
||||
// 时间
|
||||
|
|
@ -176,11 +176,11 @@ class BrandService
|
|||
$brand = Db::name('Brand')->where($brand_where)->field('id,name,logo,website_url')->select();
|
||||
if(!empty($brand))
|
||||
{
|
||||
$image_host = config('IMAGE_HOST');
|
||||
$images_host = config('images_host');
|
||||
foreach($brand as &$v)
|
||||
{
|
||||
$v['logo_old'] = $v['logo'];
|
||||
$v['logo'] = empty($v['logo']) ? null : $image_host.$v['logo'];
|
||||
$v['logo'] = empty($v['logo']) ? null : $images_host.$v['logo'];
|
||||
$v['website_url'] = empty($v['website_url']) ? null : $v['website_url'];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ class BuyService
|
|||
// 数据处理
|
||||
if(!empty($data))
|
||||
{
|
||||
$images_host = config('IMAGE_HOST');
|
||||
$images_host = config('images_host');
|
||||
foreach($data as &$v)
|
||||
{
|
||||
// 规格
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ class ExpressService
|
|||
$data = Db::name('Express')->where($where)->field('id,icon,name,sort,is_enable')->order('sort asc')->select();
|
||||
if(!empty($data) && is_array($data))
|
||||
{
|
||||
$images_host = config('IMAGE_HOST');
|
||||
$images_host = config('images_host');
|
||||
foreach($data as &$v)
|
||||
{
|
||||
$v['icon_old'] = $v['icon'];
|
||||
|
|
@ -74,13 +74,13 @@ class ExpressService
|
|||
$data = Db::name('Express')->field($field)->where(['pid'=>$id])->order('sort asc')->select();
|
||||
if(!empty($data))
|
||||
{
|
||||
$image_host = config('IMAGE_HOST');
|
||||
$images_host = config('images_host');
|
||||
foreach($data as &$v)
|
||||
{
|
||||
$v['is_son'] = (Db::name('Express')->where(['pid'=>$v['id']])->count() > 0) ? 'ok' : 'no';
|
||||
$v['ajax_url'] = url('admin/express/getnodeson', array('id'=>$v['id']));
|
||||
$v['delete_url'] = url('admin/express/delete');
|
||||
$v['icon_url'] = empty($v['icon']) ? '' : $image_host.$v['icon'];
|
||||
$v['icon_url'] = empty($v['icon']) ? '' : $images_host.$v['icon'];
|
||||
$v['json'] = json_encode($v);
|
||||
}
|
||||
return DataReturn('操作成功', 0, $data);
|
||||
|
|
|
|||
|
|
@ -106,19 +106,19 @@ class GoodsService
|
|||
{
|
||||
if(!empty($data) && is_array($data))
|
||||
{
|
||||
$image_host = config('IMAGE_HOST');
|
||||
$images_host = config('images_host');
|
||||
foreach($data as &$v)
|
||||
{
|
||||
if(is_array($v))
|
||||
{
|
||||
if(isset($v['icon']))
|
||||
{
|
||||
$v['icon'] = empty($v['icon']) ? null : $image_host.$v['icon'];
|
||||
$v['icon'] = empty($v['icon']) ? null : $images_host.$v['icon'];
|
||||
}
|
||||
if(isset($v['big_images']))
|
||||
{
|
||||
$v['big_images_old'] = $v['big_images'];
|
||||
$v['big_images'] = empty($v['big_images']) ? null : $image_host.$v['big_images'];
|
||||
$v['big_images'] = empty($v['big_images']) ? null : $images_host.$v['big_images'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -236,7 +236,7 @@ class GoodsService
|
|||
$is_category = (isset($params['is_category']) && $params['is_category'] == true) ? true : false;
|
||||
|
||||
// 开始处理数据
|
||||
$image_host = config('IMAGE_HOST');
|
||||
$images_host = config('images_host');
|
||||
foreach($data as &$v)
|
||||
{
|
||||
// 商品url地址
|
||||
|
|
@ -249,21 +249,21 @@ class GoodsService
|
|||
if(isset($v['images']))
|
||||
{
|
||||
$v['images_old'] = $v['images'];
|
||||
$v['images'] = empty($v['images']) ? null : $image_host.$v['images'];
|
||||
$v['images'] = empty($v['images']) ? null : $images_host.$v['images'];
|
||||
}
|
||||
|
||||
// 视频
|
||||
if(isset($v['video']))
|
||||
{
|
||||
$v['video_old'] = $v['video'];
|
||||
$v['video'] = empty($v['video']) ? null : $image_host.$v['video'];
|
||||
$v['video'] = empty($v['video']) ? null : $images_host.$v['video'];
|
||||
}
|
||||
|
||||
// 商品首页推荐图片,不存在则使用商品封面图片
|
||||
if(isset($v['home_recommended_images']))
|
||||
{
|
||||
$v['home_recommended_images_old'] = $v['home_recommended_images'];
|
||||
$v['home_recommended_images'] = empty($v['home_recommended_images']) ? (empty($v['images']) ? null : $v['images']) : $image_host.$v['home_recommended_images'];
|
||||
$v['home_recommended_images'] = empty($v['home_recommended_images']) ? (empty($v['images']) ? null : $v['images']) : $images_host.$v['home_recommended_images'];
|
||||
}
|
||||
|
||||
// PC内容处理
|
||||
|
|
@ -305,7 +305,7 @@ class GoodsService
|
|||
foreach($v['photo'] as &$vs)
|
||||
{
|
||||
$vs['images_old'] = $vs['images'];
|
||||
$vs['images'] = $image_host.$vs['images'];
|
||||
$vs['images'] = $images_host.$vs['images'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -341,11 +341,11 @@ class GoodsService
|
|||
$data = Db::name('GoodsContentApp')->where(['goods_id'=>$params['goods_id']])->field('id,images,content')->order('sort asc')->select();
|
||||
if(!empty($data))
|
||||
{
|
||||
$image_host = config('IMAGE_HOST');
|
||||
$images_host = config('images_host');
|
||||
foreach($data as &$v)
|
||||
{
|
||||
$v['images_old'] = $v['images'];
|
||||
$v['images'] = empty($v['images']) ? null : $image_host.$v['images'];
|
||||
$v['images'] = empty($v['images']) ? null : $images_host.$v['images'];
|
||||
$v['content_old'] = $v['content'];
|
||||
$v['content'] = empty($v['content']) ? null : explode("\n", $v['content']);
|
||||
}
|
||||
|
|
@ -382,10 +382,10 @@ class GoodsService
|
|||
$images = Db::name('GoodsSpecImages')->where($where)->column('name,images');
|
||||
if(!empty($images))
|
||||
{
|
||||
$image_host = config('IMAGE_HOST');
|
||||
$images_host = config('images_host');
|
||||
foreach($images as &$temp_iamges)
|
||||
{
|
||||
$temp_iamges = $image_host.$temp_iamges;
|
||||
$temp_iamges = $images_host.$temp_iamges;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -578,12 +578,12 @@ class GoodsService
|
|||
$data = Db::name('GoodsFavor')->alias('f')->join(['__GOODS__'=>'g'], 'g.id=f.goods_id')->field($field)->where($where)->limit($m, $n)->order($order_by)->select();
|
||||
if(!empty($data))
|
||||
{
|
||||
$image_host = config('IMAGE_HOST');
|
||||
$images_host = config('images_host');
|
||||
foreach($data as &$v)
|
||||
{
|
||||
// 图片
|
||||
$v['images_old'] = $v['images'];
|
||||
$v['images'] = empty($v['images']) ? null : $image_host.$v['images'];
|
||||
$v['images'] = empty($v['images']) ? null : $images_host.$v['images'];
|
||||
|
||||
$v['goods_url'] = HomeUrl('goods', 'index', ['id'=>$v['goods_id']]);
|
||||
}
|
||||
|
|
@ -725,11 +725,11 @@ class GoodsService
|
|||
$data = Db::name('GoodsBrowse')->alias('b')->join(['__GOODS__'=>'g'], 'g.id=b.goods_id')->field($field)->where($where)->limit($m, $n)->order($order_by)->select();
|
||||
if(!empty($data))
|
||||
{
|
||||
$image_host = config('IMAGE_HOST');
|
||||
$images_host = config('images_host');
|
||||
foreach($data as &$v)
|
||||
{
|
||||
$v['images_old'] = $v['images'];
|
||||
$v['images'] = empty($v['images']) ? null : $image_host.$v['images'];
|
||||
$v['images'] = empty($v['images']) ? null : $images_host.$v['images'];
|
||||
$v['goods_url'] = HomeUrl('goods', 'index', ['id'=>$v['goods_id']]);
|
||||
}
|
||||
}
|
||||
|
|
@ -1631,11 +1631,11 @@ class GoodsService
|
|||
$images = Db::name('GoodsSpecImages')->where($where)->select();
|
||||
if(!empty($images))
|
||||
{
|
||||
$image_host = config('IMAGE_HOST');
|
||||
$images_host = config('images_host');
|
||||
foreach($images as &$temp_iamges)
|
||||
{
|
||||
$temp_iamges['images_old'] = $temp_iamges['images'];
|
||||
$temp_iamges['images'] = $image_host.$temp_iamges['images'];
|
||||
$temp_iamges['images'] = $images_host.$temp_iamges['images'];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1852,14 +1852,14 @@ class GoodsService
|
|||
$data = Db::name('GoodsCategory')->field($field)->where(['pid'=>$id])->order('sort asc')->select();
|
||||
if(!empty($data))
|
||||
{
|
||||
$image_host = config('IMAGE_HOST');
|
||||
$images_host = config('images_host');
|
||||
foreach($data as &$v)
|
||||
{
|
||||
$v['is_son'] = (Db::name('GoodsCategory')->where(['pid'=>$v['id']])->count() > 0) ? 'ok' : 'no';
|
||||
$v['ajax_url'] = url('admin/goodscategory/getnodeson', array('id'=>$v['id']));
|
||||
$v['delete_url'] = url('admin/goodscategory/delete');
|
||||
$v['icon_url'] = empty($v['icon']) ? '' : $image_host.$v['icon'];
|
||||
$v['big_images_url'] = empty($v['big_images']) ? '' : $image_host.$v['big_images'];
|
||||
$v['icon_url'] = empty($v['icon']) ? '' : $images_host.$v['icon'];
|
||||
$v['big_images_url'] = empty($v['big_images']) ? '' : $images_host.$v['big_images'];
|
||||
$v['json'] = json_encode($v);
|
||||
}
|
||||
return DataReturn('操作成功', 0, $data);
|
||||
|
|
|
|||
|
|
@ -535,7 +535,7 @@ class OrderService
|
|||
if(!empty($data))
|
||||
{
|
||||
$detail_field = 'id,goods_id,title,images,original_price,price,spec,buy_number';
|
||||
$images_host = config('IMAGE_HOST');
|
||||
$images_host = config('images_host');
|
||||
$order_status_list = lang('common_order_user_status');
|
||||
$order_pay_status = lang('common_order_pay_status');
|
||||
foreach($data as &$v)
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ class PaymentService
|
|||
$data = Db::name('Payment')->where($where)->field('id,logo,name,sort,payment,config,apply_terminal,apply_terminal,element,is_enable,is_open_user')->order('sort asc')->select();
|
||||
if(!empty($data) && is_array($data))
|
||||
{
|
||||
$images_host = config('IMAGE_HOST');
|
||||
$images_host = config('images_host');
|
||||
foreach($data as &$v)
|
||||
{
|
||||
$v['logo_old'] = $v['logo'];
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ class ResourcesService
|
|||
$data = Db::name('AppHomeNav')->field('id,name,images_url,event_value,event_type,bg_color')->where(['platform'=>APPLICATION_CLIENT_TYPE, 'is_enable'=>1])->order('sort asc')->select();
|
||||
if(!empty($data))
|
||||
{
|
||||
$images_host = config('IMAGE_HOST');
|
||||
$images_host = config('images_host');
|
||||
foreach($data as &$v)
|
||||
{
|
||||
$v['images_url_old'] = $v['images_url'];
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class ScreeningPriceService
|
|||
$data = Db::name('ScreeningPrice')->field($field)->where(['pid'=>$id])->order('sort asc')->select();
|
||||
if(!empty($data))
|
||||
{
|
||||
$image_host = config('IMAGE_HOST');
|
||||
$images_host = config('images_host');
|
||||
foreach($data as &$v)
|
||||
{
|
||||
$v['is_son'] = (Db::name('ScreeningPrice')->where(['pid'=>$v['id']])->count() > 0) ? 'ok' : 'no';
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class SlideService
|
|||
$common_platform_type = lang('common_platform_type');
|
||||
$common_is_enable_tips = lang('common_is_enable_tips');
|
||||
$common_app_event_type = lang('common_app_event_type');
|
||||
$image_host = config('IMAGE_HOST');
|
||||
$images_host = config('images_host');
|
||||
foreach($data as &$v)
|
||||
{
|
||||
// 是否启用
|
||||
|
|
@ -60,7 +60,7 @@ class SlideService
|
|||
if(isset($v['images_url']))
|
||||
{
|
||||
$v['images_url_old'] = $v['images_url'];
|
||||
$v['images_url'] = empty($v['images_url']) ? '' : $image_host.$v['images_url'];
|
||||
$v['images_url'] = empty($v['images_url']) ? '' : $images_host.$v['images_url'];
|
||||
}
|
||||
|
||||
// 时间
|
||||
|
|
|
|||
|
|
@ -45,10 +45,10 @@ class UserService
|
|||
{
|
||||
if(substr($v['avatar'], 0, 4) != 'http')
|
||||
{
|
||||
$v['avatar'] = config('IMAGE_HOST').$v['avatar'];
|
||||
$v['avatar'] = config('images_host').$v['avatar'];
|
||||
}
|
||||
} else {
|
||||
$v['avatar'] = config('IMAGE_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('cache_common_default_theme_data', 'default')).'/images/default-user-avatar.jpg';
|
||||
}
|
||||
|
||||
// 注册时间
|
||||
|
|
@ -639,10 +639,10 @@ class UserService
|
|||
{
|
||||
if(substr($user['avatar'], 0, 4) != 'http')
|
||||
{
|
||||
$user['avatar'] = config('IMAGE_HOST').$user['avatar'];
|
||||
$user['avatar'] = config('images_host').$user['avatar'];
|
||||
}
|
||||
} else {
|
||||
$user['avatar'] = config('IMAGE_HOST').'/static/index/'.strtolower(config('DEFAULT_THEME', 'default')).'/images/default-user-avatar.jpg';
|
||||
$user['avatar'] = config('images_host').'/static/index/'.strtolower(config('DEFAULT_THEME', 'default')).'/images/default-user-avatar.jpg';
|
||||
}
|
||||
|
||||
// 存储session
|
||||
|
|
|
|||
Loading…
Reference in New Issue