Browse Source

密码

master
vee 4 years ago
parent
commit
5d112d1516
  1. 20
      App.vue
  2. 13
      pages.json
  3. 331
      pages/fingerPage/index.vue
  4. 168
      pages/fingerPage/password/index.css
  5. 80
      pages/fingerPage/password/index.vue
  6. 61
      pages/index.vue
  7. BIN
      static/tongyonh/Load_v3.png
  8. 10742
      unpackage/dist/dev/app-plus/app-service.js
  9. 21370
      unpackage/dist/dev/app-plus/app-view.js
  10. 0
      unpackage/dist/dev/app-plus/static/img/copy_24px_outlined.e8932d3c.svg
  11. 0
      unpackage/dist/dev/app-plus/static/img/more_vert_24px_outlined.427f4df0.svg
  12. BIN
      unpackage/dist/dev/app-plus/static/tongyonh/_plus.png
  13. BIN
      unpackage/dist/dev/app-plus/static/tongyonh/bigFing.png

20
App.vue

@ -20,23 +20,15 @@
// #ifdef APP-PLUS
this.appVersion()
this.getIp();
console.log('App Launch')
// #endif
//
// if(uni.getStorageSync('fingerPass')){
// uni.reLaunch({
// url:'/pages/fingerPage/index'
// })
// }else{
// uni.reLaunch({
// url:'/pages/register/index'
// })
// }
},
onShow: function() {
console.log('App Show')

13
pages.json

@ -3,6 +3,13 @@
"^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
},
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/register/index",
"style": {
@ -16,6 +23,12 @@
"navigationStyle": "custom"
}
},
{
"path": "pages/fingerPage/password/index",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/menu/helpCenter/index",
"style": {

331
pages/fingerPage/index.vue

@ -1,20 +1,20 @@
<template>
<view class="rela">
<view class="main">
<image src="../../static/tongyonh/Group285.png" mode="aspectFit" class="logo"></image>
<view class="fingcon">
<image src="../../static/tongyonh/zhiwen.png" mode="aspectFit" class="finimg" @click="goFinger"></image>
<view class="te1">
Click to verify fingerprint
</view>
</view>
<view class="passTex">
Login with wallet password
</view>
<image src="../../static/tongyonh/Group285.png" mode="aspectFit" class="logo"></image>
<view class="fingcon">
<image src="../../static/tongyonh/zhiwen.png" mode="aspectFit" class="finimg" @click="goFinger"></image>
<view class="te1">
Click to verify fingerprint
</view>
</view>
<view class="passTex" @click="gopwd">
Login with wallet password
</view>
</view>
<u-mask z-index="10" :show="show"></u-mask>
<view class="hou_jia" v-if="showFinger">
<view class="Log">
<!-- {{i18n.Login}} -->
@ -44,163 +44,170 @@
};
},
methods: {
goFinger(){
this.showFinger=true;
this.show=true;
gopwd() {
uni.navigateTo({
url: '/pages/fingerPage/password/index'
})
console.log(123456465)
},
goFinger() {
this.showFinger = true;
this.show = true;
this.fingerPass()
},
//
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)
},
//
cancel() {
this.showFinger = false;
this.checked = false;
this.show = false;
this.printCancel();
},
//
printCancel() {
this.show = false;
this.showFinger = false
console.log(this.showFinger,777777777777)
plus.fingerprint.cancel();
},
fingerPass() {
console.log(this.checked)
//
this.show = true;
this.showFinger = true;
this.fingerprint(true);
},
fingerprint: function() {
//
// #ifdef APP-PLUS
if (!plus.fingerprint.isSupport()) {
uni.showToast({
title: this.$t('index').fingerprintidentification,
icon: 'none',
duration: 1500
})
// this.disabled = true;
} else if (!plus.fingerprint.isKeyguardSecure()) {
uni.showToast({
title: this.$t('index').notequipped,
icon: 'none',
duration: 1500
})
} else if (!plus.fingerprint.isEnrolledFingerprints()) {
uni.showToast({
title: this.$t('index').oninthesetting,
icon: 'none',
duration: 1500
})
// this.disabled = true;
} else {
// this.result = '';
// // this.disabled = false;
// #ifdef MP-WEIXIN
// this.disabled = false;
uni.showToast({
title: 'Please use it in wechat real machine. The simulator does not support it',
icon: 'none',
duration: 1500
})
// #endif
// #ifndef APP-PLUS || MP-WEIXIN
uni.showToast({
title: 'Fingerprint identification is not supported on this platform',
icon: 'none',
duration: 1500,
})
// #endif
//
let that = this;
// #ifdef APP-PLUS
plus.fingerprint.authenticate(function() {
plus.nativeUI.closeWaiting(); //Android
//
// 使
uni.setStorageSync('fingerPass', true)
//
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)
},
//
cancel() {
this.showFinger = false;
this.checked = false;
this.show = false;
this.printCancel();
},
//
printCancel() {
this.show = false;
this.showFinger = false
console.log(this.showFinger, 777777777777)
plus.fingerprint.cancel();
},
fingerPass() {
console.log(this.checked)
//
this.show = true;
this.showFinger = true;
this.fingerprint(true);
},
fingerprint: function() {
//
// #ifdef APP-PLUS
if (!plus.fingerprint.isSupport()) {
uni.showToast({
title: this.$t('index').fingerprintidentification,
icon: 'none',
duration: 1500
})
// this.disabled = true;
} else if (!plus.fingerprint.isKeyguardSecure()) {
uni.showToast({
title: this.$t('index').notequipped,
icon: 'none',
duration: 1500
})
} else if (!plus.fingerprint.isEnrolledFingerprints()) {
uni.showToast({
title: this.$t('index').oninthesetting,
icon: 'none',
duration: 1500
})
// this.disabled = true;
} else {
// this.result = '';
// // this.disabled = false;
// #ifdef MP-WEIXIN
// this.disabled = false;
uni.showToast({
title: 'Please use it in wechat real machine. The simulator does not support it',
icon: 'none',
duration: 1500
})
// #endif
// #ifndef APP-PLUS || MP-WEIXIN
uni.showToast({
title: 'Fingerprint identification is not supported on this platform',
icon: 'none',
duration: 1500,
})
// #endif
//
let that = this;
// #ifdef APP-PLUS
plus.fingerprint.authenticate(function() {
plus.nativeUI.closeWaiting(); //Android
//
// 使
uni.setStorageSync('fingerPass', true)
that.showFinger = false;
that.fingerSuccess = true;
that.show = false;
uni.reLaunch({
url: '/pages/menu/wallet/index'
})
}, function(e) {
//
switch (e.code) {
case e.AUTHENTICATE_MISMATCH:
plus.nativeUI.toast(that.$t('index').Fingerprintmatchingfailed);
// uni.setStorageSync('fingerPass',false)
that.showFinger = false;
that.fingerFail = true;
that.checked = false
that.show = false;
break;
case e.AUTHENTICATE_OVERLIMIT:
plus.nativeUI.closeWaiting(); //Android
plus.nativeUI.alert(that.$t('index').Thenumberoffingerprint);
// uni.setStorageSync('fingerPass',false)
that.showFinger = false;
that.fingerFail = true;
that.checked = false
that.show = false;
break;
case e.CANCEL:
plus.nativeUI.toast(that.$t('index').Recognitioncancelled);
// uni.setStorageSync('fingerPass',false)
that.showFinger = false;
that.checked = false
that.fingerFail = true;
that.show = false;
break;
default:
plus.nativeUI.closeWaiting(); //Android
// uni.setStorageSync('fingerPass',false)
that.showFinger = false;
that.fingerSuccess = true;
that.checked = false
that.show = false;
uni.reLaunch({
url:'/pages/menu/wallet/index'
})
}, function(e) {
//
switch (e.code) {
case e.AUTHENTICATE_MISMATCH:
plus.nativeUI.toast(that.$t('index').Fingerprintmatchingfailed);
// uni.setStorageSync('fingerPass',false)
that.showFinger=false;
that.fingerFail=true;
that.checked=false
that.show=false;
break;
case e.AUTHENTICATE_OVERLIMIT:
plus.nativeUI.closeWaiting(); //Android
plus.nativeUI.alert(that.$t('index').Thenumberoffingerprint);
// uni.setStorageSync('fingerPass',false)
that.showFinger=false;
that.fingerFail=true;
that.checked=false
that.show=false;
break;
case e.CANCEL:
plus.nativeUI.toast(that.$t('index').Recognitioncancelled);
// uni.setStorageSync('fingerPass',false)
that.showFinger=false;
that.checked=false
that.fingerFail=true;
that.show=false;
break;
default:
plus.nativeUI.closeWaiting(); //Android
// uni.setStorageSync('fingerPass',false)
that.showFinger=false;
that.checked=false
that.show=false;
that.fingerFail=true;
plus.nativeUI.alert(that.$t('index').Fingerprintidentificationfailed);
break;
}
});
// Android
if ('Android' == plus.os.name) {
this.show = true;
/* plus.nativeUI.showWaiting('...').onclose = function() {
plus.fingerprint.cancel();
} */
}
// #endif
that.fingerFail = true;
plus.nativeUI.alert(that.$t('index').Fingerprintidentificationfailed);
break;
}
// #endif
},
change(status) {
},
},
});
// Android
if ('Android' == plus.os.name) {
this.show = true;
/* plus.nativeUI.showWaiting('...').onclose = function() {
plus.fingerprint.cancel();
} */
}
// #endif
}
// #endif
},
change(status) {
},
},
onLoad() {
//
if (uni.getStorageSync('fingerPass')) {
this.showFinger=true;
this.show=true;
this.showFinger = true;
this.show = true;
this.fingerPass()
}
@ -215,7 +222,7 @@
};
</script>
<style scoped>
</style>
<style>

