|
|
@ -38,7 +38,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
<scroll-view class="nav-scroll" scroll-x="true"> |
|
|
|
<scroll-view class="nav-scroll" scroll-x="true"> |
|
|
|
<view class="nav-box"> |
|
|
|
<view class="nav-box"> |
|
|
|
<view class="item on">全部</view> |
|
|
|
<!-- <view class="item on">全部</view> --> |
|
|
|
<picker class="item" @change="bindPickerChange" :value="mouthIndex" :range="mouthList" v-if="mouthList.length"> |
|
|
|
<picker class="item" @change="bindPickerChange" :value="mouthIndex" :range="mouthList" v-if="mouthList.length"> |
|
|
|
<view class="nav-name">{{form.mouth}}</view> |
|
|
|
<view class="nav-name">{{form.mouth}}</view> |
|
|
|
<view class="jiantou-down"></view> |
|
|
|
<view class="jiantou-down"></view> |
|
|
@ -157,6 +157,8 @@ export default { |
|
|
|
// observer: true, |
|
|
|
// observer: true, |
|
|
|
// observeParents: true |
|
|
|
// observeParents: true |
|
|
|
// } |
|
|
|
// } |
|
|
|
|
|
|
|
// isShow:false, |
|
|
|
|
|
|
|
isShowBind:false |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted: function() { |
|
|
|
mounted: function() { |
|
|
@ -185,6 +187,10 @@ export default { |
|
|
|
// this.form.hotListId = this.classifyList[this.classifyType].id; |
|
|
|
// this.form.hotListId = this.classifyList[this.classifyType].id; |
|
|
|
this.form.hotListId = ''; |
|
|
|
this.form.hotListId = ''; |
|
|
|
this.subclassList = this.classifyList[this.classifyType].cateDtos; |
|
|
|
this.subclassList = this.classifyList[this.classifyType].cateDtos; |
|
|
|
|
|
|
|
this.subclassList.unshift({ |
|
|
|
|
|
|
|
cateId:'', |
|
|
|
|
|
|
|
cateName:'全部', |
|
|
|
|
|
|
|
}) |
|
|
|
this.subclass = this.subclassList[0]; |
|
|
|
this.subclass = this.subclassList[0]; |
|
|
|
// this.form.cateId = this.subclass.cateId; |
|
|
|
// this.form.cateId = this.subclass.cateId; |
|
|
|
this.form.cateId = ' '; |
|
|
|
this.form.cateId = ' '; |
|
|
@ -193,7 +199,7 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 月份 |
|
|
|
// 月份 |
|
|
|
bindPickerChange(e) { |
|
|
|
bindPickerChange(e) { |
|
|
|
if(this.mouthIndex == e.detail.value) return; |
|
|
|
// if(this.mouthIndex == e.detail.value) return; |
|
|
|
this.mouthIndex = e.detail.value; |
|
|
|
this.mouthIndex = e.detail.value; |
|
|
|
this.form.mouth = this.mouthList[this.mouthIndex]; |
|
|
|
this.form.mouth = this.mouthList[this.mouthIndex]; |
|
|
|
this.goodsList = []; |
|
|
|
this.goodsList = []; |
|
|
@ -216,10 +222,22 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 子分类 |
|
|
|
// 子分类 |
|
|
|
bindPickerSubclassChange(e) { |
|
|
|
bindPickerSubclassChange(e) { |
|
|
|
if(this.subclassIndex == e.detail.value) return; |
|
|
|
// if(this.subclassIndex == e.detail.value) return; |
|
|
|
|
|
|
|
if(this.isShowBind && this.subclassIndex == e.detail.value) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
if(e.detail.value=="0"){ |
|
|
|
|
|
|
|
this.form.hotListId='' |
|
|
|
|
|
|
|
this.form.cateId='' |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
this.subclass = this.subclassList[e.detail.value]; |
|
|
|
|
|
|
|
this.form.cateId = this.subclass.cateId; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.isShowBind=true |
|
|
|
this.subclassIndex = e.detail.value; |
|
|
|
this.subclassIndex = e.detail.value; |
|
|
|
this.subclass = this.subclassList[this.subclassIndex]; |
|
|
|
this.subclass = this.subclassList[this.subclassIndex]; |
|
|
|
this.form.cateId = this.subclass.cateId; |
|
|
|
// this.form.cateId = this.subclass.cateId; |
|
|
|
this.goodsList = []; |
|
|
|
this.goodsList = []; |
|
|
|
this.getHotList(); |
|
|
|
this.getHotList(); |
|
|
|
}, |
|
|
|
}, |
|
|
|