|
@@ -347,7 +347,8 @@ function renderWriteStandard(){
|
|
hasCompleteTnterface++
|
|
hasCompleteTnterface++
|
|
if(res.data.code == '0'){
|
|
if(res.data.code == '0'){
|
|
const list = res.data.data || {}
|
|
const list = res.data.data || {}
|
|
- renderwriteStandardPage(list)
|
|
|
|
|
|
+ let casewritingNum = $(".moduleItem.casewriting").attr("data-num") || 5
|
|
|
|
+ renderwriteStandardPage(list,casewritingNum)
|
|
}
|
|
}
|
|
if(hasCompleteTnterface === allInterface){
|
|
if(hasCompleteTnterface === allInterface){
|
|
$('.loading').css("display","none")
|
|
$('.loading').css("display","none")
|
|
@@ -357,19 +358,33 @@ function renderWriteStandard(){
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
-function renderwriteStandardPage(list){
|
|
|
|
|
|
+function renderwriteStandardPage(list,casewritingNum){
|
|
let arr = Object.keys(list)
|
|
let arr = Object.keys(list)
|
|
if(arr.length > 0 && $(".moduleItem.casewriting").length > 0){
|
|
if(arr.length > 0 && $(".moduleItem.casewriting").length > 0){
|
|
moduleNum++
|
|
moduleNum++
|
|
$(".moduleItem.casewriting").append(titleStr("casewritingPush"))
|
|
$(".moduleItem.casewriting").append(titleStr("casewritingPush"))
|
|
- let str = ``
|
|
|
|
-
|
|
|
|
|
|
+ let longStr = ``
|
|
|
|
+ let shortStr = ``
|
|
for(let i = 0; i < arr.length; i++){
|
|
for(let i = 0; i < arr.length; i++){
|
|
- str += `<div class="billingPushItem"><img class="iconMark" src=${iconMark}>${arr[i]}</div>`
|
|
|
|
|
|
+ if( i < casewritingNum){
|
|
|
|
+ shortStr += `<div class="billingPushItem"><img class="iconMark" src=${iconMark}>${arr[i]}</div>`
|
|
|
|
+ }
|
|
|
|
+ longStr += `<div class="billingPushItem"><img class="iconMark" src=${iconMark}>${arr[i]}</div>`
|
|
}
|
|
}
|
|
- let allStr = `<div class="casewritingWrapper">${str}</div>`
|
|
|
|
|
|
+ let shortStrBox = `<div class="shortStrBox">${shortStr}</div>`
|
|
|
|
+ let longStrBox = `<div class="longStrBox">${longStr}</div>`
|
|
|
|
+ let allStr = `<div class="casewritingWrapper"></div>`
|
|
$(".moduleItem.casewriting").append(allStr)
|
|
$(".moduleItem.casewriting").append(allStr)
|
|
|
|
+ $(".casewritingWrapper").append(shortStrBox)
|
|
|
|
+ if( arr.length>casewritingNum){
|
|
|
|
+ $(".shortStrBox .billingPushItem").eq( $(".shortStrBox .billingPushItem").length -1).append(`<span class="showMoreCaseWriting">更多<img class="iconArrowImg" src="${iconArrowDown}"></span>`)
|
|
|
|
+
|
|
|
|
+ // $(".moduleItem .generalTreatInfo").append(`<span class="showLessGeneralTreat">收起<img class="iconArrowImg" src="${iconArrowUp}"></span>`)
|
|
|
|
+ $(".casewritingWrapper").append(longStrBox)
|
|
|
|
+ $(".longStrBox .billingPushItem").eq( $(".longStrBox .billingPushItem").length -1).append(`<span class="showLessCaseWriting">收起<img class="iconArrowImg" src="${iconArrowUp}"></span>`)
|
|
|
|
+ }
|
|
$('.moduleItem.casewriting').css("display","block")
|
|
$('.moduleItem.casewriting').css("display","block")
|
|
|
|
+ bindSlideCaseWriting()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
function renderBillingPush(list,name){
|
|
function renderBillingPush(list,name){
|
|
@@ -660,6 +675,17 @@ function bindGeneralSlide(){
|
|
})
|
|
})
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+ function bindSlideCaseWriting(){
|
|
|
|
+ $(".showMoreCaseWriting").on("click",function(){
|
|
|
|
+ $(this).parents(".casewritingWrapper ").find(".shortStrBox").css("display","none")
|
|
|
|
+ $(this).parents(".casewritingWrapper ").find(".longStrBox").css("display","block")
|
|
|
|
+ })
|
|
|
|
+ $(".showLessCaseWriting").on("click",function(){
|
|
|
|
+ $(this).parents(".casewritingWrapper ").find(".shortStrBox").css("display","block")
|
|
|
|
+ $(this).parents(".casewritingWrapper ").find(".longStrBox").css("display","none")
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
|
|
function empty(){
|
|
function empty(){
|
|
$(".responsibility").css("display","none")
|
|
$(".responsibility").css("display","none")
|