|
|
@ -1,5 +1,5 @@ |
|
|
|
<template> |
|
|
|
<view class=""> |
|
|
|
<view class="rela"> |
|
|
|
<navigation :showBack="true" :bgnum="true"> |
|
|
|
Settings |
|
|
|
</navigation> |
|
|
@ -44,9 +44,10 @@ |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
<u-mask z-index="10" :show="show"></u-mask> |
|
|
|
<view class="zhiwen_con" v-if="showFinger"> |
|
|
|
<!-- <view class="zhiwen_con" > |
|
|
|
<view class="tiao" @click="cancel"> |
|
|
|
</view> |
|
|
|
<view class="bigtitle"> |
|
|
@ -59,53 +60,34 @@ |
|
|
|
</view> |
|
|
|
<view class="flex con"> |
|
|
|
|
|
|
|
<view class="textt2" @click="cancel"> |
|
|
|
<view class="textt2"> |
|
|
|
Cancel |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="zhiwen_con" v-if="fingerFail"> |
|
|
|
<view class="tiao"> |
|
|
|
</view> |
|
|
|
<view class="bigtitle"> |
|
|
|
Fingerprint password |
|
|
|
</view> |
|
|
|
<view class="bottom_con"> |
|
|
|
<image src="../../../static/tongyonh/alert-circle.png" mode="aspectFit" class="img1"></image> |
|
|
|
<view class="text1 red"> |
|
|
|
Fingerprint not recognized. <br><text @click="fingerPass('try')">Try again.</text> |
|
|
|
</view> |
|
|
|
<view class="flex con"> |
|
|
|
<view class="textt2" @click="cancelFail"> |
|
|
|
Cancel |
|
|
|
</view> |
|
|
|
</view> --> |
|
|
|
<view class="hou_jia" v-if="showFinger"> |
|
|
|
<view class="Log"> |
|
|
|
Log in |
|
|
|
</view> |
|
|
|
<image src="../../../static/tongyonh/zww.png" mode="aspectFit" class="zzw"></image> |
|
|
|
<view class="Log" @click="cancel"> |
|
|
|
Cancel |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="zhiwen_con" v-if="fingerSuccess"> |
|
|
|
<view class="tiao" @click="cancelSucc"> |
|
|
|
</view> |
|
|
|
<view class="bigtitle"> |
|
|
|
Fingerprint password |
|
|
|
</view> |
|
|
|
<view class="bottom_con"> |
|
|
|
<image src="../../../static/tongyonh/x-circle.png" mode="aspectFit" class="img1"></image> |
|
|
|
<view class="text1 green"> |
|
|
|
Fingerprint recognized. |
|
|
|
</view> |
|
|
|
<view class="flex con"> |
|
|
|
<view class="textt2" @click="cancelSucc"> |
|
|
|
Confirm |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="hou_jia hou_jia_w" v-if="hou_jia_w"> |
|
|
|
<view class="fontt"> |
|
|
|
Confirm close validation? |
|
|
|
</view> |
|
|
|
<view class="ccon"> |
|
|
|
<view class="cancle" @click="cancel_hou"> |
|
|
|
Cancel |
|
|
|
</view> |
|
|
|
<view class="" @click="confirm_hou"> |
|
|
|
Confirm |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
</template> |
|
|
@ -115,14 +97,33 @@ |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
|
|
|
|
checked: false, |
|
|
|
show:false, |
|
|
|
showFinger:false, |
|
|
|
fingerSuccess:false, |
|
|
|
fingerFail:false, |
|
|
|
hou_jia_w:false, |
|
|
|
}; |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
cancel_hou(){ |
|
|
|
this.hou_jia_w=false; |
|
|
|
this.show=false; |
|
|
|
this.checked=true; |
|
|
|
}, |
|
|
|
confirm_hou(){ |
|
|
|
this.checked=false |
|
|
|
this.hou_jia_w=false; |
|
|
|
this.show=false; |
|
|
|
uni.setStorageSync('fingerPass',false) |
|
|
|
}, |
|
|
|
confirm() { |
|
|
|
setTimeout(() => { |
|
|
|
// 3秒后自动关闭 |
|
|
|
this.show23 = false; |
|
|
|
}, 3000) |
|
|
|
}, |
|
|
|
cancel(){ |
|
|
|
this.showFinger=false; |
|
|
|
this.checked=false; |
|
|
@ -137,22 +138,26 @@ |
|
|
|
this.fingerFail=false |
|
|
|
this.show=false; |
|
|
|
}, |
|
|
|
fingerPass(test){ |
|
|
|
fingerPass(){ |
|
|
|
console.log(this.checked) |
|
|
|
if(this.checked||test=='try'){ |
|
|
|
// 如果是启动的就调指纹 |
|
|
|
if(this.checked){ |
|
|
|
console.log(111) |
|
|
|
this.show=true; |
|
|
|
this.showFinger=true; |
|
|
|
this.showModal() |
|
|
|
this.fingerprint(true); |
|
|
|
} |
|
|
|
|
|
|
|
// 如果是关闭的就存false,转账页面出现使用密码 |
|
|
|
if(!this.checked){ |
|
|
|
uni.setStorageSync('fingerPass',false) |
|
|
|
|
|
|
|
this.show=true |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
fingerprint: function(sett) { |
|
|
|
let bltype=true; |
|
|
|
// 进来先判断本机有没有指纹 |
|
|
|
// #ifdef APP-PLUS |
|
|
|
if (!plus.fingerprint.isSupport()) { |
|
|
|
uni.showToast({ |
|
|
@ -194,22 +199,20 @@ |
|
|
|
}) |
|
|
|
// #endif |
|
|
|
|
|
|
|
// 进来先判断本机有没有指纹 |
|
|
|
|
|
|
|
let that=this; |
|
|
|
// #ifdef APP-PLUS |
|
|
|
plus.fingerprint.authenticate(function() { |
|
|
|
plus.nativeUI.closeWaiting(); //兼容Android平台关闭等待框 |
|
|
|
// uni.showToast({ |
|
|
|
// title: 'Fingerprint identification succeeded', |
|
|
|
// icon: 'none', |
|
|
|
// duration: 1500, |
|
|
|
// }) |
|
|
|
// 指纹验证成功后走这里 |
|
|
|
// 存储设置里开启指纹后的状态,隐藏使用密码 |
|
|
|
|
|
|
|
uni.setStorageSync('fingerPass',true) |
|
|
|
console.log(that.showFinger,454545) |
|
|
|
that.showFinger=false; |
|
|
|
that.fingerSuccess=true; |
|
|
|
that.show=false; |
|
|
|
console.log(that.showFinger,454545) |
|
|
|
}, function(e) { |
|
|
|
switch (e.code) { |
|
|
|