168
pages/fingerPage/password/index.css

@ -0,0 +1,168 @@
.main{
margin-top: 300rpx;
height: 100%;
/* position: relative;
left: 50%;
top: 30%;
transform: translate(-50%,-50%);
width: 100%; */
}
.main .title{
line-height: 48rpx;
color: #7D87A6;
font-size: 32rpx;
text-align: center;
margin-top: 32rpx;
margin-bottom: 140rpx;
padding: 0 80rpx;
}
#payPwd{
margin-top: 160rpx;
}
#payPwd .pwd-wrap{
width: 100%;
height: 48px;
padding-bottom: 1px;
margin: 0 auto;
background: #fff;
display: flex;
display: -webkit-flex;
cursor: pointer;
justify-content: space-between;
padding: 0;
}
.pwd-wrap li{
list-style-type:none;
text-align: center;
width: 94rpx;
line-height: 44px;
height: 100%;
border:2rpx solid #ddd ;
border-radius: 10rpx;
}
.pwd-wrap li i{
height: 10px;
width: 10px;
border-radius:50% ;
background: #000;
display: inline-block;
}
.borc{
border-color: #5B53FF !important;
}
.btnconn{
width: 100%;
display: flex;
justify-content: space-between;
margin-top: 160rpx;
}
.btnconn .btn{
width: 310rpx;
line-height: 86rpx;
border-radius: 20rpx;
border: 2rpx solid #F6F8FE;
text-align: center;
display: flex;
align-items: center;
color:#A3AED0;
justify-content: center;
font-size: 34rpx;
}
.active{
color: #6F67FF!important;
background-color: #F6F8FD;
border: none !important;
}
.btnconn .btn .img1{
width: 48rpx;
height: 48rpx;
}
.big_title2{
margin-bottom: 50rpx;
}
.big_title{
text-align: center;
font-size: 36rpx;
}
.bottom_con{
margin-top: 65rpx;
}
.bottom_con .top{
word-break: break-all;
padding: 52rpx 32rpx;
text-align: center;
line-height: 50rpx;
background-color: #FAFAFA;
border-radius: 20rpx 20rpx 0 0;
}
.bottom_con .bottom{
background-color: #F6F8FD;
display: flex;
justify-content: center;
align-items: center;
font-size: 32rpx;
height: 96rpx;
border-radius: 0 0 20rpx 20rpx;
}
.img1{
width: 48rpx;
height: 48rpx;
margin-right: 10rpx;
}
.code_con .img2{
display: block;
width: 486rpx;
height: 482rpx;
margin: 0 auto;
margin-top: 64rpx;
}
.code_con .text{
margin-top: 40rpx;
text-align: center;
font-size: 28rpx;
color: #7D87A6;
padding-bottom: 150rpx;
}
/* /deep/ .u-box[data-v-0e1e7f9a] {
border: 2rpx solid #E0E5F2 !important;
} */
/deep/ .u-dot span{
color: #000 !important;
}
/deep/ .u-placeholder-line{
background: #5B53FF;
}
/deep/ .u-dot span {
color: #5B53FF !important;
}
.infoText{
color:#F16063;
font-size: 30rpx;
text-align: center;
margin-top: 48rpx;
}
page{
height: 100%;
}

