|
@@ -16,7 +16,8 @@
|
|
|
{{end}}
|
|
|
</div>
|
|
|
<div class="jy_classify_r">
|
|
|
- <div class="jy_classify_r_box common_classify_r_box">
|
|
|
+ {{if not .T.cooperateCode }}
|
|
|
+ <div class="jy_classify_r_box common_classify_r_box">
|
|
|
<div class="jy_classify_kefu">
|
|
|
<img src='{{Msg "seo" "cdn"}}/images/pc/logo.png?v={{Msg "seo" "version"}}' alt="" />
|
|
|
<span>400-108-6670</span>
|
|
@@ -61,7 +62,9 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="jy_classify_r_box config_classify_r_box"></div>
|
|
|
+ {{else}}
|
|
|
+ <div class="jy_classify_r_box config_classify_r_box"></div>
|
|
|
+ {{end}}
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -116,9 +119,9 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
<!--S-侧边栏-->
|
|
|
<div class="right-side-box right-side-box-only" data-backside>
|
|
|
+ {{if not .T.cooperateCode }}
|
|
|
<!-- <div id="shareslider" style="width: 88px"></div>-->
|
|
|
<div id="sideIcon" class="common-right-side-item" style="right: 1px;width: 88px;height: 88px;display: none;">
|
|
|
<!-- <a href="/swordfish/frontPage/share/sess/index"><img src="{{Msg "seo" "cdn"}}/share/img/active-icon.png" alt="" style="width: 88px;"></a>-->
|
|
@@ -166,6 +169,7 @@
|
|
|
<p>下载App<br>免费查看全国商机</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ {{end}}
|
|
|
<!-- 可配置数据类config-right-side-item-->
|
|
|
<div class="right-side-item back-to-up" data-backtop>
|
|
|
<div class="hover-open-box">
|
|
@@ -202,64 +206,40 @@ if(ADList.length>0){
|
|
|
<script defer src='{{Msg "seo" "cdn"}}/common-module/public/js/automatic-id.min.js?v={{Msg "seo" "version"}}'></script>
|
|
|
<!--渠道合作商侧边栏、底部配置-->
|
|
|
<script>
|
|
|
- // 获取渠道商配置的侧边栏和底部数据
|
|
|
- function getCooperationConfig() {
|
|
|
- // 右侧边栏
|
|
|
- $('.common-right-side-item').hide()
|
|
|
- // 底部客服
|
|
|
- $('.common_classify_r_box').hide()
|
|
|
- var list = [
|
|
|
- {
|
|
|
- icon: '/images/index/new/telphone.png',
|
|
|
- activeIcon: '/images/index/new/telphone.png',
|
|
|
- rich: ` <div>客服热线:400-108-6670<br>服务时间:工作日 9:00-17:40</div>`,
|
|
|
- tip: '客服热线'
|
|
|
- },
|
|
|
- {
|
|
|
- icon: '/images/index/new/wx.png',
|
|
|
- activeIcon: '/images/index/new/wx1.png',
|
|
|
- rich: `<img data-share-img src="/front/share/10" alt="">
|
|
|
- <p>关注剑鱼标讯<br>免费追踪全国商机</p>`,
|
|
|
-
|
|
|
- tip: '关注剑鱼'
|
|
|
- }
|
|
|
- ]
|
|
|
- var obj = {
|
|
|
- phone: "400-108-6600",
|
|
|
- imgs: [{
|
|
|
- img: "/front/downloadJyApp/qr?page=pc_bottom&source=pc_scan",
|
|
|
- tip: "扫码下载"
|
|
|
- },
|
|
|
- {
|
|
|
- img: "/front/share/10",
|
|
|
- tip: "提示信息"
|
|
|
- }],
|
|
|
-
|
|
|
- }
|
|
|
- renderRightSide(list)
|
|
|
- renderBottomCustomer(obj)
|
|
|
- // $.ajax({
|
|
|
- // type:'post',
|
|
|
- // url:'/publicapply/channel/cooperation',
|
|
|
- // success: function(res){
|
|
|
- // if (res.error_code === 0 && res.data) {
|
|
|
- // var broadside = res.data.broadside || []
|
|
|
- // var bottomside = res.data.bottomside || []
|
|
|
- // if(broadside.length > 0) {
|
|
|
- // $('.common-right-side-item').hide()
|
|
|
- // $('.config-right-side-item').show()
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- // })
|
|
|
- }
|
|
|
- function renderRightSide (list) {
|
|
|
- var html = ''
|
|
|
- list.forEach(function(item,ind) {
|
|
|
- html += `
|
|
|
+ // 是渠道合作商则读取侧边栏以及底部配置数据
|
|
|
+ $(function() {
|
|
|
+ {{if .T.cooperateCode }}
|
|
|
+ getCooperationConfig()
|
|
|
+ {{end}}
|
|
|
+ // 获取渠道商配置的侧边栏和底部数据
|
|
|
+ function getCooperationConfig() {
|
|
|
+ $.ajax({
|
|
|
+ type:'post',
|
|
|
+ url:'/publicapply/channel/cooperation',
|
|
|
+ success: function(res){
|
|
|
+ if (res.error_code === 0 && res.data) {
|
|
|
+ var broadside = res.data.broadside || []
|
|
|
+ var bottomside = res.data.bottomside || {}
|
|
|
+ if(broadside.length > 0) {
|
|
|
+ // $('.common-right-side-item').hide()
|
|
|
+ // $('.config-right-side-item').show()
|
|
|
+ renderRightSide(broadside)
|
|
|
+ }
|
|
|
+ if(bottomside && Object.keys(bottomside)) {
|
|
|
+ renderBottomCustomer(bottomside)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ // 可配置侧边栏信息渲染
|
|
|
+ function renderRightSide (list) {
|
|
|
+ var html = ''
|
|
|
+ list.forEach(function(item,ind) {
|
|
|
+ html += `
|
|
|
<div class="right-side-item config-right-side-item ${ind+1 === list.length ? 'last-config-item' : ''}">
|
|
|
- <span class="text-customer"><img src='${item.icon}?v={{Msg "seo" "version"}}' alt=""></span>
|
|
|
- <span class="text-customer text-customer-hover"><img src='${item.activeIcon}?v={{Msg "seo" "version"}}' alt=""></span>
|
|
|
+ <span class="text-customer"><img src='${item.icon}' alt=""></span>
|
|
|
+ <span class="text-customer text-customer-hover"><img src='${item.activeIcon}' alt=""></span>
|
|
|
<p class="desc_text_b">${item.tip}</p>
|
|
|
<div class="slidePop">
|
|
|
<div class="slidePop-content">
|
|
@@ -268,34 +248,32 @@ if(ADList.length>0){
|
|
|
</div>
|
|
|
</div>
|
|
|
`
|
|
|
- })
|
|
|
- $('.right-side-box').prepend(html)
|
|
|
- $('.config-right-side-item').show()
|
|
|
- }
|
|
|
- function renderBottomCustomer (obj) {
|
|
|
- var html = ''
|
|
|
- if(obj.phone) {
|
|
|
- html+= `<div class="jy_classify_kefu">
|
|
|
- <img src='/images/pc/logo.png?v={{Msg "seo" "version"}}' alt="" />
|
|
|
+ })
|
|
|
+ $('.right-side-box').prepend(html)
|
|
|
+ // $('.config-right-side-item').show()
|
|
|
+ }
|
|
|
+ // 可配置底部客服信息渲染
|
|
|
+ function renderBottomCustomer (obj) {
|
|
|
+ var html = ''
|
|
|
+ if(obj.phone) {
|
|
|
+ html+= `<div class="jy_classify_kefu">
|
|
|
+ <img src='/images/pc/logo.png' alt="" />
|
|
|
<span>${obj.phone}</span>
|
|
|
</div>`
|
|
|
- }
|
|
|
- if(obj.imgs && $.isArray(obj.imgs) && obj.imgs.length > 0) {
|
|
|
- html+= '<div class="qr_box">'
|
|
|
- obj.imgs.forEach(function(item, index) {
|
|
|
- html+= ` <div>
|
|
|
+ }
|
|
|
+ if(obj.imgs && $.isArray(obj.imgs) && obj.imgs.length > 0) {
|
|
|
+ html+= '<div class="qr_box">'
|
|
|
+ obj.imgs.forEach(function(item, index) {
|
|
|
+ html+= ` <div>
|
|
|
<img src='${item.img}' alt="">
|
|
|
<p>${item.tip}</p>
|
|
|
</div>`
|
|
|
- })
|
|
|
- html+= '</div>'
|
|
|
+ })
|
|
|
+ html+= '</div>'
|
|
|
+ }
|
|
|
+ $('.config_classify_r_box').append(html)
|
|
|
}
|
|
|
- $('.config_classify_r_box').append(html)
|
|
|
- $('.config_classify_r_box').show()
|
|
|
- }
|
|
|
- var cooperateCode = false
|
|
|
- {{if ne .T.cooperateCode ""}}
|
|
|
- cooperateCode = true
|
|
|
- getCooperationConfig()
|
|
|
- {{end}}
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
</script>
|