File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 68
68
function $ (id ){
69
69
return document .getElementById (id);
70
70
}
71
+ function getParameter (key ){
72
+ var searchArr = location .search .slice (1 ).split (' &' );
73
+ for (let i = 0 ; i < searchArr .length ; i++ ){
74
+ let searchItem = searchArr[i].split (' =' );
75
+ if (searchItem[0 ] == key){
76
+ return decodeURIComponent (searchItem[1 ]);
77
+ }
78
+ }
79
+ }
71
80
/* function getNormalizedDateTimeString(date){//date是标准的Date对象
72
81
var iosString = date.toISOString();
73
82
return iosString.replace(/\..+/, '');
286
295
this .baiduMap .init (this .baiduMapCtn );
287
296
var _this = this ;
288
297
this .initTimeRound (new Date ());
289
- if (localStorage .getItem (' apiKey' )){// 0XlwMJm8U42KEZ394N4p8hm2p=s=
298
+ if (getParameter (' apikey' )){
299
+ $apiKey .value = getParameter (' apikey' );
300
+ }else if (localStorage .getItem (' apiKey' )){// 0XlwMJm8U42KEZ394N4p8hm2p=s=
290
301
$apiKey .value = localStorage .getItem (' apiKey' );
291
302
}
292
- if (localStorage .getItem (' deviceId' )){// 517162506
303
+ if (getParameter (' deviceid' )){
304
+ $deviceId .value = getParameter (' deviceid' );
305
+ }else if (localStorage .getItem (' deviceId' )){// 517162506
293
306
$deviceId .value = localStorage .getItem (' deviceId' );
294
307
}
295
308
if (localStorage .getItem (' pointCount' )){// 500
You can’t perform that action at this time.
0 commit comments