|
|
@@ -58,16 +58,17 @@
|
|
|
}
|
|
|
|
|
|
this.isAndroid = /(Android)/i.test(navigator.userAgent)
|
|
|
+ this.isiOS = /(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)
|
|
|
const that = this;
|
|
|
this.phone = location.href.split('?')[1].split('&')[0].split('=')[1];
|
|
|
- this.isiOS = location.href.split('?')[1].split('&')[1] ? location.href.split('?')[1].split('&')[1].split('=')[1] : false;
|
|
|
this.number = this.phone.substring(0, 3) + ' ' + this.phone.substring(3, 7) + ' ' + this.phone.substring(7, 11);
|
|
|
this.TencentCaptcha = new window.TencentCaptcha(
|
|
|
getAppId('development'),
|
|
|
function (res) {/* callback */
|
|
|
- if (that.isiOS === '1') {
|
|
|
+ if (that.isiOS) {
|
|
|
window.webkit.messageHandlers.returnVerificationCode.postMessage(res.ret.toString());
|
|
|
- } else {
|
|
|
+ }
|
|
|
+ if (that.isAndroid) {
|
|
|
window.hap.verificationCode(res.ret.toString());
|
|
|
}
|
|
|
if (res.ret === 0) {
|