|
@@ -38,6 +38,13 @@ var areaSelector = {
|
|
|
this.$origin = this.$el.find('.selected-list.origin')
|
|
|
this.initProvinceNameList()
|
|
|
},
|
|
|
+ getIsIndustryPage:function (){ //行业分类页面选择删除地市
|
|
|
+ let arr= window.location.pathname.split("/")
|
|
|
+ if ( arr.length>2 ){
|
|
|
+ return arr[2]==="industry"
|
|
|
+ }
|
|
|
+ return false
|
|
|
+ },
|
|
|
initEvents: function () {
|
|
|
var _this = this
|
|
|
var container = this.$view
|
|
@@ -45,8 +52,10 @@ var areaSelector = {
|
|
|
container.on('click', '.j-button-item.can-expand', function (e) {
|
|
|
var $this = $(this)
|
|
|
container.find('.j-button-item.can-expand').removeClass('expand')
|
|
|
- //$this.addClass('expand')
|
|
|
-
|
|
|
+ if (!this.getIsIndustryPage()){
|
|
|
+ $this.addClass('expand')
|
|
|
+ }
|
|
|
+ alert(window)
|
|
|
// 删除其他cityList
|
|
|
container.find('.city-list').remove()
|
|
|
|
|
@@ -100,12 +109,15 @@ var areaSelector = {
|
|
|
// 是不是直辖市, 是直辖市直接高亮
|
|
|
var isSingle = this.isSingleProvince(pName)
|
|
|
if (isSingle) {
|
|
|
- $p.addClass('active')
|
|
|
- return
|
|
|
+ $p.addClass('active')
|
|
|
+ return
|
|
|
}
|
|
|
|
|
|
container.find('.j-button-item.can-expand').removeClass('expand')
|
|
|
- //$p.addClass('expand')
|
|
|
+ if (!this.getIsIndustryPage()){
|
|
|
+ $p.addClass('expand')
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
// 删除其他cityList
|
|
|
container.find('.city-list').remove()
|