|
@@ -24,7 +24,7 @@
|
|
|
<li class="list_item" id="all">
|
|
|
<div class="item_label"></div>
|
|
|
<div class="item_industry_list">
|
|
|
- <button class="industry_item">全部行业</button>
|
|
|
+ <button class="industry_item active">全部行业</button>
|
|
|
</div>
|
|
|
</li>
|
|
|
<li class="list_item" id="A">
|
|
@@ -43,240 +43,163 @@
|
|
|
<div class="item_label">C</div>
|
|
|
<div class="item_industry_list">
|
|
|
<button class="industry_item">财政</button>
|
|
|
- <button class="industry_item">出版广电</button>
|
|
|
<button class="industry_item">传媒</button>
|
|
|
<button class="industry_item">城管</button>
|
|
|
<button class="industry_item">采矿业</button>
|
|
|
+ <button class="industry_item">出版广电</button>
|
|
|
</div>
|
|
|
</li>
|
|
|
<li class="list_item" id="D">
|
|
|
<div class="item_label">D</div>
|
|
|
<div class="item_industry_list">
|
|
|
- <button class="industry_item">电力</button>
|
|
|
- <button class="industry_item">广电</button>
|
|
|
- <button class="industry_item">传媒</button>
|
|
|
- <button class="industry_item">城管</button>
|
|
|
- <button class="industry_item">采矿业</button>
|
|
|
- </div>
|
|
|
- </li>
|
|
|
- <li class="list_item" id="E">
|
|
|
- <div class="item_label">E</div>
|
|
|
- <div class="item_industry_list">
|
|
|
- <button class="industry_item">电力</button>
|
|
|
- <button class="industry_item">广电</button>
|
|
|
- <button class="industry_item">传媒</button>
|
|
|
- <button class="industry_item">城管</button>
|
|
|
- <button class="industry_item">采矿业</button>
|
|
|
+ <button class="industry_item">档案</button>
|
|
|
+ <button class="industry_item">地震</button>
|
|
|
+ <button class="industry_item">党委办</button>
|
|
|
+ <button class="industry_item">电信行业</button>
|
|
|
</div>
|
|
|
</li>
|
|
|
<li class="list_item" id="F">
|
|
|
<div class="item_label">F</div>
|
|
|
<div class="item_industry_list">
|
|
|
- <button class="industry_item">电力</button>
|
|
|
- <button class="industry_item">广电</button>
|
|
|
- <button class="industry_item">传媒</button>
|
|
|
- <button class="industry_item">城管</button>
|
|
|
- <button class="industry_item">采矿业</button>
|
|
|
+ <button class="industry_item">法院</button>
|
|
|
+ <button class="industry_item">发改</button>
|
|
|
</div>
|
|
|
</li>
|
|
|
<li class="list_item" id="G">
|
|
|
<div class="item_label">G</div>
|
|
|
<div class="item_industry_list">
|
|
|
- <button class="industry_item">电力</button>
|
|
|
- <button class="industry_item">广电</button>
|
|
|
- <button class="industry_item">传媒</button>
|
|
|
- <button class="industry_item">城管</button>
|
|
|
- <button class="industry_item">采矿业</button>
|
|
|
+ <button class="industry_item">工商</button>
|
|
|
+ <button class="industry_item">工信</button>
|
|
|
+ <button class="industry_item">国土</button>
|
|
|
+ <button class="industry_item">公安</button>
|
|
|
+ <button class="industry_item">国资委</button>
|
|
|
+ <button class="industry_item">公共资源交易</button>
|
|
|
</div>
|
|
|
</li>
|
|
|
<li class="list_item" id="H">
|
|
|
<div class="item_label">H</div>
|
|
|
<div class="item_industry_list">
|
|
|
- <button class="industry_item">电力</button>
|
|
|
- <button class="industry_item">广电</button>
|
|
|
- <button class="industry_item">传媒</button>
|
|
|
- <button class="industry_item">城管</button>
|
|
|
- <button class="industry_item">采矿业</button>
|
|
|
- </div>
|
|
|
- </li>
|
|
|
- <li class="list_item" id="I">
|
|
|
- <div class="item_label">I</div>
|
|
|
- <div class="item_industry_list">
|
|
|
- <button class="industry_item">电力</button>
|
|
|
- <button class="industry_item">广电</button>
|
|
|
- <button class="industry_item">传媒</button>
|
|
|
- <button class="industry_item">城管</button>
|
|
|
- <button class="industry_item">采矿业</button>
|
|
|
+ <button class="industry_item">环保</button>
|
|
|
+ <button class="industry_item">海关</button>
|
|
|
</div>
|
|
|
</li>
|
|
|
<li class="list_item" id="J">
|
|
|
<div class="item_label">J</div>
|
|
|
<div class="item_industry_list">
|
|
|
- <button class="industry_item">电力</button>
|
|
|
- <button class="industry_item">广电</button>
|
|
|
- <button class="industry_item">传媒</button>
|
|
|
- <button class="industry_item">城管</button>
|
|
|
- <button class="industry_item">采矿业</button>
|
|
|
+ <button class="industry_item">教育</button>
|
|
|
+ <button class="industry_item">军队</button>
|
|
|
+ <button class="industry_item">交通</button>
|
|
|
+ <button class="industry_item">纪委</button>
|
|
|
+ <button class="industry_item">金融业</button>
|
|
|
+ <button class="industry_item">建筑业</button>
|
|
|
+ <button class="industry_item">检察院</button>
|
|
|
+ <button class="industry_item">机关事务</button>
|
|
|
</div>
|
|
|
</li>
|
|
|
<li class="list_item" id="K">
|
|
|
<div class="item_label">K</div>
|
|
|
<div class="item_industry_list">
|
|
|
- <button class="industry_item">电力</button>
|
|
|
- <button class="industry_item">广电</button>
|
|
|
- <button class="industry_item">传媒</button>
|
|
|
- <button class="industry_item">城管</button>
|
|
|
- <button class="industry_item">采矿业</button>
|
|
|
+ <button class="industry_item">科技</button>
|
|
|
</div>
|
|
|
</li>
|
|
|
<li class="list_item" id="L">
|
|
|
<div class="item_label">L</div>
|
|
|
<div class="item_industry_list">
|
|
|
- <button class="industry_item">电力</button>
|
|
|
- <button class="industry_item">广电</button>
|
|
|
- <button class="industry_item">传媒</button>
|
|
|
- <button class="industry_item">城管</button>
|
|
|
- <button class="industry_item">采矿业</button>
|
|
|
+ <button class="industry_item">林业</button>
|
|
|
+ <button class="industry_item">旅游</button>
|
|
|
</div>
|
|
|
</li>
|
|
|
<li class="list_item" id="M">
|
|
|
<div class="item_label">M</div>
|
|
|
<div class="item_industry_list">
|
|
|
- <button class="industry_item">电力</button>
|
|
|
- <button class="industry_item">广电</button>
|
|
|
- <button class="industry_item">传媒</button>
|
|
|
- <button class="industry_item">城管</button>
|
|
|
- <button class="industry_item">采矿业</button>
|
|
|
+ <button class="industry_item">民政</button>
|
|
|
+ <button class="industry_item">民宗</button>
|
|
|
</div>
|
|
|
</li>
|
|
|
<li class="list_item" id="N">
|
|
|
<div class="item_label">N</div>
|
|
|
<div class="item_industry_list">
|
|
|
- <button class="industry_item">电力</button>
|
|
|
- <button class="industry_item">广电</button>
|
|
|
- <button class="industry_item">传媒</button>
|
|
|
- <button class="industry_item">城管</button>
|
|
|
- <button class="industry_item">采矿业</button>
|
|
|
- </div>
|
|
|
- </li>
|
|
|
- <li class="list_item" id="O">
|
|
|
- <div class="item_label">O</div>
|
|
|
- <div class="item_industry_list">
|
|
|
- <button class="industry_item">电力</button>
|
|
|
- <button class="industry_item">广电</button>
|
|
|
- <button class="industry_item">传媒</button>
|
|
|
- <button class="industry_item">城管</button>
|
|
|
- <button class="industry_item">采矿业</button>
|
|
|
+ <button class="industry_item">农业</button>
|
|
|
+ <button class="industry_item">能源化工</button>
|
|
|
+ <button class="industry_item">农林牧渔</button>
|
|
|
</div>
|
|
|
</li>
|
|
|
<li class="list_item" id="P">
|
|
|
<div class="item_label">P</div>
|
|
|
<div class="item_industry_list">
|
|
|
- <button class="industry_item">电力</button>
|
|
|
- <button class="industry_item">广电</button>
|
|
|
- <button class="industry_item">传媒</button>
|
|
|
- <button class="industry_item">城管</button>
|
|
|
- <button class="industry_item">采矿业</button>
|
|
|
+ <button class="industry_item">批发零售</button>
|
|
|
</div>
|
|
|
</li>
|
|
|
<li class="list_item" id="Q">
|
|
|
<div class="item_label">Q</div>
|
|
|
<div class="item_industry_list">
|
|
|
- <button class="industry_item">电力</button>
|
|
|
- <button class="industry_item">广电</button>
|
|
|
- <button class="industry_item">传媒</button>
|
|
|
- <button class="industry_item">城管</button>
|
|
|
- <button class="industry_item">采矿业</button>
|
|
|
+ <button class="industry_item">气象</button>
|
|
|
</div>
|
|
|
</li>
|
|
|
<li class="list_item" id="R">
|
|
|
<div class="item_label">R</div>
|
|
|
<div class="item_industry_list">
|
|
|
- <button class="industry_item">电力</button>
|
|
|
- <button class="industry_item">广电</button>
|
|
|
- <button class="industry_item">传媒</button>
|
|
|
- <button class="industry_item">城管</button>
|
|
|
- <button class="industry_item">采矿业</button>
|
|
|
+ <button class="industry_item">人行</button>
|
|
|
+ <button class="industry_item">人社</button>
|
|
|
+ <button class="industry_item">人大</button>
|
|
|
</div>
|
|
|
</li>
|
|
|
<li class="list_item" id="S">
|
|
|
<div class="item_label">S</div>
|
|
|
<div class="item_industry_list">
|
|
|
- <button class="industry_item">电力</button>
|
|
|
- <button class="industry_item">广电</button>
|
|
|
- <button class="industry_item">传媒</button>
|
|
|
- <button class="industry_item">城管</button>
|
|
|
- <button class="industry_item">采矿业</button>
|
|
|
+ <button class="industry_item">食药</button>
|
|
|
+ <button class="industry_item">税务</button>
|
|
|
+ <button class="industry_item">水利</button>
|
|
|
+ <button class="industry_item">市政</button>
|
|
|
+ <button class="industry_item">审计</button>
|
|
|
+ <button class="industry_item">商务</button>
|
|
|
+ <button class="industry_item">司法</button>
|
|
|
+ <button class="industry_item">社会团体</button>
|
|
|
</div>
|
|
|
</li>
|
|
|
<li class="list_item" id="T">
|
|
|
<div class="item_label">T</div>
|
|
|
<div class="item_industry_list">
|
|
|
- <button class="industry_item">电力</button>
|
|
|
- <button class="industry_item">广电</button>
|
|
|
- <button class="industry_item">传媒</button>
|
|
|
- <button class="industry_item">城管</button>
|
|
|
- <button class="industry_item">采矿业</button>
|
|
|
- </div>
|
|
|
- </li>
|
|
|
- <li class="list_item" id="U">
|
|
|
- <div class="item_label">U</div>
|
|
|
- <div class="item_industry_list">
|
|
|
- <button class="industry_item">电力</button>
|
|
|
- <button class="industry_item">广电</button>
|
|
|
- <button class="industry_item">传媒</button>
|
|
|
- <button class="industry_item">城管</button>
|
|
|
- <button class="industry_item">采矿业</button>
|
|
|
+ <button class="industry_item">统计</button>
|
|
|
+ <button class="industry_item">统战</button>
|
|
|
+ <button class="industry_item">体育</button>
|
|
|
</div>
|
|
|
- </li>
|
|
|
- <li class="list_item" id="V">
|
|
|
- <div class="item_label">V</div>
|
|
|
- <div class="item_industry_list">
|
|
|
- <button class="industry_item">电力</button>
|
|
|
- <button class="industry_item">广电</button>
|
|
|
- <button class="industry_item">传媒</button>
|
|
|
- <button class="industry_item">城管</button>
|
|
|
- <button class="industry_item">采矿业</button>
|
|
|
- </div>
|
|
|
- </li>
|
|
|
+ </li>
|
|
|
<li class="list_item" id="W">
|
|
|
<div class="item_label">W</div>
|
|
|
<div class="item_industry_list">
|
|
|
- <button class="industry_item">电力</button>
|
|
|
- <button class="industry_item">广电</button>
|
|
|
- <button class="industry_item">传媒</button>
|
|
|
- <button class="industry_item">城管</button>
|
|
|
- <button class="industry_item">采矿业</button>
|
|
|
+ <button class="industry_item">文化</button>
|
|
|
+ <button class="industry_item">卫生</button>
|
|
|
</div>
|
|
|
</li>
|
|
|
<li class="list_item" id="X">
|
|
|
<div class="item_label">X</div>
|
|
|
<div class="item_industry_list">
|
|
|
- <button class="industry_item">电力</button>
|
|
|
- <button class="industry_item">广电</button>
|
|
|
- <button class="industry_item">传媒</button>
|
|
|
- <button class="industry_item">城管</button>
|
|
|
- <button class="industry_item">采矿业</button>
|
|
|
+ <button class="industry_item">学校</button>
|
|
|
+ <button class="industry_item">宣传</button>
|
|
|
+ <button class="industry_item">信息技术</button>
|
|
|
</div>
|
|
|
</li>
|
|
|
<li class="list_item" id="Y">
|
|
|
<div class="item_label">Y</div>
|
|
|
<div class="item_industry_list">
|
|
|
- <button class="industry_item">电力</button>
|
|
|
- <button class="industry_item">广电</button>
|
|
|
- <button class="industry_item">传媒</button>
|
|
|
- <button class="industry_item">城管</button>
|
|
|
- <button class="industry_item">采矿业</button>
|
|
|
+ <button class="industry_item">医疗</button>
|
|
|
+ <button class="industry_item">银监</button>
|
|
|
+ <button class="industry_item">运输物流</button>
|
|
|
</div>
|
|
|
</li>
|
|
|
<li class="list_item" id="Z">
|
|
|
<div class="item_label">Z</div>
|
|
|
<div class="item_industry_list">
|
|
|
- <button class="industry_item">电力</button>
|
|
|
- <button class="industry_item">广电</button>
|
|
|
- <button class="industry_item">传媒</button>
|
|
|
- <button class="industry_item">城管</button>
|
|
|
- <button class="industry_item">采矿业</button>
|
|
|
+ <button class="industry_item">质监</button>
|
|
|
+ <button class="industry_item">组织</button>
|
|
|
+ <button class="industry_item">政协</button>
|
|
|
+ <button class="industry_item">住建</button>
|
|
|
+ <button class="industry_item">证监</button>
|
|
|
+ <button class="industry_item">政府办</button>
|
|
|
+ <button class="industry_item">制造业</button>
|
|
|
+ <button class="industry_item">政务中心</button>
|
|
|
+ <button class="industry_item">住宿餐饮</button>
|
|
|
</div>
|
|
|
</li>
|
|
|
</ul>
|
|
@@ -288,33 +211,24 @@
|
|
|
<a href="javascript:;">B</a>
|
|
|
<a href="javascript:;">C</a>
|
|
|
<a href="javascript:;">D</a>
|
|
|
- <a href="javascript:;">E</a>
|
|
|
<a href="javascript:;">F</a>
|
|
|
<a href="javascript:;">G</a>
|
|
|
<a href="javascript:;">H</a>
|
|
|
- <a href="javascript:;">I</a>
|
|
|
<a href="javascript:;">J</a>
|
|
|
<a href="javascript:;">K</a>
|
|
|
<a href="javascript:;">L</a>
|
|
|
<a href="javascript:;">M</a>
|
|
|
<a href="javascript:;">N</a>
|
|
|
- <a href="javascript:;">O</a>
|
|
|
<a href="javascript:;">P</a>
|
|
|
<a href="javascript:;">Q</a>
|
|
|
<a href="javascript:;">R</a>
|
|
|
<a href="javascript:;">S</a>
|
|
|
<a href="javascript:;">T</a>
|
|
|
- <a href="javascript:;">U</a>
|
|
|
- <a href="javascript:;">V</a>
|
|
|
<a href="javascript:;">W</a>
|
|
|
<a href="javascript:;">X</a>
|
|
|
<a href="javascript:;">Y</a>
|
|
|
<a href="javascript:;">Z</a>
|
|
|
</div>
|
|
|
- <!-- <div class="bottom_button">
|
|
|
- <button class="reset-btn left_btn" disabled>重置</button>
|
|
|
- <button class="save-btn right_btn" disabled>确认</button>
|
|
|
- </div> -->
|
|
|
<div class="tips_btn">
|
|
|
<div class="tips_discount">
|
|
|
<div class="tips_d_money" style="display: block">¥38</div>
|
|
@@ -330,7 +244,8 @@
|
|
|
<script src="/vipsubscribe/js/fastclick.js?v={{Msg "seo" "version"}}"></script>
|
|
|
<script src="/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
|
|
|
<script>
|
|
|
- // 点击导航跳转
|
|
|
+
|
|
|
+ // 点击导航跳转
|
|
|
$("body").on('click','.slide a',function(){
|
|
|
var s = $(this).html()
|
|
|
if(s == '#'){
|
|
@@ -338,18 +253,7 @@
|
|
|
}
|
|
|
document.querySelector('#' + s).scrollIntoView({block:'center'});
|
|
|
})
|
|
|
- // 是否选中全国
|
|
|
- function checkedAll(){
|
|
|
- // 判断全部行业以外有没有被选中
|
|
|
- $('.list_item:not(#all)').each(function () {
|
|
|
- let isActive = $(this).children().children('button').hasClass('active')
|
|
|
- if(!isActive){
|
|
|
- $('#all').children().children('button').addClass('active')
|
|
|
- }else{
|
|
|
- $('#all').children().children('button').removeClass('active')
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
+
|
|
|
// 在续订里,要保存已经选中的数组并置灰,按需要拼接上选中的行业数组
|
|
|
|
|
|
// button一共有以下几个操作属性
|
|
@@ -366,6 +270,15 @@
|
|
|
// { name: '电力', disabled: true },
|
|
|
// { name: '采矿业', disabled: true }
|
|
|
// ]
|
|
|
+ /*
|
|
|
+ 插入行业
|
|
|
+ var insertArr = [
|
|
|
+ { name: '医疗1', disabled: true },
|
|
|
+ { name: '医疗2', disabled: false },
|
|
|
+ { name: '医疗3', disabled: true }
|
|
|
+ ]
|
|
|
+ insertIndustryItem('E', insertArr)
|
|
|
+ */
|
|
|
function insertIndustryItem (letter, industryArr = []) {
|
|
|
if (!letter) return
|
|
|
var query = `#${letter[0].toUpperCase()} .item_industry_list`
|
|
@@ -377,24 +290,16 @@
|
|
|
}
|
|
|
industryItemContainer.html(buttonArr.join(''))
|
|
|
}
|
|
|
- // 例子
|
|
|
- var insertArr = [
|
|
|
- { name: '医疗1', disabled: true },
|
|
|
- { name: '医疗2', disabled: false },
|
|
|
- { name: '医疗3', disabled: true }
|
|
|
- ]
|
|
|
- insertIndustryItem('E', insertArr)
|
|
|
-
|
|
|
-
|
|
|
- // 选中行业在已选择提示中显示
|
|
|
- var selectedIndustryArr = null
|
|
|
+
|
|
|
function findSelectedIndustry () {
|
|
|
var buttons = $('.select-area-box .list button')
|
|
|
// 找到已选择的数组(有active类的数组)
|
|
|
var selectedArr = []
|
|
|
buttons.each(function(){
|
|
|
if ($(this).hasClass('active')) {
|
|
|
- selectedArr.push($(this).text())
|
|
|
+ if($(this).attr("disabled")!="disabled"){
|
|
|
+ selectedArr.push($(this).text())
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
|
|
@@ -404,7 +309,7 @@
|
|
|
} else {
|
|
|
$('.tips_btn .tips_d_text').slideUp()
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
selectedIndustryArr = selectedArr
|
|
|
|
|
|
var selectedStr = selectedArr.join('、')
|
|
@@ -420,18 +325,21 @@
|
|
|
$('#all button').trigger('click')
|
|
|
}
|
|
|
}
|
|
|
- findDisabledIndustry()
|
|
|
- // 找disabled的button函数
|
|
|
- var disabledIndustryArr = null
|
|
|
- function findDisabledIndustry () {
|
|
|
- var $disabledButton = $('.select-area-box .list button:disabled')
|
|
|
- var arr = []
|
|
|
- $disabledButton.each(function (index, dom) {
|
|
|
- arr.push($(dom).text())
|
|
|
+
|
|
|
+ function showSelect(arr,canclick){
|
|
|
+ if(!arr)return
|
|
|
+ arr.forEach(v => {
|
|
|
+ $($('.industry_item')).each(function (index, dom) {
|
|
|
+ if (canclick&&v!="全部行业"){
|
|
|
+ $('#all').children().children('button').removeClass('active');
|
|
|
+ }
|
|
|
+ if (v == $(dom).text()) {
|
|
|
+ $(dom).addClass("active").attr({"disabled":!canclick})
|
|
|
+ }
|
|
|
})
|
|
|
- disabledIndustryArr = arr
|
|
|
+ })
|
|
|
}
|
|
|
- checkedAll()
|
|
|
+
|
|
|
// 每个button的点击事件
|
|
|
$('.select-area-box .list').on('click', 'button', function (e) {
|
|
|
$('.tips_btn .btns button').removeAttr('disabled')
|
|
@@ -450,14 +358,35 @@
|
|
|
|
|
|
// 重置按钮事件
|
|
|
$('.reset-btn').on('click', function () {
|
|
|
- $('.tips_btn .btns button').attr('disabled', true)
|
|
|
- $('.choose_industry .result').slideUp(200)
|
|
|
- $('.select-area-box .list button').removeClass('active');
|
|
|
- $('.tips_d_text').hide(200)
|
|
|
+ $("#all .industry_item").trigger("click");
|
|
|
})
|
|
|
- // 确认按钮事件
|
|
|
+
|
|
|
+ //=======================
|
|
|
+
|
|
|
+
|
|
|
+ // 确认按钮事件
|
|
|
$('.save-btn').on('click', function () {
|
|
|
console.log(selectedIndustryArr)
|
|
|
+ sessionStorage.setItem("vipSubSelectIndustry",JSON.stringify(selectedIndustryArr));
|
|
|
+ history.go(-1);
|
|
|
+ })
|
|
|
+
|
|
|
+ var selectedIndustryArr //已选择
|
|
|
+
|
|
|
+ $(function(){
|
|
|
+
|
|
|
+ try{
|
|
|
+ if(sessionStorage.getItem("vipSubSelectIndustry")){
|
|
|
+ selectedIndustryArr=JSON.parse(sessionStorage.getItem("vipSubSelectIndustry"));
|
|
|
+ }else{
|
|
|
+ selectedIndustryArr=[];
|
|
|
+ }
|
|
|
+ }catch(e){
|
|
|
+ console.log(e)
|
|
|
+ }
|
|
|
+ //已选择
|
|
|
+ showSelect(selectedIndustryArr,true);
|
|
|
+ findSelectedIndustry();
|
|
|
})
|
|
|
</script>
|
|
|
</body>
|