mirror of
https://github.com/caojiezi2003/Snavigation.git
synced 2024-11-10 06:39:45 +00:00
Fix: Support localhost domain and port in url
This commit is contained in:
parent
a9110e9e35
commit
1b69dce038
@ -1116,7 +1116,7 @@ $(document).ready(function () {
|
|||||||
// 自定义壁纸设置保存
|
// 自定义壁纸设置保存
|
||||||
$(".wallpaper_save").click(function () {
|
$(".wallpaper_save").click(function () {
|
||||||
var url = $("#wallpaper-url").val();
|
var url = $("#wallpaper-url").val();
|
||||||
var reg = /^http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- ./?%&=]*)?$/;
|
var reg = /^http(s)?:\/\/(([\w-]+\.)+[\w-]|localhost)+(:[0-9]{1,5})?(\/[\w- ./?%&=]*)?$/g;
|
||||||
if (!reg.test(url)) {
|
if (!reg.test(url)) {
|
||||||
iziToast.show({
|
iziToast.show({
|
||||||
message: '请输入正确的链接',
|
message: '请输入正确的链接',
|
||||||
|
Loading…
Reference in New Issue
Block a user