hls_crm/pagesA/crm/createCustomer/selectIndustry/selectIndustry.vue

48 lines
894 B
Vue

<template>
<view class="select_industry">
<!-- 搜索框 -->
<view class="industry_con">
<view class="industry_item_g" v-for="(item,index) in list" :key="index" @click="changeIndustry(item,index)">
<view>{{item}}</view>
<view v-if="index == liIndex" class="iconfont icon-paixu"></view>
</view>
</view>
</view>
</template>
<script>
import { netSelect } from '@/api/kehu.js'
export default {
data() {
return {
list:[],
liIndex:null
}
},
onLoad() {
this.getData()
},
methods: {
getData(){
netSelect().then(res=>{
this.list = res.data['行业']
})
},
changeIndustry(item,index){
this.liIndex = index
console.log(this.$store)
this.$store.commit('kefu/setIndustry',item)
}
}
}
</script>
<style lang="scss">
.industry_con {
font-size: 28rpx;
background-color: #fff;
padding-left: 24rpx;
}
</style>