first commit
This commit is contained in:
48
templates/userinfo.html
Executable file
48
templates/userinfo.html
Executable file
@@ -0,0 +1,48 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>User Profile</title>
|
||||
<script src="https://file.guimiaokeji.com/layui/jquery-3.6.0.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>User Profile</h2>
|
||||
<div id="profile">
|
||||
<p>Username: <span id="username"></span></p>
|
||||
<p>Email: <span id="email"></span></p>
|
||||
<p>Phone: <span id="phone"></span></p>
|
||||
<p>Is Member: <span id="is_member"></span></p>
|
||||
<p>Points: <span id="points"></span></p>
|
||||
<p>Referral Code: <span id="referral_code"></span></p>
|
||||
<p>Commission Rate: <span id="commission_rate"></span></p>
|
||||
<p>Login Count: <span id="login_count"></span></p>
|
||||
<p>Last Login IP: <span id="last_login_ip"></span></p>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$.ajax({
|
||||
url: '/api/profile/',
|
||||
type: 'GET',
|
||||
success: function(data) {
|
||||
$('#username').text(data.username);
|
||||
$('#email').text(data.email);
|
||||
$('#phone').text(data.phone);
|
||||
$('#is_member').text(data.is_member);
|
||||
$('#points').text(data.points);
|
||||
$('#referral_code').text(data.referral_code);
|
||||
$('#commission_rate').text(data.commission_rate);
|
||||
$('#login_count').text(data.login_count);
|
||||
$('#last_login_ip').text(data.last_login_ip);
|
||||
$('#last_login_time').text(data.last_login_time);
|
||||
$('#membership_end').text(data.membership_end);
|
||||
},
|
||||
error: function(err) {
|
||||
console.error(err);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user