|
@@ -28,12 +28,6 @@
|
|
|
</view>
|
|
|
<view class="drawer-main-name">咨询类别</view>
|
|
|
<view class="drawer-main-brand clearfix">
|
|
|
- <view
|
|
|
- class="drawer-brand-list"
|
|
|
- :class="isCheckedCategorys ? 'checked' : ''"
|
|
|
- @click="choiceCategorysAll"
|
|
|
- >全部</view
|
|
|
- >
|
|
|
<view
|
|
|
class="drawer-brand-list"
|
|
|
:class="category.isChecked ? 'checked' : ''"
|
|
@@ -41,7 +35,7 @@
|
|
|
:key="index"
|
|
|
@click="choiceCategorys(category, index)"
|
|
|
>
|
|
|
- {{ category.name }}
|
|
|
+ {{ category.className }}
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="drawer-main-name">小组</view>
|
|
@@ -101,11 +95,9 @@ export default {
|
|
|
return {
|
|
|
CustomBar: this.CustomBar, // 顶部导航栏高度
|
|
|
isIphoneX: this.$store.state.isIphoneX,
|
|
|
- isCheckedCategorys:false,
|
|
|
isCheckedGroups:false,
|
|
|
checkedIndex: 0,
|
|
|
checkedGroupsIndex: 0,
|
|
|
- checkedCategorysIndex: 0,
|
|
|
checkedMemberIndex: 0,
|
|
|
isShowClose: false,
|
|
|
listQuery: {
|
|
@@ -119,15 +111,8 @@ export default {
|
|
|
endTime:'结束日期',
|
|
|
height: 0,
|
|
|
drawerH: 0 ,// 抽屉内部scrollview高度
|
|
|
- categorys:[
|
|
|
- {name:'产品',isChecked:false},
|
|
|
- {name:'仪器',isChecked:false},
|
|
|
- {name:'耗材',isChecked:false},
|
|
|
- {name:'二手',isChecked:false},
|
|
|
- {name:'升级会员',isChecked:false},
|
|
|
- {name:'超级会员',isChecked:false},
|
|
|
- {name:'其他',isChecked:false},
|
|
|
- ],
|
|
|
+ categorys:[],
|
|
|
+ checkedCategorysList:[],
|
|
|
groups:[
|
|
|
{name:'张顺星',isChecked:false},
|
|
|
{name:'高琳琳',isChecked:false},
|
|
@@ -142,8 +127,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
+ console.log('11111111')
|
|
|
this.SetScrollHeight()
|
|
|
- this.initclubList()
|
|
|
+ this.initCategorysList()
|
|
|
},
|
|
|
computed: {
|
|
|
startDate() {
|
|
@@ -154,43 +140,27 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- async initclubList() {
|
|
|
- const userInfo = await this.$api.getStorage()
|
|
|
- this.listQuery.serviceProviderId = userInfo.serviceProviderId
|
|
|
- this.UserService.getUserClubVisitorList(this.listQuery)
|
|
|
+ initCategorysList() {
|
|
|
+ this.UserService.getUserClubConsults()
|
|
|
.then(response => {
|
|
|
- let data = response.data
|
|
|
- if (data.results && data.results.length > 0) {
|
|
|
- this.dataList = data.results.map((el,index)=>{
|
|
|
- el.isChecked = false
|
|
|
- return el
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
+ this.categorys = response.data.map((el, index) => {
|
|
|
+ el.isChecked = false
|
|
|
+ return el
|
|
|
+ })
|
|
|
})
|
|
|
.catch(error => {
|
|
|
- this.$util.msg(error.msg, 2000)
|
|
|
+ console.log('=========>获取咨询类别列表失败')
|
|
|
})
|
|
|
},
|
|
|
- choiceCategorysAll() {
|
|
|
- // 点击选择全部分类
|
|
|
- this.isCheckedCategorys = true
|
|
|
- // this.listQuery.brandIds = ''
|
|
|
- this.categorys.forEach(el => {
|
|
|
- el.isChecked = false
|
|
|
- })
|
|
|
- },
|
|
|
choiceCategorys(category,idx){
|
|
|
//选择分类
|
|
|
- this.isCheckedCategorys = false
|
|
|
- this.checkedCategorysIndex = idx
|
|
|
- this.categorys.forEach((el, index) => {
|
|
|
- if (this.checkedCategorysIndex == index) {
|
|
|
- el.isChecked = true
|
|
|
- } else {
|
|
|
- el.isChecked = false
|
|
|
- }
|
|
|
- })
|
|
|
+ category.isChecked = !category.isChecked
|
|
|
+ if (category.isChecked) {
|
|
|
+ this.checkedCategorysList.push(category.id)
|
|
|
+ } else {
|
|
|
+ this.checkedCategorysList.splice(index, 1)
|
|
|
+ }
|
|
|
+ console.log('checkedBrandList', this.checkedCategorysList)
|
|
|
},
|
|
|
choiceGroupsAll() {
|
|
|
// 点击选择全部小组
|