80
pages/fingerPage/password/index.vue

@ -0,0 +1,80 @@
<template>
<view class="">
<navigation :showBack="true" :bgnum="false">
<text class="big_title">
Enter Password
</text>
</navigation>
<view class="main">
<view class="big_title big_title2">
Enter Password
</view>
<u-message-input @finish="finish2" :inactive-color="info?'#F16063':'#E0E5F2'" active-color="#5B53FF"
:width="94" :maxlength="6" mode="box" :focus="fes" :dot-fill="true" @change="back">
</u-message-input>
<view class="infoText" v-if="info">
Password discrepansies
</view>
</view>
</view>
</view>
</template>
<script>
import cont from "@/components/navigation/navigation.vue"
export default {
data() {
return {
walletPwd:'',
msg: '',
msgLength: 0,
fes: false,
info: false,
transInfoPass: {
}
}
},
methods: {
//
back(e) {
if (e.length < 6) {
this.info = false;
}
},
finish2(e) {
if (this.walletPwd != e) {
this.info = true;
return;
} else {
console.log("验证正确")
this.info = false;
uni.navigateTo({
url: '/pages/menu/wallet/index'
})
}
},
},
onLoad() {
this.walletPwd=uni.getStorageSync('walletPwd')
if(this.walletPwd||this.walletPwd==''){
const walletInfo = uni.getStorageSync('walletInfo')
this.walletPwd=walletInfo["BTC"][0]["password"];
uni.setStorageSync('walletPwd',this.walletPwd)
}
}
};
</script>
<style scoped>
</style>
<style>
@import './index.css';
</style>

