diff --git a/app/index/view/default/public/module/form_operate_top.html b/app/index/view/default/public/module/form_operate_top.html
index 5579b6894..67a2e1fbd 100644
--- a/app/index/view/default/public/module/form_operate_top.html
+++ b/app/index/view/default/public/module/form_operate_top.html
@@ -1,18 +1,4 @@
-
-{{if isset($form_table['base']['is_delete']) and $form_table['base']['is_delete'] eq 1}}
-
-{{/if}}
-
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
@@ -33,6 +19,20 @@
}
{{/php}}
+
+{{if isset($form_table['base']['is_delete']) and $form_table['base']['is_delete'] eq 1}}
+
+{{/if}}
+
{{if isset($form_table['base']['is_search']) and $form_table['base']['is_search'] eq 1}}
重置
diff --git a/config/.gitignore b/config/.gitignore
index 6b502227c..3c5e2a814 100644
--- a/config/.gitignore
+++ b/config/.gitignore
@@ -1 +1,2 @@
-database.php
\ No newline at end of file
+database.php
+domain.php
\ No newline at end of file
diff --git a/public/core.php b/public/core.php
index 4eef0e038..e502f28e1 100755
--- a/public/core.php
+++ b/public/core.php
@@ -102,4 +102,20 @@ define('IS_POST', isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'
// 是否ajax
define('IS_AJAX', ((isset($_SERVER['HTTP_X_REQUESTED_WITH']) && 'xmlhttprequest' == strtolower($_SERVER['HTTP_X_REQUESTED_WITH'])) || isset($_REQUEST['ajax']) && $_REQUEST['ajax'] == 'ajax'));
-?>
+
+// 二级域名页面绑定
+if(substr_count(__MY_HOST__, '.') > 1 && !is_numeric(str_replace('.', '', __MY_HOST__)))
+{
+ $domain_file = ROOT.'config'.DS.'domain.php';
+ $second_domain = substr(__MY_HOST__, 0, strpos(__MY_HOST__, '.'));
+ if(file_exists($domain_file) && $second_domain != 'www')
+ {
+ $data = include($domain_file);
+ if(!empty($data) && (!empty($data[$second_domain]) || !empty($data['s'])))
+ {
+ define('SECOND_DOMAIN', $second_domain);
+ $_GET['s'] = empty($data[$second_domain]) ? $data['s'] : $data[$second_domain];
+ }
+ }
+}
+?>
\ No newline at end of file