<!--
|
* @Author: 小明丶
|
* @Date: 2019-08-15 15:40:14
|
* @LastEditors: 小明丶
|
* @LastEditTime: 2020-11-19 18:28:39
|
* @Description:
|
-->
|
<template>
|
<div class="channel-box ">
|
<v-navbar title="渠道管理" fixed></v-navbar>
|
<van-search class="search" placeholder="请输入商户名称/负责人电话" v-model="value" shape='round' />
|
<!-- <div class="list-box-div"> -->
|
|
<div class="item-box">
|
<router-link class="channel-item flex-start-g" v-for="(item, index) in calcChanList" :key="index" :to="{path:'/mine/channel-add',query:{chanId:item.chanId}}">
|
<p class="icon-box flex-center-g" :style="{background:$store.state.backColor}">
|
<svg class="icon" aria-hidden="true" style="width:25px;height:25px;fill:#fff" @click="$router.back()">
|
<use xlink:href="#iconyonghu"></use>
|
</svg>
|
</p>
|
<div>
|
<p class="name">{{item.priName}}</p>
|
<p class="c-text-666-g font-12-g">{{item.priMblNo}}</p>
|
</div>
|
</router-link>
|
</div>
|
<!-- <van-button class="btn" @click="$router.push('/mine/channel-add')">
|
<div class="inner">
|
<van-icon name="plus" />
|
<span class="text">新增</span>
|
</div>
|
</!-->
|
<v-button-circle icon='iconjia' title='新增' @click="$router.push('/mine/channel-add?isAdd=1')"></v-button-circle>
|
|
<!-- </div> -->
|
</div>
|
</template>
|
|
<script>
|
import hList from '../../../components/common/h-list';
|
export default {
|
components:{
|
hList
|
},
|
data() {
|
return {
|
finished:false,
|
loading:false,
|
value:'',
|
chanList:[]
|
}
|
},
|
computed:{
|
// 根据搜索关键字获取 对应的数据
|
calcChanList(){
|
let v = this.value;
|
let arr = this.chanList.filter(item=>{
|
return item.priName.indexOf(v) > -1 || item.priMblNo.indexOf(v) > -1;
|
})
|
if(arr){
|
return arr
|
}
|
return this.chanList;
|
}
|
},
|
created(){
|
this.init()
|
},
|
methods: {
|
saleOrderLoad(){
|
this.finished = true
|
},
|
init(){
|
this.$api.getChannel().then((res) => {
|
let {chanList} = res.body;
|
let arr = [];
|
for(let key in chanList){
|
arr.push(...chanList[key])
|
}
|
this.chanList = arr;
|
//this.chanList = [...arr,...arr,...arr,...arr,...arr,...arr,...arr,...arr,...arr];//调试用
|
}).catch((err) => {
|
|
});
|
},
|
go(){
|
this.$router.push('/mine/channel-detail')
|
}
|
},
|
}
|
</script>
|
<style lang="less" scoped>
|
.channel-box{
|
background-color: @c-bg-f5;
|
padding-top: 44px;
|
//padding-bottom: 50px;
|
// .list-box-div{
|
// overflow: scroll;
|
// height: 80vh;
|
// }
|
// .list-box-div::-webkit-scrollbar,.withdrawals-box::-webkit-scrollbar {
|
// display: none;
|
// }
|
.btn{
|
position: fixed;
|
width:50px;
|
height:50px;
|
padding: 0;
|
right: 8px;
|
bottom: 68px;
|
border-radius:50%;
|
color: @c-text-f5;
|
z-index: @zIndex-50;
|
box-shadow:0px 5px 9px 0px rgba(80,47,183,0.2);
|
background:linear-gradient(0deg,rgba(106,79,188,1),rgba(137,110,219,1));
|
.inner{
|
display: flex;
|
flex-direction: column;
|
}
|
.text{
|
.lh(15px);
|
}
|
}
|
}
|
.search{
|
margin-top: 10px;
|
padding: 15px 8px;
|
}
|
.item-box{
|
background-color: @c-bg-fff;
|
padding-bottom: 25px;
|
}
|
.channel-item{
|
height: 67px;
|
margin: 0 8px 10px;
|
padding-left: 12px;
|
box-shadow:0px 0px 5px 0px rgba(66,61,93,0.08);
|
border-radius:3px;
|
color: @c-text-333;
|
.icon-box{
|
width: 32px;
|
height: 32px;
|
margin-right: 15px;
|
border-radius: 50%;
|
background-color: @c-bg-black;
|
}
|
.name{
|
margin-bottom: 5px;
|
font-weight: bold;
|
}
|
}
|
</style>
|