liyaozhi
2025-10-28 1320688354fd168c51cf2e05f29a2253f4ed9c00
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
177
178
179
180
181
182
183
184
185
186
187
<template>
    <view class="activity-user-verify" v-if="!loading">
        <view class="top-status p30">
            <view class="status-text" v-if="detail.is_verify == 0">
                <view class="f40 fb"><text class="iconfont icon-daojishi f40 mr10"></text>待核销</view>
                <view class="f26 gray3 pt10">请核对活动和报名信息后进行核销</view>
            </view>
            <view class="status-text" v-else-if="detail.is_verify == 1">
                <view class="f40 fb">已核销</view>
                <view class="f26 gray3 pt10">该核销码已核销,无需重复核销</view>
            </view>
            <view class="status-text" v-else>
                <view class="f40 fb">已缺席</view>
                <view class="f26 gray3 pt10">该核销码已过期,无法核销</view>
            </view>
        </view>
        <view class="verify-section radius24">
            <view class="bg-white detail-info-box">
                <view class="activity-image">
                    <image :src="detail.activity.image.file_path" mode="aspectFill"></image>
                </view>
                <view class="detail-info p20">
                    <view class="gray3 f30 fb text-ellipsis-2">{{detail.activity.name}}</view>
                    <view class="gray6 f28 pt10">活动开始时间:{{detail.activity.status_text.act_start_time}}</view>
                    <view class="gray6 f28 pt10">活动结束时间:{{detail.activity.status_text.act_end_time}}</view>
                </view>
            </view>
        </view>
        <!-- 报名信息 -->
        <view class="verify-section radius24 bg-white f26 p20">
            <view class="f28 fb">报名信息</view>
            <view class="d-b-c pt30">
                <view class="gray6">报名编号</view>
                <view>{{detail.order_no}}</view>
            </view>
            <view class="d-b-c pt30">
                <view class="gray6">姓名</view>
                <view>{{detail.user.real_name}}</view>
            </view>
            <view class="d-b-c pt30">
                <view class="gray6">联系电话</view>
                <view>{{detail.user.mobile}}</view>
            </view>
            <view class="d-b-c pt30">
                <view class="gray6">报名时间</view>
                <view>{{detail.create_time}}</view>
            </view>
        </view>
        <view class="verify-footer bg-white p-0-30 pt20 pb20" v-if="detail.is_verify == 0">
            <view @click="onSubmitExtract(detail.order_id)" class="btn-submit">确认核销</view>
        </view>
    </view>
</template>
 
<script>
    import Popup from '@/components/uni-popup.vue'
    import utils from '@/common/utils.js'
    export default {
        data() {
            return {
                loading: true,
                detail: {},
            };
        },
        components: {},
        props: ['order_id'],
        onLoad(e) {
        },
        mounted() {
            /*获取订单详情*/
            this.getData();
        },
        methods: {
            
            /*获取数据*/
            getData() {
                let self = this;
                uni.showLoading({
                    title: '加载中'
                });
                self._get(
                    'branch.activityUser/verify', {
                        order_id: self.order_id
                    },
                    function(res) {
                        self.detail = res.data.detail;
                        uni.hideLoading();
                        self.loading = false;
                    },
                    function(res) {
                        // uni.switchTab({
                        //     url:'/pages/index/index'
                        // })
                        uni.navigateBack();
                    }
                );
            },
 
 
            /*核销*/
            onSubmitExtract(order_id) {
                let self = this;
                wx.showModal({
                    title: "提示",
                    content: "确定要核销吗?",
                    success: function(o) {
                        o.confirm && self._post(
                            'branch.activityUser/verify', {
                                order_id: order_id
                            },
                            function(res) {
                                uni.showToast({
                                    title: res.msg,
                                    duration: 2000,
                                    icon: 'success',
                                });
                                setTimeout(function () {
                                    self.getData();
                                }, 2000);
                            }
                        );
                    }
                });
            },
        }
    };
</script>
 
<style lang="scss" scoped>
    .activity-user-verify {
        .top-status {
            .status-text {
                .iconfont {
                    color: #333333;
                }
            }
        }
        
        .verify-section {
            margin: 0 30rpx;
            overflow: hidden;
            
            + .verify-section {
                margin-top: 30rpx;
            }
        }
        
        .detail-info-box {
            
            image {
                width: 690rpx;
                height: 322rpx;
            }
            
            .detail-info {
                
            }
        }
        
        .verify-footer {
            background: #ffffff;
            width: 750rpx;
            height: 126rpx;
            height: calc(126rpx + constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
            height: calc(126rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
            display: flex;
            align-items: center;
            justify-content: center;
            position: fixed;
            left: 0;
            bottom: 0;
            border-top: 1rpx solid #eeeeee;
            box-sizing: border-box;
        }
        .verify-footer .btn-submit {
            font-size: 28rpx;
            color: #ffffff;
            @include background_color('background_color');
            width: 690rpx;
            height: 90rpx;
            border-radius: 200rpx;
            text-align: center;
            line-height: 90rpx;
            font-weight: bold;
        }
    }
</style>