-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
441 lines (390 loc) · 13.8 KB
/
index.html
File metadata and controls
441 lines (390 loc) · 13.8 KB
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
57
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>鸿天惠</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
/* 色彩:红=喜庆/主色,节制使用;蓝绿互补平衡 — 参考 红色的设计.md */
:root {
--red-primary: #c41e3a;
--red-warm: #dc2626;
--red-accent: #e85d04;
--blue-balance: #334155;
--green-balance: #047857;
--bg-cool: #f7f8fa;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Hiragino Sans GB', sans-serif;
background: var(--bg-cool);
min-height: 100vh;
}
.header {
background: linear-gradient(135deg, var(--red-primary) 0%, var(--red-accent) 100%);
padding: 28px 20px 60px;
text-align: center;
color: #fff;
}
.header h1 {
font-size: 22px;
font-weight: 600;
margin-bottom: 4px;
}
.header p {
font-size: 13px;
opacity: 0.9;
}
.main {
padding: 0 16px 16px;
max-width: 480px;
margin: 0 auto;
}
/* AI 助手 */
.ai-section {
margin-top: -36px;
margin-bottom: 16px;
background: #fff;
border-radius: 12px;
box-shadow: 0 2px 12px rgba(0,0,0,0.08);
overflow: hidden;
}
.ai-input-wrap {
display: flex;
align-items: center;
padding: 12px 16px;
gap: 10px;
}
.ai-label {
flex-shrink: 0;
background: linear-gradient(135deg, var(--red-primary), var(--red-accent));
color: #fff;
font-size: 11px;
font-weight: 600;
padding: 4px 8px;
border-radius: 6px;
}
.ai-input {
flex: 1;
border: none;
outline: none;
font-size: 14px;
color: #333;
background: transparent;
font-family: inherit;
}
.ai-input::placeholder { color: #bbb; }
.ai-send {
flex-shrink: 0;
width: 32px;
height: 32px;
border: none;
background: linear-gradient(135deg, var(--red-primary), var(--red-accent));
border-radius: 8px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: opacity 0.2s;
}
.ai-send:active { opacity: 0.8; }
.ai-send svg { width: 16px; height: 16px; fill: #fff; }
.ai-reply {
display: none;
padding: 0 16px 14px;
}
.ai-reply.show { display: block; }
.ai-reply-bubble {
background: #f8f8f8;
border-radius: 10px;
padding: 12px 14px;
font-size: 13px;
color: #444;
line-height: 1.6;
}
.ai-reply-bubble a {
display: inline-block;
margin-top: 8px;
background: linear-gradient(135deg, var(--red-primary), var(--red-accent));
color: #fff;
text-decoration: none;
padding: 8px 20px;
border-radius: 8px;
font-size: 13px;
font-weight: 500;
}
.ai-reply-bubble a:active { opacity: 0.85; }
.typing-dot {
display: inline-block;
animation: blink 1.2s infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink {
0%, 60%, 100% { opacity: 0.2; }
30% { opacity: 1; }
}
/* 主推活动 按钮 */
.promo-section {
margin-bottom: 16px;
}
.promo-title {
font-size: 15px;
font-weight: 600;
color: var(--blue-balance);
margin-bottom: 10px;
padding-left: 10px;
border-left: 3px solid var(--red-primary);
}
.promo-btns {
display: flex;
flex-direction: column;
gap: 10px;
}
.promo-btn {
display: block;
background: #fff;
border-radius: 12px;
padding: 14px 16px;
text-decoration: none;
box-shadow: 0 2px 8px rgba(0,0,0,0.06);
transition: transform 0.2s;
border: none;
text-align: left;
font-family: inherit;
cursor: pointer;
}
.promo-btn:active {
transform: scale(0.98);
}
.promo-btn-name {
font-size: 15px;
font-weight: 600;
color: #333;
margin-bottom: 4px;
}
.promo-btn-desc {
font-size: 12px;
color: #999;
}
.promo-btn-tag {
display: inline-block;
background: #fef2f2;
color: var(--red-warm);
font-size: 11px;
padding: 2px 6px;
border-radius: 4px;
margin-top: 6px;
}
/* 服务网格 — 蓝灰标题与红形成互补 */
.section-title {
font-size: 15px;
font-weight: 600;
color: var(--blue-balance);
margin-bottom: 10px;
padding-left: 10px;
border-left: 3px solid var(--green-balance);
}
.grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 12px;
}
.card {
display: block;
background: #fff;
border-radius: 12px;
padding: 20px 16px;
text-decoration: none;
box-shadow: 0 2px 8px rgba(0,0,0,0.06);
transition: transform 0.2s;
}
.card:active { transform: scale(0.98); }
.card-icon {
width: 48px;
height: 48px;
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 12px;
}
.card-icon.waimai { background: linear-gradient(135deg, #ff9500, #ff5e00); }
.card-icon.dache { background: linear-gradient(135deg, #00c853, #00a843); }
.card-icon.movie { background: linear-gradient(135deg, #7c4dff, #536dfe); }
.card-icon.hotel { background: linear-gradient(135deg, #00bcd4, #0097a7); }
.card-title { font-size: 16px; font-weight: 600; color: #333; margin-bottom: 4px; }
.card-desc { font-size: 12px; color: #999; }
.card-tag { display: inline-block; background: #fef2f2; color: var(--red-warm); font-size: 11px; padding: 2px 6px; border-radius: 4px; margin-top: 8px; }
.footer {
text-align: center;
padding: 24px 16px;
color: #94a3b8;
font-size: 12px;
}
.icon { width: 28px; height: 28px; fill: #fff; }
</style>
</head>
<body>
<div class="header">
<h1>鸿天惠</h1>
<p>日常消费,天天有惠</p>
</div>
<div class="main">
<!-- AI 助手 -->
<div class="ai-section">
<div class="ai-input-wrap">
<span class="ai-label">AI</span>
<input class="ai-input" id="aiInput" type="text" placeholder="想吃啥?想去哪?说一句就行" enterkeyhint="send">
<button class="ai-send" id="aiSend" aria-label="发送">
<svg viewBox="0 0 24 24"><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></svg>
</button>
</div>
<div class="ai-reply" id="aiReply">
<div class="ai-reply-bubble" id="aiReplyContent"></div>
</div>
</div>
<!-- 主推活动 -->
<div class="promo-section">
<div class="promo-title">限时活动</div>
<div class="promo-btns">
<a href="https://kzurl02.cn/t7vO0v" class="promo-btn">
<div class="promo-btn-name">淘宝闪购 · 免单福利</div>
<div class="promo-btn-desc">新人首单免单 / 15 减 14 红包</div>
<span class="promo-btn-tag">餐饮佣金 6% 起</span>
</a>
<a href="https://kzurl09.cn/t7vOnH" class="promo-btn">
<div class="promo-btn-name">饿了么 · 社群专享红包</div>
<div class="promo-btn-desc">9.9 元吃饱喝足</div>
<span class="promo-btn-tag">限量福利</span>
</a>
</div>
</div>
<!-- 更多服务 -->
<div class="section-title">更多优惠</div>
<div class="grid">
<a href="https://xtc2aytt.jutuike.cn/#/pages/meituan/index?code=XTc2Aytt" class="card" data-key="waimai">
<div class="card-icon waimai">
<svg class="icon" viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"/></svg>
</div>
<div class="card-title">外卖红包</div>
<div class="card-desc">美团 · 饿了么</div>
<span class="card-tag">最高立减20元</span>
</a>
<a href="https://xtc2aytt.jutuike.cn/#/pages/didi/index?code=XTc2Aytt" class="card" data-key="dache">
<div class="card-icon dache">
<svg class="icon" viewBox="0 0 24 24"><path d="M18.92 6.01C18.72 5.42 18.16 5 17.5 5h-11c-.66 0-1.21.42-1.42 1.01L3 12v8c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h12v1c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-8l-2.08-5.99zM6.5 16c-.83 0-1.5-.67-1.5-1.5S5.67 13 6.5 13s1.5.67 1.5 1.5S7.33 16 6.5 16zm11 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM5 11l1.5-4.5h11L19 11H5z"/></svg>
</div>
<div class="card-title">打车优惠</div>
<div class="card-desc">滴滴出行</div>
<span class="card-tag">新人立减10元</span>
</a>
<a href="https://xtc2aytt.jutuike.cn/#/pages/movie/index?code=XTc2Aytt" class="card" data-key="movie">
<div class="card-icon movie">
<svg class="icon" viewBox="0 0 24 24"><path d="M18 4l2 4h-3l-2-4h-2l2 4h-3l-2-4H8l2 4H7L5 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4h-4z"/></svg>
</div>
<div class="card-title">特惠电影</div>
<div class="card-desc">低价票</div>
<span class="card-tag">9.9元起</span>
</a>
<a href="https://xtc2aytt.jutuike.cn/#/pages/mtjd/mtjd?code=XTc2Aytt" class="card" data-key="hotel">
<div class="card-icon hotel">
<svg class="icon" viewBox="0 0 24 24"><path d="M7 13c1.66 0 3-1.34 3-3S8.66 7 7 7s-3 1.34-3 3 1.34 3 3 3zm12-6h-8v7H3V5H1v15h2v-3h18v3h2v-9c0-2.21-1.79-4-4-4z"/></svg>
</div>
<div class="card-title">酒店特价</div>
<div class="card-desc">美团酒店</div>
<span class="card-tag">低至5折</span>
</a>
</div>
</div>
<div class="footer">
鸿天惠 · 日常消费,天天有惠
</div>
<script>
const services = {
shangou: {
keywords: ['闪购', '淘宝', '免单', '红包', '满减'],
url: 'https://kzurl02.cn/t7vO0v',
reply: '淘宝闪购有免单福利,新人首单免、老用户 15 减 14,很划算。',
btn: '去闪购领红包'
},
shequ: {
keywords: ['9.9', '社群', '吃饱', '便宜', '省钱', '福利'],
url: 'https://kzurl09.cn/t7vOnH',
reply: '社群专享 9.9 吃饱喝足,限量的,手慢无。',
btn: '抢社群福利'
},
waimai: {
keywords: ['外卖', '吃', '饿', '午饭', '晚饭', '早餐', '夜宵', '奶茶', '咖啡', '火锅', '烧烤', '炸鸡', '汉堡', '披萨', '麻辣烫', '酸辣粉', '快餐', '便当', '饭', '面', '粉', '粥', '肯德基', '麦当劳', '瑞幸', '蜜雪', '喜茶', '点餐', '下单', '美团', '饿了么', '食', '餐'],
url: 'https://kzurl02.cn/t7vO0v',
reply: '想吃东西?淘宝闪购有 15 减 14 红包,新人还能免单,比直接点外卖省很多。',
btn: '领外卖红包'
},
dache: {
keywords: ['打车', '出行', '出门', '滴滴', '车', '去', '回家', '上班', '机场', '火车站', '高铁', '叫车', '网约车', '代驾'],
url: 'https://xtc2aytt.jutuike.cn/#/pages/didi/index?code=XTc2Aytt',
reply: '出门打车?先领个优惠券,新人最多省 10 块。',
btn: '领打车券'
},
movie: {
keywords: ['电影', '影院', '看电影', '票', '大片', '周末', '约会', 'imax'],
url: 'https://xtc2aytt.jutuike.cn/#/pages/movie/index?code=XTc2Aytt',
reply: '看电影?这里有特惠票,9.9 起。',
btn: '买特惠电影票'
},
hotel: {
keywords: ['酒店', '住', '民宿', '旅游', '旅行', '出差', '住宿', '宾馆', '度假', '订房'],
url: 'https://xtc2aytt.jutuike.cn/#/pages/mtjd/mtjd?code=XTc2Aytt',
reply: '订酒店?美团酒店特价低至 5 折,先看看有没有你要的。',
btn: '看酒店特价'
}
};
const input = document.getElementById('aiInput');
const sendBtn = document.getElementById('aiSend');
const replyBox = document.getElementById('aiReply');
const replyContent = document.getElementById('aiReplyContent');
function matchService(text) {
text = text.toLowerCase();
let best = null;
let maxHits = 0;
for (const [key, svc] of Object.entries(services)) {
const hits = svc.keywords.filter(kw => text.includes(kw)).length;
if (hits > maxHits) {
maxHits = hits;
best = key;
}
}
return best;
}
function showTyping() {
replyBox.classList.add('show');
replyContent.innerHTML = '<span class="typing-dot">.</span><span class="typing-dot">.</span><span class="typing-dot">.</span>';
}
function showReply(svc) {
if (svc) {
const s = services[svc];
replyContent.innerHTML = s.reply + '<br><a href="' + s.url + '">' + s.btn + '</a>';
} else {
replyContent.innerHTML = '没太听懂,你可以试试「想吃外卖」「要打车」「看电影」,或者直接滑动上面的活动卡片。';
}
}
function handleSend() {
const text = input.value.trim();
if (!text) return;
showTyping();
const matched = matchService(text);
setTimeout(() => {
showReply(matched);
}, 600 + Math.random() * 400);
}
sendBtn.addEventListener('click', handleSend);
input.addEventListener('keydown', (e) => {
if (e.key === 'Enter') handleSend();
});
</script>
</body>
</html>