{{:ModuleInclude('public/header')}}

<!-- right content start  -->
<div class="content-right" data-url="{{:MyUrl('admin/index/stats')}}" data-is-stats="{{if isset($is_stats) and $is_stats eq true}}1{{else /}}0{{/if}}">
	<div class="content bg-transparent am-padding-0">
		<!-- 顶部钩子 -->
		{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
		    <div class="plugins-tag">
		        <span>plugins_admin_view_index_init_top</span>
		    </div>
		{{/if}}
		{{if !empty($plugins_admin_view_index_init_top_data) and is_array($plugins_admin_view_index_init_top_data)}}
		    {{foreach $plugins_admin_view_index_init_top_data as $hook}}
		        {{if is_string($hook) or is_int($hook)}}
		            {{$hook|raw}}
		        {{/if}}
		    {{/foreach}}
		{{/if}}

		{{if $is_system_show_base eq 1}}
			<!-- 顶部提示信息 -->
			{{if !empty($site_store_info) and !empty($site_store_info['base']) and !empty($site_store_info['base']['site_top_notice'])}}
				<div class="am-alert am-alert-danger am-radius" data-am-alert>
					<button type="button" class="am-close">&times;</button>
					<p>{{$site_store_info.base.site_top_notice|raw}}</p>
				</div>
			{{/if}}

			<!-- 顶部基础信息 -->
			<div class="block-container base-content-top am-nbfc">
				<div class="am-fl am-nbfc left-content">
					<!-- 帐号信息 -->
					{{if !empty($site_store_info) and !empty($site_store_info['user'])}}
                        <i class="iconfont icon-admin-store-user am-vertical-align-middle"></i>
						<span class="am-vertical-align-middle">{{$site_store_info.user.user_name_view}}</span>
						<a href="javascript:;" class="am-margin-left-xs am-vertical-align-middle store-accounts-event">{{:MyLang('modify_title')}}</a>
					{{else /}}
						<a href="javascript:;" class="am-margin-left-xs am-vertical-align-middle store-accounts-event" data-title="{{:MyLang('store_bind_accounts_name')}}">{{:MyLang('store_bind_accounts_name')}}</a>
						<!-- 连接商店错误信息 -->
						{{if !empty($site_store_error)}}
							<a href="javascript:;" class="am-icon-question-circle am-margin-left-xs am-vertical-align-middle" data-am-popover="{content: '{{$site_store_error}}', trigger: 'hover focus', theme: 'sm'}"></a>
						{{/if}}
					{{/if}}

					<!-- 广告 -->
					{{if !empty($site_store_info) and !empty($site_store_info['adverts']) and !empty($site_store_info['adverts']['name'])}}
						<a class="am-margin-left-sm am-text-danger am-vertical-align-middle ad-content {{if !empty($site_store_info['adverts']['icon'])}}{{$site_store_info.adverts.icon}}{{/if}}" {{if empty($site_store_info['adverts']['url'])}}href="javascript:;"{{else /}}href="{{$site_store_info.adverts.url}}" target="_blank"{{/if}}> {{$site_store_info.adverts.name}}</a>
					{{/if}}
				</div>
				<div class="am-fr am-nbfc right-content">
					<!-- VIP授权信息 -->
					{{if !empty($site_store_info) and !empty($site_store_info['vip']) and !empty($site_store_info['vip']['auth_view'])}}
						<a class="vip am-radius {{if isset($site_store_info['vip']['status']) and $site_store_info['vip']['status'] eq 1}}vip-active{{/if}}" {{if empty($site_store_info['vip']['go_url'])}}href="javascript:;"{{else /}}href="{{$site_store_info.vip.go_url}}" target="_blank"{{/if}} {{if !empty($site_store_info['vip']['auth_person'])}}data-am-popover="{content: '{{:MyLang('store_bind_authorized_subject_name')}}：{{$site_store_info.vip.auth_person}}', trigger: 'hover focus', theme: 'sm'}"{{/if}}>
                            <i class="iconfont icon-admin-store-vip"></i>
                            <span class="am-margin-left-xs">{{$site_store_info.vip.auth_view}}</span>
                        </a>
					{{/if}}

					<!-- 右侧版本信息及更新检查 -->
					<span class="right-base">
						<a {{if !empty($site_store_links) and !empty($site_store_links['system_update_log'])}}href="{{$site_store_links.system_update_log}}" target="_blank"{{else /}}href="javascript:;"{{/if}} class="am-margin-left-xs">{{$Think.APPLICATION_VERSION}}</a>
						<a href="javascript:;" class="am-margin-left-sm inspect-upgrade-submit" data-url="{{:MyUrl('admin/index/inspectupgrade')}}">{{:MyLang('store_check_update_name')}}{{if !empty($site_store_info) and !empty($site_store_info['upgrade']) and !empty($site_store_info['upgrade']['version_old']) and $site_store_info['upgrade']['version_old'] eq $Think.APPLICATION_VERSION}}<i></i>{{/if}}</a>
					</span>
				</div>
			</div>
		{{/if}}

		<!-- 公告顶部钩子 -->
		{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
		    <div class="plugins-tag">
		        <span>plugins_admin_view_index_init_notice_top</span>
		    </div>
		{{/if}}
		{{if !empty($plugins_admin_view_index_init_notice_top_data) and is_array($plugins_admin_view_index_init_notice_top_data)}}
		    {{foreach $plugins_admin_view_index_init_notice_top_data as $hook}}
		        {{if is_string($hook) or is_int($hook)}}
		            {{$hook|raw}}
		        {{/if}}
		    {{/foreach}}
		{{/if}}

		<!-- 是否展示统计数据 -->
		{{if isset($is_stats) and $is_stats eq true}}
			<!-- 基础统计内部顶部钩子 -->
			{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
			    <div class="plugins-tag">
			        <span>plugins_admin_view_index_init_stats_inside_base_top</span>
			    </div>
			{{/if}}
			{{if !empty($plugins_admin_view_index_init_stats_inside_base_top_data) and is_array($plugins_admin_view_index_init_stats_inside_base_top_data)}}
			    {{foreach $plugins_admin_view_index_init_stats_inside_base_top_data as $hook}}
			        {{if is_string($hook) or is_int($hook)}}
			            {{$hook|raw}}
			        {{/if}}
			    {{/foreach}}
			{{/if}}

			<!-- 基础统计 商城统计-->
            <div class="am-flex am-flex-row am-flex-justify-between am-gap-1 shop-flex">
                <div class="am-flex-1 am-flex-width">
                    <div class="block-container shopxo-base">
                        <div class="block-title echarts-title am-flex am-flex-row am-flex-justify-between am-flex-items-center am-flex-warp am-padding-bottom-sm">
                            <div class="am-pr">
                                <span class="title icon">{{:MyLang('index.base_item_base_stats_title')}}</span>
                            </div>
                            <div class="right-operate am-flex am-flex-items-center am-gap-1" data-type="base-count" data-empty-time="1">
                                {{if !empty($time_data)}}
                                    <div class="quick-time am-flex am-flex-items-center">
                                        {{foreach :array_values($time_data) as $k=>$v}}
                                            {{if !in_array($v['key'], ['this-month', 'last-month'])}}
                                                {{if $k lt 3}}
                                                    <a href="javascript:;" class="{{if !empty($default_day) and isset($time_data[$default_day]) and isset($time_data[$default_day]['start']) and isset($time_data[$default_day]['end']) and $time_data[$default_day]['start'] eq $v['start'] and $time_data[$default_day]['end'] eq $v['end']}} am-active{{/if}}" data-start="{{$v.start}}" data-end="{{$v.end}}">{{$v.name}}</a>
                                                {{/if}}
                                            {{/if}}
                                        {{/foreach}}
                                        <div id="base-dropdown" class="dropdown-more">
                                            <div class="am-dropdown" data-am-dropdown="{justify: '#base-dropdown'}">
                                                <a href="javascript:;" class="am-dropdown-toggle more-btn">{{:MyLang('more_title')}} <i class="iconfont icon-angle-down"></i></a>
                                                <div class="am-dropdown-content am-radius-lg">
                                                    <div class="am-flex am-flex-warp am-gap-1">
                                                        {{foreach :array_values($time_data) as $k=>$v}}
                                                            {{if !in_array($v['key'], ['this-month', 'last-month'])}}
                                                                {{if $k gt 2}}
                                                                    <div class="item">
                                                                        <a href="javascript:;" class="am-inline-block time {{if !empty($default_day) and isset($time_data[$default_day]) and isset($time_data[$default_day]['start']) and isset($time_data[$default_day]['end']) and $time_data[$default_day]['start'] eq $v['start'] and $time_data[$default_day]['end'] eq $v['end']}} am-active{{/if}}" data-start="{{$v.start}}" data-end="{{$v.end}}">{{$v.name}}</a>
                                                                    </div>
                                                                {{/if}}
                                                            {{/if}}
                                                        {{/foreach}}
                                                        <div class="item">
                                                            <a class="am-inline-block time" href="javascript:;" data-start="" data-end="">{{:MyLang('all_title')}}</a>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                {{/if}}
                                {{:ModuleInclude('/index/stats_where')}}
                            </div>
                        </div>
                        <ul class="{{if isset($is_income) and $is_income eq true}}am-avg-sm-2 am-avg-lg-4{{else /}}am-avg-sm-1 am-avg-lg-3{{/if}}">
                            <li>
                                <div class="li-content down-hover glideover-hover">
                                    <div class="am-flex am-flex-row am-flex-justify-between">
                                        <div>
                                            <p class="name">{{:MyLang('index.base_item_user_title')}}</p>
                                            <p class="total animation-count-to base-user-count" data-to="{{$base_count.user_count}}" data-speed="1500">0</p>
                                        </div>
                                        <div class="item am-flex am-flex-col am-flex-items-end">
                                            <span class="am-color-999">{{:MyLang('index.base_item_today_title')}}</span>
                                            <span class="animation-count-to am-font-weight am-text-sm" data-to="{{$user.today_count}}" data-speed="1500">0</span>
                                        </div>
                                    </div>
                                    <div class="am-flex am-flex-row am-gap-1 am-margin-bottom-xs">
                                        <span>{{:MyLang('index.base_item_yesterday_title')}}</span>
                                        <span class="animation-count-to" data-to="{{$user.yesterday_count}}" data-speed="1500">0</span>
                                    </div>
                                    <div class="li-content-foot am-flex am-flex-row am-flex-justify-between">
                                        <div class="am-flex am-flex-row am-flex-justify-right am-gap-1">
                                            <span>{{:MyLang('index.base_item_last_month_title')}}</span>
                                            <span class="animation-count-to" data-to="{{$user.last_month_count}}" data-speed="1500">0</span>
                                        </div>
                                        <div class="am-flex am-flex-row am-flex-justify-right am-gap-1">
                                            <span>{{:MyLang('index.base_item_same_month_title')}}</span>
                                            <span class="animation-count-to" data-to="{{$user.same_month_count}}" data-speed="1500">0</span>
                                        </div>
                                    </div>
                                </div>
                            </li>
                            <li>
                                <div class="li-content down-hover glideover-hover">
                                    <div class="am-flex am-flex-row am-flex-justify-between">
                                        <div>
                                            <p class="name">{{:MyLang('index.base_item_order_number_title')}}</p>
                                            <p class="total animation-count-to base-order-count" data-to="{{$base_count.order_count}}" data-speed="1500">0</p>
                                        </div>
                                        <div class="item am-flex am-flex-col am-flex-items-end">
                                            <span class="am-color-999">{{:MyLang('index.base_item_today_title')}}</span>
                                            <span class="animation-count-to am-font-weight am-text-sm" data-to="{{$order_number.today_count}}" data-speed="1500">0</span>
                                        </div>
                                    </div>
                                    <div class="am-flex am-flex-row am-gap-24 am-margin-bottom-xs">    
                                        <div class="item">
                                            <span>{{:MyLang('index.base_item_yesterday_title')}}</span>
                                            <span class="animation-count-to" data-to="{{$order_number.yesterday_count}}" data-speed="1500">0</span>
                                        </div>
                                    </div>
                                    <div class="li-content-foot am-flex am-flex-row am-flex-justify-between">
                                        <div class="am-flex am-flex-row am-flex-justify-right am-gap-1">
                                            <span>{{:MyLang('index.base_item_last_month_title')}}</span>
                                            <span class="animation-count-to" data-to="{{$order_number.last_month_count}}" data-speed="1500">0</span>
                                        </div>
                                        <div class="am-flex am-flex-row am-flex-justify-right am-gap-1">
                                            <span>{{:MyLang('index.base_item_same_month_title')}}</span>
                                            <span class="animation-count-to" data-to="{{$order_number.same_month_count}}" data-speed="1500">0</span>
                                        </div>
                                    </div>
                                </div>
                            </li>
                            <li>
                                <div class="li-content down-hover glideover-hover">
                                    <div class="am-flex am-flex-row am-flex-justify-between">
                                        <div>
                                            <p class="name">{{:MyLang('index.base_item_order_complete_number_title')}}</p>
                                            <p class="total animation-count-to base-order-sale-count" data-to="{{$base_count.order_sale_count}}" data-speed="1500">0</p>
                                        </div>
                                        <div class="item am-flex am-flex-col am-flex-items-end">
                                            <span class="am-color-999">{{:MyLang('index.base_item_today_title')}}</span>
                                            <span class="animation-count-to am-font-weight am-text-sm" data-to="{{$order_complete_number.today_count}}" data-speed="1500">0</span>
                                        </div>
                                    </div>
                                    <div class="am-flex am-flex-row am-gap-24 am-margin-bottom-xs">    
                                        <div class="item">
                                            <span>{{:MyLang('index.base_item_yesterday_title')}}</span>
                                            <span class="animation-count-to" data-to="{{$order_complete_number.yesterday_count}}" data-speed="1500">0</span>
                                        </div>
                                    </div>
                                    <div class="li-content-foot am-flex am-flex-row am-flex-justify-between">
                                        <div class="am-flex am-flex-row am-flex-justify-right am-gap-1">
                                            <span>{{:MyLang('index.base_item_last_month_title')}}</span>
                                            <span class="animation-count-to" data-to="{{$order_complete_number.last_month_count}}" data-speed="1500">0</span>
                                        </div>
                                        <div class="am-flex am-flex-row am-flex-justify-right am-gap-1">
                                            <span>{{:MyLang('index.base_item_same_month_title')}}</span>
                                            <span class="animation-count-to" data-to="{{$order_complete_number.same_month_count}}" data-speed="1500">0</span>
                                        </div>
                                    </div>
                                </div>
                            </li>
                            <!-- 收入统计权限判断 -->
                            {{if isset($is_income) and $is_income eq true}}
                                <li>
                                    <div class="li-content down-hover glideover-hover">
                                        <div class="am-flex am-flex-row am-flex-justify-between">
                                            <div>
                                                <p class="name">{{:MyLang('index.base_item_order_complete_title')}}</p>
                                                <p class="total animation-count-to base-order-complete-total" data-to="{{$base_count.order_complete_total}}" data-speed="1500" data-decimals="2">0.00</p>
                                            </div>
                                            <div class="item am-flex am-flex-col am-flex-items-end">
                                                <span class="am-color-999">{{:MyLang('index.base_item_today_title')}}</span>
                                                <span class="animation-count-to am-font-weight am-text-sm" data-to="{{$order_complete_money.today_count}}" data-speed="1500" data-decimals="2">0.00</span>
                                            </div>
                                        </div>
                                        <div class="am-flex am-flex-row am-gap-24 am-margin-bottom-xs">
                                            <div class="item">
                                                <span>{{:MyLang('index.base_item_yesterday_title')}}</span>
                                                <span class="animation-count-to" data-to="{{$order_complete_money.yesterday_count}}" data-speed="1500" data-decimals="2">0.00</span>
                                            </div>
                                        </div>
                                        <div class="li-content-foot am-flex am-flex-row am-flex-justify-between">
                                            <div class="am-flex am-flex-row am-flex-justify-right am-gap-1">
                                                <span>{{:MyLang('index.base_item_last_month_title')}}</span>
                                                <span class="animation-count-to" data-to="{{$order_complete_money.last_month_count}}" data-speed="1500" data-decimals="2">0.00</span>
                                            </div>
                                            <div class="am-flex am-flex-row am-flex-justify-right am-gap-1">
                                                <span>{{:MyLang('index.base_item_same_month_title')}}</span>
                                                <span class="animation-count-to" data-to="{{$order_complete_money.same_month_count}}" data-speed="1500" data-decimals="2">0.00</span>
                                            </div>
                                        </div>
                                    </div>
                                </li>
                            {{/if}}
                        </ul>
                    </div>
                </div>
                <!-- 基础统计基础顶部钩子 -->
                {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
                    <div class="plugins-tag">
                        <span>plugins_admin_view_index_init_stats_base_top</span>
                    </div>
                {{/if}}
                {{if !empty($plugins_admin_view_index_init_stats_base_top_data) and is_array($plugins_admin_view_index_init_stats_base_top_data)}}
                    {{foreach $plugins_admin_view_index_init_stats_base_top_data as $hook}}
                        {{if is_string($hook) or is_int($hook)}}
                            {{$hook|raw}}
                        {{/if}}
                    {{/foreach}}
                {{/if}}
            </div>
            <div class="am-flex am-flex-row am-flex-justify-between am-gap-1 order-flex">
                {{if isset($is_income) and $is_income eq true}}
                    <div class="am-flex-1 am-flex-width">
                        <div class="block-container">
                            <div class="block-title echarts-title am-flex am-flex-row am-flex-justify-between am-flex-items-center am-flex-warp am-padding-bottom-sm am-border-bottom">
                                <div class="am-pr am-flex am-flex-row am-gap-1 echarts-tabs">
                                    <span class="title am-active am-cursor-pointer" data-key="order-profit">{{:MyLang('index.base_item_order_profit_title')}}</span>
                                    <span class="title am-cursor-pointer" data-key="order-trading">{{:MyLang('index.base_item_order_trading_title')}}</span>
                                </div>
                                <div class="right-oprate-item">
                                    <div class="order-profit">
                                        <!-- 订单成交金额走势，收入统计权限判断-->
                                        <div class="right-operate am-flex am-flex-items-center am-gap-1" data-type="order-profit" data-init="1">
                                            {{if !empty($time_data)}}
                                                <span class="quick-time am-flex am-flex-items-center">
                                                    {{foreach :array_values($time_data) as $k=>$v}}
                                                        {{if $k lt 3}}
                                                            <a href="javascript:;" class="{{if !empty($default_day) and isset($time_data[$default_day]) and isset($time_data[$default_day]['start']) and isset($time_data[$default_day]['end']) and $time_data[$default_day]['start'] eq $v['start'] and $time_data[$default_day]['end'] eq $v['end']}} am-active{{/if}}" data-start="{{$v.start}}" data-end="{{$v.end}}">{{$v.name}}</a>
                                                        {{/if}}   
                                                    {{/foreach}}
                                                    <div id="order-profit-dropdown" class="dropdown-more">
                                                        <div class="am-dropdown" data-am-dropdown="{justify: '#order-profit-dropdown'}">
                                                            <a href="javascript:;" class="am-dropdown-toggle more-btn">{{:MyLang('more_title')}} <i class="iconfont icon-angle-down"></i></a>
                                                            <div class="am-dropdown-content am-radius-lg">
                                                                <div class="am-flex am-flex-warp am-gap-1">
                                                                    {{foreach :array_values($time_data) as $k=>$v}}
                                                                        {{if $k gt 2}}
                                                                            <div class="item">
                                                                                <a href="javascript:;" class="am-inline-block time {{if !empty($default_day) and isset($time_data[$default_day]) and isset($time_data[$default_day]['start']) and isset($time_data[$default_day]['end']) and $time_data[$default_day]['start'] eq $v['start'] and $time_data[$default_day]['end'] eq $v['end']}} am-active{{/if}}" data-start="{{$v.start}}" data-end="{{$v.end}}">{{$v.name}}</a>
                                                                            </div>
                                                                        {{/if}}
                                                                    {{/foreach}}
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </span>
                                            {{/if}}
                                            {{:ModuleInclude('/index/stats_where')}}
                                        </div>
                                    </div>
                                    <div class="order-trading am-hide">
                                        <!-- 订单交易走势 -->
                                        <div class="right-operate am-flex am-flex-items-center am-gap-1" data-type="order-trading" data-init="1">
                                            {{if !empty($time_data)}}
                                                <span class="quick-time am-flex am-flex-items-center">
                                                    {{foreach :array_values($time_data) as $k=>$v}}
                                                        {{if $k lt 3}}
                                                            <a href="javascript:;" class="{{if !empty($default_day) and isset($time_data[$default_day]) and isset($time_data[$default_day]['start']) and isset($time_data[$default_day]['end']) and $time_data[$default_day]['start'] eq $v['start'] and $time_data[$default_day]['end'] eq $v['end']}} am-active{{/if}}" data-start="{{$v.start}}" data-end="{{$v.end}}">{{$v.name}}</a>
                                                        {{/if}}   
                                                    {{/foreach}}
                                                    <div id="order-trading-dropdown" class="dropdown-more">
                                                        <div class="am-dropdown" data-am-dropdown="{justify: '#order-trading-dropdown'}">
                                                            <a href="javascript:;" class="am-dropdown-toggle more-btn">{{:MyLang('more_title')}} <i class="iconfont icon-angle-down"></i></a>
                                                            <div class="am-dropdown-content am-radius-lg">
                                                                <div class="am-flex am-flex-warp am-gap-1">
                                                                    {{foreach :array_values($time_data) as $k=>$v}}
                                                                        {{if $k gt 2}}
                                                                            <div class="item">
                                                                                <a href="javascript:;" class="am-inline-block time {{if !empty($default_day) and isset($time_data[$default_day]) and isset($time_data[$default_day]['start']) and isset($time_data[$default_day]['end']) and $time_data[$default_day]['start'] eq $v['start'] and $time_data[$default_day]['end'] eq $v['end']}} am-active{{/if}}" data-start="{{$v.start}}" data-end="{{$v.end}}">{{$v.name}}</a>
                                                                            </div>
                                                                        {{/if}}
                                                                    {{/foreach}}
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </span>
                                            {{/if}}
                                            {{:ModuleInclude('/index/stats_where')}}
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="echarts-content">
                                <div id="echarts-order-profit" class="echarts-tabs-change echarts-tabs-change-active"></div>
                                <div id="echarts-order-trading" class="echarts-tabs-change"></div>
                            </div>
                        </div>
                    </div>
                {{/if}}
                <div class="block-container shortcut-menu">
                    <div class="am-flex am-flex-row am-flex-justify-between am-flex-items-center">
                        <div class="am-pr block-title">
                            <span class="title icon">{{:MyLang('common_service.shortcutmenu.form_base_title')}}</span>
                        </div>
                        <div class="more-layout">
                            <a href="javascript:;" class="submit-popup" data-class="admin-index-shortcutmenu-popup" data-on-open="ShortcutmenuOpenBackEvent" data-on-close="ShortcutmenuCloseBackEvent" data-url="{{:MyUrl('admin/shortcutmenu/index')}}" data-title="{{:MyLang('admin_title')}}">{{:MyLang('admin_title')}}</a>
                        </div>
                    </div>
                    <div class="shortcut-menu-list am-margin-top-xl">
                        {{if empty($shortcut_menu_data)}}
                            {{:ModuleInclude('public/not_data')}}
                        {{else /}}
                            <div class="shortcut-menu-content am-flex am-flex-row am-flex-warp">
                                {{foreach $shortcut_menu_data as $v}}
                                    <a href="javascript:;" data-url="{{$v.url}}" data-key="{{$v.menu}}" data-id="{{$v.menu}}" data-type="menu" data-name="{{$v.name}}" class="item am-text-center am-radius">
                                        <img src="{{$v.icon}}" class="am-radius scale-sm" />
                                        <p class="am-color-333">{{$v.name}}</p>
                                    </a>
                                {{/foreach}}
                            </div>
                        {{/if}}
                    </div>
                </div>
            </div>

			<!-- 订单金额走势统计内部顶部钩子 -->
			{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
			    <div class="plugins-tag">
			        <span>plugins_admin_view_index_init_stats_inside_amount_trend_top</span>
			    </div>
			{{/if}}
			{{if !empty($plugins_admin_view_index_init_stats_inside_amount_trend_top_data) and is_array($plugins_admin_view_index_init_stats_inside_amount_trend_top_data)}}
			    {{foreach $plugins_admin_view_index_init_stats_inside_amount_trend_top_data as $hook}}
			        {{if is_string($hook) or is_int($hook)}}
			            {{$hook|raw}}
			        {{/if}}
			    {{/foreach}}
			{{/if}}

			<!-- 订单交易走势统计内部顶部钩子 -->
			{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
			    <div class="plugins-tag">
			        <span>plugins_admin_view_index_init_stats_inside_order_trading_top</span>
			    </div>
			{{/if}}
			{{if !empty($plugins_admin_view_index_init_stats_inside_order_trading_top_data) and is_array($plugins_admin_view_index_init_stats_inside_order_trading_top_data)}}
			    {{foreach $plugins_admin_view_index_init_stats_inside_order_trading_top_data as $hook}}
			        {{if is_string($hook) or is_int($hook)}}
			            {{$hook|raw}}
			        {{/if}}
			    {{/foreach}}
			{{/if}}

			<!-- 组合商品和支付统计内部顶部钩子 -->
			{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
			    <div class="plugins-tag">
			        <span>plugins_admin_view_index_init_stats_inside_compose_top</span>
			    </div>
			{{/if}}
			{{if !empty($plugins_admin_view_index_init_stats_inside_compose_top_data) and is_array($plugins_admin_view_index_init_stats_inside_compose_top_data)}}
			    {{foreach $plugins_admin_view_index_init_stats_inside_compose_top_data as $hook}}
			        {{if is_string($hook) or is_int($hook)}}
			            {{$hook|raw}}
			        {{/if}}
			    {{/foreach}}
			{{/if}}

			<!-- 组合 -->
			<ul class="block-combination-container-2 am-flex am-flex-row am-flex-justify-between am-gap-1 am-margin-bottom-sm">
				<li class="am-flex-1">
					<!-- 热销商品 -->
					<div class="block-title echarts-title goods-hot-flex am-flex am-flex-row am-flex-justify-between am-flex-items-center am-flex-warp am-padding-bottom-sm">
                        <div class="am-pr">
                            <span class="title icon">{{:MyLang('index.base_item_hot_sales_goods_title')}}</span>
                        </div>
                        <div class="right-operate am-flex am-flex-items-center am-gap-1" data-type="goods-hot" data-init="1" data-empty-time="1">
						    {{if !empty($time_data)}}
						        <span class="quick-time am-flex am-flex-items-center">
                                    {{foreach :array_values($time_data) as $k=>$v}}
                                        {{if $k lt 3}}
                                            <a href="javascript:;" class="{{if !empty($default_day) and isset($time_data[$default_day]) and isset($time_data[$default_day]['start']) and isset($time_data[$default_day]['end']) and $time_data[$default_day]['start'] eq $v['start'] and $time_data[$default_day]['end'] eq $v['end']}} am-active{{/if}}" data-start="{{$v.start}}" data-end="{{$v.end}}">{{$v.name}}</a>
                                        {{/if}}   
                                    {{/foreach}}
                                    <div id="goods-hot-dropdown" class="dropdown-more">
                                        <div class="am-dropdown" data-am-dropdown="{justify: '#goods-hot-dropdown'}">
                                            <a href="javascript:;" class="am-dropdown-toggle more-btn">{{:MyLang('more_title')}} <i class="iconfont icon-angle-down"></i></a>
                                            <div class="am-dropdown-content am-radius-lg">
                                                <div class="am-flex am-flex-warp am-gap-1">
                                                    {{foreach :array_values($time_data) as $k=>$v}}
                                                        {{if $k gt 2}}
                                                            <div class="item">
                                                                <a href="javascript:;" class="am-inline-block time {{if !empty($default_day) and isset($time_data[$default_day]) and isset($time_data[$default_day]['start']) and isset($time_data[$default_day]['end']) and $time_data[$default_day]['start'] eq $v['start'] and $time_data[$default_day]['end'] eq $v['end']}} am-active{{/if}}" data-start="{{$v.start}}" data-end="{{$v.end}}">{{$v.name}}</a>
                                                            </div>
                                                        {{/if}}
                                                    {{/foreach}}
                                                    <div class="item">
                                                        <a class="am-inline-block time" href="javascript:;" data-start="" data-end="">{{:MyLang('all_title')}}</a>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
						        </span>
						    {{/if}}
						    {{:ModuleInclude('/index/stats_where')}}
						</div>
					</div>
					<div id="echarts-goods-hot"></div>
				</li>
				<li class="am-flex-1">
					<!-- 支付方式 -->
					<div class="block-title echarts-title pay-type-flex am-flex am-flex-row am-flex-justify-between am-flex-items-center am-flex-warp am-padding-bottom-sm">
                        <div class="am-pr">
                            <span class="title icon">{{:MyLang('index.base_item_payment_type_title')}}</span>
                        </div>
						<div class="right-operate am-flex am-flex-items-center am-gap-1" data-type="pay-type" data-init="1">
						    {{if !empty($time_data)}}
						        <span class="quick-time am-flex am-flex-items-center">
                                    {{foreach :array_values($time_data) as $k=>$v}}
                                        {{if $k lt 3}}
                                            <a href="javascript:;" class="{{if !empty($default_day) and isset($time_data[$default_day]) and isset($time_data[$default_day]['start']) and isset($time_data[$default_day]['end']) and $time_data[$default_day]['start'] eq $v['start'] and $time_data[$default_day]['end'] eq $v['end']}} am-active{{/if}}" data-start="{{$v.start}}" data-end="{{$v.end}}">{{$v.name}}</a>
                                        {{/if}}   
                                    {{/foreach}}
                                    <div id="pay-type-dropdown" class="dropdown-more">
                                        <div class="am-dropdown" data-am-dropdown="{justify: '#pay-type-dropdown'}">
                                            <a href="javascript:;" class="am-dropdown-toggle more-btn">{{:MyLang('more_title')}} <i class="iconfont icon-angle-down"></i></a>
                                            <div class="am-dropdown-content am-radius-lg">
                                                <div class="am-flex am-flex-warp am-gap-1">
                                                    {{foreach :array_values($time_data) as $k=>$v}}
                                                        {{if $k gt 2}}
                                                            <div class="item">
                                                                <a href="javascript:;" class="am-inline-block time {{if !empty($default_day) and isset($time_data[$default_day]) and isset($time_data[$default_day]['start']) and isset($time_data[$default_day]['end']) and $time_data[$default_day]['start'] eq $v['start'] and $time_data[$default_day]['end'] eq $v['end']}} am-active{{/if}}" data-start="{{$v.start}}" data-end="{{$v.end}}">{{$v.name}}</a>
                                                            </div>
                                                        {{/if}}
                                                    {{/foreach}}
                                                </div>
                                            </div>
                                        </div>
                                    </div>
						        </span>
						    {{/if}}
						    {{:ModuleInclude('/index/stats_where')}}
						</div>
					</div>
					<div id="echarts-pay-type"></div>
				</li>
			</ul>

			<!-- 地域分布统计内部顶部钩子 -->
			{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
			    <div class="plugins-tag">
			        <span>plugins_admin_view_index_init_stats_inside_region_top</span>
			    </div>
			{{/if}}
			{{if !empty($plugins_admin_view_index_init_stats_inside_region_top_data) and is_array($plugins_admin_view_index_init_stats_inside_region_top_data)}}
			    {{foreach $plugins_admin_view_index_init_stats_inside_region_top_data as $hook}}
			        {{if is_string($hook) or is_int($hook)}}
			            {{$hook|raw}}
			        {{/if}}
			    {{/foreach}}
			{{/if}}

			<!-- 订单地域分布 -->
			<ul class="block-combination-container-2 am-flex am-flex-row am-flex-justify-between am-gap-1 {{if $is_system_show_base eq 1}}am-margin-bottom-sm{{/if}}">
				<li class="am-flex-1">
                    <div class="block-title echarts-title area-flex am-flex am-flex-row am-flex-justify-between am-flex-items-center am-flex-warp am-padding-bottom-sm">
                        <div class="am-pr area-select">
                            <span class="title icon">{{:MyLang('index.base_item_map_whole_country_title')}}</span>
                            <select name="value" data-am-selected="{btnWidth: '80px', btnSize: 'xs'}">
                                <option value="0" selected>{{:MyLang('index.base_item_map_whole_country_province')}}</option>
                                <option value="1">{{:MyLang('index.base_item_map_whole_country_city')}}</option>
                                <option value="2">{{:MyLang('index.base_item_map_whole_country_county')}}</option>
                            </select>
                        </div>
                        <div class="right-operate am-flex am-flex-items-center am-gap-1" data-type="order-whole-country" data-init="1" data-empty-time="1">
                            {{if !empty($time_data)}}
                                <span class="quick-time am-flex am-flex-items-center">
                                    {{foreach :array_values($time_data) as $k=>$v}}
                                        {{if $k lt 3}}
                                            <a href="javascript:;" class="{{if !empty($default_day) and isset($time_data[$default_day]) and isset($time_data[$default_day]['start']) and isset($time_data[$default_day]['end']) and $time_data[$default_day]['start'] eq $v['start'] and $time_data[$default_day]['end'] eq $v['end']}} am-active{{/if}}" data-start="{{$v.start}}" data-end="{{$v.end}}">{{$v.name}}</a>
                                        {{/if}}   
                                    {{/foreach}}
                                    <div id="order-whole-country-dropdown" class="dropdown-more">
                                        <div class="am-dropdown" data-am-dropdown="{justify: '#order-whole-country-dropdown'}">
                                            <a href="javascript:;" class="am-dropdown-toggle more-btn">{{:MyLang('more_title')}} <i class="iconfont icon-angle-down"></i></a>
                                            <div class="am-dropdown-content am-radius-lg">
                                                <div class="am-flex am-flex-warp am-gap-1">
                                                    {{foreach :array_values($time_data) as $k=>$v}}
                                                        {{if $k gt 2}}
                                                            <div class="item">
                                                                <a href="javascript:;" class="am-inline-block time {{if !empty($default_day) and isset($time_data[$default_day]) and isset($time_data[$default_day]['start']) and isset($time_data[$default_day]['end']) and $time_data[$default_day]['start'] eq $v['start'] and $time_data[$default_day]['end'] eq $v['end']}} am-active{{/if}}" data-start="{{$v.start}}" data-end="{{$v.end}}">{{$v.name}}</a>
                                                            </div>
                                                        {{/if}}
                                                    {{/foreach}}
                                                    <div class="item">
                                                        <a class="am-inline-block time" href="javascript:;" data-start="" data-end="">{{:MyLang('all_title')}}</a>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </span>
                            {{/if}}
                            {{:ModuleInclude('/index/stats_where')}}
                        </div>
                    </div>
                    <div id="echarts-map-whole-country"></div>
                </li>
				<li class="am-flex-1">
                    <div class="block-title echarts-title user-flex am-flex am-flex-row am-flex-justify-between am-flex-items-center am-flex-warp am-padding-bottom-sm am-border-bottom">
                        <div class="am-pr am-flex am-flex-row am-gap-1 echarts-tabs">
                            <span class="title am-active am-cursor-pointer" data-key="new-user">{{:MyLang('index.base_item_new_user_title')}}</span>
                            <span class="title am-cursor-pointer" data-key="buy-user">{{:MyLang('index.base_item_buy_user_title')}}</span>
                        </div>
                        <div class="right-oprate-item">
                            <div class="new-user">
                                <!--新增用户-->
                                <div class="right-operate am-flex am-flex-items-center am-gap-1" data-type="new-user" data-init="1">
                                    {{if !empty($time_data)}}
                                        <span class="quick-time am-flex am-flex-items-center">
                                            {{foreach :array_values($time_data) as $k=>$v}}
                                                {{if $k lt 3}}
                                                    <a href="javascript:;" class="{{if !empty($default_day) and isset($time_data[$default_day]) and isset($time_data[$default_day]['start']) and isset($time_data[$default_day]['end']) and $time_data[$default_day]['start'] eq $v['start'] and $time_data[$default_day]['end'] eq $v['end']}} am-active{{/if}}" data-start="{{$v.start}}" data-end="{{$v.end}}">{{$v.name}}</a>
                                                {{/if}}   
                                            {{/foreach}}
                                            <div id="new-user-dropdown" class="dropdown-more">
                                                <div class="am-dropdown" data-am-dropdown="{justify: '#new-user-dropdown'}">
                                                    <a href="javascript:;" class="am-dropdown-toggle more-btn">{{:MyLang('more_title')}} <i class="iconfont icon-angle-down"></i></a>
                                                    <div class="am-dropdown-content am-radius-lg">
                                                        <div class="am-flex am-flex-warp am-gap-1">
                                                            {{foreach :array_values($time_data) as $k=>$v}}
                                                                {{if $k gt 2}}
                                                                    <div class="item">
                                                                        <a href="javascript:;" class="am-inline-block time {{if !empty($default_day) and isset($time_data[$default_day]) and isset($time_data[$default_day]['start']) and isset($time_data[$default_day]['end']) and $time_data[$default_day]['start'] eq $v['start'] and $time_data[$default_day]['end'] eq $v['end']}} am-active{{/if}}" data-start="{{$v.start}}" data-end="{{$v.end}}">{{$v.name}}</a>
                                                                    </div>
                                                                {{/if}}
                                                            {{/foreach}}
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </span>
                                    {{/if}}
                                    {{:ModuleInclude('/index/stats_where')}}
                                </div>
                            </div>
                            <div class="buy-user am-hide">
                                <!-- 购买用户统计 -->
                                <div class="right-operate am-flex am-flex-items-center am-gap-1" data-type="buy-user" data-init="1">
                                    {{if !empty($time_data)}}
                                        <span class="quick-time am-flex am-flex-items-center">
                                            {{foreach :array_values($time_data) as $k=>$v}}
                                                {{if $k lt 3}}
                                                    <a href="javascript:;" class="{{if !empty($default_day) and isset($time_data[$default_day]) and isset($time_data[$default_day]['start']) and isset($time_data[$default_day]['end']) and $time_data[$default_day]['start'] eq $v['start'] and $time_data[$default_day]['end'] eq $v['end']}} am-active{{/if}}" data-start="{{$v.start}}" data-end="{{$v.end}}">{{$v.name}}</a>
                                                {{/if}}   
                                            {{/foreach}}
                                            <div id="buy-user-dropdown" class="dropdown-more">
                                                <div class="am-dropdown" data-am-dropdown="{justify: '#buy-user-dropdown'}">
                                                    <a href="javascript:;" class="am-dropdown-toggle more-btn">{{:MyLang('more_title')}} <i class="iconfont icon-angle-down"></i></a>
                                                    <div class="am-dropdown-content am-radius-lg">
                                                        <div class="am-flex am-flex-warp am-gap-1">
                                                            {{foreach :array_values($time_data) as $k=>$v}}
                                                                {{if $k gt 2}}
                                                                    <div class="item">
                                                                        <a href="javascript:;" class="am-inline-block time {{if !empty($default_day) and isset($time_data[$default_day]) and isset($time_data[$default_day]['start']) and isset($time_data[$default_day]['end']) and $time_data[$default_day]['start'] eq $v['start'] and $time_data[$default_day]['end'] eq $v['end']}} am-active{{/if}}" data-start="{{$v.start}}" data-end="{{$v.end}}">{{$v.name}}</a>
                                                                    </div>
                                                                {{/if}}
                                                            {{/foreach}}
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </span>
                                    {{/if}}
                                    {{:ModuleInclude('/index/stats_where')}}
                                </div>
                            </div>
                        </div>
					</div>
                    <div class="echarts-content">
                        <div id="echarts-new-user" class="echarts-tabs-change echarts-tabs-change-active"></div>
                        <div id="echarts-buy-user" class="echarts-tabs-change"></div>
                    </div>
                </li>
            </ul>
		{{/if}}

		<!-- 系统信息顶部钩子 -->
		{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
		    <div class="plugins-tag">
		        <span>plugins_admin_view_index_init_system_info_top</span>
		    </div>
		{{/if}}
		{{if !empty($plugins_admin_view_index_init_system_info_top_data) and is_array($plugins_admin_view_index_init_system_info_top_data)}}
		    {{foreach $plugins_admin_view_index_init_system_info_top_data as $hook}}
		        {{if is_string($hook) or is_int($hook)}}
		            {{$hook|raw}}
		        {{/if}}
		    {{/foreach}}
		{{/if}}

		<!-- 系统信息 -->
		{{if $is_system_show_base eq 1}}
			<ul class="block-combination-container-2 am-flex am-flex-row am-flex-justify-between am-gap-1">
				<li class="am-flex-1">
					<div class="block-title">
						<span class="title icon">{{:MyLang('index.system_info_title')}}</span>
					</div>
					<dl class="dl-content">
						<dt class="am-text-truncate">{{:MyLang('index.system_ver_title')}}</dt>
						<dd>{{$data.ver}}</dd>

						<dt class="am-text-truncate">{{:MyLang('index.system_os_ver_title')}}</dt>
						<dd>{{$data.os_ver}}</dd>

						<dt class="am-text-truncate">{{:MyLang('index.system_php_ver_title')}}</dt>
						<dd>{{$data.php_ver}}</dd>

						<dt class="am-text-truncate">{{:MyLang('index.system_mysql_ver_title')}}</dt>
						<dd>{{$data.mysql_ver}}</dd>

						<dt class="am-text-truncate">{{:MyLang('index.system_server_ver_title')}}</dt>
						<dd>{{$data.server_ver}}</dd>

						<dt class="am-text-truncate">{{:MyLang('index.system_host_title')}}</dt>
						<dd>{{$data.host}}</dd>
					</dl>
				</li>

				<li class="am-flex-1">
					<div class="block-title">
						<span class="title icon">{{:MyLang('index.development_team_title')}}</span>
					</div>
					<dl class="dl-content">
						<dt class="am-text-truncate">{{:MyLang('index.development_team_website_title')}}</dt>
						<dd>
							<a href="http://zongzhige.com/" target="_blank">{{:MyLang('index.development_team_website_value')}}</a>
						</dd>

						<dt class="am-text-truncate">{{:MyLang('index.development_team_support_title')}}</dt>
						<dd>
							<a href="http://shopxo.net/" target="_blank">{{:MyLang('index.development_team_support_value')}}</a>
						</dd>

						{{if !empty($site_store_links) and !empty($site_store_links['community_website'])}}
							<dt class="am-text-truncate">{{:MyLang('index.development_team_ask_title')}}</dt>
							<dd>
								<a href="{{$site_store_links.community_website}}" target="_blank">{{:MyLang('index.development_team_ask_value')}}</a>
							</dd>
						{{/if}}

						<dt class="am-text-truncate">{{:MyLang('index.development_team_agreement_title')}}</dt>
						<dd>
							<a href="{{if !empty($site_store_links) and !empty($site_store_links['source_license'])}}{{$site_store_links.source_license}}{{else /}}https://opensource.org/licenses/mit-license.php{{/if}}" target="_blank">{{:MyLang('index.development_team_agreement_value')}}</a>
						</dd>

						{{if !empty($site_store_links) and !empty($site_store_links['system_update_log'])}}
							<dt class="am-text-truncate">{{:MyLang('index.development_team_update_log_title')}}</dt>
							<dd>
								<a href="{{$site_store_links.system_update_log}}" target="_blank">{{:MyLang('index.development_team_update_log_value')}}</a>
							</dd>
						{{/if}}

						{{if is_array(MyLang('index.development_team_members_value'))}}
							<dt class="am-text-truncate">{{:MyLang('index.development_team_members_title')}}</dt>
							<dd>
								{{foreach :MyLang('index.development_team_members_value') as $v}}
									<a href="{{$v.url}}" target="_blank" class="am-margin-right-sm">{{$v.name}}</a>
								{{/foreach}}
							</dd>
						{{/if}}
					</dl>
				</li>
			</ul>
		{{/if}}

		<!-- 底部钩子 -->
		{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
		    <div class="plugins-tag">
		        <span>plugins_admin_view_index_init_bottom</span>
		    </div>
		{{/if}}
		{{if !empty($plugins_admin_view_index_init_bottom_data) and is_array($plugins_admin_view_index_init_bottom_data)}}
		    {{foreach $plugins_admin_view_index_init_bottom_data as $hook}}
		        {{if is_string($hook) or is_int($hook)}}
		            {{$hook|raw}}
		        {{/if}}
		    {{/foreach}}
		{{/if}}
	</div>
</div>
<!-- right content end  -->

<!-- 检查更新显示信息 -->
<div class="am-popup am-radius" id="inspect-upgrade-popup">
    <div class="am-popup-inner">
        <div class="am-popup-hd">
            <h4 class="am-popup-title">{{:MyLang('index.base_update_system_title')}}</h4>
            <span data-am-modal-close class="am-close">&times;</span>
        </div>
        <div class="am-popup-bd">
            <form class="am-form am-form-popup-fixed">
            	<div class="upgrade-content"></div>
                <div class="am-form-popup-submit">
                    <button type="button" class="am-btn am-btn-warning am-radius am-btn-xs am-margin-right-lg" data-am-modal-close>
                        <i class="am-icon-paint-brush"></i>
                        <span>{{:MyLang('cancel_title')}}</span>
                    </button>
                    <button type="button" class="am-btn am-btn-primary am-radius am-btn-xs inspect-upgrade-confirm" data-url="{{:MyUrl('admin/index/inspectupgradeconfirm')}}">
                        <i class="am-icon-check"></i>
                        <span>{{:MyLang('index.base_update_button_title')}}</span>
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>

<!-- footer start -->
{{:ModuleInclude('public/footer')}}
<script>
    // 常用功能
    // 关闭弹窗监听回调
    function ShortcutmenuCloseBackEvent()
    {
        var sttaus = parseInt(sessionStorage.getItem('admin_shortcutmenu_oprate_status') || 0);
        if(sttaus == 1)
        {
            sessionStorage.setItem('admin_shortcutmenu_oprate_status', 0); 
            window.location.reload();
        }
    }
    // 开启弹窗监听回调
    function ShortcutmenuOpenBackEvent()
    {
        sessionStorage.setItem('admin_shortcutmenu_oprate_status', 0); 
    }
</script>