doum
2025-09-04 9d901b4215323c97a00a068cd962f5c9c04dadfa
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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
<template>
    <view class="box">
        <view class="box-head" v-if="info && info.auditStatus ==2">
            <image src="/static/icon/ic_pass@2x.png" mode="widthFix"></image>
            <text >{{typeName}}已通过</text>
        </view>
        <view class="box-error"  v-if="info && info.auditStatus ==3">
            <view class="box-error-top">
                <image src="/static/icon/ic_fail@2x.png" mode="widthFix"></image>
                <text>{{typeName}}已拒绝</text>
            </view>
            <view class="box-error-info">{{info.auditRemark}}</view>
        </view>
        <view class="box-ing"  v-if="info && (info.auditStatus||1) ==1">
            <view class="box-ing-top">
                <image src="/static/icon/ic_renzhengzhong@2x.png" mode="widthFix"></image>
                <text>认证中</text>
            </view>
            <view class="box-ing-info">认证结果将通过短信/订阅消息通知您</view>
        </view>
        <view class="box-error" v-if="!info">
            <view class="box-error-top">
                <image src="/static/icon/ic_fail@2x.png" mode="widthFix"></image>
                <text>未查询到申请记录</text>
            </view>
        </view>
        <view class="box-list">
            <view class="box-list-item">
                <view class="box-list-item-label">认证类型</view>
                <view class="box-list-item-val">
                    <text>{{info.authType == 1?'企业':'个人'}}</text>
                </view>
            </view>
            <view class="box-list-item">
                <view class="box-list-item-label">联系人</view>
                <view class="box-list-item-val">
                    <text>{{info.linkName}}</text>
                </view>
            </view>
            <view class="box-list-item">
                <view class="box-list-item-label">手机号</view>
                <view class="box-list-item-val">
                    <text>{{info.telephone}}</text>
                </view>
            </view>
            <view class="box-list-item">
                <view class="box-list-item-label">接单位置</view>
                <view class="box-list-item-val">
                    <text>{{info.location}}</text>
                    <view class="box-list-item-val-edit"  v-if="info && info.auditStatus ==2" @click="goEditAddr">修改</view>
                </view>
            </view>
            <view class="box-list-info" >
                <view class="box-list-info-label">{{info.authType==1?'认证资料':'身份信息'}}</view>
                <view class="box-list-info-list">
                    <view class="box-list-info-list-image" v-for="item in info.imgList">
                        <image :src="item" @click="previemImg(item)" mode="widthFix"></image>
                    </view> 
                </view>
            </view>
        </view>
        <view class="box-footer" v-if="info &&info.auditStatus ==3">
            <view class="box-footer-btn" @click="goRenzheng">重新认证</view>
        </view>
    </view>
</template>
 
<script>
    export default {
        data() {
            return {
                title: '用户认证申请',
                typeName: '用户认证',
                flag: null, 
                loading:false,
                info: {}, 
            };
        },
        onLoad(options) {
            console.log(options)
            var flag = options.flag
            this.flag = flag 
            this.getApplyData()
            switch(flag){
                case '1':
                    this.title = '货运认证申请'
                    this.typeName='货运认证'
                    break;
                case '2':
                    this.title = '供餐认证申请'
                    this.typeName='供餐认证'
                    break;
                 default:
                    this.title = '用工认证申请'
                    this.typeName='用工认证'
                    break; 
            }
            uni.setNavigationBarTitle({
                title:this.title
            })
        },
        methods:{
            goRenzheng(){
                uni.navigateTo({
                    url: '/packageA/pages/employment-certification/employment-certification?flag='+this.flag
                })
            },
            getApplyData(){
                var that = this 
                var param ={ type:that.flag}
                this.$u.api.getIdentityInfo(param).then(res =>{
                    if(res.code ===200){
                        that.info = res.data
                    }
                 }) 
            },
            previemImg(src){
                uni.previewImage({
                    current: src, // 当前显示图片的http链接
                    urls: [src] // 需要预览的图片http链接列表
                  });
            },
            goEditAddr(){
                var that =this
                uni.chooseLocation({
                    success:(res)=> {
                        console.log(res);
                        var param ={
                            id:that.info.id,
                            lat:res.latitude,
                            location:res.name || res.address,
                            lgt:res.longitude
                        }
                        that.$u.api.updateLocation(param).then(res1 =>{
                            if(res1.code ===200){
                                uni.showToast({
                                    title: '修改成功 ',
                                    icon: "none",
                                    duration: 2000
                                });
                                that.info.location=param.location
                                that.info.lat=param.lat
                                that.info.lgt=param.lgt
                            }
                         }) 
                    },
                    fail:()=>{
                        // 如果用uni.chooseLocation没有获取到地理位置,则需要获取当前的授权信息,判断是否有地理授权信息
                        uni.getSetting({
                            success: (res) => {
                                console.log(res);
                                var status = res.authSetting;
                                if(!status['scope.userLocation']){
                                // 如果授权信息中没有地理位置的授权,则需要弹窗提示用户需要授权地理信息
                                    uni.showModal({
                                        title:"是否授权当前位置",
                                        content:"需要获取您的地理位置,请确认授权,否则地图功能将无法使用",
                                        success:(tip)=>{
                                            if(tip.confirm){
                                            // 如果用户同意授权地理信息,则打开授权设置页面,判断用户的操作
                                                uni.openSetting({
                                                    success:(data)=>{
                                                    // 如果用户授权了地理信息在,则提示授权成功
                                                        if(data.authSetting['scope.userLocation']===true){
                                                            uni.showToast({
                                                                title:"授权成功",
                                                                icon:"success",
                                                                duration:1000
                                                            })
                                                            // 授权成功后,然后再次chooseLocation获取信息
                                                            uni.chooseLocation({
                                                                success: (res) => {
                                                                    console.log("详细地址",res);
                                                                    // this.getRegionFn(res);
                                                                }
                                                            })
                                                        }else{
                                                            uni.showToast({
                                                                title:"授权失败",
                                                                icon:"none",
                                                                duration:1000
                                                            })
                                                        }
                                                    }
                                                })
                                            }
                                        }
                                    })
                                }
                            },
                            fail: (res) => {
                                uni.showToast({
                                    title:"调用授权窗口失败",
                                    icon:"none",
                                    duration:1000
                                })
                            }
                        })
                    }
                })
            }
        }
    }
