long
2024-06-26 911e0ed72a790ba054385ffe594262e123948691
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// 过滤器
 
import Vue from 'vue'
 
function install(){
  // // 分转价格
  // Vue.filter('amount', function (number) {
  //   // var number = +val.replace(/[^\d.]/g, '');
  //   return isNaN(number) ? 0.00 : parseFloat((number/100).toFixed(2));
  // });
 
  // // 省和城市一样的时候,不显示城市
  // Vue.filter('city', function (city, province) {
  //   if (city == province) {
  //     return ''
  //   } else {
  //     return city
  //   }
  // })
 
  // // 需求标题,只显示分类第二级第三级
  // Vue.filter('serviceTypeTitle', function (serviceType) {
  //   var [type1, type2, type3] = serviceType.split('|')[0].split('-')
  //   return [type2, type3].join('-')
  // })
 
  // // 缩减订单编号
  // Vue.filter('shortNo', function (no) {
  //   if (no.length > 20) {
  //     return no.substring(no.length - 20, no.length)
  //   }
  //   return no
  // })
 
  // // 订单、师傅评分转换
  // Vue.filter('score', function (score) {
  //   return score / 100
  // })
}
 
export default {
  install
}