Browse Source

解决冲突

master
vee 4 years ago
parent
commit
e0c561e08d
  1. 52
      pages/menu/sendToken/addAddress2/index.vue
  2. 3
      pages/menu/wallet/index.vue
  3. 10
      unpackage/dist/dev/app-plus/app-service.js
  4. 14
      utils/EthUtil.js
  5. 5
      utils/WalletUtil.js
  6. 1
      utils/axios.js

52
pages/menu/sendToken/addAddress2/index.vue

@ -111,7 +111,7 @@
bigAddress: '',
save: true,
AddressIndex: -1,
gai: {},
gai: [],
show: false,
checked: false,
list: [{
@ -216,7 +216,12 @@
}];
this.gai2.splice(index, 1)
uni.setStorageSync('TRXAddressInfo', this.gai2)
if(this.gai==''){
this.gai=[];
this.gai[0]=eth
}else{
this.gai.push(eth);
}
uni.setStorageSync('ETHAddressInfo', this.gai)
uni.showToast({
title: this.$t('index').Successful,
@ -255,7 +260,9 @@
if (this.value == 'BTC') {
this.gai = uni.getStorageSync('BTCAddressInfo')
if(uni.getStorageSync('BTCAddressInfo')){
this.gai = uni.getStorageSync('BTCAddressInfo')
}
this.gai2 = uni.getStorageSync('TRXAddressInfo')
var index = uni.getStorageSync('editIndex')
let btc = new Object;
@ -269,7 +276,12 @@
}];
this.gai2.splice(index, 1)
uni.setStorageSync('TRXAddressInfo', this.gai2)
if(this.gai==''){
this.gai=[];
this.gai[0]=btc
}else{
this.gai.push(btc);
}
uni.setStorageSync('BTCAddressInfo', this.gai)
uni.showToast({
title: this.$t('index').Successful,
@ -299,7 +311,13 @@
}];
this.gai2.splice(index, 1)
uni.setStorageSync('ETHAddressInfo', this.gai2)
if(this.gai==''){
this.gai=[];
this.gai[0]=trx
}else{
this.gai.push(trx);
}
uni.setStorageSync('TRXAddressInfo', this.gai)
uni.showToast({
title: this.$t('index').Successful,
@ -350,7 +368,13 @@
}];
this.gai2.splice(index, 1)
uni.setStorageSync('ETHAddressInfo', this.gai2)
if(this.gai==''){
this.gai=[];
this.gai[0]=btc
}else{
this.gai.push(btc);
}
uni.setStorageSync('BTCAddressInfo', this.gai)
uni.showToast({
title: this.$t('index').Successful,
@ -365,8 +389,10 @@
if (this.info.coinList[0].name2 == 'BTC') {
if (this.value == 'TRX') {
this.gai = uni.getStorageSync('TRXAddressInfo')
this.gai2 = uni.getStorageSync('BTCAddressInfo')
var index = uni.getStorageSync('editIndex')
let trx = new Object;
@ -381,7 +407,14 @@
}];
this.gai2.splice(index, 1)
uni.setStorageSync('BTCAddressInfo', this.gai2)
this.gai.push(trx);
// 1123
if(this.gai==''){
this.gai=[];
console.log(this.gai,454545)
this.gai[0]=trx
}else{
this.gai.push(trx);
}
uni.setStorageSync('TRXAddressInfo', this.gai)
uni.showToast({
title: this.$t('index').Successful,
@ -430,9 +463,20 @@
xname: 'Ethereum',
icon: require('@/static/tongyonh/Frame3299.png')
}];
this.gai2.splice(index, 1)
uni.setStorageSync('BTCAddressInfo', this.gai2)
this.gai.push(eth);
if(this.gai==''){
this.gai=[];
this.gai[0]=eth
}else{
this.gai.push(eth);
}
uni.setStorageSync('ETHAddressInfo', this.gai)
uni.showToast({
title: this.$t('index').Successful,

3
pages/menu/wallet/index.vue

@ -113,7 +113,7 @@
},
onLoad() {
let currency = uni.getStorageSync('currency');
if (currency) {
this.currency = currency;
@ -124,7 +124,6 @@
this.userObj = uni.getStorageSync('wallet');
console.log('eth有走这吗')
this.updateBalance();
uni.setStorageSync('isWallet', false);
// #ifdef APP-PLUS
//this.appVersion()
// #endif

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

File diff suppressed because one or more lines are too long

14
utils/EthUtil.js

@ -13,19 +13,9 @@ if (typeof web3 !== 'undefined') {
let eth = {
// //获取主币eth余额
// getBalance: async function(address) {
// console.log("查询余额:",address)
// let balance = 0;
// try{
// web3 = new Web3(new Web3.providers.HttpProvider(systemConfiguration.constant.ethNode));
// balance = await web3.eth.getBalance(address);
// console.log("余额:",balance,9999999999999)
// }catch(e){
// console.log("余额:",e,9999999999999)
// }
// return Number(balance) / Math.pow(10, 18);
// },
getBalance: async function(address) {
web3 = new Web3(new Web3.providers.HttpProvider(systemConfiguration.constant.ethNode));
console.log("查询余额:",address)
let balance = await web3.eth.getBalance(address);
console.log("余额:",balance)

5
utils/WalletUtil.js

@ -320,13 +320,10 @@ let WalletUtil = {
// 封装地址方法
updateAddress: function(type, value, bigAddress, addressName) {
let that = this
switch (wallet.type) {
switch (type) {
case 'BTC':
break;
case 'ETH':
break;
case 'TRX':
if (value == 'ETH') {

1
utils/axios.js

@ -16,7 +16,6 @@ service.interceptors.request.use(
console.log(config)
let isWallet= uni.getStorageSync('isWallet');
console.log(isWallet,55555)
if(!isWallet){
uni.showLoading({
title: 'loading',

Loading…
Cancel
Save