|
|
@ -1,76 +1,78 @@ |
|
|
|
<template> |
|
|
|
<view class=""> |
|
|
|
<navigation :showBack="false" :bgnum="true"> |
|
|
|
<image src="../../../../../static/tongyonh/Vector.png" mode="aspectFit" class="back" @click="back()"></image> |
|
|
|
<image src="../../../../../static/tongyonh/Vector.png" mode="aspectFit" class="back" @click="back()"> |
|
|
|
</image> |
|
|
|
<text class="big_title"> |
|
|
|
{{i18n.Manage}} |
|
|
|
{{i18n.Manage}} |
|
|
|
</text> |
|
|
|
</navigation> |
|
|
|
<view class="main"> |
|
|
|
<view class="item"> |
|
|
|
<view class="text1"> |
|
|
|
{{i18n.Address}} |
|
|
|
</view> |
|
|
|
<view class="text2"> |
|
|
|
{{userObj.address}} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="item"> |
|
|
|
<view class="text1"> |
|
|
|
{{i18n.Address}} |
|
|
|
</view> |
|
|
|
<view class="text2"> |
|
|
|
{{userObj.address}} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="item item2"> |
|
|
|
<view class="name flex bor" @click="showAddress=true"> |
|
|
|
<view class="text1"> |
|
|
|
{{i18n.Name}} |
|
|
|
</view> |
|
|
|
<view class="address" > |
|
|
|
<<<<<<< HEAD |
|
|
|
<text v-if="userObj.name=='BTC'">{{i18n.Setname}}</text> |
|
|
|
<view class="item item2"> |
|
|
|
<view class="name flex bor" @click="showAddress=true"> |
|
|
|
<view class="text1"> |
|
|
|
{{i18n.Name}} |
|
|
|
</view> |
|
|
|
<view class="address"> |
|
|
|
<!-- <text v-if="userObj.name=='BTC'">{{i18n.Setname}}</text> |
|
|
|
<text v-else-if="userObj.name=='ETH'">{{i18n.Setname}}</text> |
|
|
|
<text v-else-if="userObj.name=='TRX'">{{i18n.Setname}}</text> |
|
|
|
<text v-else>{{userObj.name}}</text> |
|
|
|
======= |
|
|
|
{{userObj.name}} |
|
|
|
>>>>>>> 597f46eb933c677e991915c5a7fe52f9e8d27baa |
|
|
|
<image src="../../../../../static/tongyonh/chevron_right_24px.png" mode="aspectFit" class="img1"></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="name flex" @click="goTrans()" v-if="itemMnemonic"> |
|
|
|
<view class="text1"> |
|
|
|
{{i18n.backupMneTit}} |
|
|
|
</view> |
|
|
|
<view class="address"> |
|
|
|
<image src="../../../../../static/tongyonh/chevron_right_24px.png" mode="aspectFit" class="img1"></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="name flex" @click="goKey()"> |
|
|
|
<view class="text1"> |
|
|
|
{{i18n.Backupprivatekey}} |
|
|
|
</view> |
|
|
|
<view class="address"> |
|
|
|
<image src="../../../../../static/tongyonh/chevron_right_24px.png" mode="aspectFit" class="img1"></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="showAddress" v-if="showAddress"> |
|
|
|
<image src="../../../../../static/tongyonh/xg.png" mode="aspectFit" class="img1" @click="showAddress=false"></image> |
|
|
|
<view class="title"> |
|
|
|
{{i18n.Newwalletname}} |
|
|
|
</view> |
|
|
|
<u-input :placeholder="teee" border-color="#E9EDF7" v-model="value" :type="type" :border="border" /> |
|
|
|
<view class="btnconn"> |
|
|
|
<view class="btn" @click="showAddress=false"> |
|
|
|
{{i18n.Cancel}} |
|
|
|
<text v-else-if="userObj.name=='TRX'">{{i18n.Setname}}</text> --> |
|
|
|
<text>{{userObj.name}}</text> |
|
|
|
|
|
|
|
<image src="../../../../../static/tongyonh/chevron_right_24px.png" mode="aspectFit" |
|
|
|
class="img1"></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="btn active" @click="setName()"> |
|
|
|
{{i18n.Confirm}} |
|
|
|
<view class="name flex" @click="goTrans()" v-if="itemMnemonic"> |
|
|
|
<view class="text1"> |
|
|
|
{{i18n.backupMneTit}} |
|
|
|
</view> |
|
|
|
<view class="address"> |
|
|
|
<image src="../../../../../static/tongyonh/chevron_right_24px.png" mode="aspectFit" |
|
|
|
class="img1"></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<view class="name flex" @click="goKey()"> |
|
|
|
<view class="text1"> |
|
|
|
{{i18n.Backupprivatekey}} |
|
|
|
</view> |
|
|
|
<view class="address"> |
|
|
|
<image src="../../../../../static/tongyonh/chevron_right_24px.png" mode="aspectFit" |
|
|
|
class="img1"></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="showAddress" v-if="showAddress"> |
|
|
|
<image src="../../../../../static/tongyonh/xg.png" mode="aspectFit" class="img1" |
|
|
|
@click="showAddress=false"></image> |
|
|
|
<view class="title"> |
|
|
|
{{i18n.Newwalletname}} |
|
|
|
</view> |
|
|
|
<u-input :placeholder="teee" border-color="#E9EDF7" v-model="value" :type="type" :border="border" /> |
|
|
|
<view class="btnconn"> |
|
|
|
<view class="btn" @click="showAddress=false"> |
|
|
|
{{i18n.Cancel}} |
|
|
|
</view> |
|
|
|
<view class="btn active" @click="setName()"> |
|
|
|
{{i18n.Confirm}} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
@ -78,7 +80,7 @@ |
|
|
|
<u-mask z-index='100' :show="showAddress" @click="showAddress = false"></u-mask> |
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -89,79 +91,79 @@ |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
teee:this.$t('index').walletname, |
|
|
|
value: '', |
|
|
|
teee: this.$t('index').walletname, |
|
|
|
value: '', |
|
|
|
type: 'text', |
|
|
|
border: true, |
|
|
|
height: 90, |
|
|
|
autoHeight: true, |
|
|
|
showAddress:false, |
|
|
|
userObj:{}, |
|
|
|
itemMnemonic:true, |
|
|
|
walletInfo:{}, |
|
|
|
nameIndex:-1, |
|
|
|
showAddress: false, |
|
|
|
userObj: {}, |
|
|
|
itemMnemonic: true, |
|
|
|
walletInfo: {}, |
|
|
|
nameIndex: -1, |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
back(){ |
|
|
|
back() { |
|
|
|
uni.navigateTo({ |
|
|
|
url:'/pages/menu/wallet/mwallet/index' |
|
|
|
url: '/pages/menu/wallet/mwallet/index' |
|
|
|
}) |
|
|
|
}, |
|
|
|
setName(){ |
|
|
|
if(this.value==''){ |
|
|
|
setName() { |
|
|
|
if (this.value == '') { |
|
|
|
uni.showToast({ |
|
|
|
title:this.$t('index').Namecannot, |
|
|
|
title: this.$t('index').Namecannot, |
|
|
|
icon: 'none', |
|
|
|
duration: 1500 |
|
|
|
}) |
|
|
|
} |
|
|
|
console.log(this.userObj,2222) |
|
|
|
this.userObj.name=this.value; |
|
|
|
this.$walletUtil.updateWalletName(this.userObj.type,this.userObj.address,this.value) |
|
|
|
uni.showToast({ |
|
|
|
title: this.$t('index').Successful, |
|
|
|
icon: 'success', |
|
|
|
duration: 1500 |
|
|
|
}) |
|
|
|
this.showAddress=false; |
|
|
|
setTimeout(()=>{ |
|
|
|
uni.navigateTo({ |
|
|
|
url:'../../mwallet/index' |
|
|
|
}) |
|
|
|
},1500) |
|
|
|
|
|
|
|
console.log(this.userObj, 2222) |
|
|
|
this.userObj.name = this.value; |
|
|
|
this.$walletUtil.updateWalletName(this.userObj.type, this.userObj.address, this.value) |
|
|
|
uni.showToast({ |
|
|
|
title: this.$t('index').Successful, |
|
|
|
icon: 'success', |
|
|
|
duration: 1500 |
|
|
|
}) |
|
|
|
this.showAddress = false; |
|
|
|
setTimeout(() => { |
|
|
|
uni.navigateTo({ |
|
|
|
url: '../../mwallet/index' |
|
|
|
}) |
|
|
|
}, 1500) |
|
|
|
|
|
|
|
}, |
|
|
|
goTrans() { |
|
|
|
console.log(this.userObj, 444) |
|
|
|
uni.setStorageSync('backWordInfo', this.userObj) |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/pages/menu/backUp/transPawMan/index' |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
goKey() { |
|
|
|
// 存储私钥信息 |
|
|
|
uni.setStorageSync('keyInfo', this.userObj) |
|
|
|
uni.navigateTo({ |
|
|
|
url: '../../../backUp/transPawKeyOut/index' |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
goTrans(){ |
|
|
|
console.log(this.userObj,444) |
|
|
|
uni.setStorageSync('backWordInfo',this.userObj) |
|
|
|
uni.navigateTo({ |
|
|
|
url:'/pages/menu/backUp/transPawMan/index' |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
goKey(){ |
|
|
|
// 存储私钥信息 |
|
|
|
uni.setStorageSync('keyInfo',this.userObj) |
|
|
|
uni.navigateTo({ |
|
|
|
url:'../../../backUp/transPawKeyOut/index' |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
onLoad: function(option) { |
|
|
|
this.userObj = uni.getStorageSync('addressDetailInfo') |
|
|
|
console.log(this.userObj, 45454554) |
|
|
|
// 没有助记词就隐藏助剂词导入 |
|
|
|
if (!this.userObj.mnemonic) { |
|
|
|
this.itemMnemonic = false; |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad: function(option) { |
|
|
|
this.userObj = uni.getStorageSync('addressDetailInfo') |
|
|
|
console.log(this.userObj,45454554) |
|
|
|
// 没有助记词就隐藏助剂词导入 |
|
|
|
if(!this.userObj.mnemonic){ |
|
|
|
this.itemMnemonic=false; |
|
|
|
} |
|
|
|
computed: { |
|
|
|
i18n() { |
|
|
|
return this.$t('index') |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
i18n() { |
|
|
|
return this.$t('index') |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|
</script> |
|
|
|
<style scoped> |
|
|
|