| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- <!DOCTYPE html>
- <html lang="ko"
- xmlns:th="http://www.thymeleaf.org"
- xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
- layout:decorator="mob/common/layout/AppLayoutMob">
- <!--
- *******************************************************************************
- * @source : NoticeFormMob.html
- * @desc : 알림함 Page
- *============================================================================
- * STYLE24
- * Copyright(C) 2021 TSIT, All rights reserved.
- *============================================================================
- * VER DATE AUTHOR DESCRIPTION
- * === =========== ========== =============================================
- * 1.0 2021.05.21 jsshin 최초 작성
- *******************************************************************************
- -->
- <body>
- <th:block layout:fragment="content">
- <main class="container app-only">
- <!-- ★ 컨텐츠 시작 -->
- <section id="notice" class="notice nodata">
- </section>
- <!-- ★ 컨텐츠 종료 -->
- </main>
- <script th:inline="javascript">
- $(document).ready(function(){
- $('#htopTitle').text('알림함');
- if (_isApp === 'true') {
- if (_osType === 'A') {
- window.style24.getPushList();
- } else if (_osType === 'I') {
- window.webkit.messageHandlers.getPushList.postMessage({"dummy":"dummy"});
- }
- } else {
- $('#notice').addClass('nodata');
- }
- });
- var pushListInfo = function (pushList) {
- let orgPushList;
- //IOS는 앱에서 BASE64로 인코딩 한후 전달 한다.
- if (_osType === 'I') {
- orgPushList = window.atob(pushList);
- } else if (_osType === 'A') {
- orgPushList = pushList;
- }
- if (!gagajf.isNull(orgPushList)) {
- let pushListJosn = JSON.parse(orgPushList);
- let html = '';
- $.each(pushListJosn.pushList, function(idx, item) {
- html += '<div class="inner">\n';
- html += ' <a href="'+item.link+'">\n';
- html += ' <dl>\n';
- html += ' <dt class="tit">\n';
- html += item.title;
- html += ' </dt>\n'
- html += ' <dd class="cont_txt">\n';
- html += item.content;
- html += ' </dd>\n';
- if (!gagajf.isNull(item.imgUrl)) {
- html += ' <dd class="cont_img">\n';
- html += ' <img src="'+ item.imgUrl +'" />\n';
- html += ' </dd>\n';
- }
- html += ' <dd class="cont_data">\n';
- html += ' <span>\n';
- html += fnDisplayDate(item.date);
- html += ' </span>\n';
- html += ' </dd>\n'
- html += ' </dl>\n'
- html += ' </a>';
- html += '</div>\n'
- });
- $('#notice').removeClass('nodata');
- $('#notice').html(html);
- } else {
- $('#notice').addClass('nodata');
- }
- }
-
- var fnDisplayDate = function (date) {
- let resultDate = '';
- if(!gagajf.isNull(date)) {
- let year = date.substring(0, 4);
- let month = date.substring(4, 6);
- let day = date.substring(6, 8);
- resultDate = year+'.'+month+'.'+day;
- }
- return resultDate;
- }
- </script>
- </th:block>
- </body>
- </html>
|