Browse Source

密码

master
vee 4 years ago
parent
commit
b6e8ae73d9
  1. 12
      components/navigation/navigation.vue
  2. 5
      pages/fingerPage/index.css
  3. 371
      pages/fingerPage/index.vue
  4. 21
      pages/menu/backUp/backUp4/index.css
  5. 71
      pages/menu/backUp/backUp4/index.vue
  6. 2
      pages/menu/sendToken/transfer/index.css
  7. 4
      pages/menu/transction/detail/index.css
  8. 5
      pages/menu/wallet/add/index.css
  9. 2
      pages/menu/wallet/add/index.vue
  10. 46
      pages/register/index.vue
  11. 4
      unpackage/dist/dev/app-plus/app-config-service.js
  12. 7705
      unpackage/dist/dev/app-plus/app-service.js
  13. 8187
      unpackage/dist/dev/app-plus/app-view.js
  14. BIN
      unpackage/dist/dev/app-plus/static/tongyonh/Load_v3.png
  15. 3
      utils/TokenUtil.js
  16. 2
      utils/locales/en.js
  17. 3
      utils/locales/zh-F.js
  18. 2
      utils/locales/zh.js

12
components/navigation/navigation.vue

@ -63,24 +63,22 @@
.nav-head{ .nav-head{
height: 40rpx; height: 40rpx;
background-color: #fAFAFA; background-color: #fff;
text-align: center; text-align: center;
font-weight: 700; font-weight: 700;
font-size: 36rpx; font-size: 36rpx;
color: #000; color: #000;
padding: 40rpx 16rpx; padding: 40rpx 16rpx;
margin-top: 50rpx; // margin-top: 50rpx;
display: flex; display: flex;
justify-content: center; justify-content: center;
flex-direction: row-reverse; flex-direction: row-reverse;
align-items: center; align-items: center;
//margin-top: 80rpx; // margin-top: 80rpx;
position: static;
position: sticky; position: sticky;
top: 40px; top: 20px;
width: 100%; width: 100%;
z-index: 9999; z-index: 8;
} }
.back{ .back{

5
pages/fingerPage/index.css

@ -1,7 +1,10 @@
page{ page{
overflow-y: hidden; overflow-y: hidden;
} }
.lans{
text-align: center;
margin-bottom:20rpx ;
}
.logo{ .logo{
display: block; display: block;
margin: 0 auto; margin: 0 auto;

371
pages/fingerPage/index.vue

@ -1,31 +1,37 @@
<template> <template>
<view class="rela"> <view class="rela">
<view class="main"> <view class="main">
<image src="../../static/tongyonh/Group285.png" mode="aspectFit" class="logo"></image> <image src="../../static/tongyonh/Group285.png" mode="aspectFit" class="logo"></image>
<view class="fingcon"> <view class="fingcon">
<image src="../../static/tongyonh/zhiwen.png" mode="aspectFit" class="finimg" @click="goFinger"></image> <image src="../../static/tongyonh/zhiwen.png" mode="aspectFit" class="finimg" @click="goFinger"></image>
<view class="te1"> <view class="te1">
Click to verify fingerprint {{i18n.Clicktoverify}}
</view> </view>
</view> </view>
<view class="passTex" @click="gopwd">
<!-- <view class="lans" @click="show = true">
{{i18n.lans}}
</view> -->
{{i18n.Loginwith}}
</view>
<view class="passTex" @click="gopwd">
Login with wallet password
</view>
</view> </view>
<u-mask z-index="10" :show="show"></u-mask> <u-mask z-index="10" :show="show"></u-mask>
<view class="hou_jia" v-if="showFinger"> <view class="hou_jia" v-if="showFinger">
<view class="Log"> <view class="Log">
<!-- {{i18n.Login}} --> {{i18n.Login}}
Log In
</view> </view>
<image src="../../static/tongyonh/zww.png" mode="aspectFit" class="zzw" @click="goFinger()"></image> <image src="../../static/tongyonh/zww.png" mode="aspectFit" class="zzw" @click="goFinger()"></image>
<view class="Log" @click="cancel"> <view class="Log" @click="cancel">
<!-- {{i18n.Cancel}} --> {{i18n.Cancel}}
Cancel
</view> </view>
</view> </view>
<u-select :confirm-text="cnt" :cancel-text="can" v-model="show" :list="list3" @confirm="confirm"></u-select>
</view> </view>
</template> </template>
@ -35,12 +41,33 @@
export default { export default {
data() { data() {
return { return {
cnt:this.$t('index').Confirm,
can:this.$t('index').Cancel,
checked: false, checked: false,
show: false, show: false,
showFinger: false, showFinger: false,
fingerSuccess: false, fingerSuccess: false,
fingerFail: false, fingerFail: false,
hou_jia_w: false, hou_jia_w: false,
language: this.$store.state.language == 'en' ? 'English' : '简体中文',
show: false,
list3: [{
label: this.$t('index').langfan,
disabled: false,
value: "b",
},
{
label: this.$t('index').langjian,
disabled: false,
value: "a",
},
{
label: this.$t('index').eng,
disabled: false,
value: "c",
},
],
}; };
}, },
methods: { methods: {
@ -51,163 +78,193 @@
}) })
console.log(123456465) console.log(123456465)
}, },
goFinger() { confirm(e){
this.showFinger = true; uni.setStorageSync('lang',e[0].value)
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();
if (e[0].value == 'c') {
this._i18n.locale = 'en'
this.$store.commit('setLanguage', 'en')
uni.setStorageSync('langTrue', 'English')
uni.setStorageSync("language", 'en')
uni.redirectTo({
url:'/pages/fingerPage/index'
})
} else if (e[0].value == 'a') {
this._i18n.locale = 'zh-CN'
this.$store.commit('setLanguage', 'zh-CN')
uni.setStorageSync("language", 'zh-CN')
uni.setStorageSync('langTrue', '简体中文')
uni.redirectTo({
url:'/pages/fingerPage/index'
})
} else if (e[0].value == 'b'){
this._i18n.locale = 'zh-CNF'
this.$store.commit('setLanguage', 'zh-CNF')
uni.setStorageSync("language", 'zh-CNF')
uni.setStorageSync('langTrue', '繁體中文')
uni.redirectTo({
url:'/pages/fingerPage/index'
})
}
}, },
// goFinger(){
printCancel() { this.showFinger=true;
this.show = false; this.show=true;
this.showFinger = false this.fingerPass()
console.log(this.showFinger, 777777777777)
plus.fingerprint.cancel();
}, },
//
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();
fingerPass() { },
console.log(this.checked) //
// printCancel() {
this.show = true; this.show = false;
this.showFinger = true; this.showFinger = false
this.fingerprint(true); console.log(this.showFinger,777777777777)
}, plus.fingerprint.cancel();
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()) { fingerPass() {
uni.showToast({ console.log(this.checked)
title: this.$t('index').oninthesetting, //
icon: 'none', this.show = true;
duration: 1500 this.showFinger = true;
}) this.fingerprint(true);
// this.disabled = true; },
} else { fingerprint: function() {
// this.result = ''; //
// // this.disabled = false; // #ifdef APP-PLUS
// #ifdef MP-WEIXIN if (!plus.fingerprint.isSupport()) {
// this.disabled = false; uni.showToast({
uni.showToast({ title: this.$t('index').fingerprintidentification,
title: 'Please use it in wechat real machine. The simulator does not support it', icon: 'none',
icon: 'none', duration: 1500
duration: 1500 })
}) // this.disabled = true;
// #endif } else if (!plus.fingerprint.isKeyguardSecure()) {
// #ifndef APP-PLUS || MP-WEIXIN uni.showToast({
uni.showToast({ title: this.$t('index').notequipped,
title: 'Fingerprint identification is not supported on this platform', icon: 'none',
icon: 'none', duration: 1500
duration: 1500, })
})
// #endif } else if (!plus.fingerprint.isEnrolledFingerprints()) {
// uni.showToast({
let that = this; title: this.$t('index').oninthesetting,
// #ifdef APP-PLUS icon: 'none',
plus.fingerprint.authenticate(function() { duration: 1500
plus.nativeUI.closeWaiting(); //Android })
// // this.disabled = true;
// 使 } else {
uni.setStorageSync('fingerPass', true) // this.result = '';
that.showFinger = false; // // this.disabled = false;
that.fingerSuccess = true; // #ifdef MP-WEIXIN
that.show = false; // this.disabled = false;
uni.reLaunch({ uni.showToast({
url: '/pages/menu/wallet/index' title: 'Please use it in wechat real machine. The simulator does not support it',
}) icon: 'none',
}, function(e) { duration: 1500
// })
switch (e.code) { // #endif
case e.AUTHENTICATE_MISMATCH: // #ifndef APP-PLUS || MP-WEIXIN
plus.nativeUI.toast(that.$t('index').Fingerprintmatchingfailed); uni.showToast({
// uni.setStorageSync('fingerPass',false) title: 'Fingerprint identification is not supported on this platform',
that.showFinger = false; icon: 'none',
that.fingerFail = true; duration: 1500,
that.checked = false })
that.show = false; // #endif
break; //
case e.AUTHENTICATE_OVERLIMIT: let that = this;
plus.nativeUI.closeWaiting(); //Android // #ifdef APP-PLUS
plus.nativeUI.alert(that.$t('index').Thenumberoffingerprint); plus.fingerprint.authenticate(function() {
// 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 plus.nativeUI.closeWaiting(); //Android
// uni.setStorageSync('fingerPass',false) //
// 使
uni.setStorageSync('fingerPass', true)
that.showFinger = false; that.showFinger = false;
that.checked = false that.fingerSuccess = true;
that.show = false; that.show = false;
that.fingerFail = true; uni.reLaunch({
plus.nativeUI.alert(that.$t('index').Fingerprintidentificationfailed); url:'/pages/menu/wallet/index'
break; })
}, 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
} }
}); // #endif
// Android },
if ('Android' == plus.os.name) { change(status) {
this.show = true;
/* plus.nativeUI.showWaiting('...').onclose = function() {
plus.fingerprint.cancel();
} */
}
// #endif
}
// #endif
},
change(status) {
}, },
}, },
onLoad() { onLoad() {
// //
if (uni.getStorageSync('fingerPass')) { if (uni.getStorageSync('fingerPass')) {
this.showFinger = true; this.showFinger=true;
this.show = true; this.show=true;
this.fingerPass() this.fingerPass()
} }

21
pages/menu/backUp/backUp4/index.css

@ -43,7 +43,6 @@
color: #7D87A6; color: #7D87A6;
} }
.main .textareaa{ .main .textareaa{
width: 640rpx;
min-height: 364rpx; min-height: 364rpx;
border: 2rpx solid #E9EDF7; border: 2rpx solid #E9EDF7;
border-radius: 10rpx; border-radius: 10rpx;
@ -51,6 +50,9 @@
padding: 20rpx; padding: 20rpx;
overflow: hidden; overflow: hidden;
} }
/deep/ .u-input__textarea{
padding: 20rpx 20rpx !important;
}
.main .textareaa .item{ .main .textareaa .item{
float: left; float: left;
} }
@ -133,3 +135,20 @@ display: flex;
color: #fff; color: #fff;
background-color: #5B53FF; background-color: #5B53FF;
} }
.scroll{
padding: 28rpx 0;
background-color: #FAFAFA;
display: flex;
justify-content:space-around;
}
.scroll .item{
line-height: 80rpx;
padding: 0 15rpx;
border-radius: 15rpx;
background-color: #fff;
text-align: center;
margin-left: 24rpx;
}
uni-scroll-view{
background-color: #FAFAFA;
}

