<!-- commom html -->
<textarea id="upload-editor-view" data-url="{{if !empty($user)}}{{:MyUrl('index/ueditor/index', ['path_type'=>empty($editor_path_type) ? 'common' : $editor_path_type])}}{{/if}}" style="display: none;"></textarea>

<!-- footer start -->
{{if !isset($is_footer) or $is_footer eq 1}}
	{{include file="public/footer_nav" /}}
{{/if}}
<!-- footer end -->

<!-- 公共底部钩子 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
    <div class="plugins-tag">
        <span>plugins_view_common_bottom</span>
    </div>
{{/if}}
{{if !empty($plugins_view_common_bottom_data) and is_array($plugins_view_common_bottom_data) and (!isset($is_footer) or $is_footer eq 1)}}
    {{foreach $plugins_view_common_bottom_data as $hook}}
        {{if is_string($hook) or is_int($hook)}}
            {{$hook|raw}}
        {{/if}}
    {{/foreach}}
{{/if}}
</body>
</html>

<!-- 类库 -->
<script type='text/javascript' src="{{$public_host}}static/common/lib/jquery/jquery-2.1.0.js?v={{:MyC('home_static_cache_version')}}"></script>
<script type='text/javascript' src="{{$public_host}}static/common/lib/assets/js/amazeui.min.js?v={{:MyC('home_static_cache_version')}}"></script>

<!-- 图片放大镜 -->
{{if isset($is_load_imagezoom) and $is_load_imagezoom eq 1}}
    <script type='text/javascript' src="{{$public_host}}static/common/lib/imagezoom/jquery.imagezoom.min.js?v={{:MyC('home_static_cache_version')}}"></script>
{{/if}}

<!-- echarts 图表 -->
<script type='text/javascript' src="{{$public_host}}static/common/lib/echarts/echarts.min.js?v={{:MyC('home_static_cache_version')}}"></script>
<script type='text/javascript' src="{{$public_host}}static/common/lib/echarts/macarons.js?v={{:MyC('home_static_cache_version')}}"></script>

<!-- amazeui插件 -->
<script type='text/javascript' src="{{$public_host}}static/common/lib/amazeui-switch/amazeui.switch.min.js?v={{:MyC('home_static_cache_version')}}"></script>
<script type='text/javascript' src="{{$public_host}}static/common/lib/amazeui-chosen/amazeui.chosen.min.js?v={{:MyC('home_static_cache_version')}}"></script>
<script type='text/javascript' src="{{$public_host}}static/common/lib/amazeui-dialog/amazeui.dialog.js?v={{:MyC('home_static_cache_version')}}"></script>
<script type='text/javascript' src="{{$public_host}}static/common/lib/amazeui-tagsinput/amazeui.tagsinput.min.js?v={{:MyC('home_static_cache_version')}}"></script>

<!-- 图像裁剪插件 -->
<script type='text/javascript' src="{{$public_host}}static/common/lib/cropper/cropper.min.js?v={{:MyC('home_static_cache_version')}}"></script>

<!-- 复制插件 -->
<script type='text/javascript' src="{{$public_host}}static/common/lib/clipboard/clipboard.min.js?v={{:MyC('home_static_cache_version')}}"></script>

<!-- 元素拖拽排序插件 -->
<script type='text/javascript' src="{{$public_host}}static/common/lib/dragsort/jquery.dragsort-0.5.2.min.js?v={{:MyC('home_static_cache_version')}}"></script>

<!-- ueditor 编辑器 -->
<script type='text/javascript' src="{{$my_public_url}}static/common/lib/ueditor/ueditor.config.js?v={{:MyC('home_static_cache_version')}}"></script>
<script type='text/javascript' src="{{$public_host}}static/common/lib/ueditor/ueditor.all.js?v={{:MyC('home_static_cache_version')}}"></script>
<script type='text/javascript' src="{{$public_host}}static/common/lib/ueditor/lang/zh-cn/zh-cn.js?v={{:MyC('home_static_cache_version')}}"></script>

