fstarter 2.11.3 → 2.11.4
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
CHANGED
|
@@ -46,7 +46,7 @@ if(isProductionEnvironment()){
|
|
|
46
46
|
faceResultUrl = 'https://bcs.ihasl.com/api/v1/bcs/face/faceResultQuery'
|
|
47
47
|
appid = 'wx751d925fbededc73' // 回调安全域名 wx.ihasl
|
|
48
48
|
tokenKey = '6297391dca6d4090ae60959acb73cda1'
|
|
49
|
-
loginUrl = 'https://www.ihasl.com/pages/
|
|
49
|
+
loginUrl = 'https://www.ihasl.com/pages/app2-hasl/#/login'
|
|
50
50
|
} else {
|
|
51
51
|
console.log('测试环境')
|
|
52
52
|
auth = 0
|
|
@@ -55,9 +55,7 @@ if(isProductionEnvironment()){
|
|
|
55
55
|
faceResultUrl = 'https://testbcs.ihasl.com/api/v1/bcs/face/faceResultQuery'
|
|
56
56
|
appid = 'wx38c646900b5b7ec0' // 回调安全域名 teststatic.com
|
|
57
57
|
tokenKey = '814a0b7eb0f82e02246da5e098b6e2b5'
|
|
58
|
-
loginUrl = 'https://teststatic.ihasl.com/pages/
|
|
59
|
-
// 本地的
|
|
60
|
-
// loginUrl = 'http://172.20.10.2:8080/#/login'
|
|
58
|
+
loginUrl = 'https://teststatic.ihasl.com/pages/app2-hasl/#/login'
|
|
61
59
|
}
|
|
62
60
|
console.log(appid, 'appid')
|
|
63
61
|
|
|
@@ -1175,19 +1173,26 @@ nFqBB1zM586NpO+4hua/1Ol5OiqoQJ4iQinyDiA=
|
|
|
1175
1173
|
});
|
|
1176
1174
|
document.getElementById('cancelBtn').addEventListener('click', () => {
|
|
1177
1175
|
nativeUtils.closeDialog();
|
|
1178
|
-
nativeUtils._takePictureReject
|
|
1176
|
+
if (nativeUtils._takePictureReject) {
|
|
1177
|
+
nativeUtils._takePictureReject(new Error('用户取消了操作'));
|
|
1178
|
+
}
|
|
1179
|
+
});
|
|
1180
|
+
|
|
1181
|
+
// 添加点击背景关闭弹窗的功能
|
|
1182
|
+
const cameraDialog = dialog.querySelector('.camera-dialog');
|
|
1183
|
+
cameraDialog.addEventListener('click', function (e) {
|
|
1184
|
+
if (e.target === cameraDialog) {
|
|
1185
|
+
// 点击背景时也视为取消操作
|
|
1186
|
+
nativeUtils.closeDialog();
|
|
1187
|
+
if (nativeUtils._takePictureReject) {
|
|
1188
|
+
nativeUtils._takePictureReject(new Error('用户取消了操作'));
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1179
1191
|
});
|
|
1180
1192
|
}, 0);
|
|
1181
1193
|
|
|
1182
1194
|
// 添加到文档
|
|
1183
1195
|
document.body.appendChild(dialog);
|
|
1184
|
-
|
|
1185
|
-
// 添加事件监听器,点击背景关闭弹窗
|
|
1186
|
-
dialog.addEventListener('click', function (e) {
|
|
1187
|
-
if (e.target.classList.contains('camera-dialog')) {
|
|
1188
|
-
this.closeDialog();
|
|
1189
|
-
}
|
|
1190
|
-
});
|
|
1191
1196
|
},
|
|
1192
1197
|
// 关闭弹窗
|
|
1193
1198
|
closeDialog() {
|
|
@@ -1209,6 +1214,13 @@ nFqBB1zM586NpO+4hua/1Ol5OiqoQJ4iQinyDiA=
|
|
|
1209
1214
|
document.body.removeChild(dialog);
|
|
1210
1215
|
}, 300);
|
|
1211
1216
|
}
|
|
1217
|
+
|
|
1218
|
+
// 在关闭弹窗时也要触发reject,防止Promise悬挂
|
|
1219
|
+
if (nativeUtils._takePictureReject) {
|
|
1220
|
+
nativeUtils._takePictureReject(new Error('用户取消了操作'));
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
// 清理全局引用
|
|
1212
1224
|
delete nativeUtils._takePictureResolve;
|
|
1213
1225
|
delete nativeUtils._takePictureReject;
|
|
1214
1226
|
},
|