-
Notifications
You must be signed in to change notification settings - Fork 0
/
edit.html
executable file
·278 lines (244 loc) · 18.7 KB
/
edit.html
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
<!doctype html>
<html lang="zh">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>大凤林 立直麻将 地图 日麻地图</title>
<meta name="keywords" content="麻将地图,立直麻将,大凤林,立直麻将地图,日麻地图,日本麻将地图" />
<meta name="description" content="立直麻将地图网站" />
<meta name="baidu-site-verification" content="codeva-Xkm2bZdsn3" />
<link href="https://s4.zstatic.net/ajax/libs/twitter-bootstrap/5.3.3/css/bootstrap.min.css" rel="stylesheet">
<link href="https://s4.zstatic.net/ajax/libs/bootswatch/5.3.3/darkly/bootstrap.min.css"
media="(prefers-color-scheme: dark)" rel="stylesheet">
<link href="https://s4.zstatic.net/ajax/libs/bootstrap-icons/1.11.3/font/bootstrap-icons.min.css" rel="stylesheet">
<link href="https://s4.zstatic.net/ajax/libs/bootstrap-table/1.22.2/bootstrap-table.min.css" rel="stylesheet">
<link
href="https://s4.zstatic.net/ajax/libs/bootstrap-table/1.22.2/extensions/filter-control/bootstrap-table-filter-control.min.css"
rel="stylesheet">
<style>
body,
input,
textarea,
option,
select {
font-family: -apple-system, BlinkMacSystemFont, "Microsoft JhengHei", "Meiryo", "Malgun Gothic", "tahoma", "Dotum", "MS PGothic", "PMingLiu", system, system-ui, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
}
code,
pre,
kbd {
font-family: Consolas, "Microsoft JhengHei"
}
html,
body {
height: 100%;
}
#page_map {
width: 100%;
height: 85%;
}
@media (max-width: 767.98px) {
.photos {
width: 90%;
}
}
</style>
</head>
<body>
<nav class="navbar navbar-expand-sm sticky-top shadow navbar-dark bg-primary">
<div class="container-fluid">
<a class="navbar-brand" href="#">大凤林</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" target="_blank"
href="https://docs.qq.com/form/page/DZElqZnljT0J4VnNI">提供信息</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://github.com/lietxia/mahjong_index">GitHub</a>
</li>
</ul>
</div>
</div>
</nav>
<form id="page_list" class="container my-3">
<select class="form-select" id="order" name="order" onchange="update_data()">
<option value="-1">新增一条信息</option>
</select>
<div class="input-group mt-3 mb-3">
<span class="input-group-text">操作密码</span>
<input type="password" class="form-control" id="passwd" name="passwd">
<span class="input-group-text">二次确认</span>
<select class="form-select" id="order_check" name="order_check">
<option value="0">不修改</option>
<option value="1">修改雀庄信息</option>
<option value="2">删除雀庄信息</option>
<option value="3">新增雀庄信息</option>
</select>
</div>
<hr>
<div class="input-group mt-3">
<span class="input-group-text">名称</span>
<input type="text" class="form-control" placeholder="南京ABC俱乐部" aria-label="shop_name" id="shop_name"
name="shop_name">
<span class="input-group-text">简称</span>
<input type="text" class="form-control" placeholder="南京ABC" aria-label="short_name" id="short_name"
name="short_name">
</div>
<div class="input-group mt-3">
<span class="input-group-text">区域</span>
<select class="form-select" id="area" name="area" onchange="update_subarea()">
<option value="0">北京</option>
</select>
<span class="input-group-text">子域</span>
<select class="form-select" id="subarea" name="subarea">
<option value="0">东城区</option>
</select>
</div>
<div class="input-group mt-3">
<span class="input-group-text">类型</span>
<select class="form-select" id="shop_type" name="shop_type">
<option value="0">公式战</option>
<option value="2">雀莊</option>
<option value="3">据点</option>
<option value="4">学校</option>
<option value="5">群组</option>
</select>
</div>
<div class="input-group mt-3">
<span class="input-group-text">经度</span>
<input type="text" class="form-control" placeholder="106.326806" aria-label="lng" name="lng" id="lng">
<span class="input-group-text">纬度</span>
<input type="text" class="form-control" placeholder="29.606753" aria-label="lat" name="lat" id="lat">
</div>
<small>从<a href="https://lbs.qq.com/getPoint/" target="_blank">腾讯地图</a>获取。【例】经106.326806,纬29.606753</small>
<div class="input-group mt-3">
<span class="input-group-text">地址</span>
<input type="text" class="form-control" placeholder="江苏省/南京市/秦淮区/龙台国际大厦/三楼XXX" aria-label="address"
aria-describedby="basic-addon1" id="address" name="address">
</div>
<small>注明:省/市/区</small>
<div class="input-group mt-3">
<span class="input-group-text">图片</span>
<textarea class="form-control" aria-label="With textarea" placeholder="https://abc.com/def.jpg" id="imgs"
name="imgs"></textarea>
</div>
<small>填写【图片URL链接】,一个图片一行。<br />
需到其他地方上传,比如<a href="https://cdnjson.com/" target="_blank">这个图床</a>(上传后看下方)</small>
<div class="input-group mt-3">
<span class="input-group-text">联络</span>
<textarea class="form-control" aria-label="With textarea" placeholder="QQ群号" id="contact_type"
name="contact_type"></textarea>
<textarea class="form-control" aria-label="With textarea" placeholder="12345678" id="contact"
name="contact"></textarea>
</div>
<small>左边写【联络方式的称呼】(QQ群号/手机号/直播间/微信号),一个一行。<br />
右边写【联络方式】(12345478/12344445555/https://bilibili.com/xxx)一个一行。</small>
<div class="input-group mt-3">
<span class="input-group-text">介绍</span>
<textarea class="form-control" aria-label="With textarea"
placeholder="大洋化学 REXX-II(八口)×3。营业时间:13:00~24:00,早茶局、通宵局建议提前预约。定期举办立直麻将赛事,可提供对局直播。" id="about"
name="about"></textarea>
</div>
<small>支持<a href="https://markdown.com.cn/basic-syntax/" target="_blank">markdown语法</a></small>
<div class="d-grid gap-2">
<button class="btn btn-primary my-3" type="button" onclick="post_data()">提交(每次只能操作1条)</button>
</div>
</form>
<script src="https://s4.zstatic.net/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script src="https://s4.zstatic.net/ajax/libs/twitter-bootstrap/5.3.3/js/bootstrap.bundle.min.js"></script>
<script src="https://s4.zstatic.net/ajax/libs/marked/13.0.1/marked.min.js"></script>
<script>
var area2text = ["北京", "天津", "河北", "山西", "内蒙古", "辽宁", "吉林", "黑龙江", "上海", "江苏", "浙江", "安徽", "福建", "江西", "山东", "河南", "湖北", "湖南", "广东", "广西", "海南", "重庆", "四川", "贵州", "云南", "西藏", "陕西", "甘肃", "青海", "宁夏", "新疆", "台湾", "香港", "澳门"];
var subarea2text = [["东城区", "西城区", "朝阳区", "丰台区", "石景山区", "海淀区", "门头沟区", "房山区", "通州区", "顺义区", "昌平区", "大兴区", "怀柔区", "平谷区", "密云区", "延庆区"], ["和平区", "河东区", "河西区", "南开区", "河北区", "红桥区", "东丽区", "西青区", "津南区", "北辰区", "武清区", "宝坻区", "滨海新区", "宁河区", "静海区", "蓟州区"], ["石家庄市", "唐山市", "秦皇岛市", "邯郸市", "邢台市", "保定市", "张家口市", "承德市", "沧州市", "廊坊市", "衡水市"], ["太原市", "大同市", "阳泉市", "长治市", "晋城市", "朔州市", "晋中市", "运城市", "忻州市", "临汾市", "吕梁市"], ["呼和浩特市", "包头市", "乌海市", "赤峰市", "通辽市", "鄂尔多斯市", "呼伦贝尔市", "巴彦淖尔市", "乌兰察布市", "兴安盟", "锡林郭勒盟", "阿拉善盟"], ["沈阳市", "大连市", "鞍山市", "抚顺市", "本溪市", "丹东市", "锦州市", "营口市", "阜新市", "辽阳市", "盘锦市", "铁岭市", "朝阳市", "葫芦岛市"], ["长春市", "吉林市", "四平市", "辽源市", "通化市", "白山市", "松原市", "白城市", "延边朝鲜族自治州"], ["哈尔滨市", "齐齐哈尔市", "鸡西市", "鹤岗市", "双鸭山市", "大庆市", "伊春市", "佳木斯市", "七台河市", "牡丹江市", "黑河市", "绥化市", "大兴安岭地区"], ["黄浦区", "徐汇区", "长宁区", "静安区", "普陀区", "虹口区", "杨浦区", "闵行区", "宝山区", "嘉定区", "浦东新区", "金山区", "松江区", "青浦区", "奉贤区", "崇明区"], ["南京市", "无锡市", "徐州市", "常州市", "苏州市", "南通市", "连云港市", "淮安市", "盐城市", "扬州市", "镇江市", "泰州市", "宿迁市"], ["杭州市", "宁波市", "温州市", "嘉兴市", "湖州市", "绍兴市", "金华市", "衢州市", "舟山市", "台州市", "丽水市"], ["合肥市", "芜湖市", "蚌埠市", "淮南市", "马鞍山市", "淮北市", "铜陵市", "安庆市", "黄山市", "滁州市", "阜阳市", "宿州市", "六安市", "亳州市", "池州市", "宣城市"], ["福州市", "厦门市", "莆田市", "三明市", "泉州市", "漳州市", "南平市", "龙岩市", "宁德市"], ["南昌市", "景德镇市", "萍乡市", "九江市", "新余市", "鹰潭市", "赣州市", "吉安市", "宜春市", "抚州市", "上饶市"], ["济南市", "青岛市", "淄博市", "枣庄市", "东营市", "烟台市", "潍坊市", "济宁市", "泰安市", "威海市", "日照市", "临沂市", "德州市", "聊城市", "滨州市", "菏泽市"], ["郑州市", "开封市", "洛阳市", "平顶山市", "安阳市", "鹤壁市", "新乡市", "焦作市", "濮阳市", "许昌市", "漯河市", "三门峡市", "南阳市", "商丘市", "信阳市", "周口市", "驻马店市", "济源市"], ["武汉市", "黄石市", "十堰市", "宜昌市", "襄阳市", "鄂州市", "荆门市", "孝感市", "荆州市", "黄冈市", "咸宁市", "随州市", "恩施土家族苗族自治州", "仙桃市", "潜江市", "天门市", "神农架林区"], ["长沙市", "株洲市", "湘潭市", "衡阳市", "邵阳市", "岳阳市", "常德市", "张家界市", "益阳市", "郴州市", "永州市", "怀化市", "娄底市", "湘西土家族苗族自治州"], ["广州市", "韶关市", "深圳市", "珠海市", "汕头市", "佛山市", "江门市", "湛江市", "茂名市", "肇庆市", "惠州市", "梅州市", "汕尾市", "河源市", "阳江市", "清远市", "东莞市", "中山市", "潮州市", "揭阳市", "云浮市"], ["南宁市", "柳州市", "桂林市", "梧州市", "北海市", "防城港市", "钦州市", "贵港市", "玉林市", "百色市", "贺州市", "河池市", "来宾市", "崇左市"], ["海口市", "三亚市", "三沙市", "儋州市", "五指山市", "琼海市", "文昌市", "万宁市", "东方市", "定安县", "屯昌县", "澄迈县", "临高县", "白沙黎族自治县", "昌江黎族自治县", "乐东黎族自治县", "陵水黎族自治县", "保亭黎族苗族自治县", "琼中黎族苗族自治县"], ["万州区", "涪陵区", "渝中区", "大渡口区", "江北区", "沙坪坝区", "九龙坡区", "南岸区", "北碚区", "綦江区", "大足区", "渝北区", "巴南区", "黔江区", "长寿区", "江津区", "合川区", "永川区", "南川区", "璧山区", "铜梁区", "潼南区", "荣昌区", "开州区", "梁平区", "武隆区", "城口县", "丰都县", "垫江县", "忠县", "云阳县", "奉节县", "巫山县", "巫溪县", "石柱土家族自治县", "秀山土家族苗族自治县", "酉阳土家族苗族自治县", "彭水苗族土家族自治县"], ["成都市", "自贡市", "攀枝花市", "泸州市", "德阳市", "绵阳市", "广元市", "遂宁市", "内江市", "乐山市", "南充市", "眉山市", "宜宾市", "广安市", "达州市", "雅安市", "巴中市", "资阳市", "阿坝藏族羌族自治州", "甘孜藏族自治州", "凉山彝族自治州"], ["贵阳市", "六盘水市", "遵义市", "安顺市", "毕节市", "铜仁市", "黔西南布依族苗族自治州", "黔东南苗族侗族自治州", "黔南布依族苗族自治州"], ["昆明市", "曲靖市", "玉溪市", "保山市", "昭通市", "丽江市", "普洱市", "临沧市", "楚雄彝族自治州", "红河哈尼族彝族自治州", "文山壮族苗族自治州", "西双版纳傣族自治州", "大理白族自治州", "德宏傣族景颇族自治州", "怒江傈僳族自治州", "迪庆藏族自治州"], ["拉萨市", "日喀则市", "昌都市", "林芝市", "山南市", "那曲市", "阿里地区"], ["西安市", "铜川市", "宝鸡市", "咸阳市", "渭南市", "延安市", "汉中市", "榆林市", "安康市", "商洛市"], ["兰州市", "嘉峪关市", "金昌市", "白银市", "天水市", "武威市", "张掖市", "平凉市", "酒泉市", "庆阳市", "定西市", "陇南市", "临夏回族自治州", "甘南藏族自治州"], ["西宁市", "海东市", "海北藏族自治州", "黄南藏族自治州", "海南藏族自治州", "果洛藏族自治州", "玉树藏族自治州", "海西蒙古族藏族自治州"], ["银川市", "石嘴山市", "吴忠市", "固原市", "中卫市"], ["乌鲁木齐市", "克拉玛依市", "吐鲁番市", "哈密市", "昌吉回族自治州", "博尔塔拉蒙古自治州", "巴音郭楞蒙古自治州", "阿克苏地区", "克孜勒苏柯尔克孜自治州", "喀什地区", "和田地区", "伊犁哈萨克自治州", "塔城地区", "阿勒泰地区", "石河子市", "阿拉尔市", "图木舒克市", "五家渠市", "北屯市", "铁门关市", "双河市", "可克达拉市", "昆玉市", "胡杨河市", "新星市"], ["台北市", "高雄市", "台南市", "台中市", "金门县", "南投县", "基隆市", "新竹市", "嘉义市", "新北市", "宜兰县", "新竹县", "桃园县", "苗栗县", "彰化县", "嘉义县", "云林县", "屏东县", "台东县", "花莲县", "澎湖县"], ["香港岛/中西区", "香港岛/湾仔", "香港岛/东区", "香港岛/南区", "九龙/九龙城区", "九龙/油尖旺区", "九龙/深水埗区", "九龙/黄大仙区", "九龙/观塘区", "新界/北区", "新界/大埔区", "新界/沙田区", "新界/西贡区", "新界/元朗区", "新界/屯门区", "新界/荃湾区", "新界/葵青区", "新界/离岛区"], ["澳门半岛/大堂区", "澳门半岛/风顺堂区", "澳门半岛/花地玛堂区", "澳门半岛/花王堂区", "澳门半岛/望德堂区", "澳门半岛/其他区", "离岛/嘉模堂区", "离岛/路凼填海区", "离岛/圣方济各堂区", "离岛/其他区"]];
var area = document.getElementById('area');
area.innerHTML = '';
//<option value="0">北京</option>
for (var i = 0; i < area2text.length; i++) {
var op = document.createElement('option');
op.innerText = area2text[i];
op.value = i;
area.appendChild(op);
}
function update_subarea() {
var area = document.getElementById('area');
var subarea = document.getElementById('subarea');
var data_index = area.options[area.selectedIndex].value;
subarea.innerHTML = '';
var subarea_data = subarea2text[data_index];
for (var i = 0; i < subarea_data.length; i++) {
var op = document.createElement('option');
op.innerText = subarea_data[i];
op.value = i;
subarea.appendChild(op);
}
}
update_subarea();
function create_list() {
var data = window.web_cache;
var target = document.getElementById('order');
for (var i = 0; i < data.length; i++) {
var op = document.createElement('option');
op.innerText = data[i][1];
op.value = i;
target.appendChild(op);
}
}
function post_data() {
$.post("https://cdn.r-mj.com/api/map.php",
$("form").serialize())
.done(function (data) {
var a = JSON.parse(data);
console.log(a);
if (Object.hasOwnProperty.call(a, "msg")) {
alert(a.msg);
} else {
alert("未知错误");
}
});
}
function update_data() {
var order = document.getElementById('order');
var order_value = order.options[order.selectedIndex].value;
var shop_data = [0, "", 0, 0, "", "", "", "", "", ["", ""], []];
if (order_value >= 0) {
shop_data = window.web_cache[order_value];
}
var input_text1 = ["shop_name", "short_name", "lng", "lat", "address", "about"]
var input_text2 = [1, 4, 5, 6, 7, 8]
for (let i = 0; i < input_text1.length; i++) {
document.getElementById(input_text1[i]).value = shop_data[input_text2[i]];
}
document.getElementById('area').selectedIndex = shop_data[2];
update_subarea();
document.getElementById('shop_type').selectedIndex = shop_data[0];
document.getElementById('subarea').selectedIndex = shop_data[3];
document.getElementById("imgs").value = shop_data[10].join("\n");
var contact_type = '';
var contact = '';
for (let i = 0; i < shop_data[9].length; i++) {
if (i % 2 === 0) {
contact_type += "\n" + shop_data[9][i];
} else {
contact += "\n" + shop_data[9][i];
}
}
document.getElementById("contact_type").value = contact_type.trim();
document.getElementById("contact").value = contact.trim();
}
(function () {
$.getJSON("https://cdn.r-mj.com/api/map.json", function (data) {
window.web_cache = data;
create_list();
});
// window.web_cache = [[1, "烟台·海色立直麻将", 14, 5, "烟台海色", 121.457174, 37.431029, "山东烟台莱山区金地格林梦想小区", "【烟台海色立直麻将交流群】\n机型:雀友H100日麻机两台;国标点红5机器一台\n地址:莱山区金地格林梦想小区(雀友一台);莱山区飞龙金滩花园熙园(雀友一台);芝罘区大海阳路宜间查馆量贩式剧本体验馆(点红5国标)\nQQ群:1030804341\n使用机器需提前至少一天进群向桌主预约,前两个地方均禁烟禁有料,感谢理解", ["QQ群", 1030804341], []], [0, "蕙嘉韵雀庄", 9, 4, "蕙嘉韵", 120.719162, 31.324848, "苏州工业园区嘉瑞巷8号乐嘉大厦 北面写字楼2122室", "雀庄简述:雀庄营业面积100平米,共设有两个包厢,包厢面积约15平米左右。配备有大洋JPC 四口机两台,雀友四口机1台,大洋REX3 八口机两台。雀庄禁烟。", ["QQ群", 685239677, "联系电话", 15250414987], ["https://s.r-mj.com/img/quezhuang/hjy1.jpg", "https://s.r-mj.com/img/quezhuang/hjy2.jpg", "https://s.r-mj.com/img/quezhuang/hjy3.jpg"]]];
// create_list();
})()
</script>
</body>
</html>