|
@@ -115,7 +115,7 @@ function renderContentscale(list, contentWrapClassName, name) {
|
|
|
anchors = '<li><i></i><a href="#' + contentWrapClassName +
|
|
|
'">' + name + '</a></li><li class="anchor-line"></li>';
|
|
|
str = '<p class="scaletitle">' + name + '</p>'
|
|
|
- $(`.${contentWrapClassName} .infos`).append(str);
|
|
|
+ $(`.${contentWrapClassName} .infos .infos-box`).append(str);
|
|
|
$(`.${contentWrapClassName} .anchors ul`).append(anchors);
|
|
|
for (var i = 0; i < list[0].detailList.length; i++) {
|
|
|
var item = list[0].detailList[i];
|
|
@@ -126,7 +126,7 @@ function renderContentscale(list, contentWrapClassName, name) {
|
|
|
str += item.content
|
|
|
str += '</h2></div>'
|
|
|
str = `<div class="infoWrapper">${str}</div>`
|
|
|
- $(`.${contentWrapClassName} .infos`).append(str);
|
|
|
+ $(`.${contentWrapClassName} .infos .infos-box`).append(str);
|
|
|
for (var j = 0; j < item.subList.length; j++) {
|
|
|
var items = item.subList[j];
|
|
|
for (var k = 0; k < items.detailList.length; k++) {
|
|
@@ -136,7 +136,7 @@ function renderContentscale(list, contentWrapClassName, name) {
|
|
|
str += '<p class="item-title">' + it.content + '</p>'
|
|
|
str += '<div class="item-content" data-id="' + it.id + '">'
|
|
|
str += '</div></div></div>'
|
|
|
- $(`.${contentWrapClassName} .infos .infoWrapper .infoBox`).append(str);
|
|
|
+ $(`.${contentWrapClassName} .infos .infos-box .infoWrapper .infoBox`).append(str);
|
|
|
for (var l = 0; l < it.subList[0].detailList.length; l++) {
|
|
|
var its = it.subList[0].detailList[l];
|
|
|
its.content = its.content && its.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix);
|
|
@@ -146,7 +146,7 @@ function renderContentscale(list, contentWrapClassName, name) {
|
|
|
str += '<span class="num">' + '(' + its.score + ')' + '</span>'
|
|
|
str += '</label>'
|
|
|
str += `${item.match ? `<img class="recommend" src=${recommend} />` : `` }</div>`
|
|
|
- $(".scale .infos .infoWrapper .infoBox .contentList .item-content[data-id=" + its.parentId + "]").append(str);
|
|
|
+ $(".scale .infos .infos-box .infoWrapper .infoBox .contentList .item-content[data-id=" + its.parentId + "]").append(str);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -169,11 +169,11 @@ function renderContentscale(list, contentWrapClassName, name) {
|
|
|
str += '<button class="but">结果</button></div>'
|
|
|
str += '<div class="result"><div class="result_box"><p class="hel">?</p><span>结果:</span><p id="result_title" class="result_title"></p><textarea id="inputs"></textarea></div></div>'
|
|
|
str += `<div class="foot"><div class="foot_box"><div class="printing"><img src=${printing} class="slideImg"/>打印</div><div class="copy">确认并复制结果</div></div></div>`
|
|
|
- $(`.${contentWrapClassName} .infos `).append(str);
|
|
|
+ $(`.${contentWrapClassName} .infos .infos-box`).append(str);
|
|
|
// str = `<div class="foot"><div class="foot_box"><div class="printing"><img src=${printing} class="slideImg"/>打印</div><div class="copy">确认并复制结果</div></div></div>`
|
|
|
// $(`.${contentWrapClassName} .infos`).after(str);
|
|
|
function addScrollEvent() {
|
|
|
- var scrollTop = $(`.${contentWrapClassName} .infos`).scrollTop()
|
|
|
+ var scrollTop = $(`.${contentWrapClassName} .infos .infos-box`).scrollTop()
|
|
|
|
|
|
var divHeight = 0;
|
|
|
for (var i = 0; i < list.length; i++) {
|
|
@@ -185,7 +185,7 @@ function renderContentscale(list, contentWrapClassName, name) {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- $(`.${contentWrapClassName} .infos`).scroll(throttle(addScrollEvent, 200));
|
|
|
+ $(`.${contentWrapClassName} .infos .infos-box`).scroll(throttle(addScrollEvent, 200));
|
|
|
addLinkClickEvent(contentWrapClassName);
|
|
|
adjustHeight();
|
|
|
adjustWidth()
|
|
@@ -198,10 +198,13 @@ function renderContentscale(list, contentWrapClassName, name) {
|
|
|
function getprinting() {
|
|
|
$('.printing').click(function () {
|
|
|
$('.foot').hide()
|
|
|
+ $('.hel').hide()
|
|
|
$('#Print').css({
|
|
|
'height': 'auto', //高度自动
|
|
|
}).jqprint();
|
|
|
$('.foot').show()
|
|
|
+ $('.hel').show()
|
|
|
+
|
|
|
})
|
|
|
|
|
|
}
|