Browse Source

修改

master
vee 4 years ago
parent
commit
597f46eb93
  1. 5
      main.js
  2. 89
      pages/menu/market/index.vue
  3. 2
      pages/menu/profile/index.css
  4. 175
      pages/menu/profile/index.vue
  5. 4
      pages/menu/sendToken/addAddress/index.css
  6. 1
      pages/menu/sendToken/addAddress/index.vue
  7. 454
      pages/menu/sendToken/address/index.vue
  8. 4
      pages/menu/sendToken/index.css
  9. 28
      pages/menu/sendToken/transfer/index.vue
  10. 83
      pages/menu/token/btc/index.vue
  11. 12
      pages/menu/transction/detail/index.vue
  12. 4
      pages/menu/wallet/add/index.css
  13. 4
      pages/menu/wallet/mwallet/manage/index.css
  14. 3
      pages/menu/wallet/mwallet/manage/index.vue
  15. 142
      unpackage/dist/dev/app-plus/app-service.js
  16. 50
      unpackage/dist/dev/app-plus/app-view.js
  17. 263
      utils/DataUtil.js
  18. 8
      utils/SystemConfiguration.js
  19. 3
      utils/api.js
  20. 2
      utils/locales/en.js

5
main.js

@ -14,7 +14,6 @@ import util from 'ethereumjs-util'
import store from './store' import store from './store'
import walletUtil from './utils/WalletUtil.js' import walletUtil from './utils/WalletUtil.js'
import dataUtil from './utils/DataUtil.js'
Vue.prototype.$store = store Vue.prototype.$store = store
Vue.prototype.tronweb = tronweb Vue.prototype.tronweb = tronweb
Vue.prototype.bip32 = bip32 Vue.prototype.bip32 = bip32
@ -24,7 +23,6 @@ Vue.prototype.bitcoin = bitcoin
Vue.prototype.ethers = ethers Vue.prototype.ethers = ethers
Vue.prototype.$axios = axios Vue.prototype.$axios = axios
Vue.prototype.$walletUtil = walletUtil Vue.prototype.$walletUtil = walletUtil
Vue.prototype.$dataUtil = dataUtil
// 自定义底部导航栏 // 自定义底部导航栏
import tabBar from 'components/tabBar/tabBar.vue' import tabBar from 'components/tabBar/tabBar.vue'
@ -56,10 +54,13 @@ import TokenUtil from './utils/TokenUtil.js'
import EthUtil from './utils/EthUtil.js' import EthUtil from './utils/EthUtil.js'
import TronUtil from './utils/TronUtil.js' import TronUtil from './utils/TronUtil.js'
import api from './utils/api.js' import api from './utils/api.js'
import SystemConfiguration from './utils/SystemConfiguration.js'
Vue.prototype.$Token = TokenUtil Vue.prototype.$Token = TokenUtil
Vue.prototype.$EthUtil = EthUtil Vue.prototype.$EthUtil = EthUtil
Vue.prototype.$TronUtil = TronUtil Vue.prototype.$TronUtil = TronUtil
Vue.prototype.$api = api Vue.prototype.$api = api
Vue.prototype.$SystemConfiguration = SystemConfiguration
Vue.prototype.$_i18n = i18n Vue.prototype.$_i18n = i18n
// Vue.prototype.$showDialog = true // Vue.prototype.$showDialog = true
App.mpType = 'app' App.mpType = 'app'

89
pages/menu/market/index.vue

@ -15,23 +15,20 @@
<view class="scroll"> <view class="scroll">
<view class="item flex" v-for="(item,index) in recordInfo"> <view class="item flex" v-for="(item,index) in recordInfo">
<view class="text2 pairs"> <view class="text2 pairs">
<strong>{{item.name}}</strong><span class="t1">/USDT</span> <strong>{{item.symbol}}</strong><span class="t1">/USDT</span>
</view> </view>
<view class="text2 price"> <view class="text2 price">
<view class=""> <view class="">
<strong>${{item.current_price_usd}}</strong> <strong>${{item.last}}</strong>
</view> </view>
<view class="t1"> <view class="t1">
{{item.current_price}} {{item.priceCny}}
</view> </view>
</view> </view>
<view class="btn " :class="item.change_percent>0?'red':'green'"> <view class="btn " :class="item.change_percent>0?'red':'green'">
<!-- <image src="../../../static/tongyonh/arrow-down-left1.png" mode="aspectFit" class="img1"
v-if="item.change_percent>=0"></image> {{item.rose>0?'+':''}}{{item.rose}}%
<image src="../../../static/tongyonh/arrow-down-left.png" mode="aspectFit" class="img1"
v-if="item.change_percent<0"></image> -->
{{item.change_percent>0?'+':''}}{{item.change_percent}}%
</view> </view>
</view> </view>
</view> </view>
@ -50,53 +47,55 @@
export default { export default {
data() { data() {
return { return {
recordInfo: [], recordInfo: []
isStop: false
} }
}, },
onUnload: function() {
this.isStop = true
},
computed: { computed: {
i18n() { i18n() {
return this.$t('index') return this.$t('index')
}, },
}, },
methods: { methods: {
getHomeSlideFunc() { async getHomeSlideFunc() {
const response = await this.$api.getCoinTickerList()
var _self = this; // this.collectinInfo=response.data
uni.request({ this.recordInfo = response.data.value
url: 'https://dncapi.fxhapp.com/api/coin/web-coinrank?page=1&type=0&pagesize=10', //
header: {
'content-type': 'application/x-www-form-urlencoded', //
},
success: (res) => {
this.recordInfo = res.data.data
setTimeout(function() {
console.log(_self.isStop)
if (!_self.isStop) {
_self.getHomeSlideFunc()
}
}, 2000)
this.$forceUpdate()
}
});
}, },
}, },
onLoad() { onLoad() {
this.getHomeSlideFunc();
this.getHomeSlideFunc() let that=this
uni.onSocketOpen(function (res) {
});
uni.connectSocket({
url: that.$SystemConfiguration.constant.coinTickerWs
});
uni.sendSocketMessage({
data: '{"type":"add_ticker"}'
});
uni.onSocketMessage(function(res) {
let data=JSON.parse(res.data);
console.log(data,11111)
that.recordInfo = data.value
});
},onUnload: function() {
uni.onSocketClose(function (res) {
console.log('WebSocket 已关闭!');
});
},onHide:function(){
uni.onSocketClose(function (res) {
console.log('WebSocket 已关闭!');
});
} }
}; };
</script> </script>

2
pages/menu/profile/index.css

