add
yj
2024-12-05 b9900893177c78fc559223521fe839aa21000017
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<template>
    <view class="ali">
        <view class="ali_state">
            <block v-for="(item,i) in datas" :key="i">
                <view class="State_Four">
                    <view class="FourBox">
                        <text class="line" :class="[i == 0?'noline':'']"></text>
                        <!-- =====如果不够,可以再方法和过滤器中同时添加判断-或者如下的-[v-else-if]操作 -->
                        <!-- <text class="ali_top_icon" style="margin: 0 0;" v-else-if="item.station.includes('丰巢智能快递柜') && i!= datas.length-1">待</text> -->
                        <text class="ali_top_icon" :class="[item.station.includes('签收')?'isOk':'']" style="margin: 0 0;" v-if="Type(item.station) == true && i!= datas.length-1">{{item.station | Type}}</text>
                        <view class="ali_top_icons" style="margin: 0 0;" v-else>
                            <text class="line" :class="[i == 0?'noline':'']"></text>
                            <text class="ali_top_iconss"></text>
                            <text class="line" :class="[i == 0?'noline':'']"></text>
                        </view>
                        <text class="line" :class="[i == datas.length -1?'noline':'']"></text>
                    </view>
                    <view class="station">
                        <text class="a14"  v-if="i == datas.length-1">已发货</text>
                        <text class="a14"  v-else>{{item.station}}</text>
                        <text class="a12" style="padding-top: 10upx;">{{item.time}}</text>
                    </view>
                </view>
            </block>
        </view>
    </view>
</template>
 
<script>
    export default{
        props:["datas"],
        data(){
            return{
                
            }
        },
        //过滤返回关键字
        filters:{
            Type(item){
                let Info;
                let Phone = /\d{11}/;
                if(Phone.test(item) && item.includes('正在派')){
                    Info = "派";
                }else if(item.includes('已收取快件')){
                    Info = "揽";
                }else if(item.includes('营业')){
                    Info = "运";
                }else if(item.includes('丰巢智能快递柜')){
                    Info = "待";
                }else if(item.includes('签收')){
                    Info = "收";
                }else{
                    Info = "";
                }
                return Info
            }
        },
        methods: {
            //判断哪个该展示关键字--还是默认
            Type(item){
                
                let Info;
                let Phone = /\d{11}/;
                if(Phone.test(item) && item.includes('正在派')){
                    Info = true;
                }else if(item.includes('已收取快件')){
                    Info = true;
                }else if(item.includes('营业')){
                    Info = true;
                }else if(item.includes('丰巢智能快递柜')){
                    Info = true;
                }else if(item.includes('签收')){
                    Info = true;
                }else{
                    Info = false;
                }
                return Info
            }
        },
    }
</script>
 
<style>
    .isOk{
        background-color: #F0AD4E !important;
    }
    .ali_top_iconss{
        width: 12upx;
        height: 12upx;
        display: block;
        background-color: #999;
        padding-right: 2upx;
        border-radius: 50%;
    }
    .noline{
        background-color: #fff !important;
    }
    .State_Four{
        display: flex;
        /* border: 1upx solid red; */
    }
    .FourBox{
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-right: 24upx;
    }
    .line{
        width: 2upx;
        display: flex;
        flex-direction: column;
        flex: 1;
        background-color: #999;
    }
    /* ============= */
    .station{
        display: flex;
        flex-direction: column;
        width: 90%;
        padding: 24upx 0;
    }
    .borders{
        border-bottom: 1upx solid #F2F2F2;
        padding: 24upx 0;
    }
    .ali_top_icons{
        width: 46upx;
        height: 46upx;
        display: block;
        background-color: #FFF;
        border-radius: 50%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        align-content: center;
    }
    .ali_top_icon{
        width: 46upx;
        height: 46upx;
        display: block;
        background-color: #83AECF;
        color: #fff;
        font-size: 28upx;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-right: 20upx;
    }
    .ali_top{
        display: flex;
        justify-content: flex-start;
        align-items: center;
    }
    /* ========公共========= */
    .a14{
        font-size: 28upx;
        color: #000000;
    }
    .a12{
        font-size: 24upx;
        color: #999;
    }
    .ali{
        /* width: 100%; */
        /* border: 1upx solid #F76260; */
        background-color: #FFFFFF;
        margin: 24upx;
        border-radius:18upx;
        padding: 0 24upx;
        display: flex;
        flex: 1;
        flex-direction: column;
    }
</style>