|
@@ -52,16 +52,34 @@ function renderView() {
|
|
|
<p><strong>${userInfo.user_info.left_sec}</strong><span set-lan="html:sec">秒</span></p>
|
|
|
</div>
|
|
|
</div>`;
|
|
|
+ // 使用者名稱
|
|
|
const userName = `<h2 class="user-name text-white mt-4 fw-bold">Hello,${userInfo.user_info.userName}</h2>`;
|
|
|
+ // 已使用
|
|
|
const usedtime=`<h1 class="text-center">${userInfo.user_info.total_sec} <span style="font-size:15px;">秒</span></h1>`;
|
|
|
+ // 未使用
|
|
|
const NotUsedTime=`<h1 class="text-center">${userInfo.user_info.left_sec} <span style="font-size:15px;">秒</span></h1>`;
|
|
|
+ // user資訊
|
|
|
const infContent=`
|
|
|
<div class="inf-content">
|
|
|
<p>${userInfo.user_info.userName}</p>
|
|
|
- <p>abc***************0 <a href="">更改密碼</a></p>
|
|
|
+ <p>*************** <a href="">更改密碼</a></p>
|
|
|
<p>${userInfo.user_info.email}</p>
|
|
|
</div>`;
|
|
|
-
|
|
|
+ // 歷史紀錄
|
|
|
+ // const historicalrecord
|
|
|
+ var historicalrecord=''
|
|
|
+ for (var i = 0; i < userInfo.video_info.length; i++) {
|
|
|
+ historicalrecord+='\
|
|
|
+ <tr>\
|
|
|
+ <td class="px-0">'+userInfo.video_info[i].time_stamp+'</td>\
|
|
|
+ <td class="px-0">'+userInfo.video_info[i].title+'</td>\
|
|
|
+ <td class="px-0 w-25">'+userInfo.video_info[i].duration+'</td>\
|
|
|
+ </tr>`\
|
|
|
+ ';
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ $('.historical-content').html(historicalrecord);
|
|
|
$('.userinf').html(infContent);
|
|
|
$('.userName').html(userName);
|
|
|
$('.used-time').html(usedtime);
|
|
@@ -92,4 +110,10 @@ function checkLogin() {
|
|
|
}
|
|
|
|
|
|
|
|
|
-checkLogin();
|
|
|
+checkLogin();
|
|
|
+$(".historical-record").hide();
|
|
|
+
|
|
|
+$( ".check-history" ).click(function() {
|
|
|
+ $(".historical-record").toggle();
|
|
|
+ $(".arrowdown").toggleClass("arrowdoup");
|
|
|
+ });
|