Blame view

frontend/unified.html 4.86 KB
4d824a77   tangwang   所有租户共用一套统一配置.tena...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
  <!DOCTYPE html>
  <html lang="zh-CN">
  <head>
      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <title>统一搜索界面 - Unified Search</title>
      <link rel="stylesheet" href="/static/css/style.css">
      <style>
          .tenant-selector {
              display: flex;
              align-items: center;
              gap: 10px;
              margin-bottom: 10px;
              padding: 10px;
              background: #f5f5f5;
              border-radius: 4px;
          }
          .tenant-selector label {
              font-weight: bold;
              color: #333;
          }
          .tenant-selector select {
              padding: 6px 12px;
              border: 1px solid #ddd;
              border-radius: 4px;
              font-size: 14px;
              background: white;
              cursor: pointer;
          }
          .tenant-selector select:hover {
              border-color: #007bff;
          }
          .tenant-info {
              font-size: 12px;
              color: #666;
              margin-left: auto;
          }
      </style>
  </head>
  <body>
      <div class="page-container">
          <!-- Header -->
          <header class="top-header">
              <div class="header-left">
                  <span class="logo">Unified Search</span>
                  <span class="product-count" id="productCount">0 products found</span>
              </div>
              <div class="header-right">
                  <button class="fold-btn" onclick="toggleFilters()">Fold</button>
              </div>
          </header>
  
          <!-- Tenant Selector -->
          <div class="tenant-selector">
              <label for="tenantSelect">选择租户:</label>
              <select id="tenantSelect" onchange="switchTenant()">
ae5a294d   tangwang   命名修改、代码清理
57
                  <option value="tenant1">Tenant1 (旧配置)</option>
4d824a77   tangwang   所有租户共用一套统一配置.tena...
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
                  <option value="base:1" selected>Base - Tenant 1 (店匠通用)</option>
                  <option value="base:2">Base - Tenant 2 (店匠通用)</option>
              </select>
              <span class="tenant-info" id="tenantInfo">当前: Base - Tenant 1</span>
          </div>
  
          <!-- Search Bar -->
          <div class="search-bar">
              <input type="text" id="searchInput" placeholder="输入搜索关键词... (支持中文、英文)"
                     onkeypress="handleKeyPress(event)">
              <button onclick="performSearch()" class="search-btn">搜索</button>
          </div>
  
          <!-- Filter Section -->
          <div class="filter-section" id="filterSection">
              <!-- Category Filter -->
              <div class="filter-row">
                  <div class="filter-label">Categories:</div>
                  <div class="filter-tags" id="categoryTags"></div>
              </div>
  
              <!-- Vendor/Brand Filter -->
              <div class="filter-row">
                  <div class="filter-label" id="vendorLabel">Vendor:</div>
                  <div class="filter-tags" id="brandTags"></div>
              </div>
  
              <!-- Tags/Supplier Filter -->
              <div class="filter-row">
                  <div class="filter-label" id="tagsLabel">Tags:</div>
                  <div class="filter-tags" id="supplierTags"></div>
              </div>
  
              <!-- Price Range Filter -->
              <div class="filter-row">
                  <div class="filter-label">Price Range:</div>
                  <div class="filter-tags" id="priceTags"></div>
              </div>
  
              <!-- Result Size -->
              <div class="filter-row">
                  <div class="filter-label">Results per page:</div>
                  <select id="resultSize" onchange="performSearch()">
                      <option value="10">10</option>
                      <option value="20" selected>20</option>
                      <option value="50">50</option>
                      <option value="100">100</option>
                  </select>
              </div>
          </div>
  
          <!-- Results Section -->
          <div class="results-section">
              <div id="loading" style="display: none; text-align: center; padding: 20px;">
                  <p>Searching...</p>
              </div>
  
              <div id="error" style="display: none; color: red; padding: 20px; text-align: center;"></div>
  
              <div id="welcome" style="text-align: center; padding: 40px; color: #666;">
                  <h2>Welcome to Unified Search</h2>
                  <p>Select a tenant and enter keywords to search for products</p>
              </div>
  
              <div id="productGrid" class="product-grid"></div>
  
              <!-- Pagination -->
              <div id="pagination" class="pagination"></div>
          </div>
  
          <!-- Debug Section -->
          <div class="debug-section" id="debugSection" style="display: none;">
              <button onclick="toggleDebug()" class="debug-toggle">Toggle Debug Info</button>
              <div id="debugInfo" style="display: none;"></div>
          </div>
      </div>
  
      <script src="/static/js/app_unified.js"></script>
  </body>
  </html>