MrShi
2023-10-13 9fca254349144bb63fa62261a85dacc87c43e4d2
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
<template>
    <view class="details">
        <view class="details_head">
            <view class="details_head_a">合计消费:</view>
            <view class="details_head_b">¥{{ (info.amount / 100).toFixed(2) }}</view>
            <view class="details_head_c">
                <text>结算车型:{{info.bikeType}}</text>
                <text>计费时长:{{ (info.duration / 60).toFixed(1) }}分钟</text>
            </view>
        </view>
        <view class="details_list">
            <view class="details_list_item" v-for="(item, index) in info.memberRidesResponseList" :key="index">
                <view class="details_list_item_a">
                    <text>{{ item.bikeType }}</text>
                    <text>编号:{{ item.bikeCode }}</text>
                </view>
                <view class="details_list_item_b">
                    骑行时间:{{ item.rideStartTime }} ~ {{ item.rideEndTime }} | {{ (item.rideTime / 60).toFixed(1) }}分钟
                </view>
                <view class="details_list_item_b">
                    计费时长:{{ (item.duration / 60).toFixed(1) }}分钟
                </view>
            </view>
        </view>
    </view>
</template>
 
<script>
    export default {
        data() {
            return {
                info: {}
            };
        },
        onLoad(option) {
            this.getInfo(option.id)
        },
        methods: {
            getInfo(goodsOrderId) {
                this.$u.api.ridesDetail({ goodsOrderId })
                    .then(res => {
                        if (res.code === 200) {
                            console.log(res)
                            this.info = res.data
                        }
                    })
            }
        }
    }
</script>
 
<style>
    page {
        background: #F7F7F7;
    }
</style>
<style lang="scss" scoped>
.details {
    width: 100%;
    .details_head {
        width: 100%;
        height: 216rpx;
        padding: 30rpx;
        box-sizing: border-box;
        background: #01B6AD;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        .details_head_a {
            font-size: 26rpx;
            font-family: PingFangSC-Regular, PingFang SC;
            font-weight: 400;
            color: #FFFFFF;
        }
        .details_head_b {
            font-size: 40rpx;
            font-family: PingFangSC-Regular, PingFang SC;
            font-weight: 400;
            color: #FFFFFF;
        }
        .details_head_c {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: space-between;
            text {
                font-size: 26rpx;
                font-family: PingFangSC-Regular, PingFang SC;
                font-weight: 400;
                color: #FFFFFF;
            }
        }
    }
    .details_list {
        width: 100%;
        padding: 20rpx;
        box-sizing: border-box;
        .details_list_item {
            width: 100%;
            padding: 24rpx 30rpx;
            box-sizing: border-box;
            background: #FFFFFF;
            border-radius: 20rpx;
            margin-bottom: 20rpx;
            &:last-child {
                margin: 0;
            }
            .details_list_item_a {
                width: 100%;
                display: flex;
                align-items: center;
                justify-content: space-between;
                text {
                    &:first-child {
                        font-size: 32rpx;
                        font-family: PingFangSC-Regular, PingFang SC;
                        font-weight: 400;
                        color: #222222;
                    }
                    &:last-child {
                        font-size: 26rpx;
                        font-family: PingFangSC-Regular, PingFang SC;
                        font-weight: 400;
                        color: #666666;
                    }
                }
            }
            .details_list_item_b {
                width: 100%;
                margin-top: 16rpx;
                font-size: 28rpx;
                font-family: PingFangSC-Regular, PingFang SC;
                font-weight: 400;
                color: #666666;
            }
        }
    }
}
</style>