fstarter 2.10.44 → 2.10.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/plugins/components/BSUpload2.vue +15 -5
- package/src/plugins/components/BSVerCode.vue +10 -9
- package/src/plugins/components/base.js +1 -1
- package/src/plugins/services/faceTx.js +61 -0
- package/src/plugins/services/getTxFaceResult.js +83 -0
- package/src/plugins/services/index.js +4 -0
- package/src/views/auth.vue +28 -21
- package/src/views/auth3.vue +15 -6
package/package.json
CHANGED
|
@@ -17,14 +17,15 @@
|
|
|
17
17
|
<van-image :src="model.bgImage"/>
|
|
18
18
|
</van-uploader>
|
|
19
19
|
|
|
20
|
-
<
|
|
21
|
-
v-
|
|
22
|
-
|
|
20
|
+
<div
|
|
21
|
+
v-show="showCooper"
|
|
22
|
+
class="pop"
|
|
23
23
|
closeable
|
|
24
24
|
:overlay="false"
|
|
25
25
|
:style="{
|
|
26
26
|
width: '100%',
|
|
27
|
-
height: '100%'
|
|
27
|
+
height: '100%',
|
|
28
|
+
zIndex: '999'
|
|
28
29
|
}"
|
|
29
30
|
@click-close-icon="cancel"
|
|
30
31
|
>
|
|
@@ -70,7 +71,7 @@
|
|
|
70
71
|
</van-button>
|
|
71
72
|
</div>
|
|
72
73
|
</div>
|
|
73
|
-
</
|
|
74
|
+
</div>
|
|
74
75
|
</div>
|
|
75
76
|
</template>
|
|
76
77
|
|
|
@@ -366,6 +367,15 @@
|
|
|
366
367
|
width: 50%;
|
|
367
368
|
}
|
|
368
369
|
}
|
|
370
|
+
.pop {
|
|
371
|
+
position: fixed;
|
|
372
|
+
top: 50%;
|
|
373
|
+
left:0;
|
|
374
|
+
transform: translate3d(0,-50%,0);
|
|
375
|
+
max-height: 100%;
|
|
376
|
+
overflow-y: auto;
|
|
377
|
+
background-color: #fff;
|
|
378
|
+
}
|
|
369
379
|
</style>
|
|
370
380
|
<style scoped>
|
|
371
381
|
/* .cropper-container >>> .van-button--info{
|
|
@@ -3,11 +3,10 @@
|
|
|
3
3
|
<van-field
|
|
4
4
|
:label="model.label"
|
|
5
5
|
v-model="model.value"
|
|
6
|
-
:placeholder="sent?model.placeholder:''"
|
|
6
|
+
:placeholder="sent === 'leave' ?model.placeholder:''"
|
|
7
7
|
slot="button"
|
|
8
8
|
@blur="blur"
|
|
9
9
|
:class="ctlClass"
|
|
10
|
-
:readonly="!sent"
|
|
11
10
|
:clearable="model.clearable"
|
|
12
11
|
:error-message="model.hiddenValidate ? '': model.validateResult.message"
|
|
13
12
|
>
|
|
@@ -32,7 +31,7 @@
|
|
|
32
31
|
data() {
|
|
33
32
|
return {
|
|
34
33
|
validateCtl:true,
|
|
35
|
-
sent:
|
|
34
|
+
sent: 'leave'
|
|
36
35
|
}
|
|
37
36
|
},
|
|
38
37
|
mounted() {
|
|
@@ -53,7 +52,7 @@
|
|
|
53
52
|
},
|
|
54
53
|
sendVerCode(){
|
|
55
54
|
debugger
|
|
56
|
-
if(
|
|
55
|
+
if(this.sent === 'sending'){
|
|
57
56
|
return
|
|
58
57
|
}
|
|
59
58
|
|
|
@@ -61,23 +60,25 @@
|
|
|
61
60
|
this.$emit('send-verCode',function(){
|
|
62
61
|
|
|
63
62
|
debugger
|
|
64
|
-
self.sent =
|
|
63
|
+
self.sent = 'sending'
|
|
65
64
|
self.model.expiredTime = self.modelData.expiredTime
|
|
66
65
|
|
|
67
66
|
var source = Rx.Observable.timer(0, 1000)
|
|
68
67
|
|
|
69
|
-
source = source.pipe(take(self.modelData.expiredTime)).pipe(filter(num => self.sent));
|
|
68
|
+
source = source.pipe(take(self.modelData.expiredTime)).pipe(filter(num => self.sent === 'sending'));
|
|
70
69
|
|
|
71
70
|
source.subscribe({
|
|
72
71
|
next: function(value) {
|
|
73
|
-
|
|
72
|
+
// self.sent = true
|
|
74
73
|
self.model.expiredTime = self.model.expiredTime - 1
|
|
75
74
|
self.model.sendButtonLabel = self.modelData.expiredLabel.format(self.model.expiredTime)
|
|
75
|
+
// self.sent = false
|
|
76
|
+
|
|
76
77
|
},
|
|
77
78
|
complete: function() {
|
|
78
79
|
|
|
79
80
|
self.model.sendButtonLabel = self.modelData.sendButtonLabel
|
|
80
|
-
self.sent =
|
|
81
|
+
self.sent = 'leave'
|
|
81
82
|
self.model.value = ''
|
|
82
83
|
},
|
|
83
84
|
error: function(error) {
|
|
@@ -90,7 +91,7 @@
|
|
|
90
91
|
},
|
|
91
92
|
reset(){
|
|
92
93
|
|
|
93
|
-
this.sent =
|
|
94
|
+
this.sent = 'leave'
|
|
94
95
|
this.model.label = this.modelData.label
|
|
95
96
|
this.model.disabled = this.modelData.disabled
|
|
96
97
|
this.model.value = this.modelData.value
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import http from '../assets/http.js'
|
|
2
|
+
import ak from '../assets/ak.js'
|
|
3
|
+
import config from '../assets/config.js'
|
|
4
|
+
import {ua} from "../assets/ua";
|
|
5
|
+
|
|
6
|
+
var faceTx = {
|
|
7
|
+
|
|
8
|
+
getData(params){
|
|
9
|
+
let nonce = radomKey()
|
|
10
|
+
return {
|
|
11
|
+
'idcard_name': params.idcard_name,
|
|
12
|
+
'idcard_number': params.idcard_number,
|
|
13
|
+
'comparison_type': '1',
|
|
14
|
+
'nonce': nonce
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
invoke(params){
|
|
19
|
+
|
|
20
|
+
if(ua.isIspPhone){
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
}else if(ua.microMsg){
|
|
24
|
+
debugger
|
|
25
|
+
let apiUrl = config.file.baseURL + '/file/v1/hasl/fileAdmin/fileAdmin/getTXFaceDomain'
|
|
26
|
+
// if(faceType == 'wy'){
|
|
27
|
+
// apiUrl = config.file.baseURL + '/file/v1/hasl/fileAdmin/fileAdmin/getTXFaceDomain'
|
|
28
|
+
// }else{
|
|
29
|
+
// apiUrl = config.file.baseURL + '/file/v1/hasl/fileAdmin/fileAdmin/getFaceTokenNew'
|
|
30
|
+
// }
|
|
31
|
+
|
|
32
|
+
return http.post(apiUrl,params,true,true).then((data)=>{
|
|
33
|
+
const objstr = JSON.stringify(Object.assign(params, data))
|
|
34
|
+
debugger
|
|
35
|
+
localStorage.setItem('faceAbout', objstr)
|
|
36
|
+
let cbUrl = ak.http.concatParams(params.cbUrl ? params.cbUrl : window.location.href,'facetoken=1')
|
|
37
|
+
const url = `https://${data.optimalDomain}/api/web/login?webankAppId=TIDA55eC&version=1.0.0&nonce=${params.nonce}&orderNo=${data.orderNo}&h5faceId=${data.h5faceId}&url=${encodeURIComponent(cbUrl)}&from=browser&userId=${data.userId}&sign=${data.sign}&redirectType=1&resultType=1`
|
|
38
|
+
window.location.href = url
|
|
39
|
+
return Promise.resolve(data)
|
|
40
|
+
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
}else{
|
|
44
|
+
Promise.reject()
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
}
|
|
50
|
+
function radomKey(length = 32, needChars = true) {
|
|
51
|
+
let chars = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
|
|
52
|
+
let num = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
|
|
53
|
+
let final = needChars ? chars : num
|
|
54
|
+
let nums = ''
|
|
55
|
+
for (var i = 0; i < length; i++) {
|
|
56
|
+
const id = parseInt(Math.random() * 61)
|
|
57
|
+
nums += final[id]
|
|
58
|
+
}
|
|
59
|
+
return nums
|
|
60
|
+
}
|
|
61
|
+
export default faceTx;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import http from '../assets/http.js'
|
|
2
|
+
import ak from '../assets/ak.js'
|
|
3
|
+
import config from '../assets/config.js'
|
|
4
|
+
import {ua} from "../assets/ua";
|
|
5
|
+
import service from "../service"
|
|
6
|
+
|
|
7
|
+
var getTxFaceResult = {
|
|
8
|
+
|
|
9
|
+
need(){
|
|
10
|
+
|
|
11
|
+
let token = ak.http.getQueryString('facetoken')
|
|
12
|
+
if(ak.utils.isEmpty(token)){
|
|
13
|
+
localStorage.removeItem('faceAbout')
|
|
14
|
+
return false
|
|
15
|
+
} else {
|
|
16
|
+
return true
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
},
|
|
20
|
+
getData(){
|
|
21
|
+
|
|
22
|
+
let obj = JSON.parse(localStorage.getItem('faceAbout'))
|
|
23
|
+
|
|
24
|
+
localStorage.removeItem('faceAbout')
|
|
25
|
+
return {
|
|
26
|
+
biz_no: obj.bizSeqNo,
|
|
27
|
+
userId: obj.userId,
|
|
28
|
+
orderNo: obj.orderNo,
|
|
29
|
+
nonce: obj.nonce,
|
|
30
|
+
expired: '-1000',
|
|
31
|
+
buz: 'POLICY_FILE',
|
|
32
|
+
domain: 'POLICY',
|
|
33
|
+
buzId: radomNum(16),
|
|
34
|
+
fileName: radomNum(16)
|
|
35
|
+
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
invoke(params){
|
|
40
|
+
// let faceType = params.faceType
|
|
41
|
+
// delete params.faceType
|
|
42
|
+
|
|
43
|
+
if(ua.isIspPhone){
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
}else if(ua.microMsg){
|
|
47
|
+
let apiUrl = config.file.baseURL + '/file/v1/hasl/fileAdmin/fileAdmin/getTXFaceCompareResult'
|
|
48
|
+
return http.post(apiUrl,params,true,true).then((data)=>{
|
|
49
|
+
let res = data.result
|
|
50
|
+
let resData = {
|
|
51
|
+
confidence: res.similarity,
|
|
52
|
+
imageFile: res.faceFileId,
|
|
53
|
+
success: true
|
|
54
|
+
}
|
|
55
|
+
service.saveInitService('getTxFaceResult',resData)
|
|
56
|
+
let reUrl = ak.http.deleteParams(window.location.href,'facetoken')
|
|
57
|
+
window.location.href = reUrl
|
|
58
|
+
return Promise.resolve(resData)
|
|
59
|
+
}).catch(err => {
|
|
60
|
+
let reUrl = ak.http.deleteParams(window.location.href,'facetoken')
|
|
61
|
+
reUrl = ak.http.deleteParams(reUrl,'orderNo')
|
|
62
|
+
reUrl = ak.http.deleteParams(reUrl,'signature')
|
|
63
|
+
reUrl = ak.http.deleteParams(reUrl,'h5faceId')
|
|
64
|
+
reUrl = ak.http.deleteParams(reUrl,'code')
|
|
65
|
+
window.location.href = reUrl
|
|
66
|
+
return Promise.reject(err)
|
|
67
|
+
})
|
|
68
|
+
|
|
69
|
+
}else{
|
|
70
|
+
Promise.reject()
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
}
|
|
76
|
+
function radomNum(n) {
|
|
77
|
+
var rnd = ''
|
|
78
|
+
for (var i = 0; i < n; i++) {
|
|
79
|
+
rnd += Math.floor(Math.random() * 10)
|
|
80
|
+
}
|
|
81
|
+
return rnd
|
|
82
|
+
}
|
|
83
|
+
export default getTxFaceResult;
|
|
@@ -14,6 +14,8 @@ import jumpView from './jumpView'
|
|
|
14
14
|
import statusBarHeight from './statusBarHeight'
|
|
15
15
|
import goSetPage from './goSetPage'
|
|
16
16
|
import faceInApp from './faceInApp'
|
|
17
|
+
import faceTx from './faceTx'
|
|
18
|
+
import getTxFaceResult from './getTxFaceResult'
|
|
17
19
|
|
|
18
20
|
|
|
19
21
|
var services = services || {}
|
|
@@ -34,4 +36,6 @@ services['jumpView'] = jumpView
|
|
|
34
36
|
services['goSetPage'] = goSetPage
|
|
35
37
|
services['statusBarHeight'] = statusBarHeight
|
|
36
38
|
services['faceInApp'] = faceInApp
|
|
39
|
+
services['faceTx'] = faceTx
|
|
40
|
+
services['getTxFaceResult'] = getTxFaceResult
|
|
37
41
|
export default services;
|
package/src/views/auth.vue
CHANGED
|
@@ -81,6 +81,7 @@
|
|
|
81
81
|
return {
|
|
82
82
|
vname:'auth',
|
|
83
83
|
needProcessEvent:true,
|
|
84
|
+
needLoadData: true,
|
|
84
85
|
submodel:{
|
|
85
86
|
data: {
|
|
86
87
|
required:true, // 必填
|
|
@@ -187,10 +188,10 @@
|
|
|
187
188
|
methods: {
|
|
188
189
|
face() {
|
|
189
190
|
const a = {
|
|
190
|
-
|
|
191
|
-
|
|
191
|
+
idcard_number: '152531199103160179',
|
|
192
|
+
idcard_name: '胡玉泽'
|
|
192
193
|
}
|
|
193
|
-
this.$service.callService('
|
|
194
|
+
this.$service.callService('faceTx', a)
|
|
194
195
|
},
|
|
195
196
|
gosetPage() {
|
|
196
197
|
this.$service.callService('goSetPage')
|
|
@@ -274,20 +275,22 @@
|
|
|
274
275
|
|
|
275
276
|
},
|
|
276
277
|
loadData(res){
|
|
277
|
-
|
|
278
|
+
if (res.serviceId === 'getTxFaceResult') {
|
|
279
|
+
console.log(res)
|
|
280
|
+
}
|
|
278
281
|
if(res.serviceId == 'getAuthInfo'){
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
// this.selector('#sex').set('items',[{value:"dddd",key:"21"},{value:"ffff",key:"01"}])
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
282
|
+
// console.log('aaaaaaa')
|
|
283
|
+
// console.log(this.selector('>page').ctls)
|
|
284
|
+
// let data = res.data
|
|
285
|
+
// this.selector('#auth').selector('')
|
|
286
|
+
// this.selector('#name').selector('#name').setValue(data.name)
|
|
287
|
+
// this.selector('#bank').setValue(data.bank)
|
|
288
|
+
// this.selector('#sex').setValue('1')
|
|
289
|
+
// // this.selector('#sex').set('items',[{value:"dddd",key:"21"},{value:"ffff",key:"01"}])
|
|
290
|
+
|
|
291
|
+
// this.selector('#cardno').setValue(data.cardno)
|
|
292
|
+
|
|
293
|
+
// console.log(this.regedit)
|
|
291
294
|
}
|
|
292
295
|
|
|
293
296
|
|
|
@@ -298,11 +301,15 @@
|
|
|
298
301
|
};
|
|
299
302
|
},
|
|
300
303
|
sendVerCode(resolve){
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
304
|
+
debugger
|
|
305
|
+
setTimeout(function() {
|
|
306
|
+
resolve()
|
|
307
|
+
}, 1000)
|
|
308
|
+
|
|
309
|
+
// this.$service.callService('sendVerCode').then((data)=>{
|
|
310
|
+
// resolve()
|
|
311
|
+
// }
|
|
312
|
+
// )
|
|
306
313
|
|
|
307
314
|
},
|
|
308
315
|
authWatchHandle(){
|
package/src/views/auth3.vue
CHANGED
|
@@ -8,21 +8,22 @@
|
|
|
8
8
|
cname="upload"
|
|
9
9
|
@done="done"
|
|
10
10
|
@delete="deleteFn"
|
|
11
|
+
ref="a"
|
|
11
12
|
>
|
|
12
13
|
</bs-upload2>
|
|
13
|
-
<bs-upload2
|
|
14
|
+
<!-- <bs-upload2
|
|
14
15
|
id="abv"
|
|
15
16
|
:mod="submodel.upload2"
|
|
16
17
|
cname="upload"
|
|
17
18
|
@done="done"
|
|
18
19
|
@delete="deleteFn"
|
|
19
20
|
>
|
|
20
|
-
</bs-upload2>
|
|
21
|
+
</bs-upload2> -->
|
|
21
22
|
<bs-upload
|
|
22
23
|
id="abv"
|
|
23
24
|
:mod="submodel.upload2"
|
|
24
25
|
cname="upload2"
|
|
25
|
-
@done="
|
|
26
|
+
@done="done1"
|
|
26
27
|
@delete="deleteFn"
|
|
27
28
|
>
|
|
28
29
|
</bs-upload>
|
|
@@ -74,10 +75,10 @@
|
|
|
74
75
|
// actions: 'ocr_bc', // 银行卡
|
|
75
76
|
},
|
|
76
77
|
upload2:{
|
|
77
|
-
|
|
78
|
+
uploadType: 'IdCard_Front', //身份证正面
|
|
78
79
|
// uploadType: 'IdCard_Back' //身份证反面
|
|
79
|
-
uploadType: '
|
|
80
|
-
buzId: '
|
|
80
|
+
// uploadType: 'ocr_id0', // 银行卡
|
|
81
|
+
buzId: '2321123123' // 前端自生成uuid
|
|
81
82
|
},
|
|
82
83
|
viewer:{
|
|
83
84
|
value:'https://testfile.ihasl.com/file/v1/hasl/fileAdmin/fileAdmin/get/4cba0c329a994356aa7f4e958c88373b.pdf'
|
|
@@ -113,12 +114,20 @@
|
|
|
113
114
|
},
|
|
114
115
|
done() {
|
|
115
116
|
const a = this.selector('#upload').get('data')
|
|
117
|
+
console.log()
|
|
118
|
+
this.bb = `${a.fileId}.${a.ext}`
|
|
119
|
+
|
|
120
|
+
},
|
|
121
|
+
done1() {
|
|
122
|
+
const a = this.selector('#upload2').get('data')
|
|
123
|
+
console.log(a)
|
|
116
124
|
this.bb = `${a.fileId}.${a.ext}`
|
|
117
125
|
},
|
|
118
126
|
a(){
|
|
119
127
|
// this.$service.callService('face',{fileUrl: this.bb}).then(()=>{
|
|
120
128
|
// localStorage.setItem('face.flag',true)
|
|
121
129
|
// })
|
|
130
|
+
console.log(this.$refs.a.fileList = [])
|
|
122
131
|
},
|
|
123
132
|
loadData(data) {
|
|
124
133
|
if(data.serviceId == 'getFaceResult'){
|