</script>
 
<style lang="scss" scoped>
    .box {
        width: 100%;
        .box-footer {
            width: 100%;
            padding: 0 30rpx;
            box-sizing: border-box;
            margin-top: 60rpx;
            .box-footer-btn {
                width: 100%;
                height: 88rpx;
                line-height: 88rpx;
                text-align: center;
                background: #00BC12;
                border-radius: 44rpx;
                font-weight: 500;
                font-size: 32rpx;
                color: #FFFFFF;
            }
        }
        .box-error {
            width: 100%;
            height: 248rpx;
            background: rgba(190,56,56,0.1);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            .box-error-top {
                display: flex;
                align-items: center;
                justify-content: center;
                image {
                    width: 60rpx;
                    height: 60rpx;
                    margin-right: 24rpx;
                }
                text {
                    font-weight: 600;
                    font-size: 40rpx;
                    color: #FF0000;
                }
            }
            .box-error-info {
                font-weight: 400;
                font-size: 28rpx;
                color: #333333;
                margin-top: 32rpx;
            }
        }
        
        .box-ing {
            width: 100%;
            height: 248rpx;
            background: rgba(255, 114, 0, 0.10);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            .box-ing-top {
                display: flex;
                align-items: center;
                justify-content: center;
                image {
                    width: 60rpx;
                    height: 60rpx;
                    margin-right: 24rpx;
                }
                text {
                    font-weight: 600;
                    font-size: 40rpx;
                    color: #FF7200;
                }
            }
            .box-ing-info {
                font-weight: 400;
                font-size: 28rpx;
                color: #333333;
                margin-top: 32rpx;
            }
        }
        .box-head {
            width: 100%;
            height: 172rpx;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(91,190,56,0.1);
            image {
                width: 60rpx;
                height: 60rpx;
                margin-right: 24rpx;
            }
            text {
                font-weight: 600;
                font-size: 40rpx;
                color: #00BC12;
            }
        }
        .box-list {
            width: 100%;
            padding: 0 30rpx;
            box-sizing: border-box;
            .box-list-info {
                width: 100%;
                margin-top: 30rpx;
                .box-list-info-label {
                    font-weight: 400;
                    font-size: 30rpx;
                    color: #777777;
                    margin-bottom: 30rpx;
                }
                .box-list-info-list {
                    width: 100%;
                    display: flex;
                    align-items: center;
                    justify-content: space-between;
                    flex-wrap: wrap;
                    .box-list-info-list-image {
                        width: 314rpx;
                        height: 216rpx;
                        margin: 10rpx;
                        border-radius: 16rpx;
                        overflow: hidden;
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        image {
                            width: 100%;
                        }
                    }
                }
            }
            .box-list-item {
                width: 100%;
                box-sizing: border-box;
                padding: 30rpx 0;
                display: flex;
                align-items: start;
                justify-content: space-between;
                border-bottom: 1rpx solid #E5E5E5;
                .box-list-item-label {
                    font-weight: 400;
                    font-size: 30rpx;
                    color: #777777;
                    flex-shrink: 0;
                    margin-right: 50rpx;
                }
                .box-list-item-val {
                    display: flex;
                    align-items: start;
                    text {
                        font-weight: 400;
                        font-size: 30rpx;
                        color: #222222;
                    }
                    .box-list-item-val-edit {
                        flex-shrink: 0;
                        font-weight: 400;
                        font-size: 30rpx;
                        color: #00BC12;
                        margin-left: 20rpx;
                    }
                }
            }
        }
    }
</style>