Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
597 lines (562 loc) · 22.4 KB
/
Copy pathindex.html
File metadata and controls
597 lines (562 loc) · 22.4 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
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>Hello Meijun!</title>
<style type="text/css">
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td {
margin:0;
padding:0;
}
table {
border-collapse:collapse;
border-spacing:0;
}
fieldset,img {
border:0;
}
address,caption,cite,code,dfn,em,strong,th,var {
font-style:normal;
font-weight:normal;
}
ol,ul {
list-style:none;
}
caption,th {
text-align:left;
}
h1,h2,h3,h4,h5,h6 {
font-size:100%;
font-weight:bold;
}
q:before,q:after {
content:'';
}
abbr,acronym { border:0;
}
body, html {
height: 100%;
width: 100%;
}
/* Common 定义基本样式 */
body {
font: 12px/1.8 'Microsoft Yahei','Helvetica Neue',Helvetica,Arial,Sans-serif;
padding: 0;
margin: 0;
color: #333333;
}
#map {
height: 100%;
width: 100%;
}
#loading {
height: 100%;
width: 100%;
position: absolute;
z-index: 999;
background: url("http://7rfl2o.com1.z0.glb.clouddn.com/loading.gif") no-repeat center center #FFFAD1;
top: 0;
left: 0;
text-align: center;
line-height: 300px;
font-size: 32px;
color: #666;
}
#theEnd {
height: 0%;
width: 100%;
line-height: 0;
font-size: 0;
overflow: hidden;
position: absolute;
z-index: 999;
background-color: #FFFAD1;
top: 0;
left: 0;
}
#theEndText {
position: absolute;
left: 0;
z-index: 9999;
width: 100%;
text-align: center;
font-size: 26px;
line-height: 2;
top: 50%;
margin-top: -100px;
height: 200px;
}
</style>
</head>
<body>
<div id="loading">正在加载...</div>
<div id="theEnd"></div>
<div id="map"></div>
<!-- 指定全局的分享内容 -->
<input id="wsContent" type="hidden" value="一个送给娇娇的礼物「变得是距离,不变的是坚持」。">
<!-- 指定全局的分享链接 -->
<input id="wsUrl" type="hidden" value="https://www.yoflying.com/iloveyou">
<!-- 指定全局的分享图片 -->
<input id="wsPic" type="hidden" value="http://7rfl2o.com1.z0.glb.clouddn.com/38dbb6fd5266d016f7d17237912bd40734fa35e1.jpg">
<script type="text/javascript" src="http://7rfl2o.com1.z0.glb.clouddn.com/jquery.min.js"></script>
<script type="text/javascript" src="http://7rfl2o.com1.z0.glb.clouddn.com/jquery.wshare.js"></script>
<!-- <script type="text/javascript" src="http://lukesign.qiniudn.com/sm/soundmanager2-nodebug-jsmin.js"></script> -->
<script type="text/javascript">
(function(a,b){"use strict";var c=function(){var a=[["requestFullscreen","exitFullscreen","fullscreenchange","fullscreen","fullscreenElement"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitfullscreenchange","webkitIsFullScreen","webkitCurrentFullScreenElement"],["mozRequestFullScreen","mozCancelFullScreen","mozfullscreenchange","mozFullScreen","mozFullScreenElement"]];for(var c=0,d=a.length;c<d;c++){var e=a[c];if(e[1]in b)return e}}();if(!c)return a.screenfull=!1;var d="ALLOW_KEYBOARD_INPUT"in Element,e={init:function(){return b.addEventListener(c[2],function(a){e.isFullscreen=b[c[3]],e.element=b[c[4]],e.onchange(a)}),this},isFullscreen:b[c[3]],element:b[c[4]],request:function(a){a=a||b.documentElement,a[c[0]](d&&Element.ALLOW_KEYBOARD_INPUT),b.isFullscreen||a[c[0]]()},exit:function(){b[c[1]]()},toggle:function(a){this.isFullscreen?this.exit():this.request(a)},onchange:function(){}};a.screenfull=e.init()})(window,document)
</script>
<script type="text/javascript">
/*
* 常用变量
* 唐山市 118.170106,39.634951
* 长沙民政学院: 113.017194,28.139215
* 426 KM
* 5H
*/
// 初始化地图中心
var MP_CEN = {lng: 3.894763, lat: 44.529534};
// 中国中心
var CN_CEN = {lng: 103.758427, lat: 36.172333};
// 长沙民政
var MZ_JYU = {lng: 113.018947, lat: 28.145449};
// 深圳
var GZ_GTC = {lng: 114.058926, lat: 22.603378};
// 深圳市 114.058926,22.603378
var GD_GZS = {lng: 114.062663, lat: 22.552787};
// 长沙 113.051961,23.735242
var GD_HYS = {lng: 113.051961, lat: 23.735242};
// 背景音乐
// var MUSIC;
function zoomTo(zoom, time, callback, point) {
var time = time || 1000;
var callback = callback || function() {};
var loop = '';
function loopZoom() {
var curZoom = map.getZoom();
if( curZoom == zoom ) {
clearTimeout(loop);
callback();
return false;
}
var plus = curZoom > zoom ? -1 : 1;
var toZoom = curZoom + plus;
map.setZoom(toZoom);
if( point ) {
map.setCenter(point);
}
var center = map.getCenter();
loop = setTimeout(loopZoom, time);
}
loopZoom();
}
function loopWin(loopList, time, callback) {
var i = 0;
var len = loopList.length;
var callback = callback || function () {};
var timeout = '';
function loopWinInner() {
if( i == len ) {
clearTimeout(timeout);
setTimeout(callback, 1000);
return false;
}
var opts = {
title: loopList[i].title,
maxWidth: 600,
height: 0
}
var infoWindow = new BMap.InfoWindow(loopList[i].content, opts);
map.openInfoWindow(infoWindow, new BMap.Point(loopList[i].point.lng, loopList[i].point.lat));
infoWindow.redraw();
i++;
if( loopList[i] ) {
var time = loopList[i].timeout || 2000;
} else {
var time = 2000;
}
timeout = setTimeout(loopWinInner, time);
}
loopWinInner();
}
function panZoom_GTC() {
map.panTo(new BMap.Point(GZ_GTC.lng, GZ_GTC.lat));
setTimeout(function() {
zoomTo(18, 800, function() {
var marker = new BMap.Marker(GZ_GTC);
map.addOverlay(marker);
marker.setAnimation(BMAP_ANIMATION_BOUNCE);
setTimeout(panZoom_JYU, 1000);
}, GZ_GTC);
}, 800);
}
function panZoom_JYU() {
zoomTo(8, 1000, function() {
map.panTo(new BMap.Point(MZ_JYU.lng, MZ_JYU.lat));
setTimeout(function() {
zoomTo(16, 800, function() {
var marker = new BMap.Marker(MZ_JYU);
map.addOverlay(marker);
marker.setAnimation(BMAP_ANIMATION_BOUNCE);
setTimeout(panZoom_HEY, 1000);
});
}, 1000);
});
}
function panZoom_HEY() {
zoomTo(9, 2000, function() {
map.panTo(new BMap.Point(GD_HYS.lng, GD_HYS.lat));
setTimeout(function() {
var start = new BMap.Point(MZ_JYU.lng, MZ_JYU.lat);
var end = new BMap.Point(GZ_GTC.lng, GZ_GTC.lat);
var driving2 = new BMap.DrivingRoute(map, {renderOptions:{map: map, autoViewport: false}});
driving2.search(start, end);
setTimeout(function() {
var between = [
{
title: '长沙 → 深圳',
content: '1200 km + .',
point: MZ_JYU
},
{
title: '长沙 → 深圳',
content: '3个半小时的高铁 1晚上的火车',
point: GZ_GTC
},
{
title: '变得是距离,不变的是坚持;',
content: '<img src="http://7rfl2o.com1.z0.glb.clouddn.com/piao.png" width="300" height="200" alt="ticket" />',
point: MZ_JYU
}
];
loopWin(between, 2000, showPhotos);
}, 2000);
}, 1000);
});
}
function showPhotos() {
map.clearOverlays();
map.panTo(new BMap.Point(GD_GZS.lng, GD_GZS.lat));
setTimeout(function() {
zoomTo(13, 2000, function() {
var photos = [
{
title: '',
content: '深圳有你也有我',
point: CN_CEN
},
{
title: '第一次吃雪糕',
content: '<img src="http://7rfl2o.com1.z0.glb.clouddn.com/WechatIMG336.jpeg" width="500" height="373" alt="第一次吃雪糕" />',
point: {lng: 114.053325, lat: 22.607594} //114.053325,22.607594
},
{
title: '我是小美女',
content: '<img src="http://7rfl2o.com1.z0.glb.clouddn.com/WechatIMG340.jpeg" width="500" height="373" alt="我是小美女" />',
point: {lng: 114.058701, lat: 22.604041} //114.058701,22.604041
},
{
title: '深圳第一峰 梧桐山',
content: '<img src="http://7rfl2o.com1.z0.glb.clouddn.com/WechatIMG346.jpeg" width="280" height="375" alt="深圳第一峰 梧桐山" />',
point: {lng: 114.207183, lat: 22.581455} //114.207183,22.581455
},
{
title: '试衣服',
content: '<img src="http://7rfl2o.com1.z0.glb.clouddn.com/WechatIMG2.jpeg" width="280" height="375" alt="试衣服" />',
point: {lng: 114.066329, lat: 22.536732} //114.066329,22.536732
},
{
title: '冬至包饺子',
content: '<img src="http://7rfl2o.com1.z0.glb.clouddn.com/WechatIMG4.jpeg" width="500" height="375" alt="冬至包饺子" />',
point: {lng: 114.061424, lat: 22.604287}//114.061424,22.604287
},
{
title: '美丽的影子',
content: '<img src="http://7rfl2o.com1.z0.glb.clouddn.com/WechatIMG5.jpeg" width="280" height="375" alt="美丽的影子" />',
point: {lng: 114.061424, lat: 22.604287}
},
{
title: '最美夕阳.下沙',
content: '<img src="http://7rfl2o.com1.z0.glb.clouddn.com/WechatIMG6.jpeg" width="280" height="375" alt="最美夕阳.下沙" />',
point: {lng: 114.03116, lat: 22.53558} //114.03116,22.53558
},
{
title: '深圳大学 我们又变成了学生...',
content: '<img src="http://7rfl2o.com1.z0.glb.clouddn.com/2934349b033b5bb5413ade9f35d3d539b700bce6.jpg" width="500" height="375" alt="深圳大学 我们又变成了学生..." />',
point: {lng: 113.942839, lat: 22.541054} //113.942839,22.541054
},
{
title: '看了无数次的博纳影城',
content: '<img src="http://7rfl2o.com1.z0.glb.clouddn.com/9b713976770ce5b1157d7787ae9cd614.jpg" width="499" height="373" alt="看了无数次的博纳影城" />',
point: {lng: 114.052863, lat: 22.608866} //114.052863,22.608866
},
{
title: '东方大厦 离开又是舍不得',
content: '<img src="http://7rfl2o.com1.z0.glb.clouddn.com/001YcUzGgy6V6UvIvTc6a&690.jpeg" width="500" height="375" alt="东方大厦 离开又是舍不得" />',
point: {lng: 113.952774, lat: 22.553844} //113.952774,22.553844
},
{
title: '海底捞 or 我亲爱的弟弟',
content: '<img src="http://7rfl2o.com1.z0.glb.clouddn.com/1469283956570.jpg" width="500" height="375" alt="海底捞 or 我亲爱的弟弟" />',
point: {lng: 114.053963, lat: 22.602617} //114.053963,22.602617
},
{
title: '尊宝榴莲大披萨',
content: '<img src="http://7rfl2o.com1.z0.glb.clouddn.com/logo_1101112819.jpg" width="500" height="375" alt="尊宝榴莲大披萨" />',
point: {lng: 114.059272, lat: 22.606062} //114.059272,22.606062
}
];
loopWin(photos, 2500, wannaTo);
});
}, 1000);
}
function wannaTo() {
map.closeInfoWindow();
zoomTo(9, 1000, function() {
map.panTo(new BMap.Point(CN_CEN.lng, CN_CEN.lat));
map.setMapType(BMAP_HYBRID_MAP);
setTimeout(function() {
var wanna = [
{
title: '',
content: '我们一起旅行过的地方',
point: CN_CEN
},
{
title: '厦门',
content: '<img src="http://7rfl2o.com1.z0.glb.clouddn.com/WechatIMG351.jpeg" width="500" height="338" alt="厦门" />',
point: {lng: 118.101664, lat: 24.486873} //118.101664,24.486873
},
{
title: '厦大or鼓浪屿',
content: '<img src="http://7rfl2o.com1.z0.glb.clouddn.com/WechatIMG7.jpeg" width="500" height="337" alt="厦大or鼓浪屿" />',
point: {lng: 118.072918, lat: 24.451616} //118.072918,24.451616
},
{
title: '江南乌镇',
content: '<img src="http://7rfl2o.com1.z0.glb.clouddn.com/WechatIMG353.jpeg" width="499" height="399" alt="江南乌镇" />',
point: {lng: 120.497537, lat: 30.751069}//120.497537,30.751069
},
{
title: '乌镇西栅',
content: '<img src="http://7rfl2o.com1.z0.glb.clouddn.com/WechatIMG356.jpeg" width="500" height="400" alt="乌镇西栅" />',
point: {lng: 120.489083, lat: 30.761363} //120.489083,30.761363
},
{
title: '乌镇东栅',
content: '<img src="http://7rfl2o.com1.z0.glb.clouddn.com/WechatIMG355.jpeg" width="500" height="327" alt="乌镇东栅" />',
point: {lng: 120.505181, lat: 30.745163} //120.505181,30.745163
},
{
title: '江南and小美女',
content: '<img src="http://7rfl2o.com1.z0.glb.clouddn.com/WechatIMG359.jpeg" width="500" height="327" alt="江南and小美女" />',
point: {lng: 120.489083, lat: 30.761363} //120.505181,30.745163
},
{
title: '江南水乡',
content: '<img src="http://7rfl2o.com1.z0.glb.clouddn.com/WechatIMG362.jpeg" width="500" height="327" alt="江南水乡" />',
point: {lng: 120.489083, lat: 30.761363} //120.505181,30.745163
},
{
title: '香港之行',
content: '<img src="http://7rfl2o.com1.z0.glb.clouddn.com/WechatIMG364.jpeg" width="500" height="327" alt="香港之行" />',
point: {lng: 114.316359, lat: 22.564237} //114.316359,22.564237
}
];
loopWin(wanna, 1000, function() {
slideDown('theEnd', 1000, function() {
var theEndText = '<div id="theEndText">恋爱一周年纪念地图册 举个栗子🌰(只有你才知道的代号)<br />' +
'<button data-toggle="wshare" data-type="weibo">分享到微博</button>' +
'<button onclick="window.location.reload();">再看一次</button></div>';
document.getElementById('theEnd').innerHTML = theEndText;
})});
}, 1000);
});
}
var markerText = [
];
function addMarker(lng, lat) {
var marker = new BMap.Marker( new BMap.Point(lng, lat) );
marker.setAnimation(BMAP_ANIMATION_DROP);
map.addOverlay(marker)
}
if (!Array.prototype.shuffle) {
Array.prototype.shuffle = function() {
for(var j, x, i = this.length; i; j = parseInt(Math.random() * i), x = this[--i], this[i] = this[j], this[j] = x);
return this;
};
}
markerText.shuffle();
function loopAddMarker(markers, callback) {
var i = 0;
var len = markers.length;
var callback = callback || function() {};
var loop = '';
function loopAddMarkerInner() {
if( i == len ) {
clearTimeout(loop);
callback();
return false;
}
addMarker(markers[i].lng, markers[i].lat);
i++;
loop = setTimeout(loopAddMarkerInner, 300);
}
loopAddMarkerInner();
}
function showMarkerText() {
map.closeInfoWindow();
map.panTo(new BMap.Point(82.699584, 39.8202));
setTimeout(function() {
zoomTo(9, 1000, function() {
loopAddMarker(markerText, function() {
setTimeout(function() {
slideDown('theEnd', 1000, function() {
var theEndText = '<div id="theEndText">恋爱一周年纪念地图册 举个栗子🌰(只有你才知道的代号)<br />' +
'<button data-toggle="wshare" data-type="weibo">分享到微博</button>' +
'<button onclick="window.location.reload();">再看一次</button></div>';
document.getElementById('theEnd').innerHTML = theEndText;
});
}, 5000);
});
})
}, 1000);
}
function slideDown(id, speed, callback) {
var object = document.getElementById(id);
var timeout = speed*0.001;
var callback= callback || function() {};
var loop = '';
object.style.display = 'block';
object.style.height = '0%';
function slideDownInner() {
var curHeight = parseFloat(object.style.height) || 0;
if( curHeight >= 100 ) {
clearTimeout(loop);
callback();
return false;
}
object.style.height = (curHeight + 0.1) + '%';
loop = setTimeout(slideDownInner, timeout);
}
slideDownInner();
}
function preLoadImages(imagesList, callback) {
var len = imagesList.length;
var i = 0;
var images = {};
var callback = callback || function() {};
function loadImage() {
if( i == len ) {
callback();
return false;
}
images[i] = new Image();
images[i].src = imagesList[i];
i++;
loadImage();
}
loadImage();
}
var map;
function initMap() {
map = new BMap.Map("map");
var point = new BMap.Point(MP_CEN.lng, MP_CEN.lat);
map.centerAndZoom(point, 4);
map.disableDragging();
map.disableDoubleClickZoom();
init();
}
function init() {
document.getElementById('loading').style.display = 'none';
document.getElementById('theEnd').style.height = '0';
document.getElementById('theEnd').innerHTML = '';
map.setMapType(BMAP_NORMAL_MAP);
var point = new BMap.Point(MP_CEN.lng, MP_CEN.lat);
map.centerAndZoom(point, 4);
map.clearOverlays();
map.reset();
// MUSIC.play();
map.panTo(new BMap.Point(GZ_GTC.lng, GZ_GTC.lat));
panZoom_GTC();
}
function loadScript() {
var script = document.createElement("script");
script.src = "http://api.map.baidu.com/api?v=1.2&callback=initMap";
document.body.appendChild(script);
}
window.onload = function() {
var imglist = [
'http://7rfl2o.com1.z0.glb.clouddn.com/WechatIMG336.jpeg',
'http://7rfl2o.com1.z0.glb.clouddn.com/WechatIMG340.jpeg',
'http://7rfl2o.com1.z0.glb.clouddn.com/WechatIMG346.jpeg',
'http://7rfl2o.com1.z0.glb.clouddn.com/WechatIMG2.jpeg',
'http://7rfl2o.com1.z0.glb.clouddn.com/WechatIMG4.jpeg',
'http://7rfl2o.com1.z0.glb.clouddn.com/WechatIMG5.jpeg',
'http://7rfl2o.com1.z0.glb.clouddn.com/WechatIMG6.jpeg',
'http://7rfl2o.com1.z0.glb.clouddn.com/2934349b033b5bb5413ade9f35d3d539b700bce6.jpg',
'http://7rfl2o.com1.z0.glb.clouddn.com/9b713976770ce5b1157d7787ae9cd614.jpg',
'http://7rfl2o.com1.z0.glb.clouddn.com/1469283956570.jpg',
'http://7rfl2o.com1.z0.glb.clouddn.com/1469283956570.jpg',
'http://7rfl2o.com1.z0.glb.clouddn.com/WechatIMG351.jpeg',
'http://7rfl2o.com1.z0.glb.clouddn.com/WechatIMG352.jpeg',
'http://7rfl2o.com1.z0.glb.clouddn.com/WechatIMG353.jpeg',
'http://7rfl2o.com1.z0.glb.clouddn.com/WechatIMG356.jpeg',
'http://7rfl2o.com1.z0.glb.clouddn.com/WechatIMG356.jpeg',
'http://7rfl2o.com1.z0.glb.clouddn.com/WechatIMG355.jpeg',
'http://7rfl2o.com1.z0.glb.clouddn.com/WechatIMG359.jpeg',
'http://7rfl2o.com1.z0.glb.clouddn.com/WechatIMG362.jpeg',
'http://7rfl2o.com1.z0.glb.clouddn.com/WechatIMG364.jpeg'
];
// soundManager.setup({
// url: 'http://7rfl2o.com1.z0.glb.clouddn.com/',
// onready: initMP3()
// });
preLoadImages(imglist, function() {
setTimeout(function() {
var loading = document.getElementById('loading');
loading.style.cursor = 'pointer';
loading.innerHTML = '点击开始';
loading.onclick = function() {
screenfull && screenfull.request();
loadScript();
}
}, 3000);
});
// function initMP3() {
// MUSIC = soundManager.createSound({
// id: 'mp3',
// url: './zanmenjiehunba.mp3',
// onload: function() {
// preLoadImages(imglist, function() {
// setTimeout(function() {
// var loading = document.getElementById('loading');
// loading.style.cursor = 'pointer';
// loading.innerHTML = '点击开始';
// loading.onclick = function() {
// screenfull && screenfull.request();
// loadScript();
// }
// }, 3000);
// });
// }
// });
// MUSIC.load();
// }
};
</script>
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "http://hm.baidu.com/hm.js?c142366bae08a5add7c3c1ce2703b10d";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
<audio id="bgaudio" src="http://7rfl2o.com1.z0.glb.clouddn.com/LemonTree.mp3"></audio>
<script>
document.getElementById('bgaudio').play();
</script>
</body>
</html>