export default {
  data() {
    return {
      // eslint-disable-next-line
      defaultAvatar: require('../assets/img/head_default.png')
    };
  },
  filters: {
    sceneFilter(val) {
      let str = '- -';
      switch (val) {
        case 1:
          str = '客户生日';
          break;
        case 2:
          str = '节日活动邀约';
          break;
        case 3:
          str = '加企微好友';
          break;
        case 4:
          str = '客户复购';
          break;
        case 0:
          str = '其它场景';
          break;
      }
      return str;
    }
  },
  methods: {
    filterAvatar(img) {
      return img ? img.replace(/^http(s)?/, 'https') : this.defaultAvatar;
    }
  }
};
