mirror of
https://github.com/caojiezi2003/Snavigation.git
synced 2024-11-23 10:59:46 +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 () {
|
||||
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)) {
|
||||
iziToast.show({
|
||||
message: '请输入正确的链接',
|
||||
|
Loading…
Reference in New Issue
Block a user