|
@ -41,8 +41,8 @@ |
|
|
export default { |
|
|
export default { |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
cnt:this.$t('index').Confirm, |
|
|
cnt: this.$t('index').Confirm, |
|
|
can:this.$t('index').Cancel, |
|
|
can: this.$t('index').Cancel, |
|
|
checked: false, |
|
|
checked: false, |
|
|
show: false, |
|
|
show: false, |
|
|
showFinger: false, |
|
|
showFinger: false, |
|
@ -78,8 +78,8 @@ |
|
|
}) |
|
|
}) |
|
|
console.log(123456465) |
|
|
console.log(123456465) |
|
|
}, |
|
|
}, |
|
|
confirm(e){ |
|
|
confirm(e) { |
|
|
uni.setStorageSync('lang',e[0].value) |
|
|
uni.setStorageSync('lang', e[0].value) |
|
|
|
|
|
|
|
|
if (e[0].value == 'c') { |
|
|
if (e[0].value == 'c') { |
|
|
this._i18n.locale = 'en' |
|
|
this._i18n.locale = 'en' |
|
@ -87,7 +87,7 @@ |
|
|
uni.setStorageSync('langTrue', 'English') |
|
|
uni.setStorageSync('langTrue', 'English') |
|
|
uni.setStorageSync("language", 'en') |
|
|
uni.setStorageSync("language", 'en') |
|
|
uni.redirectTo({ |
|
|
uni.redirectTo({ |
|
|
url:'/pages/fingerPage/index' |
|
|
url: '/pages/fingerPage/index' |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
} else if (e[0].value == 'a') { |
|
|
} else if (e[0].value == 'a') { |
|
@ -96,21 +96,21 @@ |
|
|
uni.setStorageSync("language", 'zh-CN') |
|
|
uni.setStorageSync("language", 'zh-CN') |
|
|
uni.setStorageSync('langTrue', '简体中文') |
|
|
uni.setStorageSync('langTrue', '简体中文') |
|
|
uni.redirectTo({ |
|
|
uni.redirectTo({ |
|
|
url:'/pages/fingerPage/index' |
|
|
url: '/pages/fingerPage/index' |
|
|
}) |
|
|
}) |
|
|
} else if (e[0].value == 'b'){ |
|
|
} else if (e[0].value == 'b') { |
|
|
this._i18n.locale = 'zh-CNF' |
|
|
this._i18n.locale = 'zh-CNF' |
|
|
this.$store.commit('setLanguage', 'zh-CNF') |
|
|
this.$store.commit('setLanguage', 'zh-CNF') |
|
|
uni.setStorageSync("language", 'zh-CNF') |
|
|
uni.setStorageSync("language", 'zh-CNF') |
|
|
uni.setStorageSync('langTrue', '繁體中文') |
|
|
uni.setStorageSync('langTrue', '繁體中文') |
|
|
uni.redirectTo({ |
|
|
uni.redirectTo({ |
|
|
url:'/pages/fingerPage/index' |
|
|
url: '/pages/fingerPage/index' |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
goFinger(){ |
|
|
goFinger() { |
|
|
this.showFinger=true; |
|
|
this.showFinger = true; |
|
|
this.show=true; |
|
|
this.show = true; |
|
|
this.fingerPass() |
|
|
this.fingerPass() |
|
|
}, |
|
|
}, |
|
|
// 依旧保留指纹 |
|
|
// 依旧保留指纹 |
|
@ -138,7 +138,7 @@ |
|
|
printCancel() { |
|
|
printCancel() { |
|
|
this.show = false; |
|
|
this.show = false; |
|
|
this.showFinger = false |
|
|
this.showFinger = false |
|
|
console.log(this.showFinger,777777777777) |
|
|
console.log(this.showFinger, 777777777777) |
|
|
plus.fingerprint.cancel(); |
|
|
plus.fingerprint.cancel(); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -203,7 +203,7 @@ |
|
|
that.fingerSuccess = true; |
|
|
that.fingerSuccess = true; |
|
|
that.show = false; |
|
|
that.show = false; |
|
|
uni.reLaunch({ |
|
|
uni.reLaunch({ |
|
|
url:'/pages/menu/wallet/index' |
|
|
url: '/pages/menu/wallet/index' |
|
|
}) |
|
|
}) |
|
|
}, function(e) { |
|
|
}, function(e) { |
|
|
// 指纹识别失败后的各种情况 |
|
|
// 指纹识别失败后的各种情况 |
|
@ -211,35 +211,35 @@ |
|
|
case e.AUTHENTICATE_MISMATCH: |
|
|
case e.AUTHENTICATE_MISMATCH: |
|
|
plus.nativeUI.toast(that.$t('index').Fingerprintmatchingfailed); |
|
|
plus.nativeUI.toast(that.$t('index').Fingerprintmatchingfailed); |
|
|
// uni.setStorageSync('fingerPass',false) |
|
|
// uni.setStorageSync('fingerPass',false) |
|
|
that.showFinger=false; |
|
|
that.showFinger = false; |
|
|
that.fingerFail=true; |
|
|
that.fingerFail = true; |
|
|
that.checked=false |
|
|
that.checked = false |
|
|
that.show=false; |
|
|
that.show = false; |
|
|
break; |
|
|
break; |
|
|
case e.AUTHENTICATE_OVERLIMIT: |
|
|
case e.AUTHENTICATE_OVERLIMIT: |
|
|
plus.nativeUI.closeWaiting(); //兼容Android平台关闭等待框 |
|
|
plus.nativeUI.closeWaiting(); //兼容Android平台关闭等待框 |
|
|
plus.nativeUI.alert(that.$t('index').Thenumberoffingerprint); |
|
|
plus.nativeUI.alert(that.$t('index').Thenumberoffingerprint); |
|
|
// uni.setStorageSync('fingerPass',false) |
|
|
// uni.setStorageSync('fingerPass',false) |
|
|
that.showFinger=false; |
|
|
that.showFinger = false; |
|
|
that.fingerFail=true; |
|
|
that.fingerFail = true; |
|
|
that.checked=false |
|
|
that.checked = false |
|
|
that.show=false; |
|
|
that.show = false; |
|
|
break; |
|
|
break; |
|
|
case e.CANCEL: |
|
|
case e.CANCEL: |
|
|
plus.nativeUI.toast(that.$t('index').Recognitioncancelled); |
|
|
plus.nativeUI.toast(that.$t('index').Recognitioncancelled); |
|
|
// uni.setStorageSync('fingerPass',false) |
|
|
// uni.setStorageSync('fingerPass',false) |
|
|
that.showFinger=false; |
|
|
that.showFinger = false; |
|
|
that.checked=false |
|
|
that.checked = false |
|
|
that.fingerFail=true; |
|
|
that.fingerFail = true; |
|
|
that.show=false; |
|
|
that.show = false; |
|
|
break; |
|
|
break; |
|
|
default: |
|
|
default: |
|
|
plus.nativeUI.closeWaiting(); //兼容Android平台关闭等待框 |
|
|
plus.nativeUI.closeWaiting(); //兼容Android平台关闭等待框 |
|
|
// uni.setStorageSync('fingerPass',false) |
|
|
// uni.setStorageSync('fingerPass',false) |
|
|
that.showFinger=false; |
|
|
that.showFinger = false; |
|
|
that.checked=false |
|
|
that.checked = false |
|
|
that.show=false; |
|
|
that.show = false; |
|
|
that.fingerFail=true; |
|
|
that.fingerFail = true; |
|
|
plus.nativeUI.alert(that.$t('index').Fingerprintidentificationfailed); |
|
|
plus.nativeUI.alert(that.$t('index').Fingerprintidentificationfailed); |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
@ -262,11 +262,32 @@ |
|
|
}, |
|
|
}, |
|
|
onLoad() { |
|
|
onLoad() { |
|
|
// 每次进来拿缓存里有没有指纹 |
|
|
// 每次进来拿缓存里有没有指纹 |
|
|
|
|
|
let fingerPass=uni.getStorageSync('fingerPass'); |
|
|
|
|
|
console.log(fingerPass,"fingerPass") |
|
|
if (uni.getStorageSync('fingerPass')) { |
|
|
if (uni.getStorageSync('fingerPass')) { |
|
|
this.showFinger=true; |
|
|
this.showFinger = true; |
|
|
this.show=true; |
|
|
this.show = true; |
|
|
this.fingerPass() |
|
|
this.fingerPass() |
|
|
} |
|
|
} |
|
|
|
|
|
let walletInfo= uni.getStorageSync('walletInfo'); |
|
|
|
|
|
if (!walletInfo || walletInfo == '') { |
|
|
|
|
|
|
|
|
|
|
|
uni.reLaunch({ |
|
|
|
|
|
url: '/pages/register/index' |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
// #ifdef APP-PLUS |
|
|
|
|
|
// 指纹 |
|
|
|
|
|
if (!uni.getStorageSync('fingerPass')) { |
|
|
|
|
|
uni.reLaunch({ |
|
|
|
|
|
url: '/pages/fingerPage/password/index' |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
// #endif |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|