<?php /*a:1:{s:67:"D:\phpstudy\WWW\12xz\app\admin\view/default\site\siteset\index.html";i:1782629701;}*/ ?>
<?php echo ModuleInclude('public/header'); ?>

<!-- right content start  -->
<div class="content-right">
    <div class="content">
        <!-- nav start -->
        <?php if(!empty($siteset_nav_list) and is_array($siteset_nav_list)): ?>
            <?php echo ModuleInclude('public/nav_switch_tabs', [
                'nav_data'  => $siteset_nav_list,
                'view_type' => $view_type,
                'nav_type'  => $nav_type,
                'url'       => 'admin/site/index'
            ]); ?>
        <?php endif; ?>
        <!-- nav end -->

        <!-- form start -->
        <form class="am-form form-validation am-form-popup-sticky" action="<?php echo MyUrl('admin/site/save'); ?>" method="POST" request-type="ajax-view" request-value="<?php echo MyUrl('admin/site/index', ['nav_type'=>$nav_type, 'view_type'=>$view_type]); ?>" enctype="multipart/form-data">
            <!-- 基础 -->
            <div class="nav-content">
                <div class="am-form-group">
                    <label><?php echo htmlentities((string) $data['common_site_default_index']['name']); ?><span class="am-form-group-label-tips"><?php echo htmlentities((string) $data['common_site_default_index']['describe']); ?></span></label>
                    <select name="<?php echo htmlentities((string) $data['common_site_default_index']['only_tag']); ?>" class="am-radius chosen-select" data-placeholder="<?php echo MyLang('please_select_tips'); ?>" data-validation-message="<?php echo htmlentities((string) $data['common_site_default_index']['error_tips']); ?>">
                        <option value=""><?php echo MyLang('please_select_tips'); ?></option>
                        <?php foreach($site_default_index_data_list as $v): if(!empty($v['data']) and is_array($v['data']) and !empty($v['name'])): ?>
                                <optgroup label="<?php echo htmlentities((string) $v['name']); ?>" class="am-color-ccc">
                                    <?php foreach($v['data'] as $vs): ?>
                                        <option value="<?php echo htmlentities((string) $vs['type']); ?>|<?php echo htmlentities((string) $vs['value']); ?>" <?php if(!empty($data['common_site_default_index']['value']) and $data['common_site_default_index']['value'] == $vs['type'].'|'.$vs['value']): ?>selected<?php endif; ?>><?php echo htmlentities((string) $vs['name']); ?></option>
                                    <?php endforeach; ?>
                                </optgroup>
                            <?php endif; ?>
                        <?php endforeach; ?>
                    </select>
                </div>
                <div class="am-form-group">
                    <label class="am-block"><?php echo htmlentities((string) $data['home_index_banner_left_status']['name']); ?><span class="am-form-group-label-tips"><?php echo htmlentities((string) $data['home_index_banner_left_status']['describe']); ?></span></label>
                    <div class="am-radio-group">
                        <?php foreach($common_close_open_list as $v): ?>
                            <label class="am-radio-inline">
                                <input type="radio" value="<?php echo htmlentities((string) $v['value']); ?>" name="<?php echo htmlentities((string) $data['home_index_banner_left_status']['only_tag']); ?>" data-validation-message="<?php echo htmlentities((string) $data['home_index_banner_left_status']['error_tips']); ?>" required <?php if(isset($data['home_index_banner_left_status']['value']) and $data['home_index_banner_left_status']['value'] == $v['value']): ?>checked<?php endif; ?> data-am-ucheck /> <?php echo htmlentities((string) $v['name']); ?>
                            </label>
                        <?php endforeach; ?>
                    </div>
                </div>
                <div class="am-form-group">
                    <label class="am-block"><?php echo htmlentities((string) $data['home_index_banner_right_status']['name']); ?><span class="am-form-group-label-tips"><?php echo htmlentities((string) $data['home_index_banner_right_status']['describe']); ?></span></label>
                    <div class="am-radio-group">
                        <?php foreach($common_close_open_list as $v): ?>
                            <label class="am-radio-inline">
                                <input type="radio" value="<?php echo htmlentities((string) $v['value']); ?>" name="<?php echo htmlentities((string) $data['home_index_banner_right_status']['only_tag']); ?>" data-validation-message="<?php echo htmlentities((string) $data['home_index_banner_right_status']['error_tips']); ?>" required <?php if(isset($data['home_index_banner_right_status']['value']) and $data['home_index_banner_right_status']['value'] == $v['value']): ?>checked<?php endif; ?> data-am-ucheck /> <?php echo htmlentities((string) $v['name']); ?>
                            </label>
                        <?php endforeach; ?>
                    </div>
                </div>
                <div class="am-form-group">
                    <label class="am-block"><?php echo htmlentities((string) $data['home_index_floor_data_type']['name']); ?><span class="am-form-group-label-tips"><?php echo htmlentities((string) $data['home_index_floor_data_type']['describe']); ?></span></label>
                    <div class="am-radio-group">
                        <?php foreach($common_site_floor_data_type_list as $k=>$v): ?>
                            <label class="am-radio-inline">
                                <input class="check-radio-change" type="radio" value="<?php echo htmlentities((string) $k); ?>" name="<?php echo htmlentities((string) $data['home_index_floor_data_type']['only_tag']); ?>" <?php if(isset($data['home_index_floor_data_type']['value']) and $data['home_index_floor_data_type']['value'] == $k): ?>checked<?php endif; ?> data-validation-message="<?php echo htmlentities((string) $data['home_index_floor_data_type']['error_tips']); ?>" data-am-ucheck /> <?php echo htmlentities((string) $v['name']); ?>
                            </label>
                        <?php endforeach; ?>
                    </div>
                </div>
                <div class="item <?php if(isset($data['home_index_floor_data_type']['value']) and $data['home_index_floor_data_type']['value'] == '2'): ?>am-active<?php endif; ?>" data-key="2">
                    <div class="am-form-group">
                        <div class="am-flex am-flex-row am-flex-justify-center am-flex-items-center am-margin-top-xl">
                            <div class="am-flex am-flex-col am-flex-items-center drop-mode am-color-999 am-text-xs am-gap-1">
                                <img src="<?php echo StaticAttachmentUrl('site/siteset/index/drop.png'); ?>"/>
                                <?php echo MyLang('site.site_setup_layout_tips'); ?>
                                <a href="<?php echo MyUrl('index/index/index', ['is_design'=>1, 'save_url'=>urlencode(base64_encode(MyUrl('admin/layout/layoutindexhomesave')))]); ?>" target="_blank" rel="noopener noreferrer" class="am-btn am-btn-primary am-btn-xs am-radius"><?php echo MyLang('site.site_setup_layout_button_name'); ?></a>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- 自动 + 手动 -->
                <div class="reverse-drop-show am-margin-bottom <?php if(isset($data['home_index_floor_data_type']['value']) and $data['home_index_floor_data_type']['value'] == 2): ?> am-hide<?php endif; ?>">
                    <div class="am-form-group">
                        <label class="am-block"><?php echo htmlentities((string) $data['home_index_floor_left_top_category']['name']); ?><span class="am-form-group-label-tips"><?php echo htmlentities((string) $data['home_index_floor_left_top_category']['describe']); ?></span></label>
                        <?php if(!empty($one_level_goods_category_list)): ?>
                            <div class="card-grey am-margin-top-sm">
                                <ul class="auto-hand-cart">
                                    <?php foreach($one_level_goods_category_list as $category): ?>
                                        <li>
                                            <p class="am-text-truncate am-margin-bottom-sm">
                                                <span><?php echo htmlentities((string) $category['name']); ?></span>
                                                <span class="am-margin-left-sm form.am-form am-form-group-label-tips"><?php echo htmlentities((string) $category['vice_name']); ?></span>
                                            </p>
                                            <?php if(!empty($category['items'])): ?>
                                                <div class="am-checkbox-group">
                                                    <?php foreach($category['items'] as $v): ?>
                                                        <label class="am-checkbox-inline">
                                                            <input type="checkbox" name="<?php echo htmlentities((string) $data['home_index_floor_left_top_category']['only_tag']); ?>[<?php echo htmlentities((string) $category['id']); ?>]" value="<?php echo htmlentities((string) $v['id']); ?>" <?php if(!empty($category['config_category_ids']) and in_array($v['id'], $category['config_category_ids'])): ?>checked<?php endif; ?> data-validation-message="<?php echo htmlentities((string) $data['home_index_floor_left_top_category']['error_tips']); ?>" data-am-ucheck /> <?php echo htmlentities((string) $v['name']); ?>
                                                        </label>
                                                    <?php endforeach; ?>
                                                </div>
                                            <?php endif; ?>
                                        </li>
                                    <?php endforeach; ?>
                                </ul>
                                <div class="am-tips-card">
                                    <p><?php echo MyLang('site.site_setup_goods_category_tips'); ?></p>
                                </div>
                            </div>
                        <?php else: ?>
                            <div class="am-text-center am-margin-top-lg">
                                <i class="am-icon-warning"></i>
                                <span><?php echo MyLang('site.site_setup_goods_category_no_data_tips'); ?></span>
                            </div>
                        <?php endif; ?>
                    </div>
                    <div class="am-form-group">
                        <label class="am-block"><?php echo htmlentities((string) $data['home_index_floor_top_right_keywords']['name']); ?><span class="am-form-group-label-tips"><?php echo htmlentities((string) $data['home_index_floor_top_right_keywords']['describe']); ?></span></label>
                        <?php if(!empty($one_level_goods_category_list)): ?>
                            <div class="card-grey">
                                <ul class="auto-hand-cart">
                                    <?php foreach($one_level_goods_category_list as $category): ?>
                                        <li>
                                            <p class="am-text-truncate am-margin-bottom-xs">
                                                <span><?php echo htmlentities((string) $category['name']); ?></span>
                                                <span class="am-margin-left-sm form.am-form am-form-group-label-tips"><?php echo htmlentities((string) $category['vice_name']); ?></span>
                                            </p>
                                            <input type="text" name="<?php echo htmlentities((string) $data['home_index_floor_top_right_keywords']['only_tag']); ?>[<?php echo htmlentities((string) $category['id']); ?>]" placeholder="<?php echo htmlentities((string) $category['name']); ?><?php echo htmlentities((string) $data['home_index_floor_top_right_keywords']['describe']); ?>" data-validation-message="<?php echo htmlentities((string) $data['home_index_floor_top_right_keywords']['error_tips']); ?>" class="am-radius" value="<?php echo htmlentities((string) $category['config_keywords']); ?>" data-am-tagsinput />
                                        </li>
                                    <?php endforeach; ?>
                                </ul>
                                <div class="am-tips-card">
                                    <p><?php echo MyLang('site.site_setup_goods_category_tips'); ?></p>
                                </div>
                            </div>
                        <?php else: ?>
                            <div class="am-text-center am-margin-top-lg">
                                <i class="am-icon-warning"></i>
                                <span><?php echo MyLang('site.site_setup_goods_category_no_data_tips'); ?></span>
                            </div>
                        <?php endif; ?>
                    </div>
                </div>
                <!-- 自动模式 -->
                <div class="item <?php if(isset($data['home_index_floor_data_type']['value']) and $data['home_index_floor_data_type']['value'] == 0): ?> am-active<?php endif; ?>" data-key="0">
                    <div class="am-form-group">
                        <label class="am-block"><?php echo htmlentities((string) $data['home_index_floor_goods_max_count']['name']); ?><span class="am-form-group-label-tips"><?php echo htmlentities((string) $data['home_index_floor_goods_max_count']['describe']); ?></span></label>
                        <input type="number" min="0" name="<?php echo htmlentities((string) $data['home_index_floor_goods_max_count']['only_tag']); ?>" placeholder="<?php echo htmlentities((string) $data['home_index_floor_goods_max_count']['name']); ?>" data-validation-message="<?php echo htmlentities((string) $data['home_index_floor_goods_max_count']['error_tips']); ?>" class="am-radius am-form-field" <?php if(!empty($data)): ?>value="<?php echo htmlentities((string) $data['home_index_floor_goods_max_count']['value']); ?>"<?php endif; ?> />
                        <?php if(is_array(MyLang('site.goods_auto_mode_max_count_tips_list'))): ?>
                            <div class="am-tips-card">
                                <p><?php echo implode('</p><p>', MyLang('site.goods_auto_mode_max_count_tips_list')); ?></p>
                            </div>
                        <?php endif; ?>
                    </div>
                    <div class="am-form-group">
                        <label class="am-block"><?php echo htmlentities((string) $data['home_index_floor_goods_order_by_type']['name']); ?><span class="am-form-group-label-tips"><?php echo htmlentities((string) $data['home_index_floor_goods_order_by_type']['describe']); ?></span></label>
                        <div class="am-radio-group">
                            <?php foreach($common_goods_order_by_type_list as $k=>$v): ?>
                                <label class="am-radio-inline">
                                    <input type="radio" name="<?php echo htmlentities((string) $data['home_index_floor_goods_order_by_type']['only_tag']); ?>" value="<?php echo htmlentities((string) $k); ?>" <?php if(isset($data['home_index_floor_goods_order_by_type']['value']) and $data['home_index_floor_goods_order_by_type']['value'] == $k): ?>checked<?php endif; ?> data-validation-message="<?php echo htmlentities((string) $data['home_index_floor_goods_order_by_type']['error_tips']); ?>" data-am-ucheck /> <?php echo htmlentities((string) $v['name']); ?>
                                </label>
                            <?php endforeach; ?>
                        </div>
                        <?php if(is_array(MyLang('site.goods_auto_mode_order_by_tips_list'))): ?>
                            <div class="am-tips-card">
                                <p><?php echo implode('</p><p>', MyLang('site.goods_auto_mode_order_by_tips_list')); ?></p>
                            </div>
                        <?php endif; ?>
                    </div>
                    <div class="am-form-group">
                        <label class="am-block"><?php echo htmlentities((string) $data['home_index_floor_goods_order_by_rule']['name']); ?><span class="am-form-group-label-tips"><?php echo htmlentities((string) $data['home_index_floor_goods_order_by_rule']['describe']); ?></span></label>
                        <div class="am-radio-group">
                            <?php foreach($common_data_order_by_rule_list as $k=>$v): ?>
                                <label class="am-radio-inline">
                                    <input type="radio" name="<?php echo htmlentities((string) $data['home_index_floor_goods_order_by_rule']['only_tag']); ?>" value="<?php echo htmlentities((string) $k); ?>" <?php if(isset($data['home_index_floor_goods_order_by_rule']['value']) and $data['home_index_floor_goods_order_by_rule']['value'] == $k): ?>checked<?php endif; ?> data-validation-message="<?php echo htmlentities((string) $data['home_index_floor_goods_order_by_rule']['error_tips']); ?>" data-am-ucheck /> <?php echo htmlentities((string) $v['name']); ?>
                                </label>
                            <?php endforeach; ?>
                        </div>
                    </div>
                </div>
                <!-- 手动模式 -->
                <div class="item <?php if(isset($data['home_index_floor_data_type']['value']) and $data['home_index_floor_data_type']['value'] == 1): ?> am-active<?php endif; ?>" data-key="1">
                    <div class="am-form-group">
                        <label class="am-block"><?php echo htmlentities((string) $data['home_index_floor_manual_mode_goods']['name']); ?><span class="am-form-group-label-tips"><?php echo htmlentities((string) $data['home_index_floor_manual_mode_goods']['describe']); ?></span></label>
                        <?php if(!empty($one_level_goods_category_list)): ?>
                            <div class="card-grey">
                                <ul class="auto-hand-cart">
                                    <?php foreach($one_level_goods_category_list as $category): ?>
                                        <li>
                                            <p class="am-text-truncate am-margin-bottom-xs">
                                                <span><?php echo htmlentities((string) $category['name']); ?></span>
                                                <span class="am-margin-left-sm form.am-form am-form-group-label-tips"><?php echo htmlentities((string) $category['vice_name']); ?></span>
                                            </p>
                                            <ul class="manual-mode-goods-container am-nbfc am-radius manual-mode-goods-container-<?php echo htmlentities((string) $category['id']); ?>">
                                            <?php if(!empty($floor_manual_mode_goods_list) && !empty($floor_manual_mode_goods_list[$category['id']])): foreach($floor_manual_mode_goods_list[$category['id']] as $g): ?>
                                                    <li class="manual-mode-goods-item-<?php echo htmlentities((string) $g['id']); ?>">
                                                        <input type="hidden" name="<?php echo htmlentities((string) $data['home_index_floor_manual_mode_goods']['only_tag']); ?>[<?php echo htmlentities((string) $category['id']); ?>][]" value="<?php echo htmlentities((string) $g['id']); ?>" />
                                                        <a href="<?php echo htmlentities((string) $g['goods_url']); ?>" target="_blank" rel="noopener noreferrer" class="am-text-truncate am-flex am-flex-items-center am-gap-1">
                                                            <img src="<?php echo htmlentities((string) $g['images']); ?>" alt="<?php echo htmlentities((string) $g['title']); ?>" class="am-border-c am-radius" width="26" height="26" />
                                                            <span class="am-flex-1 am-flex-width"><?php echo htmlentities((string) $g['title']); ?></span>
                                                        </a>
                                                        <button type="button" class="am-close am-fr">&times;</button>
                                                    </li>
                                                <?php endforeach; ?>
                                            <?php endif; ?>
                                        </ul>
                                        <span class="business-operations-submit goods-popup-add" data-tag=".manual-mode-goods-container-<?php echo htmlentities((string) $category['id']); ?>" data-form-name="<?php echo htmlentities((string) $data['home_index_floor_manual_mode_goods']['only_tag']); ?>[<?php echo htmlentities((string) $category['id']); ?>][]">+ <?php echo MyLang('site.add_goods_title'); ?></span>
                                        </li>
                                    <?php endforeach; ?>
                                </ul>
                                <div class="am-tips-card">
                                    <p><?php echo MyLang('site.site_setup_goods_category_tips'); ?></p>
                                </div>
                            </div>
                        <?php else: ?>
                            <div class="am-text-center am-margin-top-lg">
                                <i class="am-icon-warning"></i>
                                <span><?php echo MyLang('site.site_setup_goods_category_no_data_tips'); ?></span>
                            </div>
                        <?php endif; if(is_array(MyLang('site.goods_manual_mode_max_tips_list'))): ?>
                            <div class="am-tips-card">
                                <p><?php echo implode('</p><p>', MyLang('site.goods_manual_mode_max_tips_list')); ?></p>
                            </div>
                        <?php endif; ?>
                    </div>
                </div>
            </div>
            <div class="am-form-popup-submit">
                <input type="hidden" name="nav_type" value="<?php echo htmlentities((string) $nav_type); ?>" />
                <input type="hidden" name="view_type" value="<?php echo htmlentities((string) $view_type); ?>" />
                <button type="submit" class="am-btn am-btn-primary am-radius am-btn-xs btn-loading-example" data-am-loading="{spinner: 'circle-o-notch', loadingText:'<?php echo MyLang('save_title'); ?>'}">
                    <i class="am-icon-save"></i>
                    <span><?php echo MyLang('save_title'); ?></span>
                </button>
            </div>
        </form>
        <!-- form end -->
    </div>
