|
@@ -2,12 +2,11 @@
|
|
|
$(".popular").hide();
|
|
|
|
|
|
|
|
|
-
|
|
|
-$( ".article__readMore" ).click(function() {
|
|
|
-
|
|
|
+$(document).on("click", ".article__readMore", function (event) {
|
|
|
$('.article__contexts').css('height','auto');
|
|
|
$('.article__readMore').hide();
|
|
|
- });
|
|
|
+
|
|
|
+});
|
|
|
|
|
|
|
|
|
$(document).on("click", ".likeSee__state__filter--item", function (event) {
|
|
@@ -30,7 +29,8 @@ function get_data() {
|
|
|
$.ajax({
|
|
|
method: "GET",
|
|
|
// url: `json/cases-${id}.json`,
|
|
|
- url: `json/cases-${id}.json`,
|
|
|
+ // url: `json/cases-${id}.json`,
|
|
|
+ url:`json/cases.json`,
|
|
|
dataType: "json",
|
|
|
})
|
|
|
.done(function (msg) {
|
|
@@ -44,6 +44,8 @@ function get_data() {
|
|
|
let CaseDetail = "";
|
|
|
let CasePageTitle = "";
|
|
|
let CaseImgQuantity = "";
|
|
|
+ let article__contexts="";
|
|
|
+
|
|
|
|
|
|
for (let i = 0; i < msg.length; i++) {
|
|
|
designersinfo = `
|
|
@@ -92,6 +94,18 @@ function get_data() {
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>`
|
|
|
+ if(msg[i].Casedescription == undefined){
|
|
|
+ article__contexts=`<div></div>`
|
|
|
+ }else {
|
|
|
+ article__contexts=`
|
|
|
+ <div><p class="article__contexts">${msg[i].Casedescription}</p></div>
|
|
|
+ <div class="article__readMore">
|
|
|
+ <i class="fa fa-chevron-down" aria-hidden="true"></i>
|
|
|
+ <a class="article__readMore__text">閱讀更多</a>
|
|
|
+ <i class="fa fa-chevron-down" aria-hidden="true"></i>
|
|
|
+ </div>
|
|
|
+ `
|
|
|
+ }
|
|
|
|
|
|
for (let j = 0; j < msg[i].CaseTag.length; j++) {
|
|
|
// console.log(msg[i].CaseTag.length);
|
|
@@ -99,7 +113,7 @@ function get_data() {
|
|
|
// console.log(msg[i].CaseTag[j].Tag);
|
|
|
|
|
|
CaseTag += ' \
|
|
|
- <a href="" class="btn btn-outline-custom rounded-0">'+ msg[i].CaseTag[j].Tag + '</a> \
|
|
|
+ <a target="_blank" href="https://hhh.com.tw/cases/lists/' + msg[i].CaseTag[j].Tag + '-keyword/" class="btn btn-outline-custom rounded-0">'+ msg[i].CaseTag[j].Tag + '</a> \
|
|
|
';
|
|
|
}
|
|
|
|
|
@@ -199,7 +213,7 @@ function get_data() {
|
|
|
for (var z = 0; z < msg[i].ProfileRecently[k].ProfileTag.length; z++) {
|
|
|
// console.log(msg[i].ProfileRecently[k].ProfileTag.length)
|
|
|
CaseNews += '\
|
|
|
- <a href="">\
|
|
|
+ <a target="_blank" href="https://hhh.com.tw/cases/lists/' + msg[i].ProfileRecently[k].ProfileTag[z].Tag + '-keyword/">\
|
|
|
'+ msg[i].ProfileRecently[k].ProfileTag[z].Tag + '\
|
|
|
</a>\
|
|
|
';
|
|
@@ -219,7 +233,7 @@ function get_data() {
|
|
|
for (var y = 0; y < msg[i].ProfilePopularity[x].ProfileTag.length; y++) {
|
|
|
// console.log(msg[i].ProfileRecently[k].ProfileTag.length)
|
|
|
CasePopular += '\
|
|
|
- <a href="'+ msg[i].ProfilePopularity[x].ProfileTag[y].TagLink + '" class="likeSee__tag--item">\
|
|
|
+ <a target="_blank" href="https://hhh.com.tw/cases/lists/' + msg[i].ProfilePopularity[x].ProfileTag[y].Tag + '-keyword/" class="likeSee__tag--item">\
|
|
|
'+ msg[i].ProfilePopularity[x].ProfileTag[y].Tag + '\
|
|
|
</a>\
|
|
|
';
|
|
@@ -448,6 +462,8 @@ function get_data() {
|
|
|
$('.CaseModel').html(CaseDetail);
|
|
|
$('#case-page-title').html(CasePageTitle);
|
|
|
$('.case-img-quantity').html(CaseImgQuantity);
|
|
|
+ $('.article__contexts-box').html(article__contexts);
|
|
|
+
|
|
|
|
|
|
|
|
|
$('.CaseDetail-slick').slick({
|