61
pages/index.vue

@ -0,0 +1,61 @@
<template>
<view class="question-wrap" :style="{ height: screenHeight }">
</view>
</template>
<script>
export default {
data() {
return {
screenHeight: 0,
}
},
onLoad() {
this.screenHeight = uni.getSystemInfoSync().windowHeight;
let walletInfo= uni.getStorageSync('walletInfo');
//console.log(uni.getStorageSync('walletInfo'),22222,(walletInfo||walletInfo==''))
if (!walletInfo||walletInfo=='') {
uni.reLaunch({
url: '/pages/register/index'
})
} else {
console.log(uni.getStorageSync('walletInfo'),11111)
// #ifdef APP-PLUS
//
if (uni.getStorageSync('fingerPass')) {
uni.reLaunch({
url: '/pages/fingerPage/index'
})
return;
}else{
uni.reLaunch({
url: '/pages/fingerPage/password/index'
})
return;
}
// #endif
uni.reLaunch({
url: '/pages/fingerPage/password/index'
})
}
}
}
</script>
<style lang="scss">
page {
width: 100%;
height: 100%;
}
.question-wrap {
background: url("../static/tongyonh/Load_v3.png")
no-repeat;
background-size: 100%;
width: 100%;
min-height: 100%;
.content-wrap {
}
}
</style>

BIN
static/tongyonh/Load_v3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

10742
unpackage/dist/dev/app-plus/app-service.js

File diff suppressed because one or more lines are too long

21370
unpackage/dist/dev/app-plus/app-view.js

File diff suppressed because one or more lines are too long

0
unpackage/dist/dev/app-plus/static/img/copy_24px_outlined.8dca7e38.svg → unpackage/dist/dev/app-plus/static/img/copy_24px_outlined.e8932d3c.svg

Before

Width:  |  Height:  |  Size: 629 B

After

Width:  |  Height:  |  Size: 629 B

0
unpackage/dist/dev/app-plus/static/img/more_vert_24px_outlined.266aaa48.svg → unpackage/dist/dev/app-plus/static/img/more_vert_24px_outlined.427f4df0.svg

Before

Width:  |  Height:  |  Size: 526 B

After

Width:  |  Height:  |  Size: 526 B

BIN
unpackage/dist/dev/app-plus/static/tongyonh/_plus.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

BIN
unpackage/dist/dev/app-plus/static/tongyonh/bigFing.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

Loading…
Cancel
Save