</div>
<!-- right content end  -->

<!-- 商品添加弹窗 -->
<div class="am-popup am-radius am-popup-full-max-lg" id="siteset-goods-popup">
    <div class="am-popup-inner">
        <div class="am-popup-hd">
            <h4 class="am-popup-title"><?php echo MyLang('site.add_goods_title'); ?></h4>
            <span data-am-modal-close class="am-close">&times;</span>
        </div>
        <div class="am-popup-bd am-padding-0">
            <form class="am-form am-padding-sm goods-add-container">
                <!-- 搜索 -->
                <div class="forth-selection-container" data-search-url="<?php echo MyUrl('admin/site/goodssearch'); ?>">
                    <select class="am-radius chosen-select forth-selection-form-category" data-placeholder="<?php echo MyLang('form_goods_category_placeholder'); ?>" data-validation-message="<?php echo MyLang('form_goods_category_message'); ?>">
                        <option value=""><?php echo MyLang('form_goods_category_placeholder'); ?></option>
                        <?php if(!empty($one_level_goods_category_list)): foreach($one_level_goods_category_list as $v): ?>
                                <option value="<?php echo htmlentities((string) $v['id']); ?>"><?php echo htmlentities((string) $v['name']); ?></option>
                                <?php if(!empty($v['items'])): foreach($v['items'] as $vs): ?>
                                        <option style="padding-left: 15px;" value="<?php echo htmlentities((string) $vs['id']); ?>"><?php if(empty($vs['items'])): ?>├<?php else: ?>└<?php endif; ?>² <?php echo htmlentities((string) $vs['name']); ?></option>
                                        <?php if(!empty($vs['items'])): foreach($vs['items'] as $kss=>$vss): ?>
                                                <option style="padding-left: 30px;" value="<?php echo htmlentities((string) $vss['id']); ?>"><?php if($kss == count($vs['items'])-1): ?>└<?php else: ?>├<?php endif; ?>³ <?php echo htmlentities((string) $vss['name']); ?></option>
                                            <?php endforeach; ?>
                                        <?php endif; ?>
                                    <?php endforeach; ?>
                                <?php endif; ?>
                            <?php endforeach; ?>
                        <?php endif; ?>
                    </select>
                    <input type="text" placeholder="<?php echo MyLang('goods_name'); ?>" class="am-radius forth-selection-form-keywords" />
                    <button type="button" class="am-btn am-btn-primary am-radius am-btn-xs search-submit" data-am-loading="{spinner: 'circle-o-notch', loadingText: ' <?php echo MyLang('search_title'); ?>'}">
                        <i class="iconfont icon-search"></i>
                        <span><?php echo MyLang('search_title'); ?></span>
                    </button>
                </div>

                <!-- 商品列表 -->
                <div class="am-scrollable-vertical am-margin-top-sm am-padding-bottom-xs am-radius goods-list-container" data-loading-msg="<?php echo MyLang('searching_tips'); ?>">
                    <ul class="am-gallery am-avg-sm-2 am-avg-md-6 am-avg-lg-8 am-gallery-bordered"></ul>
                </div>

                <!-- 分页 -->
                <div class="am-margin-top-sm am-text-center goods-page-container"></div>
            </form>
        </div>
    </div>
</div>

<!-- footer start -->
<?php echo ModuleInclude('public/footer'); ?>