71
pages/menu/backUp/backUp4/index.vue

@ -8,9 +8,9 @@
{{i18n.Mnemonicsimportverification}} {{i18n.Mnemonicsimportverification}}
</view> </view>
<textarea v-model="wordInfo" class="textareaa" :placeholder="teee" <u-input type="textarea" :clearable="false" v-model="wordInfo" @input="getmon()" :placeholder="teee" class="textareaa" placeholderStyle="color:rgb(224,229,242)"
placeholder-style="color:rgb(224,229,242)"> :focus="foucStatus" @blur="hideMon" />
</textarea>
<u-button class="custom-style" @click="confirm">{{i18n.Confirm}}</u-button> <u-button class="custom-style" @click="confirm">{{i18n.Confirm}}</u-button>
@ -52,7 +52,17 @@
<u-mask :show="show" z-index="10"></u-mask> <u-mask :show="show" z-index="10"></u-mask>
<u-mask :show="show2" z-index="10"></u-mask> <u-mask :show="show2" z-index="10"></u-mask>
</view> </view>
<scroll-view :scroll-x="true" class="" v-if="wordType">
<!-- @click="toWord(item)" -->
<view class="scroll">
<view class="item" v-for="item,index in worcon" @touchend.prevent="toWord(item)">
{{item}}
</view>
</view>
</scroll-view>
<!-- <u-keyboard mode="car" v-model="show222"></u-keyboard> -->
</view> </view>
</view> </view>
@ -63,6 +73,8 @@
export default { export default {
data() { data() {
return { return {
show222:'',
wordType:false,
teee: this.$t('index').separatedbyspaces, teee: this.$t('index').separatedbyspaces,
mnemonics: [], mnemonics: [],
wordArr: [], wordArr: [],
@ -78,6 +90,13 @@
name: '', name: '',
typename: '', typename: '',
info: {}, info: {},
worcon:[],
keyUp:'',
foucStatus:false,
defaultPhoneHeight:'', //
nowPhoneHeight:'', //
}; };
}, },
computed: { computed: {
@ -86,6 +105,47 @@
}, },
}, },
methods: { methods: {
nowPhoneHeight(){
if(this.defaultPhoneHeight != this.nowPhoneHeight){
//
//
//this.tabbar = true
}else{
//
//
this.wordType=false
}
},
hideMon(){
this.wordType=false
},
getmon(){
console.log(this.wordInfo)
var ss = this.wordInfo.split(" ")
this.keyUp=ss[ss.length-1];
console.log(ss[ss.length-1],444)
this.worcon=this.$Token.searchMnemonic(ss[ss.length-1])
if(this.worcon.length>0){
this.wordType=true;
}else if(this.worcon.length==0){
uni.showToast({
title: '无效的助记词',
icon: 'none',
duration: 1500
})
}
console.log(this.worcon,444444)
},
toWord(item){
console.log(this.keyUp+item,78787878)
this.wordInfo+=item+' '
this.wordInfo=this.wordInfo.replace(this.keyUp+item,item)
this.keyUp='';
this.wordType=false
console.log(this.foucStatus,7878787878787787777777777)
},
// //
goTranPaw() { goTranPaw() {
uni.navigateTo({ uni.navigateTo({
@ -166,7 +226,10 @@
}, },
onLoad(item) { onLoad(item) {
this.defaultPhoneHeight = window.innerHeight
window.onresize = ()=>{
this.nowPhoneHeight = window.innerHeight
}
if (item != '' || item != undefined) { if (item != '' || item != undefined) {
uni.setStorageSync('createWalletName', item.name) uni.setStorageSync('createWalletName', item.name)
} }

2
pages/menu/sendToken/transfer/index.css

@ -247,7 +247,7 @@ input{
padding: 0 24rpx; padding: 0 24rpx;
position: absolute; position: absolute;
z-index: 999; z-index: 999;
bottom: -120rpx; bottom: -350rpx;
width: 100%; width: 100%;
padding-top: 24rpx; padding-top: 24rpx;
padding-bottom: 100rpx; padding-bottom: 100rpx;

4
pages/menu/transction/detail/index.css

@ -1,4 +1,6 @@
page{
height:100%;
}
.main{ .main{
padding: 0 30rpx; padding: 0 30rpx;
/* padding-bottom: 100rpx; */ /* padding-bottom: 100rpx; */

5
pages/menu/wallet/add/index.css

@ -1,3 +1,8 @@
page{
overflow-y: hidden;
}
.renYou{ .renYou{
width: 36rpx; width: 36rpx;
height: 20rpx; height: 20rpx;

2
pages/menu/wallet/add/index.vue

@ -30,7 +30,7 @@
</view> </view>
</view> </view>
<u-mask :show="show" z-index="5"></u-mask> <u-mask :show="show" z-index="80"></u-mask>
<view class="bottom_con" v-if="show"> <view class="bottom_con" v-if="show">
<image src="../../../../static/tongyonh/xg.png" mode="aspectFit" class="xg" @click="show = false"></image> <image src="../../../../static/tongyonh/xg.png" mode="aspectFit" class="xg" @click="show = false"></image>
<view class="tiao" @click="show = false"></view> <view class="tiao" @click="show = false"></view>

46
pages/register/index.vue

@ -176,25 +176,35 @@
}, },
methods: { methods: {
confirm(e) {
uni.setStorageSync('lang', e[0].value)
if (e[0].value == 'c') { confirm(e){
this._i18n.locale = 'en' uni.setStorageSync('lang',e[0].value)
this.$store.commit('setLanguage', 'en')
uni.setStorageSync('langTrue', 'English') if (e[0].value == 'c') {
uni.setStorageSync("language", 'en') this._i18n.locale = 'en'
} else if (e[0].value == 'a') { this.$store.commit('setLanguage', 'en')
this._i18n.locale = 'zh-CN' uni.setStorageSync('langTrue', 'English')
this.$store.commit('setLanguage', 'zh-CN') uni.setStorageSync("language", 'en')
uni.setStorageSync("language", 'zh-CN') uni.redirectTo({
uni.setStorageSync('langTrue', '简体中文') url:'/pages/register/index'
} else if (e[0].value == 'b') { })
this._i18n.locale = 'zh-CNF' } else if (e[0].value == 'a') {
this.$store.commit('setLanguage', 'zh-CNF') this._i18n.locale = 'zh-CN'
uni.setStorageSync("language", 'zh-CNF') this.$store.commit('setLanguage', 'zh-CN')
uni.setStorageSync('langTrue', '繁體中文') uni.setStorageSync("language", 'zh-CN')
} uni.setStorageSync('langTrue', '简体中文')
uni.redirectTo({
url:'/pages/register/index'
})
} else if (e[0].value == 'b'){
this._i18n.locale = 'zh-CNF'
this.$store.commit('setLanguage', 'zh-CNF')
uni.setStorageSync("language", 'zh-CNF')
uni.setStorageSync('langTrue', '繁體中文')
uni.redirectTo({
url:'/pages/register/index'
})
}
}, },
checkboxGroupChange() { checkboxGroupChange() {

4
unpackage/dist/dev/app-plus/app-config-service.js

File diff suppressed because one or more lines are too long

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

File diff suppressed because one or more lines are too long

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

File diff suppressed because one or more lines are too long

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

3
utils/TokenUtil.js

@ -22,7 +22,7 @@ let token = {
* index 数据的每一项下标 * index 数据的每一项下标
* array 迭代的数组 * array 迭代的数组
*/ */
if(item.indexOf(str)>-1){ if(item.indexOf(str)==0){
list.push(item) list.push(item)
} }
@ -32,7 +32,6 @@ let token = {
return list return list
}, },
entropyToMnemonic:function(src){ entropyToMnemonic:function(src){
const mnemonic = bip39.entropyToMnemonic(src) const mnemonic = bip39.entropyToMnemonic(src)
}, },

2
utils/locales/en.js

@ -2,6 +2,8 @@
export default { export default {
index: { index: {
// regis // regis
Clicktoverify:'Click to verify fingerprint',
Loginwith:'Login with wallet password',
Decentralised:'Decentralised wallets,self-directed assets', Decentralised:'Decentralised wallets,self-directed assets',
Localstorage:'Local storage of private keys, safe and secure', Localstorage:'Local storage of private keys, safe and secure',
EasyDecentralised:'Easy to use multi-chain wallet', EasyDecentralised:'Easy to use multi-chain wallet',

3
utils/locales/zh-F.js

@ -1,8 +1,9 @@
// zhf.js // zhf.js
export default { export default {
index: { index: {
// regis // regis
Clicktoverify:'點擊驗證指紋',
Loginwith:'使用錢包密碼登錄',
Decentralised:'去中心化錢包,自主資產', Decentralised:'去中心化錢包,自主資產',
Localstorage:'私鑰本地存儲,安全有保障', Localstorage:'私鑰本地存儲,安全有保障',
EasyDecentralised:'簡單易用多鏈錢包', EasyDecentralised:'簡單易用多鏈錢包',

2
utils/locales/zh.js

@ -2,6 +2,8 @@
export default { export default {
index: { index: {
// regis // regis
Clicktoverify:'点击验证指纹',
Loginwith:'使用钱包密码登录',
Decentralised:'去中心化钱包,自主资产', Decentralised:'去中心化钱包,自主资产',
Localstorage:'私钥本地存储,安全有保障', Localstorage:'私钥本地存储,安全有保障',
EasyDecentralised:'简单易用多链钱包', EasyDecentralised:'简单易用多链钱包',

Loading…
Cancel
Save