fstarter 2.10.56 → 2.10.57
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/.babelrc +6 -6
- package/.editorconfig +9 -9
- package/index.html +22 -22
- package/index.js +222 -222
- package/package.json +104 -104
- package/src/App.vue +38 -38
- package/src/i18n/en-US.js +35 -35
- package/src/i18n/zh-CN.js +35 -35
- package/src/main.js +95 -95
- package/src/plugins/assets/ak.js +948 -948
- package/src/plugins/assets/callNative.js +490 -490
- package/src/plugins/assets/compressImg.js +75 -75
- package/src/plugins/assets/config.js +106 -106
- package/src/plugins/assets/fileServer.js +469 -469
- package/src/plugins/assets/http.js +344 -344
- package/src/plugins/assets/ua.js +27 -27
- package/src/plugins/components/BSButton.vue +61 -61
- package/src/plugins/components/BSCascader.vue +465 -465
- package/src/plugins/components/BSCell.vue +48 -48
- package/src/plugins/components/BSDatePicker.vue +167 -167
- package/src/plugins/components/BSImage.vue +42 -42
- package/src/plugins/components/BSInput.vue +140 -140
- package/src/plugins/components/BSList.vue +81 -81
- package/src/plugins/components/BSPicCode.vue +96 -96
- package/src/plugins/components/BSPopup.vue +43 -43
- package/src/plugins/components/BSRadio.vue +97 -97
- package/src/plugins/components/BSSearch.vue +109 -109
- package/src/plugins/components/BSSelect.vue +144 -144
- package/src/plugins/components/BSSign.vue +454 -454
- package/src/plugins/components/BSStepper.vue +115 -115
- package/src/plugins/components/BSUpload.vue +92 -92
- package/src/plugins/components/BSUpload2.vue +397 -397
- package/src/plugins/components/BSVerCode.vue +128 -128
- package/src/plugins/components/BSViewer.vue +92 -92
- package/src/plugins/components/base.js +496 -496
- package/src/plugins/components/base2.js +489 -489
- package/src/plugins/lib/weixin.js +20 -20
- package/src/plugins/platform/index.js +7 -7
- package/src/plugins/platform/isp_phone.js +310 -310
- package/src/plugins/plugins/README.md +560 -0
- package/src/plugins/plugins/browserUtils.js +925 -0
- package/src/plugins/plugins/components/imageCropper.vue +299 -0
- package/src/plugins/plugins/components/images/bz.png +0 -0
- package/src/plugins/plugins/components/images/correct.png +0 -0
- package/src/plugins/plugins/components/images/error.png +0 -0
- package/src/plugins/plugins/components/images/mohu.png +0 -0
- package/src/plugins/plugins/components/images/qs.png +0 -0
- package/src/plugins/plugins/components/images/zd.png +0 -0
- package/src/plugins/plugins/components/pdfPreview.vue +688 -0
- package/src/plugins/plugins/demo.vue +832 -0
- package/src/plugins/plugins/native-js-sdk.js +360 -0
- package/src/plugins/plugins/nativeUtils.js +1444 -0
- package/src/plugins/route/index.js +140 -140
- package/src/plugins/selector/index.js +342 -342
- package/src/plugins/service/index.js +81 -81
- package/src/plugins/services/callCamera.js +53 -53
- package/src/plugins/services/exit.js +37 -36
- package/src/plugins/services/face.js +69 -69
- package/src/plugins/services/faceH5.js +54 -54
- package/src/plugins/services/faceInApp.js +31 -31
- package/src/plugins/services/faceTx.js +61 -61
- package/src/plugins/services/getFaceResult.js +104 -104
- package/src/plugins/services/getH5FaceResult.js +62 -62
- package/src/plugins/services/getMenus.js +40 -40
- package/src/plugins/services/getSystemData.js +144 -128
- package/src/plugins/services/getToken.js +93 -79
- package/src/plugins/services/getTxFaceResult.js +83 -83
- package/src/plugins/services/getUserInfo.js +47 -47
- package/src/plugins/services/goSetPage.js +40 -40
- package/src/plugins/services/hideFhoneTitle.js +36 -36
- package/src/plugins/services/index.js +45 -45
- package/src/plugins/services/init.js +35 -35
- package/src/plugins/services/jumpView.js +42 -40
- package/src/plugins/services/logout.js +44 -43
- package/src/plugins/services/share.js +113 -113
- package/src/plugins/services/statusBarHeight.js +39 -39
- package/src/plugins/session/index.js +32 -32
- package/src/services/getAuthInfo.js +22 -22
- package/src/services/index.js +9 -9
- package/src/services/sendVerCode.js +23 -23
- package/src/views/auth.vue +367 -367
- package/src/views/auth2.vue +90 -90
- package/src/views/auth3.vue +157 -157
- package/src/views/auth4.vue +8979 -8979
- package/src/views/auth5.vue +50 -50
- package/src/views/authh5.vue +369 -369
- package/src/views/components/BankSelect.vue +55 -55
- package/src/views/foot.vue +140 -140
- package/src/views/page.vue +222 -222
- package/src/views/shellFunc.vue +41 -41
- package/themes/basic.css +1 -1
- package/webpack.config.js +144 -144
- package/fstarter.iml +0 -9
|
@@ -1,128 +1,144 @@
|
|
|
1
|
-
import ak from '../assets/ak.js'
|
|
2
|
-
import isp_phone from '../platform/isp_phone.js'
|
|
3
|
-
import session from '../session'
|
|
4
|
-
import {ua} from '../assets/ua.js'
|
|
5
|
-
import config from '../assets/config.js'
|
|
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
|
-
let
|
|
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
|
-
isp_phone.
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
1
|
+
import ak from '../assets/ak.js'
|
|
2
|
+
import isp_phone from '../platform/isp_phone.js'
|
|
3
|
+
import session from '../session'
|
|
4
|
+
import {ua} from '../assets/ua.js'
|
|
5
|
+
import config from '../assets/config.js'
|
|
6
|
+
import nativeUtils from '../plugins/nativeUtils'
|
|
7
|
+
|
|
8
|
+
var service = {
|
|
9
|
+
|
|
10
|
+
getData(){
|
|
11
|
+
return {}
|
|
12
|
+
},
|
|
13
|
+
invoke(params){
|
|
14
|
+
if(ua.isIspPhone){
|
|
15
|
+
return this.invoke2_isp(params)
|
|
16
|
+
}else if(ua.microMsg){
|
|
17
|
+
return this.invoke2_microMsg(params)
|
|
18
|
+
}else{
|
|
19
|
+
return this.invoke2_browser(params)
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
invoke2_isp(params){
|
|
23
|
+
return nativeUtils.getDeviceInfo().then(data => {
|
|
24
|
+
return {
|
|
25
|
+
model: data.model,
|
|
26
|
+
systemType: data.osName,
|
|
27
|
+
version: data.appVersion,
|
|
28
|
+
brand: data.brand,
|
|
29
|
+
chancel: data.model,
|
|
30
|
+
isp: data.isp,
|
|
31
|
+
startTime: data.StartTime,
|
|
32
|
+
timeZone: data.timezone,
|
|
33
|
+
uuid: data.deviceId,
|
|
34
|
+
packageInfo: data.packageInfo,
|
|
35
|
+
ip:data.ip
|
|
36
|
+
}
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
// if(!ak.utils.isEmpty(isp_phone.data.GET_PHONE_INFO)){
|
|
40
|
+
// let data = isp_phone.data.GET_PHONE_INFO.nativeData
|
|
41
|
+
// return Promise.resolve({
|
|
42
|
+
// model:data.model,
|
|
43
|
+
// systemType:data.systemType,
|
|
44
|
+
// version:data.version,
|
|
45
|
+
// brand:data.brand,
|
|
46
|
+
// chancel:data.chancel,
|
|
47
|
+
// isp:data.isp,
|
|
48
|
+
// startTime:data.startTime,
|
|
49
|
+
// timeZone: data.timeZone,
|
|
50
|
+
// uuid: data.uuid,
|
|
51
|
+
// packageInfo: data.packageInfo,
|
|
52
|
+
// loginName: data.loginName,
|
|
53
|
+
// ip:data.ip
|
|
54
|
+
// })
|
|
55
|
+
// }
|
|
56
|
+
|
|
57
|
+
// isp_phone.callShell('GET_PHONE_INFO', null, null)
|
|
58
|
+
// let self = this
|
|
59
|
+
// var p = new Promise(function(resolve, reject){
|
|
60
|
+
// self.onWait(self,resolve)
|
|
61
|
+
// });
|
|
62
|
+
|
|
63
|
+
// return p;
|
|
64
|
+
|
|
65
|
+
},
|
|
66
|
+
invoke2_microMsg(params){
|
|
67
|
+
if(ak.utils.isEmpty(session.sys.uuid))
|
|
68
|
+
session.sys.uuid = ak.utils.guid2()
|
|
69
|
+
|
|
70
|
+
if(ak.utils.isEmpty(session.sys.startTime))
|
|
71
|
+
session.sys.startTime = Date.parse(new Date())
|
|
72
|
+
console.log(navigator)
|
|
73
|
+
let connection = navigator.connection || navigator.mozConnection || navigator.webkitConnection || { type:'unknown' }
|
|
74
|
+
let offset = (new Date()).getTimezoneOffset() / 60
|
|
75
|
+
return Promise.resolve({
|
|
76
|
+
model:'NULL',
|
|
77
|
+
systemType:'microMsg',
|
|
78
|
+
version:'NULL',
|
|
79
|
+
brand:'NULL',
|
|
80
|
+
chancel:'NULL',
|
|
81
|
+
isp: `${connection.type || connection.effectiveType}`,
|
|
82
|
+
startTime:session.sys.startTime,
|
|
83
|
+
timeZone: offset,
|
|
84
|
+
uuid: session.sys.uuid,
|
|
85
|
+
packageInfo: config.sys.id + '-1.9.1',
|
|
86
|
+
loginName: session.userInfo.userId,
|
|
87
|
+
ip:'0.0.0.0'
|
|
88
|
+
})
|
|
89
|
+
|
|
90
|
+
},
|
|
91
|
+
invoke2_browser(params){
|
|
92
|
+
if(ak.utils.isEmpty(session.sys.uuid))
|
|
93
|
+
session.sys.uuid = ak.utils.guid2()
|
|
94
|
+
|
|
95
|
+
if(ak.utils.isEmpty(session.sys.startTime))
|
|
96
|
+
session.sys.startTime = Date.parse(new Date())
|
|
97
|
+
console.log(navigator)
|
|
98
|
+
let connection = navigator.connection || navigator.mozConnection || navigator.webkitConnection || { type:'unknown' }
|
|
99
|
+
let offset = (new Date()).getTimezoneOffset() / 60
|
|
100
|
+
return Promise.resolve({
|
|
101
|
+
model:'NULL',
|
|
102
|
+
systemType:'microMsg',
|
|
103
|
+
version:'NULL',
|
|
104
|
+
brand:'NULL',
|
|
105
|
+
chancel:'NULL',
|
|
106
|
+
isp: `${connection.type || connection.effectiveType}`,
|
|
107
|
+
startTime:session.sys.startTime,
|
|
108
|
+
timeZone: offset,
|
|
109
|
+
uuid: session.sys.uuid,
|
|
110
|
+
packageInfo: config.sys.id + '-1.9.1',
|
|
111
|
+
loginName: session.userInfo.userId,
|
|
112
|
+
ip:'0.0.0.0'
|
|
113
|
+
})
|
|
114
|
+
|
|
115
|
+
},
|
|
116
|
+
onWait(self,resolve){
|
|
117
|
+
|
|
118
|
+
if(isp_phone.status.GET_PHONE_INFO >= 10){
|
|
119
|
+
isp_phone.status.GET_PHONE_INFO = 0
|
|
120
|
+
let data = isp_phone.data.GET_PHONE_INFO.nativeData
|
|
121
|
+
resolve({
|
|
122
|
+
model:data.model,
|
|
123
|
+
systemType:data.systemType,
|
|
124
|
+
version:data.version,
|
|
125
|
+
brand:data.brand,
|
|
126
|
+
chancel:data.chancel,
|
|
127
|
+
isp:data.isp,
|
|
128
|
+
startTime:data.startTime,
|
|
129
|
+
timeZone: data.timeZone,
|
|
130
|
+
uuid: data.uuid,
|
|
131
|
+
packageInfo: data.packageInfo,
|
|
132
|
+
loginName: data.loginName,
|
|
133
|
+
ip:data.ip
|
|
134
|
+
})
|
|
135
|
+
}else{
|
|
136
|
+
isp_phone.status.GET_PHONE_INFO++
|
|
137
|
+
setTimeout(function(){self.onWait(self,resolve)}, 500);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export default service;
|
|
@@ -1,79 +1,93 @@
|
|
|
1
|
-
import ak from '../assets/ak.js'
|
|
2
|
-
import isp_phone from '../platform/isp_phone.js'
|
|
3
|
-
import {ua} from '../assets/ua.js'
|
|
4
|
-
import session from "../session";
|
|
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
|
-
return
|
|
31
|
-
'token':
|
|
32
|
-
'type':'Basic'
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
isp_phone.
|
|
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
|
-
|
|
1
|
+
import ak from '../assets/ak.js'
|
|
2
|
+
import isp_phone from '../platform/isp_phone.js'
|
|
3
|
+
import {ua} from '../assets/ua.js'
|
|
4
|
+
import session from "../session";
|
|
5
|
+
import nativeUtils from '../plugins/nativeUtils'
|
|
6
|
+
|
|
7
|
+
var service = {
|
|
8
|
+
|
|
9
|
+
getData(){
|
|
10
|
+
return {}
|
|
11
|
+
},
|
|
12
|
+
invoke(params){
|
|
13
|
+
|
|
14
|
+
if(ua.isIspPhone){
|
|
15
|
+
return this.invoke2_isp(params)
|
|
16
|
+
}else if(ua.microMsg){
|
|
17
|
+
return this.invoke2_microMsg(params)
|
|
18
|
+
}else{
|
|
19
|
+
// return Promise.resolve()
|
|
20
|
+
return Promise.resolve({
|
|
21
|
+
'token': sessionStorage.getItem('token'),
|
|
22
|
+
'type':'Basic',
|
|
23
|
+
'loginId': 'NULL'
|
|
24
|
+
})
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
},
|
|
28
|
+
invoke2_isp(params){
|
|
29
|
+
return nativeUtils.getUserInfo().then(res => {
|
|
30
|
+
return {
|
|
31
|
+
'token': res.token,
|
|
32
|
+
'type':'Basic',
|
|
33
|
+
'loginId': res.userId
|
|
34
|
+
}
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
// if(!ak.utils.isEmpty(isp_phone.data.GET_TOKEN)){
|
|
38
|
+
// let data = isp_phone.data.GET_TOKEN.nativeData
|
|
39
|
+
|
|
40
|
+
// if(session.sys.isLogined == ak.utils.isEmpty(data.token))
|
|
41
|
+
// session.sys.isLogined = !ak.utils.isEmpty(data.token)
|
|
42
|
+
|
|
43
|
+
// return Promise.resolve({
|
|
44
|
+
// 'token':data.token,
|
|
45
|
+
// 'type':'Basic'
|
|
46
|
+
// })
|
|
47
|
+
// }
|
|
48
|
+
|
|
49
|
+
// let self = this
|
|
50
|
+
// isp_phone.callShell('GET_TOKEN', null, null)
|
|
51
|
+
// var p = new Promise(function(resolve, reject){
|
|
52
|
+
// self.onWait(self,resolve)
|
|
53
|
+
// })
|
|
54
|
+
// return p
|
|
55
|
+
},
|
|
56
|
+
invoke2_microMsg(params){
|
|
57
|
+
|
|
58
|
+
const tokenKey = 'wxjtl'
|
|
59
|
+
let token = ak.http.getCookie2(tokenKey)
|
|
60
|
+
|
|
61
|
+
if(session.sys.isLogined == ak.utils.isEmpty(token))
|
|
62
|
+
session.sys.isLogined = !ak.utils.isEmpty(token)
|
|
63
|
+
|
|
64
|
+
return Promise.resolve({
|
|
65
|
+
'token': token,
|
|
66
|
+
'type':'Inner',
|
|
67
|
+
'loginId': 'NULL'
|
|
68
|
+
})
|
|
69
|
+
|
|
70
|
+
},
|
|
71
|
+
onWait(self,resolve){
|
|
72
|
+
|
|
73
|
+
if(isp_phone.status.GET_TOKEN >= 10){
|
|
74
|
+
isp_phone.status.GET_TOKEN = 0
|
|
75
|
+
let data = isp_phone.data.GET_TOKEN.nativeData
|
|
76
|
+
|
|
77
|
+
if(session.sys.isLogined == ak.utils.isEmpty(data.token))
|
|
78
|
+
session.sys.isLogined = !ak.utils.isEmpty(data.token)
|
|
79
|
+
|
|
80
|
+
return resolve({
|
|
81
|
+
'token':data.token,
|
|
82
|
+
'type':'Basic'
|
|
83
|
+
})
|
|
84
|
+
|
|
85
|
+
}else{
|
|
86
|
+
isp_phone.status.GET_TOKEN++
|
|
87
|
+
setTimeout(function(){self.onWait(self,resolve)}, 500);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export default service;
|
|
@@ -1,83 +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;
|
|
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;
|