清理代码

This commit is contained in:
2022-02-08 09:17:12 +08:00
parent 0bfdcdf6af
commit ab958d0777
16 changed files with 1332 additions and 1817 deletions

View File

@@ -4,8 +4,6 @@
"description": "ZH健康", "description": "ZH健康",
"main": "main.js", "main": "main.js",
"dependencies": { "dependencies": {
"bitcore-lib": "^8.25.25",
"bitcore-mnemonic": "^8.25.25",
"moment": "^2.29.1", "moment": "^2.29.1",
"uni-read-pages": "^1.0.5", "uni-read-pages": "^1.0.5",
"uni-simple-router": "^2.0.7", "uni-simple-router": "^2.0.7",

View File

@@ -1,6 +1,6 @@
<template> <template>
<view class="im--img" :class="guest ? 'right': 'left'"> <view class="im--image" :class="guest ? 'right': 'left'">
<image class="src" :src="msg.thumbnail" @click="previewImage" mode="widthFix"></image> <image class="img" :src="msg.thumbnail" @click="previewImage" mode="widthFix"></image>
</view> </view>
</template> </template>
@@ -10,7 +10,15 @@
props: { props: {
msg: { msg: {
type: Object, type: Object,
default: {} default: () => {
return {
local: '',
remote: '',
objectName: '',
thumbnail: '',
isFull: false
}
}
}, },
guest: { guest: {
type: Boolean, type: Boolean,
@@ -30,22 +38,23 @@
} }
</script> </script>
<style scoped> <style scoped lang="scss">
.im--img { .im--image {
padding: 19rpx; padding: 20rpx;
}
.im--img.left { &.left {
border-radius: 0 20rpx 20rpx 20rpx; border-radius: 0 20rpx 20rpx 20rpx;
background: white; background: white;
} }
.im--img.right { &.right {
border-radius: 20rpx 0 20rpx 20rpx; border-radius: 20rpx 0 20rpx 20rpx;
background: #34CE98; background: #34CE98;
} }
.src { .img {
width: 240rpx; width: 150rpx;
border-radius: 10rpx;
}
} }
</style> </style>

View File

@@ -7,11 +7,6 @@
<script> <script>
export default { export default {
name: 'showText', name: 'showText',
data() {
return {
};
},
props: { props: {
msg: { msg: {
type: Object, type: Object,
@@ -25,22 +20,22 @@
} }
</script> </script>
<style scoped> <style scoped lang="scss">
.im--text { .im--text {
max-width: 400rpx; max-width: 400rpx;
padding: 20rpx; padding: 20rpx;
font-size: 28rpx; font-size: 28rpx;
line-height: 40rpx; line-height: 40rpx;
}
.im--text.left { &.left {
border-radius: 0 20rpx 20rpx 20rpx; border-radius: 0 20rpx 20rpx 20rpx;
background: white; background: white;
} }
.im--text.right { &.right {
border-radius: 20rpx 0 20rpx 20rpx; border-radius: 20rpx 0 20rpx 20rpx;
background: #34CE98; background: $main-color;
color: white; color: white;
}
} }
</style> </style>

View File

@@ -1,9 +1,9 @@
<template> <template>
<view> <view>
<view class="im--audio" :class="guest ? 'right': 'left'" @click="onPlayMsg"> <view class="im--voice" :class="guest ? 'right': 'left'" @click="onPlayMsg">
<image v-if="!guest" class="audio-mp3" src="@/static/icon/audio_green.png" mode="widthFix"></image> <image v-if="!guest" class="icon" src="@/static/icon/audio_green.png" mode="widthFix"></image>
<text class="audio-text">"{{msg.duration}}"</text> <text class="duration">{{msg.duration}}"</text>
<image v-if="guest" class="audio-mp3" src="@/static/icon/audio_white.png" mode="widthFix"></image> <image v-if="guest" class="icon" src="@/static/icon/audio_white.png" mode="widthFix"></image>
</view> </view>
</view> </view>
</template> </template>
@@ -57,8 +57,8 @@
} }
</script> </script>
<style scoped> <style scoped lang="scss">
.im--audio { .im--voice {
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
@@ -66,33 +66,30 @@
width: 170rpx; width: 170rpx;
padding: 0 20rpx; padding: 0 20rpx;
box-sizing: border-box; box-sizing: border-box;
}
, .icon {
.im--audio.left { width: 38rpx;
border-radius: 0 20rpx 20rpx 20rpx; height: 38rpx;
background: white; }
}
.im--audio.right { &.left {
border-radius: 20rpx 0 20rpx 20rpx; border-radius: 0 20rpx 20rpx 20rpx;
background: #34CE98; background: white;
}
.audio-mp3 { .duration {
width: 38rpx; color: #333;
height: 38rpx; font-size: 30rpx;
} }
}
.audio-text { &.right {
font-size: 30rpx; border-radius: 20rpx 0 20rpx 20rpx;
} background: $main-color;
.im--audio.left .audio-text { .duration {
color: #333; color: white;
} font-size: 30rpx;
}
.im--audio.right .audio-text { }
color: white;
} }
</style> </style>

View File

@@ -1,64 +1,68 @@
<template> <template>
<view class="content vertical"> <view class="content vertical">
<!-- logo --> <!-- logo -->
<image class="logo" src="@/static/wallet/logo.png" mode="widthFix"></image> <image class="logo" src="@/static/wallet/logo.png" mode="widthFix"></image>
<!-- 副标题 --> <!-- 副标题 -->
<view class="sub-title">激活您的ZH健康钱包获取钱包地址地址可以理解为您的个人银行卡卡号</view> <view class="sub-title">激活您的ZH健康钱包获取钱包地址地址可以理解为您的个人银行卡卡号</view>
<!-- 按钮 --> <!-- 按钮 -->
<view class="wallet-btn" @click="$Router.replace({name: 'WalletCreate'})">激活钱包</view> <view class="wallet-btn" @click="$Router.replace({name: 'WalletCreate'})">激活钱包</view>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
} }
}, },
methods: { methods: {
} }
} }
</script> </script>
<style> <style>
page { page {
background-color: white; background-color: white;
} }
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
.content{ .content {
position: relative; position: relative;
height: 100vh; height: 100vh;
padding: 0 15vw; padding: 0 15vw;
text-align: center; text-align: center;
.logo{
width: 138rpx; .logo {
vertical-align: top; width: 138rpx;
margin-bottom: 20vh; vertical-align: top;
} margin-bottom: 20vh;
.sub-title{ }
font-size: $title-size-m;
color: $text-gray; .sub-title {
} font-size: $title-size-m;
.wallet-btn{ color: $text-gray;
width: 100%; }
background-color: $main-color;
height: 90rpx; .wallet-btn {
line-height: 90rpx; width: 100%;
margin-top: $margin * 2; background-color: $main-color;
border-radius: $radius-lg; height: 90rpx;
color: white; line-height: 90rpx;
font-weight: bold; margin-top: $margin * 2;
font-size: $title-size; border-radius: $radius-lg;
&.hollow{ color: white;
background-color: white; font-weight: bold;
color: $main-color; font-size: $title-size;
border:solid 2rpx $main-color;
box-sizing: border-box; &.hollow {
} background-color: white;
} color: $main-color;
} border: solid 2rpx $main-color;
box-sizing: border-box;
}
}
}
</style> </style>

View File

