|
@@ -46,44 +46,7 @@ function renderView() {
|
|
|
|
|
|
renderView();
|
|
|
|
|
|
-renderHistoryList();
|
|
|
|
|
|
-function renderHistoryList() {
|
|
|
- let token = getCookie('jwt_token');
|
|
|
- axios({
|
|
|
- method: 'post',
|
|
|
- url: 'https://www.choozmo.com:8887/history_input',
|
|
|
- headers: {
|
|
|
- 'accept': 'application/json',
|
|
|
- 'Authorization': `Bearer ${token}`
|
|
|
- }
|
|
|
- }).then(res => {
|
|
|
- console.log(res.data);
|
|
|
- const history = res.data;
|
|
|
- let str = '';
|
|
|
- for(let i = 0;i < history.length;i++){
|
|
|
- str += `<div class="historyList-item row">
|
|
|
- <div class="col-3">
|
|
|
- <div class="listimg__fr"><img src="${history[i]['image_urls'][0]}" alt="${history[i].name}"></div>
|
|
|
- </div>
|
|
|
- <div class="col-6">
|
|
|
- <p class="my-3">${history[i].name}</p>
|
|
|
- </div>
|
|
|
- <div class="col-3 d-flex align-items-center">
|
|
|
- <span onlick="view()" data-vlink="${history[i].link}"><i class="fas fa-play-circle me-1"></i>觀看影片</span>
|
|
|
- </div>
|
|
|
- </div>`
|
|
|
- }
|
|
|
- $('#content_block .col-12').html(str);
|
|
|
- }).catch(err => {
|
|
|
- console.log(err);
|
|
|
- });
|
|
|
-}
|
|
|
-
|
|
|
-function view() {
|
|
|
- window.open(`http://${event.target.data.vlink}`, '_blank');
|
|
|
- console.log("link view");
|
|
|
- }
|
|
|
|
|
|
function checkLogin() {
|
|
|
let token = getCookie('jwt_token');
|