@ -30,7 +30,7 @@ padding-bottom: 350rpx;
height: 72rpx; height: 72rpx;
} }
.main_con .item .text1{ .main_con .item .text1{
font-size: 32rpx; font-size: 28rpx;
margin-left: 24rpx; margin-left: 24rpx;
} }
.main_con .item .img2{ .main_con .item .img2{

175
pages/menu/profile/index.vue

@ -2,77 +2,77 @@
<view class=""> <view class="">
<navigation :showBack="false" :bgnum="true"> <navigation :showBack="false" :bgnum="true">
<text class="big_title"> <text class="big_title">
{{i18n.protit}} {{i18n.protit}}
</text> </text>
</navigation> </navigation>
<view class="main"> <view class="main">
<view class="main_con"> <view class="main_con">
<view class="title"> <view class="title">
{{i18n.apps}} {{i18n.apps}}
</view> </view>
<view class="item flex" @click="goMan()"> <view class="item flex" @click="goMan()">
<view class="itemImg flex"> <view class="itemImg flex">
<image src="../../../static/tongyonh/profile1.png" class="img1" mode="aspectFit"></image> <image src="../../../static/tongyonh/profile1.png" class="img1" mode="aspectFit"></image>
<text class="text1"> {{i18n.magew}}</text> <text class="text1"> {{i18n.magew}}</text>
</view>
<image src="../../../static/tongyonh/chevron_right_24px.png" class="img2" mode="aspectFit"></image>
</view>
<view class="item flex" @click="goAddress()">
<view class="itemImg flex">
<image src="../../../static/tongyonh/circle.png" class="img1" mode="aspectFit"></image>
<text class="text1">{{i18n.addBook}}</text>
</view>
<image src="../../../static/tongyonh/chevron_right_24px.png" class="img2" mode="aspectFit"></image>
</view>
<view class="item flex" @click="goSettings()">
<view class="itemImg flex">
<image src="../../../static/tongyonh/Frame68p.png" class="img1" mode="aspectFit"></image>
<text class="text1">{{i18n.Settings}}</text>
</view>
<image src="../../../static/tongyonh/chevron_right_24px.png" class="img2" mode="aspectFit"></image>
</view>
<view class="item flex" @click="goHelp()">
<view class="itemImg flex">
<image src="../../../static/tongyonh/Frame70.png" class="img1" mode="aspectFit"></image>
<text class="text1">{{i18n.helpcen}}</text>
</view>
<image src="../../../static/tongyonh/chevron_right_24px.png" class="img2" mode="aspectFit"></image>
</view>
<view class="item flex" @click="goAbout()">
<view class="itemImg flex">
<image src="../../../static/tongyonh/Frame71.png" class="img1" mode="aspectFit"></image>
<text class="text1">{{i18n.aboutus}}</text>
</view>
<image src="../../../static/tongyonh/chevron_right_24px.png" class="img2" mode="aspectFit"></image>
</view>
</view> </view>
<image src="../../../static/tongyonh/chevron_right_24px.png" class="img2" mode="aspectFit"></image>
</view>
<view class="item flex" @click="goAddress()"> <view class="main_con">
<view class="itemImg flex"> <view class="title">
<image src="../../../static/tongyonh/circle.png" class="img1" mode="aspectFit"></image> {{i18n.Hardware}}
<text class="text1">{{i18n.addBook}}</text> </view>
</view> <view class="item flex" @click="goMatching()">
<image src="../../../static/tongyonh/chevron_right_24px.png" class="img2" mode="aspectFit"></image> <view class="itemImg flex">
</view> <image src="../../../static/tongyonh/Frame72.png" class="img1" mode="aspectFit"></image>
<view class="item flex" @click="goSettings()"> <text class="text1"> {{i18n.math}}</text>
<view class="itemImg flex">
<image src="../../../static/tongyonh/Frame68p.png" class="img1" mode="aspectFit"></image>
<text class="text1">{{i18n.Settings}}</text>
</view>
<image src="../../../static/tongyonh/chevron_right_24px.png" class="img2" mode="aspectFit"></image>
</view>
<view class="item flex" @click="goHelp()">
<view class="itemImg flex">
<image src="../../../static/tongyonh/Frame70.png" class="img1" mode="aspectFit"></image>
<text class="text1">{{i18n.helpcen}}</text>
</view>
<image src="../../../static/tongyonh/chevron_right_24px.png" class="img2" mode="aspectFit"></image>
</view>
<view class="item flex" @click="goAbout()">
<view class="itemImg flex">
<image src="../../../static/tongyonh/Frame71.png" class="img1" mode="aspectFit"></image>
<text class="text1">{{i18n.aboutus}}</text>
</view>
<image src="../../../static/tongyonh/chevron_right_24px.png" class="img2" mode="aspectFit"></image>
</view>
</view>
<view class="main_con">
<view class="title">
{{i18n.Hardware}}
</view>
<view class="item flex" @click="goMatching()">
<view class="itemImg flex">
<image src="../../../static/tongyonh/Frame72.png" class="img1" mode="aspectFit"></image>
<text class="text1"> {{i18n.math}}</text>
</view> </view>
<image src="../../../static/tongyonh/chevron_right_24px.png" class="img2" mode="aspectFit"></image> <image src="../../../static/tongyonh/chevron_right_24px.png" class="img2" mode="aspectFit"></image>
</view> </view>
</view> </view>
</view>
<tab-bar :selectActive="5"></tab-bar>
</view> </view>
<tab-bar :selectActive="5"></tab-bar>
</view>
</template> </template>
@ -83,49 +83,50 @@
export default { export default {
data() { data() {
return { return {
} }
}, },
methods: { methods: {
goMatching(){ goMatching() {
uni.showToast({ uni.showToast({
title: 'Not yet open', title: 'Not yet open',
icon: 'none', icon: 'none',
duration: 1500 duration: 1500
}) })
}, },
goAbout(){ goAbout() {
uni.navigateTo({ uni.navigateTo({
url:'/pages/menu/about/index' url: '/pages/menu/about/index'
}) })
}, },
goHelp(){ goHelp() {
uni.showToast({ uni.showToast({
title: 'Not yet open', title: 'Not yet open',
icon: 'none', icon: 'none',
duration: 1500 duration: 1500
}) })
}, },
goSettings(){ goSettings() {
uni.navigateTo({ uni.navigateTo({
url:'/pages/menu/setting/index' url: '/pages/menu/setting/index'
}) })
},
goMan() {
uni.navigateTo({
url: '/pages/menu/wallet/mwallet/index'
})
},
goAddress() {
uni.setStorageSync('sourcePage', '/pages/menu/profile/index');
uni.navigateTo({
url: '/pages/menu/sendToken/address/index'
})
}, },
goMan(){
uni.navigateTo({
url:'/pages/menu/wallet/mwallet/index'
})
},
goAddress(){
uni.navigateTo({
url:'/pages/menu/sendToken/address/index'
})
},
}, },
onLoad() { onLoad() {
}, },
computed: { computed: {
i18n() { i18n() {
@ -135,9 +136,9 @@
}; };
</script> </script>
<style scoped> <style scoped>
page{ page {
background-color: #FAFAFA; background-color: #FAFAFA;
} }
</style> </style>
<style> <style>

4
pages/menu/sendToken/addAddress/index.css

@ -386,7 +386,7 @@
} }
.bottom_con .item .text2{ .bottom_con .item .text2{
font-size: 30rpx; font-size: 24rpx;
text-align: left; text-align: left;
color: #A3AED0; color: #A3AED0;
font-weight: normal; font-weight: normal;
@ -396,7 +396,7 @@
margin-left: 15rpx; margin-left: 15rpx;
} }
.bottom_con .item .text1{ .bottom_con .item .text1{
font-size: 32rpx; font-size: 30rpx;
color: #000; color: #000;
font-weight: normal; font-weight: normal;
} }

1
pages/menu/sendToken/addAddress/index.vue

@ -102,7 +102,6 @@
export default { export default {
data() { data() {
return { return {
info: {}, info: {},
addressName: '', addressName: '',
bigAddress: '', bigAddress: '',

454
pages/menu/sendToken/address/index.vue

@ -1,135 +1,145 @@
<template> <template>
<view class=""> <view class="">
<navigation :showBack="false" :bgnum="true"> <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>
<image src="../../../../static/tongyonh/IconGroup.png" mode="aspectFit" class="renYou" slot="logo" @click="goAddress()"></image> <image src="../../../../static/tongyonh/IconGroup.png" mode="aspectFit" class="renYou" slot="logo"
@click="goAddress()"></image>
<text class="big_title"> <text class="big_title">
Address Address
</text> </text>
</navigation> </navigation>
<view class="main"> <view class="main">
<view class="big_item"> <view class="big_item">
<view class="item flex" v-for="(item,index) in BTCAddressInfo" @click="goTransfer(item)"> <view class="item flex" v-for="(item,index) in BTCAddressInfo" @click="goTransfer(item)">
<view class="textcon flex"> <view class="textcon flex">
<view class="bigcon"> <view class="bigcon">
<view class="textimg flexx"> <view class="textimg flexx">
<image :src="item.coinList[0].icon" mode="aspectFit" class="img"></image> <image :src="item.coinList[0].icon" mode="aspectFit" class="img"></image>
<text class="textt">{{item.coinList[0].name}}</text> <text class="textt">{{item.coinList[0].name}}</text>
<text class="textt2">{{item.name}}</text> <text class="textt2">{{item.name}}</text>
</view>
<view class="text1">
{{item.address}}
</view>
</view> </view>
<view class="text1"> </view>
{{item.address}} <view class="btncon">
<image src="../../../../static/tongyonh/more_vert_24px_outlined.svg" mode="aspectFit"
class="img2" @click.stop="showIndex(item,index)">
</image>
</view>
<view class="set_con" v-if="show" v-show="index==btcIndex">
<image src="../../../../static/tongyonh/xg.png" mode="aspectFit" class="img1"
@click.stop="show = false"></image>
<view class="itemm flexx" @click.stop="editItem(index)">
<image src="../../../../static/tongyonh/create_24px.png" mode="aspectFit" class="img">
</image>
Edit
</view>
<view class="itemm flexx red" @click.stop="deleteItem()">
<image src="../../../../static/tongyonh/trash.png" mode="aspectFit" class="img"></image>
Delete
</view> </view>
</view> </view>
</view> </view>
<view class="btncon">
<image src="../../../../static/tongyonh/more_vert_24px_outlined.svg" mode="aspectFit" class="img2" @click.stop="showIndex(item,index)"> <view class="item flex" v-for="(item,index) in ETHAddressInfo" @click="goTransfer(item)">
</image> <view class="textcon flex">
</view> <view class="bigcon">
<view class="textimg flexx">
<image :src="item.coinList[0].icon" mode="aspectFit" class="img"></image>
<view class="set_con" v-if="show" v-show="index==btcIndex"> <text class="textt">{{item.coinList[0].name}}</text>
<image src="../../../../static/tongyonh/xg.png" mode="aspectFit" class="img1" @click.stop="show = false"></image> <text class="textt2">{{item.name}}</text>
<view class="itemm flexx" @click.stop="editItem(index)"> </view>
<image src="../../../../static/tongyonh/create_24px.png" mode="aspectFit" class="img"></image> <view class="text1">
Edit {{item.address}}
</view> </view>
<view class="itemm flexx red" @click.stop="deleteItem()"> </view>
<image src="../../../../static/tongyonh/trash.png" mode="aspectFit" class="img"></image>
Delete
</view>
</view>
</view> </view>
<view class="btncon">
<view class="item flex" v-for="(item,index) in ETHAddressInfo" @click="goTransfer(item)"> <image src="../../../../static/tongyonh/more_vert_24px_outlined.svg" mode="aspectFit"
<view class="textcon flex"> class="img2" @click.stop="showIndex(item,index)">
<view class="bigcon"> </image>
<view class="textimg flexx"> </view>
<image :src="item.coinList[0].icon" mode="aspectFit" class="img"></image>
<text class="textt">{{item.coinList[0].name}}</text> <view class="set_con" v-if="show2" v-show="index==ethIndex">
<text class="textt2">{{item.name}}</text> <image src="../../../../static/tongyonh/xg.png" mode="aspectFit" class="img1"
@click.stop="show2 = false"></image>
<view class="itemm flexx" @click.stop="editItem(index)">
<image src="../../../../static/tongyonh/create_24px.png" mode="aspectFit" class="img">
</image>
Edit
</view> </view>
<view class="text1"> <view class="itemm flexx red" @click.stop="deleteItem()">
{{item.address}} <image src="../../../../static/tongyonh/trash.png" mode="aspectFit" class="img"></image>
Delete
</view> </view>
</view> </view>
</view> </view>
<view class="btncon">
<image src="../../../../static/tongyonh/more_vert_24px_outlined.svg" mode="aspectFit" class="img2" @click.stop="showIndex(item,index)">
</image>
</view>
<view class="set_con" v-if="show2" v-show="index==ethIndex"> <view class="item flex" v-for="(item,index) in TRXAddressInfo" @click="goTransfer(item)">
<image src="../../../../static/tongyonh/xg.png" mode="aspectFit" class="img1" @click.stop="show2 = false"></image> <view class="textcon flex">
<view class="itemm flexx" @click.stop="editItem(index)"> <view class="bigcon">
<image src="../../../../static/tongyonh/create_24px.png" mode="aspectFit" class="img"></image> <view class="textimg flexx">
Edit <image :src="item.coinList[0].icon" mode="aspectFit" class="img"></image>
<text class="textt">{{item.coinList[0].name}}</text>
<text class="textt2">{{item.name}}</text>
</view>
<view class="text1">
{{item.address}}
</view>
</view>
</view> </view>
<view class="itemm flexx red" @click.stop="deleteItem()"> <view class="btncon">
<image src="../../../../static/tongyonh/trash.png" mode="aspectFit" class="img"></image> <image src="../../../../static/tongyonh/more_vert_24px_outlined.svg" mode="aspectFit"
Delete class="img2" @click.stop="showIndex(item,index)">
</image>
</view> </view>
</view>
</view> <view class="set_con" v-if="show3" v-show="index==trxIndex">
<image src="../../../../static/tongyonh/xg.png" mode="aspectFit" class="img1"
@click.stop="show3 = false"></image>
<view class="itemm flexx" @click.stop="editItem(index)">
<image src="../../../../static/tongyonh/create_24px.png" mode="aspectFit" class="img">
</image>
<view class="item flex" v-for="(item,index) in TRXAddressInfo" @click="goTransfer(item)"> Edit
<view class="textcon flex">
<view class="bigcon">
<view class="textimg flexx">
<image :src="item.coinList[0].icon" mode="aspectFit" class="img"></image>
<text class="textt">{{item.coinList[0].name}}</text>
<text class="textt2">{{item.name}}</text>
</view> </view>
<view class="text1"> <view class="itemm flexx red" @click.stop="deleteItem()">
{{item.address}} <image src="../../../../static/tongyonh/trash.png" mode="aspectFit" class="img"></image>
Delete
</view> </view>
</view> </view>
</view> </view>
<view class="btncon">
<image src="../../../../static/tongyonh/more_vert_24px_outlined.svg" mode="aspectFit" class="img2" @click.stop="showIndex(item,index)">
</image>
</view>
<view class="set_con" v-if="show3" v-show="index==trxIndex">
<image src="../../../../static/tongyonh/xg.png" mode="aspectFit" class="img1" @click.stop="show3 = false"></image>
<view class="itemm flexx" @click.stop="editItem(index)">
<image src="../../../../static/tongyonh/create_24px.png" mode="aspectFit" class="img"></image>
Edit
</view>
<view class="itemm flexx red" @click.stop="deleteItem()">
<image src="../../../../static/tongyonh/trash.png" mode="aspectFit" class="img"></image>
Delete
</view>
</view>
</view>
</view> </view>
<view class="info_con green" v-if="showImte">
<view class="info_con green" v-if="showImte">
<view class="text"> <view class="text">
{{itemCoin}} {{itemAddress}} {{itemCoin}} {{itemAddress}}
</view> </view>
<view class="text text2"> <view class="text text2">
DELETE DELETE
</view> </view>
</view> </view>
</view> </view>
<u-mask z-index="10" :show="show" ></u-mask> <u-mask z-index="10" :show="show" @click="show = false"></u-mask>
<u-mask z-index="10" :show="show2" ></u-mask> <u-mask z-index="10" :show="show2" @click="show2 = false"></u-mask>
<u-mask z-index="10" :show="show3" ></u-mask> <u-mask z-index="10" :show="show3" @click="show3 = false"></u-mask>
</view> </view>
@ -140,23 +150,23 @@
export default { export default {
data() { data() {
return { return {
ethIndex:0, sourcePage:'',
btcIndex:0, ethIndex: 0,
trxIndex:0, btcIndex: 0,
showImte:false, trxIndex: 0,
BTCAddressInfo:{}, showImte: false,
ETHAddressInfo:{}, BTCAddressInfo: {},
TRXAddressInfo:{}, ETHAddressInfo: {},
walletIndex:-1, TRXAddressInfo: {},
itemCoin:'', walletIndex: -1,
itemAddress:'', itemCoin: '',
info:{}, itemAddress: '',
transfer:'', info: {},
show: false, transfer: '',
show2: false, show: false,
show3: false, show2: false,
list: [ show3: false,
{ list: [{
name: 'Single address', name: 'Single address',
checked: true, checked: true,
disabled: false disabled: false
@ -176,133 +186,137 @@ show3: false,
}, },
methods: { methods: {
// //
goTransfer(item){ goTransfer(item) {
if(this.transfer){ console.log(this.transfer,12316546)
uni.setStorageSync('myTransAddress',item) if (this.transfer) {
uni.setStorageSync('myTransAddress', item)
uni.navigateTo({ uni.navigateTo({
url:'../transfer/index' url: '../transfer/index'
}) })
} }
}, },
back(){ back() {
if(this.transfer){ uni.removeStorageSync("sourcePage")
uni.navigateBack({ if(this.sourcePage){
uni.reLaunch({
url: this.sourcePage
}) })
}else{ }else{
uni.reLaunch({ uni.navigateBack({
url:'/pages/menu/profile/index'
}) })
} }
}, },
editItem(index){ editItem(index) {
console.log(index,78787) console.log(index, 78787)
uni.setStorageSync('editIndex',index) uni.setStorageSync('editIndex', index)
uni.setStorageSync('AddressInfo',this.info) uni.setStorageSync('AddressInfo', this.info)
uni.setStorageSync('AddressName',this.itemCoin) uni.setStorageSync('AddressName', this.itemCoin)
uni.setStorageSync('AddressIndex',this.walletIndex) uni.setStorageSync('AddressIndex', this.walletIndex)
uni.navigateTo({ uni.navigateTo({
url:'../addAddress2/index' url: '../addAddress2/index'
}) })
}, },
showIndex(item,index){ showIndex(item, index) {
this.itemCoin=item.coinList[0].name this.itemCoin = item.coinList[0].name
if(item.coinList[0].xname=='Bitcoin'){ if (item.coinList[0].xname == 'Bitcoin') {
this.btcIndex=index this.btcIndex = index
this.show=true this.show = true
}else if(item.coinList[0].xname=='Ethereum'){ } else if (item.coinList[0].xname == 'Ethereum') {
this.show2=true this.show2 = true
this.ethIndex=index this.ethIndex = index
}else{ } else {
this.trxIndex=index this.trxIndex = index
this.show3=true this.show3 = true
} }
this.info= item this.info = item
this.itemCoin=item.coinList[0].name this.itemCoin = item.coinList[0].name
this.itemAddress=item.address this.itemAddress = item.address
this.walletIndex=index; this.walletIndex = index;
}, },
deleteItem(){ deleteItem() {
console.log(this.walletIndex,4444444) console.log(this.walletIndex, 4444444)
if(this.itemCoin=='BTC'){ if (this.itemCoin == 'BTC') {
console.log(this.BTCAddressInfo.length,'length') console.log(this.BTCAddressInfo.length, 'length')
if(this.BTCAddressInfo.length==1){ if (this.BTCAddressInfo.length == 1) {
let BTCAddressInfo=[] let BTCAddressInfo = []
uni.setStorageSync('BTCAddressInfo',BTCAddressInfo) uni.setStorageSync('BTCAddressInfo', BTCAddressInfo)
} }
console.log(this.BTCAddressInfo,1111) console.log(this.BTCAddressInfo, 1111)
console.log(this.walletIndex,44444) console.log(this.walletIndex, 44444)
this.BTCAddressInfo.splice(this.walletIndex,1) this.BTCAddressInfo.splice(this.walletIndex, 1)
console.log(this.BTCAddressInfo,'删除后') console.log(this.BTCAddressInfo, '删除后')
uni.setStorageSync('BTCAddressInfo', this.BTCAddressInfo) uni.setStorageSync('BTCAddressInfo', this.BTCAddressInfo)
this.showImte=true; this.showImte = true;
this.show=false; this.show = false;
setTimeout(()=>{ setTimeout(() => {
this.showImte=false; this.showImte = false;
},1500) }, 1500)
} }
if(this.itemCoin=='ETH'){ if (this.itemCoin == 'ETH') {
if(this.ETHAddressInfo.length==1){ if (this.ETHAddressInfo.length == 1) {
let ETHAddressInfo=[] let ETHAddressInfo = []
uni.setStorageSync('ETHAddressInfo',ETHAddressInfo) uni.setStorageSync('ETHAddressInfo', ETHAddressInfo)
} }
console.log(this.ETHAddressInfo,1111) console.log(this.ETHAddressInfo, 1111)
console.log(this.walletIndex,44444) console.log(this.walletIndex, 44444)
this.ETHAddressInfo.splice(this.walletIndex,1) this.ETHAddressInfo.splice(this.walletIndex, 1)
uni.setStorageSync('ETHAddressInfo',this.ETHAddressInfo) uni.setStorageSync('ETHAddressInfo', this.ETHAddressInfo)
this.showImte=true; this.showImte = true;
this.show2=false; this.show2 = false;
setTimeout(()=>{ setTimeout(() => {
this.showImte=false; this.showImte = false;
},1500) }, 1500)
} }
if(this.itemCoin=='TRX'){ if (this.itemCoin == 'TRX') {
if(this.TRXAddressInfo.length==1){ if (this.TRXAddressInfo.length == 1) {
let TRXAddressInfo=[] let TRXAddressInfo = []
uni.setStorageSync('TRXAddressInfo',TRXAddressInfo) uni.setStorageSync('TRXAddressInfo', TRXAddressInfo)
} }
this.TRXAddressInfo.splice(this.walletIndex,1) this.TRXAddressInfo.splice(this.walletIndex, 1)
uni.setStorageSync('TRXAddressInfo',this.TRXAddressInfo) uni.setStorageSync('TRXAddressInfo', this.TRXAddressInfo)
this.showImte=true; this.showImte = true;
this.show3=false; this.show3 = false;
setTimeout(()=>{ setTimeout(() => {
this.showImte=false; this.showImte = false;
},1500) }, 1500)
} }
}, },
goAddress(){ goAddress() {
uni.navigateTo({ uni.navigateTo({
url:'../addAddress/index' url: '../addAddress/index'
}) })
} }
}, },
onLoad(item) { onLoad(item) {
//
if(item){
this.transfer=item
}
this.sourcePage=uni.getStorageSync('sourcePage')
//
if (item.item) {
this.transfer = item.item
}
if(uni.getStorageSync('BTCAddressInfo').length>0){ if (uni.getStorageSync('BTCAddressInfo').length > 0) {
this.BTCAddressInfo=uni.getStorageSync('BTCAddressInfo') this.BTCAddressInfo = uni.getStorageSync('BTCAddressInfo')
console.log(this.BTCAddressInfo,777) console.log(this.BTCAddressInfo, 777)
} }
if(uni.getStorageSync('ETHAddressInfo').length>0){ if (uni.getStorageSync('ETHAddressInfo').length > 0) {
this.ETHAddressInfo=uni.getStorageSync('ETHAddressInfo') this.ETHAddressInfo = uni.getStorageSync('ETHAddressInfo')
console.log(this.ETHAddressInfo,777) console.log(this.ETHAddressInfo, 777)
} }
if(uni.getStorageSync('TRXAddressInfo').length>0){ if (uni.getStorageSync('TRXAddressInfo').length > 0) {
this.TRXAddressInfo=uni.getStorageSync('TRXAddressInfo') this.TRXAddressInfo = uni.getStorageSync('TRXAddressInfo')
console.log(this.TRXAddressInfo,777) console.log(this.TRXAddressInfo, 777)
} }
} }
}; };
@ -310,7 +324,7 @@ goAddress(){
<style scoped> <style scoped>
page { page {
background: #FAFAFA; background: #FAFAFA;
height: 100%; height: 100%;
} }
</style> </style>

4
pages/menu/sendToken/index.css

@ -43,7 +43,7 @@
font-size: 32rpx; font-size: 32rpx;
} }
.title{ .title{
font-size: 36rpx; font-size: 32rpx;
text-align: center; text-align: center;
font-weight: 700; font-weight: 700;
margin-top: 15rpx; margin-top: 15rpx;
@ -65,7 +65,7 @@
} }
.main .text2{ .main .text2{
color: #000; color: #000;
font-size: 30rpx; font-size: 28rpx;
margin-top: 52rpx; margin-top: 52rpx;
background-color: #FAFAFA; background-color: #FAFAFA;
border-radius: 10rpx; border-radius: 10rpx;

28
pages/menu/sendToken/transfer/index.vue

@ -21,14 +21,14 @@
{{i18n.Receivingaddress}} {{i18n.Receivingaddress}}
</view> </view>
<view class="text2" @click="goAddress('transfer')"> <view class="text2" @click="goAddress('transfer')">
{{i18n.AdressBook}} {{i18n.AddressBook}}
</view> </view>
</view> </view>
<view class="inputcon"> <view class="inputcon">
<input type="text" value="" placeholder-style="font-size: 30rpx; color: #D0D0D2;" <input type="text" value="" placeholder-style="font-size: 30rpx; color: #D0D0D2;"
placeholder="Please enter the recipient address" class="input1" placeholder="Please enter the recipient address" class="input1"
v-model="transInfoPass.toAddress" /> v-model="transInfoPass.toAddress" />
<image src="../../../../static/tongyonh/Frame330.png" mode="aspectFit" class="img1"></image> <image src="../../../../static/tongyonh/Frame330.png" mode="aspectFit" class="img1" @click="scanCode"></image>
</view> </view>
</view> </view>
@ -438,12 +438,12 @@
this.show = true; this.show = true;
let that = this let that = this
if (this.coin.type === 'ETH') { if (this.coin.type === 'ETH') {
this.$EthUtil.getGas().then((res) => {
console.log(res, 'ETH')
this.$EthUtil.getGas().then((res) => { this.$EthUtil.getGas().then((res) => {
console.log(res,'ETH') that.transInfoPass.fee = res * 61000 / Math.pow(10, 6)
this.$EthUtil.getGas().then((res) => {
that.transInfoPass.fee = res*61000/ Math.pow(10,6)
})
}) })
})
} else if (this.coin.type === 'TRX') { } else if (this.coin.type === 'TRX') {
this.$TronUtil.getTransaction(this.transInfoPass.fromAddress, this.$TronUtil.getTransaction(this.transInfoPass.fromAddress,
@ -453,7 +453,7 @@
that.transaction = res; that.transaction = res;
uni.setStorageSync('transaction', that.transaction) uni.setStorageSync('transaction', that.transaction)
console.log(JSON.stringify(that.transaction)) console.log(JSON.stringify(that.transaction))
let size = JSON.stringify(that.transaction).replace(/[^x00-xFF]/g,'**').length; let size = JSON.stringify(that.transaction).replace(/[^x00-xFF]/g, '**').length;
console.log(size, "size") console.log(size, "size")
console.log(size.toString().length, "size") console.log(size.toString().length, "size")
that.transInfoPass.fee = Number(size) * (size.toString().length + 1) * 1000 / Math.pow(10, that.transInfoPass.fee = Number(size) * (size.toString().length + 1) * 1000 / Math.pow(10,
@ -472,6 +472,16 @@
} }
}, },
scanCode() {
var _this = this
uni.scanCode({
success: function(res) {
console.log('扫码内容', res.result)
_this.transInfoPass.toAddress = res.result;
}
});
},
// //
printCancel() { printCancel() {
@ -601,7 +611,7 @@
goAddress(text) { goAddress(text) {
console.log(text)
uni.navigateTo({ uni.navigateTo({
url: '../address/index?item=' + text url: '../address/index?item=' + text
}) })
@ -624,7 +634,7 @@
if (uni.getStorageSync('fingerPass')) { if (uni.getStorageSync('fingerPass')) {
this.passShow = uni.getStorageSync('fingerPass') this.passShow = uni.getStorageSync('fingerPass')
} }
} }
}; };

83
pages/menu/token/btc/index.vue

@ -45,8 +45,9 @@
<view class="select_con"> <view class="select_con">
<view class="select"> <view class="select">
<u-tabs height="120" bar-width="172" active-font="13" inactive-font="13" active-color="#6F69FF" inactive-color="#A3AED0" :list="list" <u-tabs height="120" bar-width="172" active-font="13" inactive-font="13" active-color="#6F69FF"
:is-scroll="false" :current="current" @change="change"></u-tabs> inactive-color="#A3AED0" :list="list" :is-scroll="false" :current="current" @change="change">
</u-tabs>
<u-empty text="No content" mode="list" v-if="showInfo"></u-empty> <u-empty text="No content" mode="list" v-if="showInfo"></u-empty>
@ -63,15 +64,15 @@
{{item.address}} {{item.address}}
</view> </view>
<view class="text2"> <view class="text2">
{{item.time}} {{item.transactionTime}}
</view> </view>
</view> </view>
</view> </view>
<view class="rig_con"> <view class="rig_con">
<view class="text1"> <view class="text1">
<text v-if="address==item.to">+</text> <text v-if="item.type=='in'">+</text>
<text v-if="address==item.from">-</text> <text v-if="item.type=='out'">-</text>
{{item.value}} {{item.amount}}
<text class=""> <text class="">
{{item.network}} {{item.network}}
</text> </text>
@ -116,14 +117,15 @@
data() { data() {
return { return {
// address // address
trxs:{}, trxs: [],
coin: {}, coin: {},
isNoData:false,
showInfo: false, showInfo: false,
list: [{ list: [{
name: this.$t('index').All, name: this.$t('index').All,
}, { }, {
name: this.$t('index').Send, name: this.$t('index').Send,
}, { }, {
name: this.$t('index').Receive, name: this.$t('index').Receive,
@ -144,10 +146,10 @@
} }
}, },
computed: { computed: {
i18n() { i18n() {
return this.$t('index') return this.$t('index')
}, },
}, },
methods: { methods: {
goSend() { goSend() {
uni.navigateTo({ uni.navigateTo({
@ -178,35 +180,52 @@
this.type = 'receive' this.type = 'receive'
} }
this.current = index; this.current = index;
console.log(this.current) this.pageNum = 1;
this.trxs=[];
this.getWalletInfo(); this.getWalletInfo();
this.isNoData=false;
}, },
onReachBottom() {
if(!this.isNoData){
this.pageNum=this.pageNum+1;
this.getWalletInfo();
}
},
async getWalletInfo() {
let params = {
address: this.coin.address,
chainName: this.coin.type,
contract: this.coin.contractAddress,
pageNum: this.pageNum,
pageSize: this.pageSize
}
if (this.type === 'send') {
params.fromAddress = this.coin.address;
} else if (this.type === 'receive') {
params.toAddress = this.coin.address
}
const response = await this.$api.getChainDataList(params)
if (response.data.rows.length == 0 ) {
this.isNoData=true;
if(this.pageNum == 1){
this.showInfo = true;
}
} else {
this.showInfo = false;
}
this.trxs=this.trxs.concat(response.data.rows);
getWalletInfo() {
var that = this
this.$dataUtil.transactionData(this.coin.type, this.type, this.coin.address, this.coin.contractAddress,
this.pageNum, this.pageSize,
function(data) {
console.log(data, 121211212112121)
if (data.length == 0) {
that.showInfo = true;
} else {
that.showInfo = false;
}
that.trxs = data
})
} }
}, },
onLoad() { onLoad() {
this.coin = uni.getStorageSync('coin'); this.coin = uni.getStorageSync('coin');
this.change(0); this.change(0);
},
onReachBottom() {
this.pageSize += 5;
this.getWalletInfo()
} }
}; };
</script> </script>
<style scoped> <style scoped>

12
pages/menu/transction/detail/index.vue

@ -21,7 +21,7 @@
Amount Amount
</view> </view>
<view class="text1"> <view class="text1">
{{info.value}} {{info.network}} {{info.amount}} {{info.coin}}
</view> </view>
</view> </view>
<view class="title_con flex"> <view class="title_con flex">
@ -29,7 +29,7 @@
Time Time
</view> </view>
<view class="text2"> <view class="text2">
{{info.time}} {{info.transactionTime}}
</view> </view>
</view> </view>
<view class="title_con flex"> <view class="title_con flex">
@ -37,7 +37,7 @@
Tx Fee Tx Fee
</view> </view>
<view class="text2"> <view class="text2">
{{info.fee}} {{info.network}} {{info.fee}} {{info.chainName}}
</view> </view>
</view> </view>
@ -58,8 +58,8 @@
<text v-else>(me)</text> <text v-else>(me)</text>
</view> </view>
<view class="text2"> <view class="text2">
{{info.from}} {{info.fromAddress}}
<image @click="copyTextMethod(info.from)" src="../../../../static/tongyonh/copy_24px.png" mode="aspectFit" class="img"></image> <image @click="copyTextMethod(info.fromAddress)" src="../../../../static/tongyonh/copy_24px.png" mode="aspectFit" class="img"></image>
</view> </view>
</view> </view>
<view class="item"> <view class="item">
@ -69,7 +69,7 @@
<text v-else>(others)</text> <text v-else>(others)</text>
</view> </view>
<view class="text2"> <view class="text2">
{{info.to}} {{info.toAddress}}
<image @click="copyTextMethod(info.to)" src="../../../../static/tongyonh/copy_24px.png" mode="aspectFit" class="img"></image> <image @click="copyTextMethod(info.to)" src="../../../../static/tongyonh/copy_24px.png" mode="aspectFit" class="img"></image>
</view> </view>
</view> </view>

4
pages/menu/wallet/add/index.css

@ -84,10 +84,10 @@
margin-right: 20rpx; margin-right: 20rpx;
} }
.bot_con .item .left .textcon .text1{ .bot_con .item .left .textcon .text1{
font-size: 32rpx; font-size: 30rpx;
} }
.bot_con .item .left .textcon .text2{ .bot_con .item .left .textcon .text2{
font-size: 28rpx; font-size: 24rpx;
color: #B0BBD5; color: #B0BBD5;
} }
.bot_con .item .rig{ .bot_con .item .rig{

4
pages/menu/wallet/mwallet/manage/index.css

@ -11,7 +11,7 @@
margin-bottom: 24rpx; margin-bottom: 24rpx;
} }
.main .item .text1{ .main .item .text1{
font-size: 32rpx; font-size: 30rpx;
color: #000; color: #000;
margin-bottom: 16rpx; margin-bottom: 16rpx;
} }
@ -22,7 +22,7 @@ margin-bottom: 16rpx;
border-bottom: 2rpx solid #F4F7FE; border-bottom: 2rpx solid #F4F7FE;
} }
.main .item .text2{ .main .item .text2{
font-size: 32rpx; font-size: 28rpx;
color: #68769F; color: #68769F;
word-break: break-word; word-break: break-word;
} }

3
pages/menu/wallet/mwallet/manage/index.vue

@ -21,7 +21,7 @@
{{i18n.Name}} {{i18n.Name}}
</view> </view>
<view class="address" > <view class="address" >
{{i18n.Setname}} {{userObj.name}}
<image src="../../../../../static/tongyonh/chevron_right_24px.png" mode="aspectFit" class="img1"></image> <image src="../../../../../static/tongyonh/chevron_right_24px.png" mode="aspectFit" class="img1"></image>
</view> </view>
</view> </view>
@ -103,6 +103,7 @@
}) })
} }
console.log(this.userObj,2222) console.log(this.userObj,2222)
this.userObj.name=this.value;
this.$walletUtil.updateWalletName(this.userObj.type,this.userObj.address,this.value) this.$walletUtil.updateWalletName(this.userObj.type,this.userObj.address,this.value)
uni.showToast({ uni.showToast({
title: 'Successfully', title: 'Successfully',

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

File diff suppressed because one or more lines are too long

50
unpackage/dist/dev/app-plus/app-view.js

File diff suppressed because one or more lines are too long

263
utils/DataUtil.js

@ -1,263 +0,0 @@
import index from './index.js'
let DataUtil = {
transactionData: function(type, dataType, address, contract, pageNum, pageSize, success) {
console.log(type, dataType, address, contract, pageNum, pageSize, 1111)
switch (type) {
case 'BTC':
success([]);
break;
case 'ETH':
this.ethTransactionData(contract, dataType, address, pageNum, pageSize, success);
break;
case 'TRX':
this.trxTransactionData(contract, dataType, address, pageNum, pageSize, success);
break;
}
},
ethTransactionData: function(contract, dataType, address, pageNum, pageSize, success) {
let dataList = [];
if (!contract) {
uni.request({
url: 'http://scan.weirui0755.com/eth/api/eth/address/normal/' + address + '/' +
pageNum +
'/' + pageSize, //请求接口
header: {
'content-type': 'application/x-www-form-urlencoded', //自定义请求头信息
},
success: (res) => {
console.log(res, 1234654)
if (res.data.code === 1) {
var data = res.data.data;
for (let i = 0; i < data.length; i++) {
if (!data[i].toAlias) {
if ((data[i].from != address && dataType == 'send') || (data[i]
.to != address && dataType == 'receive')) {
continue;
}
var transactionData = {
value: data[i].value,
from: data[i].from,
to: data[i].to,
fee: data[i].fee,
txid: data[i].txid,
confirmations: data[i].confirmations,
block_no: data[i].block_no,
time: index.formatyymmddhhmmss33(data[i].time * 1000)
}
if (data[i].from === address) {
let newaddress = data[i].to;
newaddress = newaddress.substring(0, 6) + '...' + newaddress.substring(
newaddress.length-6,
newaddress.length)
transactionData.address = newaddress;
transactionData.type = 'out';
} else {
let newaddress = data[i].from;
newaddress = newaddress.substring(0, 6) + '...' + newaddress.substring(
newaddress.length-6,
newaddress.length)
transactionData.address = newaddress;
transactionData.type = 'in';
}
dataList.push(transactionData)
}
}
}
success(dataList)
},
error: (res) => {
success(dataList)
}
});
} else {
uni.request({
url: 'http://scan.weirui0755.com/eth/api/eth/address/tokentrans/' + address + '/' +
contract + '/' + pageNum +
'/' + pageSize, //请求接口
header: {
'content-type': 'application/x-www-form-urlencoded', //自定义请求头信息
},
success: (res) => {
console.log(res, 1234654)
if (res.data.code === 1) {
var data = res.data.data;
for (let i = 0; i < data.length; i++) {
if (!data[i].toAlias) {
if ((data[i].from != address && dataType == 'send') || (data[i]
.to != address && dataType == 'receive')) {
continue;
}
var transactionData = {
value: data[i].value / Math.pow(10, data[i].tokenDecimals),
from: data[i].from,
to: data[i].to,
txid: data[i].txid,
fee: data[i].fee,
confirmations: data[i].conformations,
block_no: data[i].block_no,
time: index.formatyymmddhhmmss33(data[i].time * 1000)
}
if (data[i].from === address) {
let newaddress = data[i].to;
newaddress = newaddress.substring(0, 6) + '...' + newaddress.substring(
newaddress.length-6,
newaddress.length)
transactionData.address = newaddress;
transactionData.type = 'out';
} else {
let newaddress = data[i].from;
newaddress = newaddress.substring(0, 6) + '...' + newaddress.substring(
newaddress.length-6,
newaddress.length)
transactionData.address = newaddress;
transactionData.type = 'in';
}
dataList.push(transactionData)
}
}
}
success(dataList)
}
});
}
}
,
trxTransactionData: function(contract, dataType, address, pageNum, pageSize, success) {
let dataList = [];
let add = address
if (contract == null || contract == '') {
uni.request({
url: 'http://scan.weirui0755.com/trx/api/trx/address/normal/' + address + '/' +
pageNum +
'/' + pageSize, //请求接口
header: {
'content-type': 'application/x-www-form-urlencoded', //自定义请求头信息
},
success: (res) => {
console.log(res.data.code)
if (res.data.code === 1) {
var data = res.data.data;
for (let i = 0; i < data.length; i++) {
if ((data[i].from != address && dataType == 'send') || (data[i]
.to != address && dataType == 'receive') || data[i].tType !=
'Transfer') {
continue;
}
var transactionData = {
value: data[i].value,
from: data[i].from,
to: data[i].to,
fee: data[i].fee,
txid: data[i].txid,
confirmations: data[i].confirmations,
block_no: data[i].block_no,
time: index.formatyymmddhhmmss33(data[i].time * 1000)
}
if (data[i].from === address) {
var newaddress = data[i].to
newaddress = newaddress.substring(0, 6) + '...' + newaddress.substring(newaddress.length-6,
newaddress.length);
transactionData.address = newaddress;
transactionData.type = 'out';
} else {
var newaddress = data[i].from
newaddress = newaddress.substring(0, 6) + '...' + newaddress.substring(newaddress.length-6,
newaddress.length);
transactionData.address = newaddress;
transactionData.type = 'in';
}
console.log(transactionData.address, 123456)
dataList.push(transactionData)
}
}
success(dataList)
}
});
} else {
uni.request({
url: 'http://scan.weirui0755.com/trx/api/trx/address/tokentrans/' + address + '/' +
contract + '/' + pageNum +
'/' + pageSize, //请求接口
header: {
'content-type': 'application/x-www-form-urlencoded', //自定义请求头信息
},
success: (res) => {
console.log(res, 12346545555)
console.log(dataType, 5555555555)
if (res.data.code === 1) {
var data = res.data.data;
for (let i = 0; i < data.length; i++) {
console.log(!data[i].toAlias, 5555555555,data[i].to == add)
if ((data[i].to == add && dataType == 'send') || (data[i]
.from == add && dataType == 'receive')) {
continue;
}
var transactionData = {
value: data[i].value / Math.pow(10, data[i].tokenDecimals),
from: data[i].from,
to: data[i].to,
txid: data[i].txid,
fee: data[i].fee,
confirmations: data[i].conformations,
block_no: data[i].block_no,
time: index.formatyymmddhhmmss33(data[i].time * 1000)
}
if (data[i].from === address) {
var newaddress = data[i].to
newaddress = newaddress.substring(0, 6) + '...' + newaddress.substring(
newaddress.length-6,
newaddress.length);
transactionData.address = newaddress;
transactionData.type = 'out';
} else {
var newaddress = data[i].from
newaddress = newaddress.substring(0, 6) + '...' + newaddress.substring(
newaddress.length-6,
newaddress.length);
transactionData.address = newaddress;
transactionData.type = 'in';
}
dataList.push(transactionData)
}
}
success(dataList)
}
});
}
}
}
export default DataUtil

8
utils/SystemConfiguration.js

@ -2,12 +2,12 @@ let isTest = true;
const constant = isTest ? { const constant = isTest ? {
//服务端连接 //服务端连接
serverUrl: 'http://wallet-api.weirui0755.com' serverUrl: 'http://wallet-api.weirui0755.com',
coinTickerWs:'ws://wallet-quartz.weirui0755.com/websocket'
} : { } : {
//服务端连接 //服务端连接
serverUrl: 'http://wallet-api.weirui0755.com' serverUrl: 'http://wallet-api.weirui0755.com',
coinTickerWs:'ws://wallet-quartz.weirui0755.com/websocket'
} }
export default { export default {

3
utils/api.js

@ -10,7 +10,8 @@ const api = {
getContractInfoList: (params) => Vue.prototype.$axios.get('/api/contract/getContractInfoList?' + qs.stringify(params)), getContractInfoList: (params) => Vue.prototype.$axios.get('/api/contract/getContractInfoList?' + qs.stringify(params)),
//获取汇率 //获取汇率
getCoinRate: (params) => Vue.prototype.$axios.get('/api/coinRate/getCoinRate?' + qs.stringify(params)), getCoinRate: (params) => Vue.prototype.$axios.get('/api/coinRate/getCoinRate?' + qs.stringify(params)),
getChainDataList: (params) => Vue.prototype.$axios.get('/api/chainData/getChainDataList?' + qs.stringify(params)),
getCoinTickerList: (params) => Vue.prototype.$axios.get('/api/coinTicker/getCoinTickerList'),
//--------------------------------- free --------------------------------- //--------------------------------- free ---------------------------------
} }

2
utils/locales/en.js

@ -143,7 +143,7 @@ export default {
CopySuccessful:'Copy address Successful!', CopySuccessful:'Copy address Successful!',
// transfer // transfer
Transfer:'Transfer', Transfer:'Transfer',
AdressBook:'Adress Book', AddressBook:'Address Book',
Transferamount:'Transfer amount', Transferamount:'Transfer amount',
Balance:'Balance', Balance:'Balance',
ALL:"ALL", ALL:"ALL",

Loading…
Cancel
Save