@@ -1,187 +1,193 @@
<template> <template>
<view> <view>
<!-- 设置钱包密码 --> <!-- 设置钱包密码 -->
<view class="password"> <view class="password">
<view class="prompt">请设置6位数字密码建议不要使用连续的数字</view> <view class="prompt">请设置6位数字密码建议不要使用连续的数字</view>
<view class="group"> <view class="group">
<view class="inputs" @click="onShowKet('password')"> <view class="inputs" @click="onShowKet('password')">
<block v-if="password.length > 0"> <block v-if="password.length > 0">
<text v-for="item in password.length" :key="item"></text> <text v-for="item in password.length" :key="item"></text>
</block> </block>
<block v-if="keyShow && valKye === 'password'"> <block v-if="keyShow && valKye === 'password'">
<text class="flicker-animation">|</text> <text class="flicker-animation">|</text>
</block> </block>
<block v-else> <block v-else>
<text v-if="password.length === 0" class="placeholder">请设置密码</text> <text v-if="password.length === 0" class="placeholder">请设置密码</text>
</block> </block>
</view> </view>
<view class="inputs" :class="{'hide': verify === ''}" @click="onShowKet('verify')"> <view class="inputs" :class="{'hide': verify === ''}" @click="onShowKet('verify')">
<block v-if="verify.length > 0"> <block v-if="verify.length > 0">
<text v-for="item in verify.length" :key="item"></text> <text v-for="item in verify.length" :key="item"></text>
</block> </block>
<block v-if="keyShow && valKye === 'verify'"> <block v-if="keyShow && valKye === 'verify'">
<text class="flicker-animation">|</text> <text class="flicker-animation">|</text>
</block> </block>
<block v-else> <block v-else>
<text v-if="verify.length === 0" class="placeholder">请确认密码</text> <text v-if="verify.length === 0" class="placeholder">请确认密码</text>
</block> </block>
</view> </view>
</view> </view>
</view> </view>
<!-- key键盘 --> <!-- key键盘 -->
<u-keyboard <u-keyboard mode="number" random dotDisabled :overlay="false" :show="keyShow" :showCancel="false"
mode="number" @change="keyValChange" @backspace="keyValBackspace" @confirm="keyShow = false"></u-keyboard>
random <!-- 按钮 -->
dotDisabled <view class="buttons">
:overlay="false" <button type="default" form-type="submit" @click="createWallet">确认激活</button>
:show="keyShow" </view>
:showCancel="false" </view>
@change="keyValChange" </template>
@backspace="keyValBackspace"
@confirm="keyShow = false" <script>
></u-keyboard> import {
<!-- 按钮 --> security
<view class="buttons"> } from '@/apis/interfaces/wallet';
<button type="default" form-type="submit" @click="createWallet">确认激活</button> export default {
</view> data() {
</view> return {
</template> password: '',
verify: '',
<script> valKye: '',
import { security } from '@/apis/interfaces/wallet'; keyShow: false
export default { };
data() { },
return { methods: {
password: '', // 唤起key
verify : '', onShowKet(key) {
valKye : '', this.valKye = key
keyShow : false this.keyShow = true
}; },
}, // 键盘输入
methods: { keyValChange(e) {
// 唤起key if (this[this.valKye].length >= 6) return
onShowKet(key){ this[this.valKye] += e
this.valKye = key },
this.keyShow = true // 键盘删除
}, keyValBackspace(e) {
// 键盘输入 if (this[this.valKye].length) this[this.valKye] = this[this.valKye].substr(0, this[this.valKye].length -
keyValChange(e){ 1)
if(this[this.valKye].length >= 6) return },
this[this.valKye] += e // 激活钱包
}, createWallet() {
// 键盘删除 if (this.password === '' || this.verify === '') {
keyValBackspace(e){ uni.showToast({
if(this[this.valKye].length) this[this.valKye] = this[this.valKye].substr(0, this[this.valKye].length - 1) icon: 'none',
}, title: '请设置密码'
// 激活钱包 });
createWallet() { return;
if (this.password === '' || this.verify === '') { }
uni.showToast({ if (this.password !== this.verify) {
icon: 'none', uni.showToast({
title: '请设置密码' icon: 'none',
}); title: '两次输入密码不一致'
return; });
} return;
if (this.password !== this.verify) { }
uni.showToast({
icon: 'none', security({
title: '两次输入密码不一致' code: Number(this.password)
}); }).then(res => {
return; this.$Router.replace({
} name: 'WalletProperty'
})
security({ }).catch(err => {
code: Number(this.password) uni.showToast({
}).then(res => { icon: 'none',
this.$Router.replace({ title: err.message
name: 'WalletProperty' });
}) });
}).catch(err => { }
uni.showToast({ }
icon: 'none', };
title: err.message </script>
});
}); <style>
} .flicker-animation {
} animation: flicker .8s infinite;
}; }
</script>
@keyframes flicker {
<style> 0% {
.flicker-animation{ opacity: 0;
animation: flicker .8s infinite; }
}
@keyframes flicker{ 100 {
0%{opacity: 0;} opacity: 1;
100{opacity: 1;} }
} }
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
// 副标题 // 副标题
.sub-title { .sub-title {
color: $text-gray; color: $text-gray;
text-align: center; text-align: center;
margin: $margin * 2 $margin; margin: $margin * 2 $margin;
font-size: $title-size-m; font-size: $title-size-m;
} }
// 设置密码 // 设置密码
.password { .password {
padding: 0 $padding * 2; padding: 0 $padding * 2;
.prompt {
margin-top: $margin * 2; .prompt {
font-size: $title-size-m; margin-top: $margin * 2;
color: $main-color; font-size: $title-size-m;
text-align: center; color: $main-color;
} text-align: center;
}
.group {
padding-top: $padding; .group {
.inputs { padding-top: $padding;
padding: 10rpx $padding + 10;
margin-top: $margin; .inputs {
border-radius: $radius-m; padding: 10rpx $padding + 10;
background-color: $window-color; margin-top: $margin;
height: 70rpx; border-radius: $radius-m;
line-height: 70rpx; background-color: $window-color;
font-size: $title-size-lg; height: 70rpx;
text-align: center; line-height: 70rpx;
text{ font-size: $title-size-lg;
padding: 0 10rpx; text-align: center;
text-align: center;
} text {
.placeholder{ padding: 0 10rpx;
color: $text-gray; text-align: center;
} }
}
} .placeholder {
} color: $text-gray;
}
// 按钮 }
.buttons { }
padding: $padding * 2; }
.text {
text-align: center; // 按钮
line-height: 90rpx; .buttons {
height: 90rpx; padding: $padding * 2;
margin-bottom: $margin * 2;
font-size: $title-size-lg; .text {
color: $main-color; text-align: center;
font-weight: bold; line-height: 90rpx;
} height: 90rpx;
margin-bottom: $margin * 2;
button { font-size: $title-size-lg;
height: 90rpx; color: $main-color;
line-height: 90rpx; font-weight: bold;
background-color: $main-color; }
border-radius: $radius-m;
color: white; button {
font-weight: bold; height: 90rpx;
font-size: $title-size; line-height: 90rpx;
&::after{ background-color: $main-color;
display: none; border-radius: $radius-m;
} color: white;
} font-weight: bold;
} font-size: $title-size;
&::after {
display: none;
}
}
}
</style> </style>

View File

@@ -1,112 +1,122 @@
<template> <template>
<view> <view>
<!-- 提示信息 --> <!-- 提示信息 -->
<view class="prompt">请按照顺序记录并确保正确备份助记词</view> <view class="prompt">请按照顺序记录并确保正确备份助记词</view>
<!-- 助记词 --> <!-- 助记词 -->
<ul class="mnemonic"> <ul class="mnemonic">
<li v-for="(item, index) in mnemonic" :key="index">{{item}}</li> <li v-for="(item, index) in mnemonic" :key="index">{{item}}</li>
</ul> </ul>
<!-- 按钮 --> <!-- 按钮 -->
<view class="buttons"> <view class="buttons">
<view class="text">助记词是用户账户的唯一标识不能分享给他人掌握该助记词即可控制该账户与钱包</view> <view class="text">助记词是用户账户的唯一标识不能分享给他人掌握该助记词即可控制该账户与钱包</view>
<!-- <button type="default" @click="goto">验证助记词</button> --> <!-- <button type="default" @click="goto">验证助记词</button> -->
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { seed } from "@/apis/interfaces/wallet" import {
export default { seed
data() { } from "@/apis/interfaces/wallet"
return { export default {
mnemonic: [] data() {
} return {
}, mnemonic: []
mounted() { }
seed({ },
code: this.$Route.query.password mounted() {
}).then(res => { seed({
this.mnemonic = res.seed.split(' ') code: this.$Route.query.password
}).catch(err => { }).then(res => {
uni.showToast({ this.mnemonic = res.seed.split(' ')
icon: 'none', }).catch(err => {
title: err.message uni.showToast({
}) icon: 'none',
}) title: err.message
}, })
methods: { })
goto(){ },
this.$Router.replace({ methods: {
name: 'WalletValidation', goto() {
params: { this.$Router.replace({
seed: this.mnemonic, name: 'WalletValidation',
sign: this.sign params: {
} seed: this.mnemonic,
}) sign: this.sign
} }
} })
} }
</script> }
}
<style lang="scss" scoped> </script>
// 提示信息
.prompt{ <style lang="scss" scoped>
color: $text-gray; // 提示信息
text-align: center; .prompt {
line-height: 90rpx; color: $text-gray;
font-size: $title-size-m; text-align: center;
} line-height: 90rpx;
// 跳过 font-size: $title-size-m;
.skip{ }
padding: $padding * 2;
text-align: center; // 跳过
color: $text-gray; .skip {
navigator{ padding: $padding * 2;
color: $main-color; text-align: center;
margin-left: $margin/2; color: $text-gray;
display: inline-block;
} navigator {
} color: $main-color;
// 助记词 margin-left: $margin/2;
.mnemonic{ display: inline-block;
margin: $margin $margin * 2; }
border-radius: $radius-m; }
box-shadow: 0 0 4rpx 4rpx rgba($color: $text-color, $alpha: .02);
background-color: white; // 助记词
padding: $padding; .mnemonic {
list-style: none; margin: $margin $margin * 2;
display: flex; border-radius: $radius-m;
flex-wrap: wrap; box-shadow: 0 0 4rpx 4rpx rgba($color: $text-color, $alpha: .02);
li{ background-color: white;
text-align: center; padding: $padding;
height: 58rpx; list-style: none;
padding: 0 $padding/2; display: flex;
line-height: 58rpx; flex-wrap: wrap;
margin: $margin / 2;
color: $text-color; li {
background: rgba($color: $border-color, $alpha: .4); text-align: center;
} height: 58rpx;
} padding: 0 $padding/2;
// 按钮 line-height: 58rpx;
.buttons{ margin: $margin / 2;
padding: $padding $padding * 2; color: $text-color;
.text{ background: rgba($color: $border-color, $alpha: .4);
text-align: center; }
margin-bottom: $margin * 2; }
font-size: $title-size-m;
color: $text-price; // 按钮
} .buttons {
button{ padding: $padding $padding * 2;
height: 90rpx;
line-height: 90rpx; .text {
background-color: $main-color; text-align: center;
border-radius: $radius-lg; margin-bottom: $margin * 2;
color: white; font-size: $title-size-m;
font-weight: bold; color: $text-price;
font-size: $title-size; }
&::after{
display: none; button {
} height: 90rpx;
} line-height: 90rpx;
} background-color: $main-color;
border-radius: $radius-lg;
color: white;
font-weight: bold;
font-size: $title-size;
&::after {
display: none;
}
}
}
</style> </style>

View File

@@ -1,119 +1,130 @@
<template> <template>
<view> <view>
<!-- 私钥 --> <!-- 私钥 -->
<view class="keys"> <view class="keys">
<view class="title">您的ZH托管钱包</view> <view class="title">您的ZH托管钱包</view>
<view class="key">{{key || '-'}}</view> <view class="key">{{key || '-'}}</view>
<view class="copykey" @click="copykey">复制我的私钥</view> <view class="copykey" @click="copykey">复制我的私钥</view>
</view> </view>
<!-- 疑问 --> <!-- 疑问 -->
<view class="doubt" v-if="rules.length > 0"> <view class="doubt" v-if="rules.length > 0">
<view class="doubt-item" v-for="(item, index) in rules" :key="index"> <view class="doubt-item" v-for="(item, index) in rules" :key="index">
<view class="title">{{item.title || '-'}}</view> <view class="title">{{item.title || '-'}}</view>
<view class="content">{{item.description || '-'}}</view> <view class="content">{{item.description || '-'}}</view>
</view> </view>
</view> </view>
<!-- 免责说明 --> <!-- 免责说明 -->
<!-- <view class="liability"> <!-- <view class="liability">
<navigator url="/pages/wallet/cmsWithDraw">免责条款</navigator> <navigator url="/pages/wallet/cmsWithDraw">免责条款</navigator>
</view> --> </view> -->
</view> </view>
</template> </template>
<script> <script>
import { privatekey, keyrules } from '@/apis/interfaces/wallet' import {
export default { privatekey,
data() { keyrules
return { } from '@/apis/interfaces/wallet'
key: "", export default {
rules: [ data() {
{ return {
title: "什么是托管钱包?", key: "",
description: "托管钱包顾名思义就是用户把私钥和数字资产委托给其他机构管理,也就是就是通过中心化的方式安全管理并保存资产,本质上是与区块链所追求的去中心化相背离的。" rules: [{
}, title: "什么是托管钱包?",
{ description: "托管钱包顾名思义就是用户把私钥和数字资产委托给其他机构管理,也就是就是通过中心化的方式安全管理并保存资产,本质上是与区块链所追求的去中心化相背离的。"
title: "什么是钱包私钥?", },
description: "作为管理和使用加密货币最关键的东西,私钥对所有数字货币用户而言具有所有权,拥有私钥才能支配相应的加密资产。" {
} title: "什么是钱包私钥?",
] description: "作为管理和使用加密货币最关键的东西,私钥对所有数字货币用户而言具有所有权,拥有私钥才能支配相应的加密资产。"
}; }
}, ]
mounted() { };
privatekey(this.$Route.query.password).then(res => { },
this.key = res.private_key mounted() {
}).catch(err => { privatekey(this.$Route.query.password).then(res => {
uni.showToast({ this.key = res.private_key
title: err.message, }).catch(err => {
icon : 'none' uni.showToast({
}) title: err.message,
}) icon: 'none'
}, })
methods:{ })
copykey(){ },
uni.setClipboardData({ methods: {
data: this.key copykey() {
}) uni.setClipboardData({
} data: this.key
} })
} }
</script> }
}
<style lang="scss"> </script>
.keys{
margin: $margin * 2; <style lang="scss">
background: white; .keys {
padding: $padding * 2; margin: $margin * 2;
box-shadow: 0 0 4rpx 4rpx rgba($color: #000000, $alpha: .02); background: white;
border-radius: $radius; padding: $padding * 2;
.title{ box-shadow: 0 0 4rpx 4rpx rgba($color: #000000, $alpha: .02);
text-align: center; border-radius: $radius;
font-weight: bold;
font-size: $title-size + 4; .title {
color: $text-color; text-align: center;
} font-weight: bold;
.key{ font-size: $title-size + 4;
padding: $padding * 2 0; color: $text-color;
text-align: center; }
color: $main-color;
word-wrap: break-word; .key {
} padding: $padding * 2 0;
.copykey{ text-align: center;
background-color: $main-color; color: $main-color;
color: white; word-wrap: break-word;
height: 95rpx; }
line-height: 95rpx;
text-align: center; .copykey {
font-size: $title-size; background-color: $main-color;
border-radius: $radius-m; color: white;
font-weight: bold; height: 95rpx;
} line-height: 95rpx;
} text-align: center;
.doubt{ font-size: $title-size;
margin: $margin $margin * 2; border-radius: $radius-m;
.doubt-item{ font-weight: bold;
padding: $padding 0; }
.title{ }
font-weight: bold;
color: $text-color; .doubt {
line-height: 50rpx; margin: $margin $margin * 2;
font-size: $title-size + 2;
} .doubt-item {
.content{ padding: $padding 0;
color: $text-gray;
font-size: $title-size-m; .title {
line-height: 40rpx; font-weight: bold;
} color: $text-color;
} line-height: 50rpx;
} font-size: $title-size + 2;
.liability{ }
text-align: center;
color: $text-gray; .content {
@extend .ios-bottom; color: $text-gray;
navigator{ font-size: $title-size-m;
font-size: $title-size-sm; line-height: 40rpx;
display: inline-block; }
line-height: 90rpx; }
padding: 0 ($padding * 2); }
}
} .liability {
text-align: center;
color: $text-gray;
@extend .ios-bottom;
navigator {
font-size: $title-size-sm;
display: inline-block;
line-height: 90rpx;
padding: 0 ($padding * 2);
}
}
</style> </style>

View File

@@ -1,359 +1,386 @@
<template> <template>
<view> <view>
<view class="propery"> <view class="propery">
<view class="propery-content"> <view class="propery-content">
<view class="currency">钱包余额</view> <view class="currency">钱包余额</view>
<view class="balance">{{ balance.balance || '0' }}</view> <view class="balance">{{ balance.balance || '0' }}</view>
<view class="frozen">{{ balance.frozen || '0' }} 冻结中</view> <view class="frozen">{{ balance.frozen || '0' }} 冻结中</view>
<view class="balance-flex"> <view class="balance-flex">
<view class="balance-flex-item" @click="showAddress">区块链地址</view> <view class="balance-flex-item" @click="showAddress">区块链地址</view>
<view class="balance-flex-item" @click="showPrivatekey('privatekey')">我的私钥</view> <view class="balance-flex-item" @click="showPrivatekey('privatekey')">我的私钥</view>
</view> </view>
</view> </view>
</view> </view>
<!-- 账户记录 --> <!-- 账户记录 -->
<view class="record"> <view class="record">
<view class="record-tabs"> <view class="record-tabs">
<view class="tabs-item" :class="logsType === 0 ? 'show': ''" @click="onLogsType(0)">全部</view> <view class="tabs-item" :class="logsType === 0 ? 'show': ''" @click="onLogsType(0)">全部</view>
<view class="tabs-item" :class="logsType === 2 ? 'show': ''" @click="onLogsType(2)">收入</view> <view class="tabs-item" :class="logsType === 2 ? 'show': ''" @click="onLogsType(2)">收入</view>
<view class="tabs-item" :class="logsType === 1 ? 'show': ''" @click="onLogsType(1)">支出</view> <view class="tabs-item" :class="logsType === 1 ? 'show': ''" @click="onLogsType(1)">支出</view>
</view> </view>
<record :list="logs" /> <record :list="logs" />
<!-- ios安全距离 --> <!-- ios安全距离 -->
<view class="ios-bottom"></view> <view class="ios-bottom"></view>
</view> </view>
<!-- 钱包密码 --> <!-- 钱包密码 -->
<u-popup :show="passwordShow" @close="resetPassword" mode="center" round="10" borderRadius="10"> <u-popup :show="passwordShow" @close="resetPassword" mode="center" round="10" borderRadius="10">
<view class="validationPassword"> <view class="validationPassword">
<view class="from"> <view class="from">
<view class="title">验证钱包密码</view> <view class="title">验证钱包密码</view>
<view class="inputs"> <view class="inputs">
<text v-for="item in password.length" :key="item"></text> <text v-for="item in password.length" :key="item"></text>
<text class="flicker-animation">|</text> <text class="flicker-animation">|</text>
</view> </view>
</view> </view>
</view> </view>
</u-popup> </u-popup>
<!-- key --> <!-- key -->
<u-keyboard <u-keyboard mode="number" random dotDisabled :overlay="false" :show="passwordShow" confirmText="验证"
mode="number" @change="keyValChange" @backspace="keyValBackspace" @confirm="payPassword('confirm', passwordPages)"
random @cancel="passwordShow = false"></u-keyboard>
dotDisabled </view>
:overlay="false"
:show="passwordShow"
confirmText="验证"
@change="keyValChange"
@backspace="keyValBackspace"
@confirm="payPassword('confirm', passwordPages)"
@cancel="passwordShow = false"
></u-keyboard>
</view>
</template> </template>
<script> <script>
import record from '@/components/property/record' import record from '@/components/property/record'
import { sum, logs, securityCheck } from '@/apis/interfaces/wallet' import {
export default { sum,
components: { logs,
record securityCheck
}, } from '@/apis/interfaces/wallet'
data() { export default {
return { components: {
balance : {}, record
logs : [], },
logsType : 0, data() {
password : '', return {
passwordShow : false, balance: {},
passwordPages: '' logs: [],
}; logsType: 0,
}, password: '',
onShow() { passwordShow: false,
Promise.all([ passwordPages: ''
sum(), };
logs() },
]).then(res => { onShow() {
this.balance = res[0] Promise.all([
this.logs = res[1] sum(),
}).catch(err => { logs()
uni.showToast({ ]).then(res => {
icon: 'none', this.balance = res[0]
title: err.message this.logs = res[1]
}) }).catch(err => {
}) uni.showToast({
}, icon: 'none',
methods: { title: err.message
// 键盘输入 })
keyValChange(e){ })
if(this.password.length >= 6) return },
this.password += e methods: {
}, // 键盘输入
// 键盘删除 keyValChange(e) {
keyValBackspace(e){ if (this.password.length >= 6) return
if(this.password.length) this.password = this.password.substr(0, this.password.length - 1) this.password += e
}, },
// 弹出私钥 // 键盘删除
showPrivatekey(pages){ keyValBackspace(e) {
this.passwordShow = true if (this.password.length) this.password = this.password.substr(0, this.password.length - 1)
this.passwordPages = pages },
}, // 弹出私钥
// 重置密码 showPrivatekey(pages) {
resetPassword(){ this.passwordShow = true
this.passwordShow = false this.passwordPages = pages
this.password = '' },
}, // 重置密码
// 验证私钥 resetPassword() {
payPassword(type){ this.passwordShow = false
if(type === 'confirm'){ this.password = ''
if(this.password === '') { },
uni.showToast({ // 验证私钥
title: '请输入安全密码', payPassword(type) {
icon : 'none' if (type === 'confirm') {
}) if (this.password === '') {
return uni.showToast({
} title: '请输入安全密码',
securityCheck(this.password).then(res => { icon: 'none'
switch (this.passwordPages){ })
case 'privatekey': return
this.$Router.push({name:'WalletPrivatekey', params: {password: this.password}}) }
break; securityCheck(this.password).then(res => {
case 'ResetPassword': switch (this.passwordPages) {
this.$Router.push({name:'ResetPassword', params: {password: this.password}}) case 'privatekey':
break; this.$Router.push({
case 'WalletMnemonic': name: 'WalletPrivatekey',
this.$Router.push({name:'WalletMnemonic', params: {password: this.password}}) params: {
break; password: this.password
} }
this.resetPassword() })
}).catch(err => { break;
uni.showToast({ case 'ResetPassword':
title: err.message, this.$Router.push({
icon: 'none', name: 'ResetPassword',
}) params: {
}) password: this.password
return }
} })
this.$refs.showPassword.close() break;
}, case 'WalletMnemonic':
// 交易记录 this.$Router.push({
onLogsType(index) { name: 'WalletMnemonic',
if (this.logsType === index) return params: {
this.logsType = index password: this.password
this.logs = [] }
logs({ })
flag: this.logsType break;
}).then(res => { }
this.logs = res this.resetPassword()
}) }).catch(err => {
}, uni.showToast({
// 区块地址 title: err.message,
showAddress() { icon: 'none',
uni.showModal({ })
title: '我的区块链地址', })
content: this.balance.address, return
cancelText: '复制', }
cancelColor: '#009B69', this.$refs.showPassword.close()
success: (res) => { },
if (res.cancel) { // 交易记录
uni.setClipboardData({ onLogsType(index) {
data: this.balance.address if (this.logsType === index) return
}) this.logsType = index
} this.logs = []
} logs({
}) flag: this.logsType
} }).then(res => {
}, this.logs = res
onNavigationBarButtonTap(e) { })
if (e.index === 0) { },
uni.showActionSheet({ // 区块地址
itemList: ['导出助记词', '修改密码'], showAddress() {
success: (res) => { uni.showModal({
switch (res.tapIndex) { title: '我的区块链地址',
case 0: content: this.balance.address,
this.showPrivatekey('WalletMnemonic') cancelText: '复制',
break; cancelColor: '#009B69',
case 1: success: (res) => {
this.showPrivatekey('ResetPassword') if (res.cancel) {
break; uni.setClipboardData({
} data: this.balance.address
uni.hideLoading() })
} }
}) }
} })
} }
} },
</script> onNavigationBarButtonTap(e) {
if (e.index === 0) {
<style> uni.showActionSheet({
.flicker-animation{ itemList: ['导出助记词', '修改密码'],
animation: flicker .8s infinite; success: (res) => {
} switch (res.tapIndex) {
@keyframes flicker{ case 0:
0%{opacity: 0;} this.showPrivatekey('WalletMnemonic')
100{opacity: 1;} break;
} case 1:
this.showPrivatekey('ResetPassword')
break;
}
uni.hideLoading()
}
})
}
}
}
</script>
<style>
.flicker-animation {
animation: flicker .8s infinite;
}
@keyframes flicker {
0% {
opacity: 0;
}
100 {
opacity: 1;
}
}
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
// 验证密码弹出层 // 验证密码弹出层
.validationPassword{ .validationPassword {
width: 80vw; width: 80vw;
.from{
padding: $padding*2;
text-align: center;
.title{
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-weight: bold;
font-size: $title-size;
padding-bottom: $padding;
}
// input{
// background: $window-color;
// height: 90rpx;
// left: 90rpx;
// font-size: $title-size-lg;
// border-radius: 45rpx;
// }
.inputs {
background-color: $window-color;
height: 90rpx;
line-height: 90rpx;
border-radius: 45rpx;
font-size: $title-size-lg;
text-align: center;
text{
padding: 0 10rpx;
text-align: center;
}
.placeholder{
color: $text-gray;
}
}
}
.buttons{
text-align: center;
padding: 0 $padding*2;
.button{
height: 90rpx;
line-height: 90rpx;
margin-bottom: $margin;
&.cancel{
color: $text-gray;
}
&.confirm{
color: white;
background: $main-color;
border-radius: 45rpx;
}
}
}
//
//
}
// 账户
.propery {
position: relative;
padding-top: var(--status-bar-height);
background-image: linear-gradient(to right, $main-color, #22aa98);
&::before { .from {
position: absolute; padding: $padding*2;
left: 0; text-align: center;
top: 0;
width: 100%;
height: 100%;
content: " ";
// background-image: url(@/static/background/wallet-back.png);
background-size: 100%;
background-repeat: no-repeat;
}
.propery-content { .title {
position: relative; display: flex;
z-index: 1; flex-direction: column;
padding: $padding * 5 $padding * 2; align-items: center;
text-align: center; justify-content: center;
font-weight: bold;
font-size: $title-size;
padding-bottom: $padding;
}
.currency { // input{
font-size: $title-size-m; // background: $window-color;
color: rgba($color: white, $alpha: .8); // height: 90rpx;
} // left: 90rpx;
// font-size: $title-size-lg;
// border-radius: 45rpx;
// }
.inputs {
background-color: $window-color;
height: 90rpx;
line-height: 90rpx;
border-radius: 45rpx;
font-size: $title-size-lg;
text-align: center;
.balance { text {
font-size: $title-size * 2; padding: 0 10rpx;
padding: ($padding / 2) 0; text-align: center;
color: white; }
}
.frozen { .placeholder {
background: rgba($color: #000000, $alpha: .1); color: $text-gray;
color: rgba($color: white, $alpha: .7); }
display: inline-block; }
padding: 0 $padding; }
font-size: $title-size-m;
height: 50rpx;
line-height: 50rpx;
border-radius: $radius-m;
border: solid 1rpx rgba($color: white, $alpha: .4)
}
.balance-flex { .buttons {
display: flex; text-align: center;
justify-content: center; padding: 0 $padding*2;
margin-top: $margin * 3;
.balance-flex-item { .button {
background-color: white; height: 90rpx;
width: 200rpx; line-height: 90rpx;
height: 75rpx; margin-bottom: $margin;
line-height: 75rpx;
color: $main-color;
margin: 0 $margin;
border-radius: $radius-m;
font-size: $title-size-lg;
}
}
}
}
// 记录 &.cancel {
.record { color: $text-gray;
background-color: white; }
border-radius: $radius $radius 0 0;
padding: $padding ($padding * 2);
margin-top: -$margin;
position: relative;
z-index: 2;
.record-tabs { &.confirm {
display: flex; color: white;
justify-content: space-around; background: $main-color;
font-weight: bold; border-radius: 45rpx;
font-size: $title-size; }
color: $text-gray; }
line-height: 70rpx; }
margin-bottom: $margin;
.tabs-item { //
position: relative; //
padding: 0 $padding; }
&.show { // 账户
color: $main-color; .propery {
position: relative;
padding-top: var(--status-bar-height);
background-image: linear-gradient(to right, $main-color, #22aa98);
&::before { &::before {
position: absolute; position: absolute;
bottom: 0; left: 0;
left: $padding; top: 0;
right: $padding; width: 100%;
height: 4rpx; height: 100%;
content: " "; content: " ";
background-color: $main-color; // background-image: url(@/static/background/wallet-back.png);
} background-size: 100%;
} background-repeat: no-repeat;
} }
}
} .propery-content {
position: relative;
z-index: 1;
padding: $padding * 5 $padding * 2;
text-align: center;
.currency {
font-size: $title-size-m;
color: rgba($color: white, $alpha: .8);
}
.balance {
font-size: $title-size * 2;
padding: ($padding / 2) 0;
color: white;
}
.frozen {
background: rgba($color: #000000, $alpha: .1);
color: rgba($color: white, $alpha: .7);
display: inline-block;
padding: 0 $padding;
font-size: $title-size-m;
height: 50rpx;
line-height: 50rpx;
border-radius: $radius-m;
border: solid 1rpx rgba($color: white, $alpha: .4)
}
.balance-flex {
display: flex;
justify-content: center;
margin-top: $margin * 3;
.balance-flex-item {
background-color: white;
width: 200rpx;
height: 75rpx;
line-height: 75rpx;
color: $main-color;
margin: 0 $margin;
border-radius: $radius-m;
font-size: $title-size-lg;
}
}
}
}
// 记录
.record {
background-color: white;
border-radius: $radius $radius 0 0;
padding: $padding ($padding * 2);
margin-top: -$margin;
position: relative;
z-index: 2;
.record-tabs {
display: flex;
justify-content: space-around;
font-weight: bold;
font-size: $title-size;
color: $text-gray;
line-height: 70rpx;
margin-bottom: $margin;
.tabs-item {
position: relative;
padding: 0 $padding;
&.show {
color: $main-color;
&::before {
position: absolute;
bottom: 0;
left: $padding;
right: $padding;
height: 4rpx;
content: " ";
background-color: $main-color;
}
}
}
}
}
</style> </style>

View File

@@ -1,198 +1,203 @@
<template> <template>
<view> <view>
<!-- 设置钱包密码 --> <!-- 设置钱包密码 -->
<view class="password"> <view class="password">
<view class="prompt">请设置6位数字密码建议不要使用连续的数字</view> <view class="prompt">请设置6位数字密码建议不要使用连续的数字</view>
<view class="group"> <view class="group">
<view class="inputs" @click="onShowKet('password')"> <view class="inputs" @click="onShowKet('password')">
<block v-if="password.length > 0"> <block v-if="password.length > 0">
<text v-for="item in password.length" :key="item"></text> <text v-for="item in password.length" :key="item"></text>
</block> </block>
<block v-if="keyShow && valKye === 'password'"> <block v-if="keyShow && valKye === 'password'">
<text class="flicker-animation">|</text> <text class="flicker-animation">|</text>
</block> </block>
<block v-else> <block v-else>
<text v-if="password.length === 0" class="placeholder">请设置密码</text> <text v-if="password.length === 0" class="placeholder">请设置密码</text>
</block> </block>
</view> </view>
<view class="inputs" :class="{'hide': verify === ''}" @click="onShowKet('verify')"> <view class="inputs" :class="{'hide': verify === ''}" @click="onShowKet('verify')">
<block v-if="verify.length > 0"> <block v-if="verify.length > 0">
<text v-for="item in verify.length" :key="item"></text> <text v-for="item in verify.length" :key="item"></text>
</block> </block>
<block v-if="keyShow && valKye === 'verify'"> <block v-if="keyShow && valKye === 'verify'">
<text class="flicker-animation">|</text> <text class="flicker-animation">|</text>
</block> </block>
<block v-else> <block v-else>
<text v-if="verify.length === 0" class="placeholder">请确认密码</text> <text v-if="verify.length === 0" class="placeholder">请确认密码</text>
</block> </block>
</view> </view>
</view> </view>
</view> </view>
<!-- key键盘 --> <!-- key键盘 -->
<u-keyboard <u-keyboard mode="number" random dotDisabled :overlay="false" :show="keyShow" :showCancel="false"
mode="number" @change="keyValChange" @backspace="keyValBackspace" @confirm="keyShow = false"></u-keyboard>
random <!-- 按钮 -->
dotDisabled <view class="buttons">
:overlay="false" <button type="default" form-type="submit" @click="createWallet">确认修改</button>
:show="keyShow" </view>
:showCancel="false" </view>
@change="keyValChange"
@backspace="keyValBackspace"
@confirm="keyShow = false"
></u-keyboard>
<!-- 按钮 -->
<view class="buttons">
<button type="default" form-type="submit" @click="createWallet">确认修改</button>
</view>
</view>
</template> </template>
<script> <script>
import { securityReset } from '@/apis/interfaces/wallet' import {
export default { securityReset
data() { } from '@/apis/interfaces/wallet'
return { export default {
password: '', data() {
verify: '', return {
oldPassword: '', password: '',
verify: '',
valKye : '', oldPassword: '',
keyShow : false valKye: '',
} keyShow: false
}, }
onLoad() { },
this.oldPassword = this.$Route.query.password onLoad() {
}, this.oldPassword = this.$Route.query.password
methods: { },
// 唤起key methods: {
onShowKet(key){ // 唤起key
this.valKye = key onShowKet(key) {
this.keyShow = true this.valKye = key
}, this.keyShow = true
// 键盘输入 },
keyValChange(e){ // 键盘输入
if(this[this.valKye].length >= 6) return keyValChange(e) {
this[this.valKye] += e if (this[this.valKye].length >= 6) return
}, this[this.valKye] += e
// 键盘删除 },
keyValBackspace(e){ // 键盘删除
if(this[this.valKye].length) this[this.valKye] = this[this.valKye].substr(0, this[this.valKye].length - 1) keyValBackspace(e) {
}, if (this[this.valKye].length) this[this.valKye] = this[this.valKye].substr(0, this[this.valKye].length -
// 修改密码 1)
createWallet() { },
if (this.password === '' || this.verify === '') { // 修改密码
uni.showToast({ createWallet() {
icon: 'none', if (this.password === '' || this.verify === '') {
title: '请设置密码' uni.showToast({
}) icon: 'none',
return title: '请设置密码'
} })
if (this.password !== this.verify) { return
uni.showToast({ }
icon: 'none', if (this.password !== this.verify) {
title: '两次输入密码不一致' uni.showToast({
}) icon: 'none',
return title: '两次输入密码不一致'
} })
securityReset({ return
new_code: this.password, }
code: this.oldPassword securityReset({
}).then(res => { new_code: this.password,
uni.showModal({ code: this.oldPassword
title: '提示', }).then(res => {
content: '密码已重置', uni.showModal({
showCancel:false, title: '提示',
success: res=> { content: '密码已重置',
uni.navigateBack() showCancel: false,
} success: res => {
}) uni.navigateBack()
}).catch(err => { }
uni.showToast({ })
icon: 'none', }).catch(err => {
title: err.message uni.showToast({
}) icon: 'none',
}) title: err.message
} })
} })
} }
</script> }
}
</script>
<style>
.flicker-animation{
animation: flicker .8s infinite; <style>
} .flicker-animation {
@keyframes flicker{ animation: flicker .8s infinite;
0%{opacity: 0;} }
100{opacity: 1;}
} @keyframes flicker {
0% {
opacity: 0;
}
100 {
opacity: 1;
}
}
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
// 副标题 // 副标题
.sub-title { .sub-title {
color: $text-gray; color: $text-gray;
text-align: center; text-align: center;
margin: $margin * 2 $margin; margin: $margin * 2 $margin;
font-size: $title-size-m; font-size: $title-size-m;
} }
// 设置密码 // 设置密码
.password { .password {
padding: 0 $padding * 2; padding: 0 $padding * 2;
.prompt {
margin-top: $margin * 2; .prompt {
font-size: $title-size-m; margin-top: $margin * 2;
color: $main-color; font-size: $title-size-m;
text-align: center; color: $main-color;
} text-align: center;
}
.group {
padding-top: $padding; .group {
.inputs { padding-top: $padding;
padding: 10rpx $padding + 10;
margin-top: $margin; .inputs {
border-radius: $radius-m; padding: 10rpx $padding + 10;
background-color: $window-color; margin-top: $margin;
height: 70rpx; border-radius: $radius-m;
line-height: 70rpx; background-color: $window-color;
font-size: $title-size-lg; height: 70rpx;
text-align: center; line-height: 70rpx;
text{ font-size: $title-size-lg;
padding: 0 10rpx; text-align: center;
text-align: center;
} text {
.placeholder{ padding: 0 10rpx;
color: $text-gray; text-align: center;
} }
}
} .placeholder {
} color: $text-gray;
}
// 按钮 }
.buttons { }
padding: $padding * 2; }
.text {
text-align: center; // 按钮
line-height: 90rpx; .buttons {
height: 90rpx; padding: $padding * 2;
margin-bottom: $margin * 2;
font-size: $title-size-lg; .text {
color: $main-color; text-align: center;
font-weight: bold; line-height: 90rpx;
} height: 90rpx;
margin-bottom: $margin * 2;
button { font-size: $title-size-lg;
height: 90rpx; color: $main-color;
line-height: 90rpx; font-weight: bold;
background-color: $main-color; }
border-radius: $radius-m;
color: white; button {
font-weight: bold; height: 90rpx;
font-size: $title-size; line-height: 90rpx;
&::after{ background-color: $main-color;
display: none; border-radius: $radius-m;
} color: white;
} font-weight: bold;
} font-size: $title-size;
&::after {
display: none;
}
}
}
</style> </style>

View File

@@ -1,170 +1,178 @@
<template> <template>
<view> <view>
<!-- 提示信息 --> <!-- 提示信息 -->
<view class="prompt"> <view class="prompt">
验证您的钱包助记词 验证您的钱包助记词
</view> </view>
<!-- 助记词 --> <!-- 助记词 -->
<view class="mnemonic"> <view class="mnemonic">
<view <view class="item" v-for="(item, index) in validation" :key="index" :class="item === null ? 'hide': ''"
class="item" @click="onKeys('removeKey', index)">{{ item }}</view>
v-for="(item, index) in validation" </view>
:key="index" <!-- 选择助记词 -->
:class="item === null ? 'hide': ''" <block v-if="mnemonic.length > 0">
@click="onKeys('removeKey', index)" <view class="mnemonic-title">
>{{ item }}</view> 按顺序填写助记词
</view> </view>
<!-- 选择助记词 --> <view class="mnemonic-select">
<block v-if="mnemonic.length > 0"> <view class="item" v-for="(item, index) in mnemonic" :key="index" @click="onKeys('addKey', index)">
<view class="mnemonic-title"> {{ item }}</view>
按顺序填写助记词 </view>
</view> </block>
<view class="mnemonic-select"> <!-- 按钮 -->
<view class="item" v-for="(item, index) in mnemonic" :key="index" @click="onKeys('addKey', index)">{{ item }}</view> <view class="buttons">
</view> <button type="default" @click="verifyMnemonic">验证</button>
</block> </view>
<!-- 按钮 --> </view>
<view class="buttons"> </template>
<button type="default" @click="verifyMnemonic">验证</button>
</view> <script>
</view> import {
</template> hash
} from "@/apis/interfaces/wallet"
<script> export default {
import { hash } from "../../apis/interfaces/wallet" data() {
export default { return {
data() { validation: new Array(12).fill(null), // 验证key
return { mnemonic: [], // 助记词key
validation : new Array(12).fill(null), // 验证key sign: '', // 助记词校验签名
mnemonic : [], // 助记词key seedString: '', // 助记词原词
sign : '', // 助记词校验签名 }
seedString : '', // 助记词原词 },
} mounted() {
}, let seed = this.$Route.query.seed.split(',')
mounted() { seed.sort(() => {
let seed = this.$Route.query.seed.split(',') return Math.random() - .5
seed.sort(() => { });
return Math.random() - .5 console.log(seed)
}); // this.mnemonic = seed
console.log(seed) // this.sign = this.$Route.query.sign
// this.mnemonic = seed // this.seedString = this.$Route.query.seed
// this.sign = this.$Route.query.sign },
// this.seedString = this.$Route.query.seed methods: {
}, // 填写助记词
methods: { onKeys(type, index) {
// 填写助记词 if (type === 'addKey') {
onKeys(type, index){ this.$set(this.validation, this.validation.findIndex(val => val === null), this.mnemonic[index])
if(type === 'addKey') { this.$delete(this.mnemonic, index)
this.$set(this.validation, this.validation.findIndex(val => val === null), this.mnemonic[index]) return
this.$delete(this.mnemonic, index) }
return if (type === 'removeKey' && this.validation[index] !== null) {
} this.mnemonic.push(this.validation[index])
if(type === 'removeKey' && this.validation[index] !== null) { this.$delete(this.validation, index)
this.mnemonic.push(this.validation[index]) this.validation.push(null)
this.$delete(this.validation, index) }
this.validation.push(null) },
} // 验证助记词
}, verifyMnemonic() {
// 验证助记词 if (this.validation.findIndex(val => val === null) > -1) {
verifyMnemonic(){ uni.showToast({
if(this.validation.findIndex(val => val === null) > -1){ title: '请完整填写助记词',
uni.showToast({ icon: 'none'
title: '请完整填写助记词', })
icon : 'none' return
}) }
return let seed = this.validation.toString().replace(/,/g, ',')
} if (this.seedString !== seed) {
let seed = this.validation.toString().replace(/,/g, ',') uni.showToast({
if (this.seedString !== seed) { title: '验证失败,请确认您的助记词',
uni.showToast({ icon: 'none'
title: '验证失败,请确认您的助记词', })
icon : 'none' return
}) }
return uni.redirectTo({
} url: './create'
uni.redirectTo({ })
url: './create' }
}) }
} }
} </script>
}
</script> <style lang="scss" scoped>
// 提示信息
<style lang="scss" scoped> .prompt {
// 提示信息 color: $text-gray;
.prompt{ text-align: center;
color: $text-gray; line-height: 90rpx;
text-align: center; font-size: $title-size-m;
line-height: 90rpx; }
font-size: $title-size-m;
} // 选择助记词
// 选择助记词 .mnemonic-title {
.mnemonic-title{ padding-top: $padding * 2;
padding-top: $padding * 2; margin: 0 $margin * 2;
margin: 0 $margin * 2; font-size: $title-size-m;
font-size: $title-size-m; color: $main-color;
color: $main-color; }
}
.mnemonic-select{ .mnemonic-select {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
padding: $padding $padding + $padding / 2; padding: $padding $padding + $padding / 2;
.item{
background-color: white; .item {
line-height: 68rpx; background-color: white;
height: 68rpx; line-height: 68rpx;
width: 68rpx; height: 68rpx;
text-align: center; width: 68rpx;
margin: $margin / 2; text-align: center;
border-radius: $radius-m; margin: $margin / 2;
box-shadow: 0 0 4rpx 4rpx rgba($color: $text-color, $alpha: .02); border-radius: $radius-m;
} box-shadow: 0 0 4rpx 4rpx rgba($color: $text-color, $alpha: .02);
} }
// 助记词 }
.mnemonic{
margin: $margin ($margin * 2); // 助记词
border-radius: $radius-m; .mnemonic {
box-shadow: 0 0 4rpx 4rpx rgba($color: $text-color, $alpha: .02); margin: $margin ($margin * 2);
background-color: white; border-radius: $radius-m;
padding: $padding; box-shadow: 0 0 4rpx 4rpx rgba($color: $text-color, $alpha: .02);
display: flex; background-color: white;
flex-wrap: wrap; padding: $padding;
align-items: flex-start; display: flex;
.item{ flex-wrap: wrap;
background: rgba($color: $border-color, $alpha: .4); align-items: flex-start;
min-width: 58rpx;
height: 58rpx; .item {
line-height: 58rpx; background: rgba($color: $border-color, $alpha: .4);
text-align: center; min-width: 58rpx;
color: $text-color; height: 58rpx;
margin: $margin / 2; line-height: 58rpx;
&.hide{ text-align: center;
border:dashed 1px $border-color; color: $text-color;
box-sizing: border-box; margin: $margin / 2;
background-color: white;
} &.hide {
} border: dashed 1px $border-color;
} box-sizing: border-box;
// 按钮 background-color: white;
.buttons{ }
padding: $padding $padding * 2; }
.text{ }
text-align: center;
margin-bottom: $margin * 2; // 按钮
font-size: $title-size-lg; .buttons {
color: $text-price; padding: $padding $padding * 2;
}
button{ .text {
height: 90rpx; text-align: center;
line-height: 90rpx; margin-bottom: $margin * 2;
background-color: $main-color; font-size: $title-size-lg;
border-radius: $radius-lg; color: $text-price;
color: white; }
font-weight: bold;
font-size: $title-size; button {
&[disabled]{ height: 90rpx;
background: rgba($color: $main-color, $alpha: .8); line-height: 90rpx;
} background-color: $main-color;
} border-radius: $radius-lg;
} color: white;
font-weight: bold;
font-size: $title-size;
&[disabled] {
background: rgba($color: $main-color, $alpha: .8);
}
}
}
</style> </style>

View File

@@ -1,126 +0,0 @@
import Bitcore from "bitcore-lib"
import Mnemonic from "bitcore-mnemonic"
import secp256k1 from 'secp256k1'
import {
Address,
pubToAddress,
toBuffer,
toChecksumAddress,
intToBuffer
} from 'ethereumjs-util'
import coinType from './networks.js'
import basex from 'base-x'
export default class Wallet {
static coinType = coinType
/**
* 生成助记词
* @param {Object} lang
*/
static generateMnemonic(lang) {
if (lang) {
return (new Mnemonic(this.getLanguage(lang))).toString();
} else {
return (new Mnemonic()).toString();
}
}
/**
* 验证助记词
* @param {Object} code
* @param {Object} lang
*/
static validMnemonic(code, lang) {
if (lang) {
return Mnemonic.isValid(code, this.getLanguage(lang));
} else {
return Mnemonic.isValid(code);
}
}
/**
* 获取助记词字典
* @param {Object} lang
*/
static getLanguage(lang) {
return Mnemonic.Words[lang]
}
/**
* 转成硬钱包私钥
* @param {Object} code
*/
static toHDPrivateKey(code) {
return (new Mnemonic(code)).toHDPrivateKey()
}
/**
* 验证地址是否合法
* @param {Object} addr
*/
static isValidAddress(addr) {
return Bitcore.Address.isValid(addr)
}
/**
* 硬钱包私钥转成对应网络的 地址 和 私钥
* @param {Object} hdPrivateKey
* @param {Object} type
*/
static HDPrivateKeyToAddress(hdPrivateKey, type) {
const derived = hdPrivateKey.derive("m/44'/" + type.type + "'/0'/0/0");
if (type.type === 195) {
const ethAddr = this.getEthereumAddress(derived)
const addressBuffer = Buffer.concat([intToBuffer(0x41), ethAddr.buf], 21)
return {
address: Bitcore.encoding.Base58Check.encode(addressBuffer),
public_key: derived.privateKey.publicKey.toString(),
private_key: derived.privateKey.toString()
}
}
if (type.type === 144) {
let addr = derived.privateKey.toAddress(type.network).toString()
let deco = Bitcore.encoding.Base58.decode(addr)
return {
address: basex('rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz').encode(deco),
public_key: derived.privateKey.publicKey.toString(),
private_key: derived.privateKey.toString()
}
}
if (this.networkIsEthereum(type)) {
return {
address: toChecksumAddress(this.getEthereumAddress(derived).toString()),
public_key: derived.privateKey.publicKey.toString(),
private_key: derived.privateKey.toString()
}
}
return {
address: derived.privateKey.toAddress(type.network).toString(),
public_key: derived.privateKey.publicKey.toString(),
private_key: derived.privateKey.toString()
}
}
/**
* 以太坊地址格式转换
* @param {Object} derived
*/
static getEthereumAddress(derived) {
const publicKey = derived.hdPublicKey.publicKey.toBuffer()
const ethPublicKey = secp256k1.publicKeyConvert(publicKey, false)
.slice(1)
return Address.fromPublicKey(toBuffer(ethPublicKey))
}
/**
* 是否是以太坊网络
* @param {Object} type
*/
static networkIsEthereum(type) {
return type.isEthereum
}
}

View File

@@ -1,29 +0,0 @@
import {
Wallet
} from "./Wallet.js"
const code = Wallet.generateMnemonic(this.defaultLanguage)
this.mnemonicCode = code
const hdPrivateKey = Wallet.toHDPrivateKey(this.mnemonicCode)
// const derived = hdPrivateKey.derive("m/44'/61'/0'/0/0");
// const publicKey = derived.hdPublicKey.publicKey.toBuffer()
// const ethPublicKey = secp256k1.publicKeyConvert(publicKey, false)
// .slice(1)
// const ethAddr = Address.fromPublicKey(toBuffer(ethPublicKey)).toString();
// console.log(toChecksumAddress(ethAddr));
// console.log(Address.fromPrivateKey(hdPrivateKey.hdPublicKey.publicKey.toBuffer()));
var addr = []
for (var i in this.coinType) {
let whk = Wallet.HDPrivateKeyToAddress(hdPrivateKey, i)
let parmas = {
name: this.coinType[i],
address: whk.address,
private_key: whk.private_key,
}
addr.push(parmas)
}
this.address = addr

View File

@@ -1,24 +0,0 @@
import store from "@/store/index.js"
const USE_SOTER_AUTH_KEY = 'USE_SOTER_AUTH_KEY'
/**
* 初始化配置
*/
const initWalletConfigs = () => {
// 生物识别
const USE_SOTER = Boolean(uni.getStorageSync(USE_SOTER_AUTH_KEY))
store.dispatch('wallet/setSoterAuth', USE_SOTER)
// 获取默认钱包
}
const setSoterAuthStatus = (opt) => {
uni.setStorageSync(USE_SOTER_AUTH_KEY, opt)
store.dispatch('wallet/setSoterAuth', opt)
}
export default {
USE_SOTER_AUTH_KEY,
setSoterAuthStatus,
initWalletConfigs
}

View File

@@ -1,209 +0,0 @@
import Bitcore from "bitcore-lib"
export default [{
type: 0,
name: '比特币',
symbol: 'BTC',
code: 'btc',
isEthereum: false,
network: Bitcore.Networks.mainnet
},
{
type: 60,
name: '以太坊',
symbol: 'ETH',
code: 'eth',
isEthereum: true
},
{
type: 61,
name: '以太经典',
symbol: 'ETC',
code: 'etc',
isEthereum: true
},
{
type: 60,
name: '赤子心',
symbol: 'CZX',
code: 'eth_0x3a2a239b1bdaae768ffa06314d523e88e98d4d1f',
isEthereum: true
},
// {
// type: 2,
// name: '莱特币',
// symbol: 'LTC',
// isEthereum: false,
// network: Bitcore.Networks.add({
// name: 'LTC',
// alias: 'LTC',
// pubkeyhash: 0x30,
// privatekey: 0x32,
// scripthash: 0xb0,
// bech32prefix: 'ltc',
// xpubkey: 0x019da462,
// xprivkey: 0x019d9cfe,
// networkMagic: 0xdbb6c0fb
// })
// },
{
type: 3,
name: '狗狗币',
symbol: 'DOGE',
code: 'doge',
isEthereum: false,
network: Bitcore.Networks.add({
name: 'DOGE',
alias: 'DOGE',
pubkeyhash: 0x1e,
privatekey: 0x16,
scripthash: 0x9e,
bech32prefix: 'doge',
xpubkey: 0x02facafd,
xprivkey: 0x02fac398,
networkMagic: 0xc0c0c0c0
})
},
// {
// type: 133,
// name: '零币',
// symbol: 'ZEC',
// isEthereum: false,
// network: Bitcore.Networks.add({
// name: 'ZEC',
// alias: 'ZEC',
// pubkeyhash: 0x1e,
// privatekey: 0x16,
// scripthash: 0x9e,
// bech32prefix: 'doge',
// xpubkey: 0x02facafd,
// xprivkey: 0x02fac398,
// networkMagic: 0xc0c0c0c0
// })
// },
// {
// type: 144,
// name: 'XPR - 瑞波币',
// symbol: 'XPR',
// isEthereum: false,
// network: Bitcore.Networks.add({
// name: 'XPR',
// alias: 'XPR',
// pubkeyhash: 0x1e,
// privatekey: 0x16,
// scripthash: 0x9e,
// bech32prefix: 'doge',
// xpubkey: 0x02facafd,
// xprivkey: 0x02fac398,
// networkMagic: 0xc0c0c0c0
// })
// },
// {
// type: 145,
// name: '比特现金',
// symbol: 'BCH',
// isEthereum: false,
// network: Bitcore.Networks.add({
// name: 'BCH',
// alias: 'BCH',
// pubkeyhash: 0x00,
// privatekey: 0x05,
// scripthash: 0x80,
// bech32prefix: 'bitcoincash',
// xpubkey: 0x0488b21e,
// xprivkey: 0x0488ade4,
// networkMagic: 0xd9b4bef9
// })
// },
// {
// type: 195,
// name: '波场',
// symbol: 'TRX',
// isEthereum: false,
// network: Bitcore.Networks.add({
// name: 'TRX',
// alias: 'TRX',
// pubkeyhash: 0x41,
// privatekey: 0x05,
// scripthash: 0x80,
// bech32prefix: '',
// xpubkey: 0x0488b21e,
// xprivkey: 0x0488ade4
// })
// },
{
type: 195,
name: 'USDT(TRC20)',
symbol: 'USDT',
code: 'trx_TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t',
isEthereum: false,
network: Bitcore.Networks.add({
name: 'USDT',
alias: 'USDT',
pubkeyhash: 0x41,
privatekey: 0x05,
scripthash: 0x80,
bech32prefix: '',
xpubkey: 0x0488b21e,
xprivkey: 0x0488ade4
})
},
{
type: 195,
name: 'USDT(ERC20)',
symbol: 'USDT',
code: 'eth_0xdac17f958d2ee523a2206206994597c13d831ec7',
isEthereum: true
},
{
type: 0,
name: 'USDT(OMNI)',
symbol: 'USDT',
code: 'usdt',
isEthereum: false,
network: Bitcore.Networks.mainnet
},
{
type: 13107,
name: '比特元',
symbol: 'BTY',
code: 'bty',
isEthereum: false,
network: Bitcore.Networks.add({
name: 'BTY',
alias: 'BTY',
pubkeyhash: 0x00,
privatekey: 0x05,
scripthash: 0x80,
bech32prefix: 'bityuan',
xpubkey: 0x0488b21e,
xprivkey: 0x0488ade4,
networkMagic: 0xd9b4bef9
})
},
// {
// type: 60,
// name: '元链',
// symbol: 'YCC',
// isEthereum: true
// },
{
type: 13107,
name: 'JZC',
symbol: 'JZC',
code: 'bty',
isEthereum: false,
network: Bitcore.Networks.add({
name: 'JZC',
alias: 'JZC',
pubkeyhash: 0x00,
privatekey: 0x05,
scripthash: 0x80,
bech32prefix: 'bityuan',
xpubkey: 0x0488b21e,
xprivkey: 0x0488ade4,
networkMagic: 0xd9b4bef9
})
}
]

207
yarn.lock
View File

@@ -2,194 +2,27 @@
# yarn lockfile v1 # yarn lockfile v1
"base-x@^3.0.2": moment@^2.29.1:
"integrity" "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==" version "2.29.1"
"resolved" "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz" resolved "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz"
"version" "3.0.9" integrity sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==
dependencies:
"safe-buffer" "^5.0.1"
"bech32@=2.0.0": uni-read-pages@^1.0.5:
"integrity" "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" version "1.0.5"
"resolved" "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz" resolved "https://registry.npmjs.org/uni-read-pages/-/uni-read-pages-1.0.5.tgz"
"version" "2.0.0" integrity sha512-GkrrZ0LX0vn9R5k6RKEi0Ez3Q3e2vUpjXQ8Z6/K/d28KudI9ajqgt8WEjQFlG5EPm1K6uTArN8LlqmZTEixDUA==
"bigi@^1.1.0", "bigi@^1.4.2": uni-simple-router@^2.0.7:
"integrity" "sha1-nGZalfiLiwj8Bc/XMfVhhZ1yWCU=" version "2.0.7"
"resolved" "https://registry.npmjs.org/bigi/-/bigi-1.4.2.tgz" resolved "https://registry.npmjs.org/uni-simple-router/-/uni-simple-router-2.0.7.tgz"
"version" "1.4.2" integrity sha512-8FKv5dw7Eoonm0gkO8udprrxzin0fNUI0+AvIphFkFRH5ZmP5ZWJ2pvnWzb2NiiqQSECTSU5VSB7HhvOSwD5eA==
"bip-schnorr@=0.6.4": uview-ui@^2.0.19:
"integrity" "sha512-dNKw7Lea8B0wMIN4OjEmOk/Z5qUGqoPDY0P2QttLqGk1hmDPytLWW8PR5Pb6Vxy6CprcdEgfJpOjUu+ONQveyg==" version "2.0.19"
"resolved" "https://registry.npmjs.org/bip-schnorr/-/bip-schnorr-0.6.4.tgz" resolved "https://registry.npmjs.org/uview-ui/-/uview-ui-2.0.19.tgz"
"version" "0.6.4" integrity sha512-ddZiaP7R9wsUxMzAuhuXgh5OswgCm2lKuulTqjnRXFr0uUWsgL1iBifU3GbOwpwP0LtTHKJOo9rYv1LP0WXmzA==
dependencies:
"bigi" "^1.4.2"
"ecurve" "^1.0.6"
"js-sha256" "^0.9.0"
"randombytes" "^2.1.0"
"safe-buffer" "^5.2.1"
"bitcore-lib@^8.25.25": vuex@^3.6.2:
"integrity" "sha512-H6qNCVl4M8/MglXhvc04mmeus1d6nrmqTJGQ+xezJLvL7hs7R3dyBPtOqSP3YSw0iq/GWspMd8f5OOlyXVipJQ==" version "3.6.2"
"resolved" "https://registry.npmjs.org/bitcore-lib/-/bitcore-lib-8.25.25.tgz" resolved "https://registry.npmjs.org/vuex/-/vuex-3.6.2.tgz"
"version" "8.25.25" integrity sha512-ETW44IqCgBpVomy520DT5jf8n0zoCac+sxWnn+hMe/CzaSejb/eVw2YToiXYX+Ex/AuHHia28vWTq4goAexFbw==
dependencies:
"bech32" "=2.0.0"
"bip-schnorr" "=0.6.4"
"bn.js" "=4.11.8"
"bs58" "^4.0.1"
"buffer-compare" "=1.1.1"
"elliptic" "^6.5.3"
"inherits" "=2.0.1"
"lodash" "^4.17.20"
"bitcore-mnemonic@^8.25.25":
"integrity" "sha512-7HvRxHrmd+Rh0Ohl0SEDMKQBAM+FoevXbCFnxGju6H+uZjtWMOToHA8vUg0+B91pfEMjdt9mQVB/wSA8GMqnCA=="
"resolved" "https://registry.npmjs.org/bitcore-mnemonic/-/bitcore-mnemonic-8.25.25.tgz"
"version" "8.25.25"
dependencies:
"bitcore-lib" "^8.25.25"
"unorm" "^1.4.1"
"bn.js@^4.11.9":
"integrity" "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA=="
"resolved" "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz"
"version" "4.12.0"
"bn.js@=4.11.8":
"integrity" "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA=="
"resolved" "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz"
"version" "4.11.8"
"brorand@^1.1.0":
"integrity" "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8="
"resolved" "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz"
"version" "1.1.0"
"bs58@^4.0.1":
"integrity" "sha1-vhYedsNU9veIrkBx9j806MTwpCo="
"resolved" "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz"
"version" "4.0.1"
dependencies:
"base-x" "^3.0.2"
"buffer-compare@=1.1.1":
"integrity" "sha1-W+e+hTr4kZjR9N3AkNHWakiu9ZY="
"resolved" "https://registry.npmjs.org/buffer-compare/-/buffer-compare-1.1.1.tgz"
"version" "1.1.1"
"ecurve@^1.0.6":
"integrity" "sha512-/BzEjNfiSuB7jIWKcS/z8FK9jNjmEWvUV2YZ4RLSmcDtP7Lq0m6FvDuSnJpBlDpGRpfRQeTLGLBI8H+kEv0r+w=="
"resolved" "https://registry.npmjs.org/ecurve/-/ecurve-1.0.6.tgz"
"version" "1.0.6"
dependencies:
"bigi" "^1.1.0"
"safe-buffer" "^5.0.1"
"elliptic@^6.5.3":
"integrity" "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ=="
"resolved" "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz"
"version" "6.5.4"
dependencies:
"bn.js" "^4.11.9"
"brorand" "^1.1.0"
"hash.js" "^1.0.0"
"hmac-drbg" "^1.0.1"
"inherits" "^2.0.4"
"minimalistic-assert" "^1.0.1"
"minimalistic-crypto-utils" "^1.0.1"
"hash.js@^1.0.0", "hash.js@^1.0.3":
"integrity" "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA=="
"resolved" "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz"
"version" "1.1.7"
dependencies:
"inherits" "^2.0.3"
"minimalistic-assert" "^1.0.1"
"hmac-drbg@^1.0.1":
"integrity" "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE="
"resolved" "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz"
"version" "1.0.1"
dependencies:
"hash.js" "^1.0.3"
"minimalistic-assert" "^1.0.0"
"minimalistic-crypto-utils" "^1.0.1"
"inherits@^2.0.3":
"integrity" "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
"resolved" "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz"
"version" "2.0.4"
"inherits@^2.0.4":
"integrity" "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
"resolved" "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz"
"version" "2.0.4"
"inherits@=2.0.1":
"integrity" "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE="
"resolved" "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz"
"version" "2.0.1"
"js-sha256@^0.9.0":
"integrity" "sha512-sga3MHh9sgQN2+pJ9VYZ+1LPwXOxuBJBA5nrR5/ofPfuiJBE2hnjsaN8se8JznOmGLN2p49Pe5U/ttafcs/apA=="
"resolved" "https://registry.npmjs.org/js-sha256/-/js-sha256-0.9.0.tgz"
"version" "0.9.0"
"lodash@^4.17.20":
"integrity" "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
"resolved" "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz"
"version" "4.17.21"
"minimalistic-assert@^1.0.0", "minimalistic-assert@^1.0.1":
"integrity" "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A=="
"resolved" "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz"
"version" "1.0.1"
"minimalistic-crypto-utils@^1.0.1":
"integrity" "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo="
"resolved" "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz"
"version" "1.0.1"
"moment@^2.29.1":
"integrity" "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ=="
"resolved" "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz"
"version" "2.29.1"
"randombytes@^2.1.0":
"integrity" "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ=="
"resolved" "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz"
"version" "2.1.0"
dependencies:
"safe-buffer" "^5.1.0"
"safe-buffer@^5.0.1", "safe-buffer@^5.1.0", "safe-buffer@^5.2.1":
"integrity" "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
"resolved" "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz"
"version" "5.2.1"
"uni-read-pages@^1.0.5":
"integrity" "sha512-GkrrZ0LX0vn9R5k6RKEi0Ez3Q3e2vUpjXQ8Z6/K/d28KudI9ajqgt8WEjQFlG5EPm1K6uTArN8LlqmZTEixDUA=="
"resolved" "https://registry.npmjs.org/uni-read-pages/-/uni-read-pages-1.0.5.tgz"
"version" "1.0.5"
"uni-simple-router@^2.0.7":
"integrity" "sha512-8FKv5dw7Eoonm0gkO8udprrxzin0fNUI0+AvIphFkFRH5ZmP5ZWJ2pvnWzb2NiiqQSECTSU5VSB7HhvOSwD5eA=="
"resolved" "https://registry.npmjs.org/uni-simple-router/-/uni-simple-router-2.0.7.tgz"
"version" "2.0.7"
"unorm@^1.4.1":
"integrity" "sha512-b2/KCUlYZUeA7JFUuRJZPUtr4gZvBh7tavtv4fvk4+KV9pfGiR6CQAQAWl49ZpR3ts2dk4FYkP7EIgDJoiOLDA=="
"resolved" "https://registry.npmjs.org/unorm/-/unorm-1.6.0.tgz"
"version" "1.6.0"
"uview-ui@^2.0.19":
"integrity" "sha512-ddZiaP7R9wsUxMzAuhuXgh5OswgCm2lKuulTqjnRXFr0uUWsgL1iBifU3GbOwpwP0LtTHKJOo9rYv1LP0WXmzA=="
"resolved" "https://registry.npmjs.org/uview-ui/-/uview-ui-2.0.19.tgz"
"version" "2.0.19"
"vuex@^3.6.2":
"integrity" "sha512-ETW44IqCgBpVomy520DT5jf8n0zoCac+sxWnn+hMe/CzaSejb/eVw2YToiXYX+Ex/AuHHia28vWTq4goAexFbw=="
"resolved" "https://registry.npmjs.org/vuex/-/vuex-3.6.2.tgz"
"version" "3.6.2"