-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Your Name
committed
Oct 14, 2023
1 parent
89c5a35
commit 2cf855a
Showing
20 changed files
with
40 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
(function(){ | ||
layui.use(['layer'], function () { | ||
var layer = layui.layer; | ||
|
||
if(!Cookies.get("user_id")) { | ||
layer.prompt({ | ||
formType: 0, | ||
value: "1000", | ||
title: '第一次,请设置您的用户ID', | ||
area: ['400px', '50px'] // 自定义文本域宽高 | ||
}, function(value, index, elem){ | ||
Cookies.set("user_id", value, { expires: 7, path: '' }); | ||
layer.close(index); // 关闭层 | ||
}); | ||
} | ||
|
||
layui.$(".user").html(Cookies.get("user_id")); | ||
}) | ||
|
||
})() |