-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
49 lines (43 loc) · 1.4 KB
/
script.js
File metadata and controls
49 lines (43 loc) · 1.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
window.onload = () => {
var addresses = {
sev: {
id: 'sev',
address: 'ул. Гоголя 21, Севастополь. Россия',
phone: '+7 (978) 09-25-846',
phone_city: '93-70-18',
email: 'sev@printmaster-it.ru',
schedule: {
work: '9:00 - 18:00',
weekend: '10:00 - 14:00'
}
},
simf: {
id: 'simf',
phone: '+7 (978) 045 40 30',
address: 'ул. Севастопольская, 112, Сиферополь. Россия',
phone_city: '93-70-18',
email: 'simf@printmaster-it.ru',
schedule: {
work: '9:00 - 18:00',
weekend: '10:00 - 14:00'
}
}
}
var town = '';
if (window.localStorage.getItem('printmasterTown')) {
town = window.localStorage.getItem('printmasterTown');
setTownInfo(addresses[town]);
} else {
town = (ymaps.geolocation.city === 'Симферополь')
? 'simf'
: 'sev'
var res = confirm('Ваш город ' + ymaps.geolocation.city + '?')
console.log(res)
window.localStorage.setItem('printmasterTown', town);
setTownInfo(addresses[town]);
}
function setTownInfo(data) {
var headerSchedule = '';
var footerSchedule
}
}