Browse Source

fix: QR code and IPv6 display out of bounds, path of error page

master
Dnomd343 4 years ago
parent
commit
a341986955
  1. 10
      assets/js/main.js
  2. 2
      assets/js/main.min.js
  3. 4
      backend/queryInfo.php
  4. 10
      index.html

10
assets/js/main.js

@ -85,6 +85,12 @@ function showQRCode() {
});
var shareLeft = event.pageX - 50;
var shareTop = event.pageY + 15;
if (shareLeft + 122 > $(document).width()) {
shareLeft = $(document).width() - 122;
}
if (shareTop + 122 > $(document).height()) {
shareTop = $(document).height() - 122;
}
shareX = shareLeft + 61;
shareY = shareTop + 61;
if ($("#qrcode").is(':hidden')) {
@ -210,15 +216,13 @@ function clear() {
};
function draw(x, y) {
var size = 100;
var map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/mapbox/streets-v11',
center: [y, x],
zoom: 3
});
var size = 100;
var pulsingDot = {
width: size,
height: size,

2
assets/js/main.min.js

File diff suppressed because one or more lines are too long

4
backend/queryInfo.php

@ -186,7 +186,7 @@ function routeParam() {
echo 'Illegal Request' . PHP_EOL;
} else {
header('HTTP/1.1 302 Moved Temporarily');
header('Location: /error.html');
header('Location: /error');
}
exit; // 退出程序
}
@ -218,7 +218,7 @@ function routeParam() {
$ip = isset($_GET['ip']) ? $_GET['ip'] : $ip; // 若存在请求信息则查询该IP
if (!filter_var($ip, \FILTER_VALIDATE_IP)) { // 输入IP不合法
if ($_GET['cli'] == "true") { // 命令行模式
echo "Illegal IP format" . PHP_EOL;
echo "Illegal Request" . PHP_EOL;
} else {
$reply = array();
$reply['status'] = 'F';

10
index.html

@ -64,6 +64,16 @@
color: #2d87ee;
}
#ip {
word-wrap: break-word;
word-break: break-all;
}
#scope {
word-wrap: break-word;
word-break: break-all;
}
.positioncontrol {
position: absolute;
left: calc(100vw*0.8 - 190px);

Loading…
Cancel
Save