<!-- 颜色选择器 -->
<script type='text/javascript' src="{{$public_host}}static/common/lib/colorpicker/jquery.colorpicker.js?v={{:MyC('home_static_cache_version')}}"></script>

<!-- 日期组件 -->
<script type='text/javascript' src="{{$public_host}}static/common/lib/My97DatePicker/WdatePicker.js"></script>

<!-- baidu map -->
{{if isset($is_load_baidu_map_api) and $is_load_baidu_map_api eq 1}}
    <script type="text/javascript" src="{{$my_http}}://api.map.baidu.com/api?v=2.0&ak={{:MyC('common_baidu_map_ak')}}"></script>
{{/if}}

<!-- 隐藏编辑器初始化 -->
<script type="text/javascript">
    var upload_editor = UE.getEditor("upload-editor-view", {
        isShow: false,
        focus: false,
        enableAutoSave: false,
        autoSyncData: false,
        autoFloatEnabled:false,
        wordCount: false,
        sourceEditor: null,
        scaleEnabled:true,
        toolbars: [["insertimage", "insertvideo", "attachment"]]
    });
</script>

<!-- 项目公共 -->
<script type='text/javascript' src="{{$public_host}}static/common/js/common.js?v={{:MyC('home_static_cache_version')}}"></script>
<script type='text/javascript' src="{{$public_host}}static/index/{{$default_theme}}/js/common.js?v={{:MyC('home_static_cache_version')}}"></script>

<!-- 应用插件公共js -->
{{if !empty($plugins_js)}}
    <script type='text/javascript' src="{{$public_host}}static/{{$plugins_js}}?v={{:MyC('home_static_cache_version')}}"></script>
{{/if}}

<!-- 当前控制器js -->
{{if !empty($module_js)}}
	<script type='text/javascript' src="{{$public_host}}static/{{$module_js}}?v={{:MyC('home_static_cache_version')}}"></script>
{{/if}}

<!-- 底部信息 --> 
{{:MyC('home_footer_info')}}

<!-- js钩子 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
    <div class="plugins-tag">
        <span>plugins_js</span>
    </div>
{{/if}}
{{if !empty($plugins_js_data) and is_array($plugins_js_data)}}
    {{foreach $plugins_js_data as $hook}}
        {{if !empty($hook) and is_string($hook)}}
            {{if substr($hook, 0, 4) eq 'http'}}
                <script type='text/javascript' src="{{$hook}}?v={{:MyC('home_static_cache_version')}}"></script>
            {{else /}}
                <script type='text/javascript' src="{{$public_host}}{{$hook}}?v={{:MyC('home_static_cache_version')}}"></script>
            {{/if}}
        {{elseif is_array($hook) /}}
            {{foreach $hook as $hook_js}}
                {{if !empty($hook_js) and is_string($hook_js)}}
                    {{if substr($hook_js, 0, 4) eq 'http'}}
                        <script type='text/javascript' src="{{$hook_js}}?v={{:MyC('home_static_cache_version')}}"></script>
                    {{else /}}
                        <script type='text/javascript' src="{{$public_host}}{{$hook_js}}?v={{:MyC('home_static_cache_version')}}"></script>
                    {{/if}}
                {{/if}}
            {{/foreach}}
        {{/if}}
    {{/foreach}}
{{/if}}

<!-- 公共页面底部钩子 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
    <div class="plugins-tag">
        <span>plugins_common_page_bottom</span>
    </div>
{{/if}}
{{if !empty($plugins_common_page_bottom_data) and is_array($plugins_common_page_bottom_data)}}
    {{foreach $plugins_common_page_bottom_data as $hook}}
        {{if is_string($hook) or is_int($hook)}}
            {{$hook|raw}}
        {{/if}}
    {{/foreach}}
{{/if}}