li-guang
2020-12-18 82c48f3b548145d0cb3c652c47ed4def1e3e4c77
hive-app/pages/workbench/selectCustomer.vue
@@ -1,8 +1,8 @@
<template>
   <view class="container">
      <search-bar :placeholder=placeholder></search-bar>
      <view class="flex justify-between" @click="linkTo('./customerInfo')">
         <view class="flex-1 mr-10">
      <search-bar placeholder="客户姓名、手机、卡号、拼音"></search-bar>
      <view class="flex justify-between">
         <navigator :url="'./customerInfo?type='+type" hover-class="none"  class="flex-1 mr-10">
            <view class="member-list flex align-center" v-for="(item, index) in 15">
               <text class="first-name" :style="{background: caculateBgcolor(index)}">李</text>
               <view class="flex-1 flex align-center justify-between member-list-con">
@@ -16,7 +16,7 @@
                  </view>
               </view>
            </view>
         </view>
         </navigator>
         <indexed-list></indexed-list>
      </view>
   </view>
@@ -32,19 +32,18 @@
      },
      data() {
         return {
            placeholder:"客户姓名、手机、卡号、拼音",
            colors: ['#CCC6B4', '#C0CCB4', '#B4C2CC', '#BEB4CC', '#B4CCBE', '#B4CCCA', '#CCB4C6', '#CCB4B4'],
            filterType: 1,
            type: 1 ,//1新建订单 2新建服务单
            colors: ['#CCC6B4', '#C0CCB4', '#B4C2CC', '#BEB4CC', '#B4CCBE', '#B4CCCA', '#CCB4C6', '#CCB4B4']
         };
      },
      onLoad(options) {
         if(options.type){
            this.type = options.type;
         }
      },
      methods:{
         caculateBgcolor(index){
            return this.colors[index%8];
         },
         linkTo(val){
            uni.navigateTo({
               url:val
            })
         },
      }
   }