From 82c181f51c4a000b0e711b20f4a69d211808fdfc Mon Sep 17 00:00:00 2001 From: vee <897831508@qq.com> Date: Sat, 4 Dec 2021 01:24:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 2 +- components/navigation/navigation.vue | 4 +- pages.json | 17 +- pages/fingerPage/index.vue | 421 +- pages/menu/backUp/backUp4/index.vue | 149 +- pages/menu/backUp/transPaw/index.vue | 6 +- pages/menu/setting/index.vue | 2 +- .../dist/dev/app-plus/app-config-service.js | 4 +- unpackage/dist/dev/app-plus/app-service.js | 17065 ++++---- unpackage/dist/dev/app-plus/app-view.js | 33111 ++++++++-------- .../dev/app-plus/static/tongyonh/Frame.png | Bin 0 -> 249796 bytes .../app-plus/static/tongyonh/Illustration.png | Bin 0 -> 234355 bytes .../dev/app-plus/static/tongyonh/Nftimg.png | Bin 0 -> 200737 bytes utils/TokenUtil.js | 4 +- 14 files changed, 25267 insertions(+), 25518 deletions(-) create mode 100644 unpackage/dist/dev/app-plus/static/tongyonh/Frame.png create mode 100644 unpackage/dist/dev/app-plus/static/tongyonh/Illustration.png create mode 100644 unpackage/dist/dev/app-plus/static/tongyonh/Nftimg.png diff --git a/App.vue b/App.vue index bf74840..2f8ef82 100644 --- a/App.vue +++ b/App.vue @@ -4,7 +4,7 @@ max-width: 828rpx; //最大宽度自己可以调整 margin: auto !important; } - + page{margin-top:50rpx} /* #endif */ @import "uview-ui/index.scss"; diff --git a/components/navigation/navigation.vue b/components/navigation/navigation.vue index 7ffa493..51fd06a 100644 --- a/components/navigation/navigation.vue +++ b/components/navigation/navigation.vue @@ -63,7 +63,7 @@ .nav-head{ height: 40rpx; - background-color: #fff; + background-color: #fafafa; text-align: center; font-weight: 700; font-size: 36rpx; @@ -76,7 +76,7 @@ align-items: center; // margin-top: 80rpx; position: sticky; - top: 20px; + top: 40rpx; width: 100%; z-index: 8; diff --git a/pages.json b/pages.json index c54482b..fdeecfa 100644 --- a/pages.json +++ b/pages.json @@ -3,12 +3,18 @@ "^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue" }, "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages + // { + // "path": "pages/index", + // "style": { + // "navigationStyle": "custom" + // } + + // }, { - "path": "pages/index", + "path": "pages/fingerPage/index", "style": { "navigationStyle": "custom" } - }, { "path": "pages/register/index", @@ -17,12 +23,7 @@ } }, - { - "path": "pages/fingerPage/index", - "style": { - "navigationStyle": "custom" - } - }, + { "path": "pages/fingerPage/password/index", "style": { diff --git a/pages/fingerPage/index.vue b/pages/fingerPage/index.vue index fa00784..65d0fd6 100644 --- a/pages/fingerPage/index.vue +++ b/pages/fingerPage/index.vue @@ -1,26 +1,26 @@ @@ -41,8 +41,8 @@ export default { data() { return { - cnt:this.$t('index').Confirm, - can:this.$t('index').Cancel, + cnt: this.$t('index').Confirm, + can: this.$t('index').Cancel, checked: false, show: false, showFinger: false, @@ -50,7 +50,7 @@ fingerFail: false, hou_jia_w: false, language: this.$store.state.language == 'en' ? 'English' : '简体中文', - show: false, + show: false, list3: [{ label: this.$t('index').langfan, disabled: false, @@ -66,207 +66,228 @@ disabled: false, value: "c", }, - + ], }; }, methods: { gopwd() { - + uni.navigateTo({ url: '/pages/fingerPage/password/index' }) console.log(123456465) }, - confirm(e){ - uni.setStorageSync('lang',e[0].value) - - 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', '繁體中文') + confirm(e) { + uni.setStorageSync('lang', e[0].value) + + 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' + url: '/pages/fingerPage/index' }) - } + } }, - goFinger(){ - this.showFinger=true; - this.show=true; + 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() { // 每次进来拿缓存里有没有指纹 + let fingerPass=uni.getStorageSync('fingerPass'); + console.log(fingerPass,"fingerPass") if (uni.getStorageSync('fingerPass')) { - this.showFinger=true; - this.show=true; + this.showFinger = true; + this.show = true; 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 + + } @@ -279,7 +300,7 @@ };