|
|
@@ -42,11 +42,9 @@
|
|
|
});
|
|
|
|
|
|
var pushListInfo = function (pushList) {
|
|
|
- alert('pushListInfo1 Call ===> ' + pushList);
|
|
|
let orgPushList;
|
|
|
- //IOS는 앱에서 BASE64로 인코딩 한후 전달 한다.
|
|
|
- if (_osType === 'I') {
|
|
|
- orgPushList = window.atob(pushList);
|
|
|
+ if (_osType === 'I') { //IOS는 앱에서 BASE64로 인코딩 한후 전달 한다. 아래와같이 해줘야 한글 안깨짐
|
|
|
+ orgPushList = decodeURIComponent(escape(window.atob(pushList)));
|
|
|
} else if (_osType === 'A') {
|
|
|
orgPushList = pushList;
|
|
|
}
|
|
|
@@ -55,36 +53,14 @@
|
|
|
let pushListJosn = JSON.parse(orgPushList);
|
|
|
let html = '';
|
|
|
$.each(pushListJosn.pushList, function(idx, item) {
|
|
|
- if (_osType === 'I') {
|
|
|
- alert('fnDecodeUnicode :' + fnDecodeUnicode(item.content.toLowerCase())
|
|
|
- + 'escape :' + escape(item.content)
|
|
|
- + ' unescape :' + unescape(item.content)
|
|
|
- + ' encodeURI:' + encodeURI(item.content)
|
|
|
- + ' decodeURI:' + decodeURI(item.content)
|
|
|
- + ' encodeURIComponent:' + encodeURIComponent(item.content)
|
|
|
- + ' decodeURIComponent:' + decodeURIComponent(item.content)
|
|
|
- );
|
|
|
- }
|
|
|
html += '<div class="inner">\n';
|
|
|
html += ' <a href="'+item.link+'">\n';
|
|
|
html += ' <dl>\n';
|
|
|
html += ' <dt class="tit">\n';
|
|
|
- let title = '';
|
|
|
- if (_osType === 'I') {
|
|
|
- title = fnDecodeUnicode(item.title.toLowerCase());
|
|
|
- } else if(_osType === 'A') {
|
|
|
- title = item.title;
|
|
|
- }
|
|
|
- html += title;
|
|
|
+ html += item.title;
|
|
|
html += ' </dt>\n'
|
|
|
html += ' <dd class="cont_txt">\n';
|
|
|
- let content = '';
|
|
|
- if (_osType === 'I') {
|
|
|
- content = fnDecodeUnicode(item.content.toLowerCase());
|
|
|
- } else if(_osType === 'A') {
|
|
|
- content = item.content;
|
|
|
- }
|
|
|
- html += content;
|
|
|
+ html += item.content;
|
|
|
html += ' </dd>\n';
|
|
|
if (!gagajf.isNull(item.imgUrl)) {
|
|
|
html += ' <dd class="cont_img">\n';
|
|
|
@@ -107,72 +83,6 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- var pushListInfo2 = function (pushList) {
|
|
|
- alert('pushListInfo2 Call ===> ' + pushList);
|
|
|
- // let orgPushList;
|
|
|
- // //IOS는 앱에서 BASE64로 인코딩 한후 전달 한다.
|
|
|
- // if (_osType === 'I') {
|
|
|
- // orgPushList = window.atob(pushList);
|
|
|
- // } else if (_osType === 'A') {
|
|
|
- // orgPushList = pushList;
|
|
|
- // }
|
|
|
-
|
|
|
- if (!gagajf.isNull(pushList)) {
|
|
|
- let pushListJosn = JSON.parse(pushList);
|
|
|
- let html = '';
|
|
|
- $.each(pushListJosn.pushList, function(idx, item) {
|
|
|
- if (_osType === 'I') {
|
|
|
- alert('fnDecodeUnicode :' + fnDecodeUnicode(item.content.toLowerCase())
|
|
|
- + 'escape :' + escape(item.content)
|
|
|
- + ' unescape :' + unescape(item.content)
|
|
|
- + ' encodeURI:' + encodeURI(item.content)
|
|
|
- + ' decodeURI:' + decodeURI(item.content)
|
|
|
- + ' encodeURIComponent:' + encodeURIComponent(item.content)
|
|
|
- + ' decodeURIComponent:' + decodeURIComponent(item.content)
|
|
|
- );
|
|
|
- }
|
|
|
- html += '<div class="inner">\n';
|
|
|
- html += ' <a href="'+item.link+'">\n';
|
|
|
- html += ' <dl>\n';
|
|
|
- html += ' <dt class="tit">\n';
|
|
|
- let title = '';
|
|
|
- if (_osType === 'I') {
|
|
|
- title = fnDecodeUnicode(item.title.toLowerCase());
|
|
|
- } else if(_osType === 'A') {
|
|
|
- title = item.title;
|
|
|
- }
|
|
|
- html += title;
|
|
|
- html += ' </dt>\n'
|
|
|
- html += ' <dd class="cont_txt">\n';
|
|
|
- let content = '';
|
|
|
- if (_osType === 'I') {
|
|
|
- content = fnDecodeUnicode(item.content.toLowerCase());
|
|
|
- } else if(_osType === 'A') {
|
|
|
- content = item.content;
|
|
|
- }
|
|
|
- html += 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)) {
|
|
|
@@ -185,13 +95,6 @@
|
|
|
}
|
|
|
|
|
|
|
|
|
- var fnDecodeUnicode = function(context) {
|
|
|
- const regExp = /\\u([\d\w]{4})/gi;
|
|
|
- context = context.replace(regExp, function (match, grp)
|
|
|
- { return String.fromCharCode(parseInt(grp, 16)); } );
|
|
|
- return unescape(context);
|
|
|
- }
|
|
|
-
|
|
|
</script>
|
|
|
|
|
|
</th:block>
|