bitcooo
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

199 lines
4.5 KiB

<template>
<view class="main">
<view class="wrap">
<swiper class="swiper" :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval">
<swiper-item>
<view class="swiper-item">
<image src="../../static/tongyonh/phone_image.png" class="img1" mode="aspectFit"></image>
<view class="text_con">
<view class="text1">
Decentralised wallets,
self-directed assets
</view>
<view class="text2">
Local storage of private keys, safe and secure
</view>
</view>
</view>
</swiper-item>
<swiper-item>
<view class="swiper-item">
<image src="../../static/tongyonh/phone_image.png" class="img1" mode="aspectFit"></image>
<view class="text_con">
<view class="text1">
Decentralised wallets,
self-directed assets
</view>
<view class="text2">
Local storage of private keys, safe and secure
</view>
</view>
</view>
</swiper-item>
</swiper>
</view>
<view class="reg_con">
<view class="reg">
<view class="border">
<view class="item flex" @click="createWallet">
<view class="left flex">
<image src="../../static/tongyonh/create_wallet.png" mode="aspectFit" class="letimg">
</image>
<view class="textcon">
<view class="text1">
Create a wallet
</view>
<view class="text2">
One identity management
</view>
</view>
</view>
<image src="../../static/tongyonh/chevron_right_24px.png" class="rigimg" mode="aspectFit">
</image>
</view>
</view>
<view class="item flex" @click="loginWallet">
<view class="left flex">
<image src="../../static/tongyonh/login_wallet.png" mode="aspectFit" class="letimg"></image>
<view class="textcon">
<view class="text1">
Login to wallet
</view>
<view class="text2">
Restore existing wallets
</view>
</view>
</view>
<image src="../../static/tongyonh/chevron_right_24px.png" class="rigimg" mode="aspectFit"></image>
</view>
</view>
<view class="select">
<u-checkbox-group @change="checkboxGroupChange">
<u-checkbox @change="checkboxChange" v-for="(item, index) in list2" :key="index"
v-model="item.checked" :name="item.name" active-color="#5B53FF"> <text class="name">I have read and agree to the
<text class="active" @click.stop="Terms">Terms of Service</text>
</text> </u-checkbox>
</u-checkbox-group>
</view>
</view>
</view>
</template>
<script>
import utils from '@/utils'
import md5 from 'js-md5'
import store from '@/store'
import token from '@/utils/TokenUtil'
import cont from "@/components/navigation/navigation.vue"
export default {
data() {
return {
list2: [{
name: '',
checked: false,
disabled: false,
}, ],
list: ['', '../../../static/tongyonh/phone_image.png'],
indicatorDots: true,
autoplay: true,
interval: 3000,
inde: 1,
walletInfo: {},
}
},
onLoad() {},
onShow() {
console.log(uni.getStorageSync('walletInfo'))
if (uni.getStorageSync('walletInfo')) {
uni.reLaunch({
url: '/pages/menu/wallet/index'
})
}
// uni.clearStorageSync();
this.list2.checked = false;
},
methods: {
checkboxGroupChange() {
},
checkboxChange() {
if (this.inde % 2 == 0) {
this.list2[0].checked = false;
} else {
this.list2[0].checked = true;
}
this.inde++
},
createWallet() {
if (this.list2[0].checked != true) {
uni.showToast({
title: 'Please check the terms of service',
icon: 'none',
duration: 1500
})
return;
}
// 读到钱包助记词信息,存入缓存
var word2 = this.$Token.generateMnemonic();
uni.setStorage({
key: 'word',
data: word2,
success: function() {
console.log('success', word2)
}
});
console.log(this.list2.checked, 224)
this.list2[0].checked = false;
console.log(this.list2.checked, 444)
uni.navigateTo({
url: '../menu/backUp/index',
})
},
loginWallet() {
if (this.list2[0].checked != true) {
uni.showToast({
title: 'Please check the terms of service',
icon: 'none',
duration: 1500
})
return;
}
this.list2[0].checked = false;
uni.navigateTo({
url: '../menu/backUp/backUp4/index',
})
},
Terms() {
uni.navigateTo({
url: '../menu/about/terms/index',
})
}
},
}
</script>
<style>
@import './index.css';
</style>