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
<template>
<view class="container u-row-between" v-if="info">
<Settle :index="pageIndex" :type="1">
<view class="content-view">
<!-- <view style="min-height: 120rpx;" v-if="status == 8"></view> -->
<view class="u-flex u-row-center">
<image :class="['icon', {active: status != 1, h: [1, 2, 3, 4].indexOf(status) != -1}]"
:src="imageUrl">
</image>
</view>
<view class="txt-box">
<text :class="['title', {failed: status == 4} ,index ? 'active' : '']"
v-for="(txt,index) in info.txtArr" :key="index">{{txt}}</text>
</view>
<view class="tips-box" v-if="info.tipsArr">
<text :class="['tips',info.tipsArr.length>1 && index===0 ? 'red' : '']"
v-for="(txt,index) in info.tipsArr" :key="index">{{txt}}</text>
</view>
<view class="services-view">
<view v-if="[1, 2, 3, 4, 7].indexOf(status) != -1">
<view class="service-info-image">
<u-image class="qrcode" :src="erweimaImage" width="220" height="220" mode="widthFix"
:fade="true" duration="450">
</u-image>
</view>
<view class="content-info-tip">长按二维码保存图片</view>
<view class="content-info-tip">添加官方客服微信及时了解审核进度</view>
</view>
</view>
<button class="btn-submit" @click="$u.debounce(goPage, 500)">{{info.btnTxt}}</button>
</view>
</Settle>
</view>
</template>
<script>
import Settle from '@/components/settle/index.vue'
// import Services from '@/components/settle/services.vue'
export default {
components: {
Settle,
// Services
},
data() {
return {
pageIndex: 2,
settledInfo: null,
promptList: [{
status: 1,
statusName: '待审核',
txtArr: ['入驻资料提交成功', '您的申请入驻资料已成功提交,工作人员正在审核中'],
btnTxt: '去首页',
url: '/pages/index/index'
}, {
status: 2,
statusName: '已通过',
txtArr: ['入驻资料审核成功', '您的申请入驻资料已审核提交,可进行在线学习考试'],
btnTxt: '下一步',
url: '/pages/learn/exam'
}, {
status: 3,
statusName: '备选',
txtArr: ['您已成为', "“充电桩安装备选服务商”"],
tipsArr: ['后续如有业务,请留意通知!'],
btnTxt: '去首页',
url: '/pages/index/index'
}, {
status: 4,
statusName: '已驳回',
txtArr: ['入驻资料审核失败'],
tipsArr: ['原因:', '图片不够清楚'],
btnTxt: '重新提交',
url: '/pages/settle/file'
}, {
status: 8,
statusName: 'step4',
txtArr: ['您已通过接单在线考试', '通过在线考试后,可以前往签约'],
btnTxt: '下一步',
url: '/pages/settle/sign-contract'
}, {
status: [5, 6],
statusName: '未支付保证金',
txtArr: ['您已成功完成签约', "完成签约后,缴纳配件押金即可完成入驻"],
btnTxt: '下一步',
url: '/pages/settle/pay-ensure'
}, {
status: 7,
statusName: '已支付保证金',
txtArr: ['您已成功缴纳配件押金', " 成功缴纳配件押金后即前往接单"],
btnTxt: '去首页',
url: '/pages/index/index'
}],
// 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
status: '',
info: null,
}
},
computed: {
imageUrl() {
return this.status == 1 ? process.uniEnv.qn_base_url + 'chenggong.png' : process.uniEnv.qn_base_url +
'icon-prompt.png'
},
erweimaImage() {
return process.uniEnv.qn_base_url + 'erweima-rk.png'
},
},
onLoad(e) {
getApp().trackPage('入驻结果中转页')
if (e) {
if (e.pageIndex) {
this.pageIndex = e.pageIndex;
}
}
// if(!this.settledInfo){
// this.getBaseInfo()
// }
},
onShow() {
if (!this.settledInfo) {
this.getBaseInfo()
}
},
components: {
},
methods: {
async getBaseInfo() {
const app = getApp()
const callBack = (vm, result) => {
vm.settledInfo = result
vm.status = result.record.status
}
let settledInfo = await app.getBaseInfo(this, callBack)
this.settledInfo = settledInfo
this.status = settledInfo.record.status
switch (this.status) {
case 1:
case 2:
case 3:
case 4:
this.pageIndex = 2;
break;
case 8:
this.pageIndex = 3;
break;
case 5:
case 6:
this.pageIndex = 4;
break;
case 7:
this.pageIndex = 5;
break;
default:
this.pageIndex = 1;
break;
}
uni.hideLoading()
this.initInfo(settledInfo.record)
},
initInfo(record) {
if (!record) {
this.info = this.promptList[0]
return
}
const status = record.status
// const status = 7
const infoArr = this.promptList.filter(item => {
const itemStatus = item.status
let idx = -2
if (Array.isArray(itemStatus)) {
idx = itemStatus.indexOf(status)
}
return itemStatus === status || idx >= 0
})
const info = infoArr.length > 0 && infoArr[0]
if (!info) {
this.info = this.promptList[0]
return
}
// if (status === 6) {
// info.tipsArr[0] = '请缴纳' + this.settledInfo.record.deposit + '元质保金'
// } else
if (status === 4) {
info.tipsArr[1] = this.settledInfo.record.reason || ''
}
this.info = info
},
download() {
let that = this;
uni.downloadFile({ //获得二维码的临时地址
url: that.erweimaImage,
success: (res) => {
if (res.statusCode == 200) {
uni.saveImageToPhotosAlbum({
filePath: res.tempFilePath, //传入临时地址
success() {
that.$u.toast('保存成功!');
},
fail() {
that.$u.toast('保存失败!');
}
})
}
}
})
},
// saveQrcode() {
// let that = this;
// uni.downloadFile({ //获得二维码的临时地址
// url: that.erweimaImage,
// success:(res)=>{
// if(res.statusCode == 200){
// uni.saveImageToPhotosAlbum({
// filePath:res.tempFilePath,//传入临时地址
// success() {
// that.$u.toast('保存成功!');
// },
// complete(res) {
// if (res.errMsg.indexOf('auth') != -1) {
// uni.showModal({
// title: '提示',
// content: '获取相册权限失败,请到设置页面开启权限',
// confirmText: '好的',
// success(res) {
// if (res.confirm) {
// uni.openSetting({
// success(res) {
// }
// });
// }
// }
// })
// } else if (res.errMsg) {
// that.$u.toast('保存失败!');
// }
// }
// })
// }
// }
// })
// },
goPage() {
const url = this.info.url
if (this.status == 1 || this.status == 3 || this.status == 7) {
uni.reLaunch({
url,
});
} else {
uni.navigateTo({
url,
});
}
},
},
}
</script>
<style lang="scss" scoped>
.container {
display: flex;
width: 750rpx;
// height:500rpx;
display: flex;
flex-direction: column;
background-color: #F4F5F7;
height: 100%;
position: absolute;
.icon {
margin-top: 20rpx;
width: 224rpx;
height: 224rpx;
&.active {
margin-top: 150rpx;
width: 234rpx;
height: 222rpx;
}
&.h {
margin-top: 38rpx;
width: 234rpx;
height: 222rpx;
}
}
.content-view {
background-color: #FFFFFF;
margin-bottom: 30rpx;
border-radius: 12rpx;
padding: 30rpx;
}
.txt-box {}
.title {
display: block;
font-weight: bold;
// padding: 0 30rpx;
text-align: center;
font-weight: bold;
font-size: 44rpx;
color: #2272FF;
&.failed {
color: #FA5A49;
}
&.active {
color: #666666;
font-size: 24rpx;
font-weight: 400;
margin-top: 20rpx;
}
}
.tips-box {
// margin-top: 32rpx;
text-align: center;
}
.tips {
color: #666666;
font-size: 24rpx;
}
.btn-submit {
margin-top: 50rpx;
margin-bottom: 30rpx;
width: 600rpx;
height: 104rpx;
line-height: 104rpx;
border-radius: 52rpx;
background: #2272ff;
font-size: 32rpx;
font-weight: bold;
color: #fff;
&:disabled {
border: 2rpx solid #999;
background-color: #f3f3f3;
color: #999;
}
}
.services-view {
padding-top: 50rpx;
text-align: center;
min-height: 120rpx;
.service-info-image {
margin-bottom: 30rpx;
width: 100%;
text-align: center;
display: flex;
justify-content: center;
}
.content-info-tip {
font-size: 22rpx;
color: #666666;
}
}
}
</style>