Browse Source

钱包工具类

master
vee 4 years ago
parent
commit
1353908f70
  1. 4
      .hbuilderx/launch.json
  2. 10
      pages/menu/about/Privacy/index.vue
  3. 21
      pages/menu/about/index.vue
  4. 10
      pages/menu/about/terms/index.vue
  5. 2
      pages/menu/collection/collectionDetail/index.vue
  6. 2
      pages/menu/collection/collectionDetailtrue/index.vue
  7. 2
      pages/menu/market/index.css
  8. 2
      pages/menu/market/index.vue
  9. 4
      pages/menu/sendToken/addAddress/index.css
  10. 3
      pages/menu/sendToken/transfer/index.css
  11. 5
      pages/menu/sendToken/transfer/index.vue
  12. 31
      pages/menu/wallet/index.css
  13. 47
      pages/menu/wallet/index.vue
  14. 28
      pages/menu/wallet/otherCoin/index.css
  15. 1
      pages/menu/wallet/otherCoin/index.vue
  16. BIN
      static/tongyonh/textt.png
  17. 37204
      unpackage/dist/dev/app-plus/app-service.js
  18. 28905
      unpackage/dist/dev/app-plus/app-view.js
  19. 0
      unpackage/dist/dev/app-plus/static/img/copy_24px_outlined.e8932d3c.svg
  20. 0
      unpackage/dist/dev/app-plus/static/img/more_vert_24px_outlined.427f4df0.svg
  21. BIN
      unpackage/dist/dev/app-plus/static/tongyonh/textt.png
  22. 8
      utils/EthUtil.js
  23. 15
      utils/WalletUtil.js
  24. 4
      utils/api.js
  25. 5
      utils/axios.js
  26. 3
      utils/locales/en.js
  27. 6
      utils/locales/zh-F.js
  28. 6
      utils/locales/zh.js

4
.hbuilderx/launch.json

@ -14,6 +14,10 @@
{ {
"launchtype" : "local" "launchtype" : "local"
}, },
"mp-weixin" :
{
"launchtype" : "local"
},
"type" : "uniCloud" "type" : "uniCloud"
} }
] ]

10
pages/menu/about/Privacy/index.vue

@ -4,16 +4,10 @@
{{i18n.TermsofService}} {{i18n.TermsofService}}
</navigation> </navigation>
<view class="con"> <view class="con">
<view class="main">
<view class="">
Lorem text
</view>
Dosuere at turpis at, fringilla efficitur quam. Suspendisse vitae lacus ac lectus facilisis ornare. Vivamus vitae pulvinar nisi, in vehicula elit. Praesent iaculis ante tellus, eu mattis lectus suscipit sit amet. Sed congue accumsan nunc in iaculis. Sed malesuada elit turpis, eu egestas eros rhoncus non. Sed pulvinar euismod libero sit amet scelerisque. Vestibulum ante felis, condimentum in vulputate id, tempor eu nulla. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Etiam condimentum augue vitae nulla suscipit eleifend. Phasellus consectetur volutpat nulla, cursus facilisis elit vulputate sed. Mauris in semper sem. Interdum et malesuada fames ac ante ipsum primis in faucibus.
</view>
<view class="main"> <view class="main">
Etiam nisi lorem, posuere at turpis at, fringilla efficitur quam. Suspendisse vitae lacus ac lectus facilisis ornare. Vivamus vitae pulvinar nisi, in vehicula elit. Praesent iaculis ante tellus, eu mattis lectus suscipit sit amet. Sed congue accumsan nunc in iaculis. Sed malesuada elit turpis, eu egestas eros rhoncus non. Sed pulvinar euismod libero sit amet scelerisque. Vestibulum ante felis, condimentum in vulputate id, tempor eu nulla. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Etiam condimentum augue vitae nulla suscipit eleifend. Phasellus consectetur volutpat nulla, cursus facilisis elit vulputate sed. Mauris in semper sem. Interdum et malesuada fames ac ante ipsum primis in faucibus. {{i18n.TermsofServiceTxt}}
</view> </view>
</view> </view>
</view> </view>

21
pages/menu/about/index.vue

@ -16,7 +16,7 @@
{{i18n.Versionupdate}} {{i18n.Versionupdate}}
</view> </view>
<view class="text2 gray"> <view class="text2 gray">
v2.2.9 {{version}}
</view> </view>
</view> </view>
<view class="flex item"> <view class="flex item">
@ -32,17 +32,19 @@
{{i18n.TermsofService}} {{i18n.TermsofService}}
</view> </view>
<view class="text2 gray"> <view class="text2 gray">
<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>
<view class="flex item" @click="goPrivacy"> <!-- <view class="flex item" @click="goPrivacy">
<view class="text1"> <view class="text1">
{{i18n.PrivacyPolicy}} {{i18n.PrivacyPolicy}}
</view> </view>
<view class="text2 gray"> <view class="text2 gray">
<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">
</view> </image>
</view> </view>
</view> -->
</view> </view>
</view> </view>
@ -55,7 +57,7 @@
export default { export default {
data() { data() {
return { return {
version:'1.0.0'
}; };
}, },
computed: { computed: {
@ -63,6 +65,11 @@
return this.$t('index') return this.$t('index')
}, },
}, },
onLoad() {
// #ifdef APP-PLUS
this.version=plus.runtime.versionName;
// #endif
},
methods: { methods: {
goTerms() { goTerms() {
uni.navigateTo({ uni.navigateTo({
@ -82,7 +89,5 @@
</style> </style>
<style> <style>
@import './index.css'; @import './index.css';
</style> </style>

10
pages/menu/about/terms/index.vue

@ -5,12 +5,10 @@
</navigation> </navigation>
<view class="con"> <view class="con">
<view class="main"> <view class="main">
{{i18n.Etiamnisilorem1}}<br>
{{i18n.Etiamnisilorem2}} {{i18n.TermsofServiceTxt}}
</view>
<view class="main">
{{i18n.Etiamnisilorem3}}
</view> </view>
</view> </view>
</view> </view>
@ -39,7 +37,5 @@
</style> </style>
<style> <style>
@import './index.css'; @import './index.css';
</style> </style>

2
pages/menu/collection/collectionDetail/index.vue

@ -21,7 +21,7 @@
<text class="textleft">{{i18n.Contracts}}: </text>{{item.contract}} <text class="textleft">{{i18n.Contracts}}: </text>{{item.contract}}
</view> </view>
<view class="top"> <view class="top">
<text class="textleft texttt">{{i18n.ID}}: </text>{{item.id}} <text class="textleft texttt">{{i18n.ID}}: </text>{{item.tonkenId}}
</view> </view>
</view> </view>
</view> </view>

2
pages/menu/collection/collectionDetailtrue/index.vue

@ -29,7 +29,7 @@
{{i18n.TokenID}} {{i18n.TokenID}}
</view> </view>
<view class="text1one"> <view class="text1one">
{{item.id}} {{item.tonkenId}}
</view> </view>
</view> </view>
<view class="btn" @click="test"> <view class="btn" @click="test">

2
pages/menu/market/index.css

@ -1,6 +1,6 @@
.main_con { .main_con {
padding: 0 24rpx; padding: 0 24rpx;
padding-bottom: 250rpx; /* padding-bottom: 250rpx; */
margin-top: 80rpx; margin-top: 80rpx;
position: relative; position: relative;
} }

2
pages/menu/market/index.vue

@ -26,7 +26,7 @@
</view> </view>
</view> </view>
<view class="btn " :class="item.change_percent>0?'red':'green'"> <view class="btn " :class="item.rose>0?'red':'green'">
{{item.rose>0?'+':''}}{{item.rose}}% {{item.rose>0?'+':''}}{{item.rose}}%
</view> </view>

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

@ -21,7 +21,9 @@
position: relative; position: relative;
padding-bottom: 52rpx; padding-bottom: 52rpx;
} }
input{
font-size: 26rpx;
}
.yuan{ .yuan{
width: 114rpx; width: 114rpx;
height: 114rpx; height: 114rpx;

3
pages/menu/sendToken/transfer/index.css

@ -57,6 +57,9 @@
width: 85%; width: 85%;
position: relative; position: relative;
} }
input{
font-size: 26rpx;
}
.inputcon{ .inputcon{
position: relative; position: relative;
} }

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

@ -608,6 +608,7 @@
goAddress(text) { goAddress(text) {
uni.setStorageSync('transInfoPass',this.transInfoPass) uni.setStorageSync('transInfoPass',this.transInfoPass)
uni.setStorageSync('sourcePage', '/pages/menu/sendToken/transfer/index');
uni.navigateTo({ uni.navigateTo({
url: '../address/index?item=transfer' url: '../address/index?item=transfer'
}) })
@ -638,11 +639,11 @@
this.currency=currency; this.currency=currency;
} }
if(this.currency==='USD'){ if(this.currency==='USD'){
if (this.coin.balancePrice) { if (this.coin.balancePrice&&this.coin.balancePrice>0) {
this.price = (this.coin.balancePrice / this.coin.balance).toFixed(2) this.price = (this.coin.balancePrice / this.coin.balance).toFixed(2)
} }
}else{ }else{
if (this.coin.balanceCnyPrice) { if (this.coin.balanceCnyPrice&&this.coin.balancePrice>0) {
this.price = (this.coin.balanceCnyPrice / this.coin.balance).toFixed(2) this.price = (this.coin.balanceCnyPrice / this.coin.balance).toFixed(2)
} }
} }

31
pages/menu/wallet/index.css

@ -1,19 +1,4 @@
.head{
/* background: #FAFAFA !important; */
position: sticky;
/* #ifdef H5 */
top: 80rpx;
/* #endif */
/* #ifndef H5 */
top: 0;
/* #endif */
z-index: 999;
}
page{
width: 100%;
height: 100%;
/* overflow: hidden; */
}
.renYou{ .renYou{
width: 36rpx; width: 36rpx;
height: 20rpx; height: 20rpx;
@ -31,7 +16,7 @@ page{
} }
.main{ .main{
padding: 0 26rpx; padding: 0 26rpx;
padding-bottom: 250rpx; /* padding-bottom: 250rpx; */
height: 100%; height: 100%;
} }
.main .money_con{ .main .money_con{
@ -119,10 +104,22 @@ page{
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
} }
.bot_con .item .left .img1{ .bot_con .item .left .img1{
width: 84rpx; width: 84rpx;
height: 84rpx; height: 84rpx;
margin-right: 20rpx; margin-right: 20rpx;
border-radius: 100px;
border: 1rpx solid #F0F0F0;
}
.icon{
width: 70%;
height: 70%;
margin-top: 15%;
border-radius: 100px;
margin-left: 15%;
} }
.bot_con .item .left .textcon .text1{ .bot_con .item .left .textcon .text1{
font-size: 30rpx; font-size: 30rpx;

47
pages/menu/wallet/index.vue

@ -48,7 +48,10 @@
<view class="scroll"> <view class="scroll">
<view class="item flexx" @click="goTrans(item,index)" v-for="item,index in this.userObj.coinList"> <view class="item flexx" @click="goTrans(item,index)" v-for="item,index in this.userObj.coinList">
<view class="left flex "> <view class="left flex ">
<image :src="item.icon" mode="aspectFit" class="img1"></image> <view class="img1">
<image :src="item.icon" mode="aspectFit" class="icon"></image>
</view>
<view class="textcon"> <view class="textcon">
<view class="text1"> <view class="text1">
{{item.name}} {{item.name}}
@ -64,7 +67,8 @@
</view> </view>
<view class="text2" v-if="item.balancePrice"> <view class="text2" v-if="item.balancePrice">
{{currency=='USD'?'$ '+(!item.balancePrice?0.00:item.balancePrice):'¥ '+(!item.balanceCnyPrice?0.00:item.balanceCnyPrice)}}
{{currency=='USD'?'$ '+(!item.balancePrice?0.00:item.balancePrice):'¥ '+(!item.balanceCnyPrice?0.00:item.balanceCnyPrice)}}
</view> </view>
<view class="text2" v-if="!item.balancePrice"> <view class="text2" v-if="!item.balancePrice">
$ 0.00 $ 0.00
@ -104,17 +108,25 @@
}, },
onUnload: function() { onUnload: function() {
this.isStop = true this.isStop = true
uni.setStorageSync('isWallet', false);
}, },
onLoad() { async onLoad() {
let currency = uni.getStorageSync('currency'); let currency = uni.getStorageSync('currency');
if (currency) { if (currency) {
this.currency = currency; this.currency = currency;
} }
uni.setStorageSync('isWallet', true);
// //
this.$walletUtil.updateBalance();
this.userObj = uni.getStorageSync('wallet');
this.userObj = uni.getStorageSync('wallet');
this.userObj = await this.$walletUtil.updateBalance();
uni.setStorageSync('isWallet', false);
// #ifdef APP-PLUS
this.appVersion()
// #endif
}, },
computed: { computed: {
@ -130,6 +142,31 @@
// }, 500); // }, 500);
// }, // },
methods: { methods: {
async appVersion() {
let param = {
'appId': uni.getSystemInfoSync().platform
}
console.log('ss' + this.$api)
const response = await this.$api.versionUpgrade(param)
plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
console.log('当前版本号' + wgtinfo.versionCode)
console.log((wgtinfo.versionCode < response.data.versionId))
if (wgtinfo.versionCode < response.data.versionId) {
let that=this;
// uni.showModal({
// title: that.i18n.updateTitle,
// content: that.i18n.updateMsg,
// success: function (res) {
// if (res.confirm) {
// plus.runtime.openURL(response.data.appUrl);
// }
// }
// });
}
});
},
goOther() { goOther() {
uni.navigateTo({ uni.navigateTo({

28
pages/menu/wallet/otherCoin/index.css

@ -1,21 +1,22 @@
.maintoP { .maintoP {
margin-top: 100rpx; margin-top: 100rpx;
} }
.aaa { .aaa {
display: block; display: block;
} }
page {
height: 100%;
}
.main_con { .main_con {
max-height: 1000rpx; max-height: 1000rpx;
overflow-y: scroll; overflow-y: scroll;
} }
.main { .main {
padding: 0 24rpx; padding: 0 24rpx;
margin-top: 30rpx; margin-top: 30rpx;
background: #fff; background: #fff;
} }
.title { .title {
height: 160rpx; height: 160rpx;
display: flex; display: flex;
@ -23,11 +24,13 @@
font-size: 32rpx; font-size: 32rpx;
border-bottom: 2rpx solid #F6F8FD; border-bottom: 2rpx solid #F6F8FD;
} }
.flex { .flex {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
.flex2 { .flex2 {
display: flex; display: flex;
} }
@ -36,27 +39,33 @@
width: 80rpx; width: 80rpx;
height: 80rpx; height: 80rpx;
} }
.main_con .item { .main_con .item {
height: 160rpx; height: 160rpx;
border-bottom: 2rpx solid #F6F8FD; border-bottom: 2rpx solid #F6F8FD;
border-radius: 24rpx; border-radius: 24rpx;
} }
.main_con .item .img { .main_con .item .img {
width: 48rpx; width: 48rpx;
height: 48rpx; height: 48rpx;
} }
.main_con .textcon { .main_con .textcon {
margin-left: 20rpx; margin-left: 20rpx;
} }
.main_con .textcon .text1 { .main_con .textcon .text1 {
font-size: 30rpx; font-size: 30rpx;
} }
.main_con .textcon .text2 { .main_con .textcon .text2 {
font-size: 24rpx; font-size: 24rpx;
color: #999; color: #999;
word-break: break-word; word-break: break-word;
} }
.back { .back {
width: 30rpx; width: 30rpx;
height: 30rpx; height: 30rpx;
@ -65,20 +74,24 @@
top: 50%; top: 50%;
transform: translateY(-50%); transform: translateY(-50%);
} }
.opci { .opci {
opacity: 0.5; opacity: 0.5;
} }
.topview { .topview {
background-color: #FAFAFA; background-color: #FAFAFA;
width: 100%; width: 100%;
border-radius: 32rpx; border-radius: 32rpx;
position: relative; position: relative;
} }
.topinput { .topinput {
width: 100%; width: 100%;
height: 70rpx; height: 70rpx;
padding-left: 100rpx; padding-left: 100rpx;
} }
.searchimg { .searchimg {
width: 48rpx; width: 48rpx;
height: 48rpx; height: 48rpx;
@ -103,23 +116,28 @@
color: #fff; color: #fff;
transition: .8s all; transition: .8s all;
} }
.goTop { .goTop {
position: fixed; position: fixed;
bottom: 60rpx !important; bottom: 60rpx !important;
} }
.green { .green {
background-color: #6AD6A8; background-color: #6AD6A8;
} }
.info_con .text{
} .info_con .text {}
.info_con .text2 { .info_con .text2 {
font-size: 700; font-size: 700;
font-size: 32rpx; font-size: 32rpx;
} }
.goTop { .goTop {
position: fixed; position: fixed;
bottom: 60rpx !important; bottom: 60rpx !important;
} }
.copyImg { .copyImg {
width: 48rpx; width: 48rpx;
height: 48rpx; height: 48rpx;

1
pages/menu/wallet/otherCoin/index.vue

@ -15,6 +15,7 @@
<view class="main_con"> <view class="main_con">
<view class="item flex" v-for="item,index in coinInfo" :key="index"> <view class="item flex" v-for="item,index in coinInfo" :key="index">
<view class="left flex2"> <view class="left flex2">
<image :src="item.contractIconUrlAbs" mode="aspectFit" class="img"></image> <image :src="item.contractIconUrlAbs" mode="aspectFit" class="img"></image>
<view class="textcon"> <view class="textcon">
<view class="text1"> <view class="text1">

BIN
static/tongyonh/textt.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

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

File diff suppressed because one or more lines are too long

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

File diff suppressed because one or more lines are too long

0
unpackage/dist/dev/app-plus/static/img/copy_24px_outlined.8dca7e38.svg → unpackage/dist/dev/app-plus/static/img/copy_24px_outlined.e8932d3c.svg

Before

Width:  |  Height:  |  Size: 629 B

After

Width:  |  Height:  |  Size: 629 B

0
unpackage/dist/dev/app-plus/static/img/more_vert_24px_outlined.266aaa48.svg → unpackage/dist/dev/app-plus/static/img/more_vert_24px_outlined.427f4df0.svg

Before

Width:  |  Height:  |  Size: 526 B

After

Width:  |  Height:  |  Size: 526 B

BIN
unpackage/dist/dev/app-plus/static/tongyonh/textt.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

8
utils/EthUtil.js

@ -82,13 +82,15 @@ let eth = {
let res =await uni.request({ let res =await uni.request({
url: 'https://mainnet.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161', //仅为示例,并非真实接口地址。 url: systemConfiguration.constant.ethNode, //仅为示例,并非真实接口地址。
method: 'POST', method: 'POST',
data: data, data: data,
dataType: 'json' dataType: 'json'
}); });
let resData=res[res.length-1];
let balance = Number(web3.utils.hexToNumberString(res['data']['result'])) / Math.pow(10, 18) console.log(resData,5555555555)
let balance = Number(web3.utils.hexToNumberString(resData.data.result)) / Math.pow(10, 18)
console.log(balance,'balance')
return balance; return balance;
}, },

15
utils/WalletUtil.js

@ -224,14 +224,16 @@ let WalletUtil = {
wallet.balance = await BtcUtil.getBalance(wallet.address) wallet.balance = await BtcUtil.getBalance(wallet.address)
break; break;
case 'ETH': case 'ETH':
console.log("进来ETH") console.log("进来ETH",wallet.balance )
wallet.balance = await EthUtil.getBalance(wallet.address); wallet.balance = await EthUtil.getBalance(wallet.address);
console.log("进来ETH",wallet.balance )
for (let i = 1; i < wallet.coinList.length; i++) { for (let i = 1; i < wallet.coinList.length; i++) {
wallet.coinList[i].balance = EthUtil.getTokenBalance(wallet.address, wallet.coinList[ wallet.coinList[i].balance = await EthUtil.getTokenBalance(wallet.address, wallet.coinList[i].contractAddress);
i].contractAddress); console.log("进来ETH",wallet.coinList[i].balance)
} }
wallet.totalBalancePrice = wallet.coinList[1].balancePrice wallet.totalBalancePrice = wallet.coinList[1].balancePrice?wallet.coinList[1].balancePrice:0;
wallet.totalBalanceCnyPrice=wallet.coinList[1].balanceCnyPrice wallet.totalBalanceCnyPrice=wallet.coinList[1].balanceCnyPrice?wallet.coinList[1].balanceCnyPrice:0;
wallet.coinList[1].balancePrice = (wallet wallet.coinList[1].balancePrice = (wallet
.coinList[1].balance * usdtU.data.priceInUsd).toFixed(2); .coinList[1].balance * usdtU.data.priceInUsd).toFixed(2);
wallet.coinList[1].balanceCnyPrice = (wallet wallet.coinList[1].balanceCnyPrice = (wallet
@ -280,10 +282,13 @@ let WalletUtil = {
} }
wallet.balancePrice = (wallet.balance * mainCoinP.data.priceInUsd).toFixed(2); wallet.balancePrice = (wallet.balance * mainCoinP.data.priceInUsd).toFixed(2);
wallet.balanceCnyPrice = (wallet.balance * mainCoinP.data.priceCny).toFixed(2); wallet.balanceCnyPrice = (wallet.balance * mainCoinP.data.priceCny).toFixed(2);
wallet.totalBalancePrice=(Number(wallet.totalBalancePrice)+Number(wallet.balancePrice)).toFixed(2); wallet.totalBalancePrice=(Number(wallet.totalBalancePrice)+Number(wallet.balancePrice)).toFixed(2);
wallet.totalBalanceCnyPrice=(Number(wallet.totalBalanceCnyPrice)+Number(wallet.balanceCnyPrice)).toFixed(2); wallet.totalBalanceCnyPrice=(Number(wallet.totalBalanceCnyPrice)+Number(wallet.balanceCnyPrice)).toFixed(2);
console.log("wallet.balancePrice",Number(wallet.totalBalancePrice))
console.log("wallet.balanceCnyPrice",wallet.totalBalancePrice)
wallet.coinList[0].balance = wallet.balance wallet.coinList[0].balance = wallet.balance
wallet.coinList[0].balancePrice = wallet.balancePrice wallet.coinList[0].balancePrice = wallet.balancePrice
wallet.coinList[0].balanceCnyPrice = wallet.balanceCnyPrice wallet.coinList[0].balanceCnyPrice = wallet.balanceCnyPrice

4
utils/api.js

@ -12,9 +12,9 @@ const api = {
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)), getChainDataList: (params) => Vue.prototype.$axios.get('/api/chainData/getChainDataList?' + qs.stringify(params)),
getCoinTickerList: (params) => Vue.prototype.$axios.get('/api/coinTicker/getCoinTickerList'), getCoinTickerList: (params) => Vue.prototype.$axios.get('/api/coinTicker/getCoinTickerList'),
getBalance: (params) => Vue.prototype.$axios.get('/api/balance/getBalance?' + qs.stringify(params)) getBalance: (params) => Vue.prototype.$axios.get('/api/balance/getBalance?' + qs.stringify(params)),
versionUpgrade: (params) => Vue.prototype.$axios.get('/api/home/versionUpgrade?' + qs.stringify(params))
//--------------------------------- free --------------------------------- //--------------------------------- free ---------------------------------
} }

5
utils/axios.js

@ -15,10 +15,15 @@ service.interceptors.request.use(
config => { config => {
console.log(config) console.log(config)
let isWallet= uni.getStorageSync('isWallet');
console.log(isWallet,55555)
if(!isWallet){
uni.showLoading({ uni.showLoading({
title: 'loading', title: 'loading',
mask: true mask: true
}) })
}
console.log('============================') console.log('============================')
// if (config.urlType=='eth') { // if (config.urlType=='eth') {
// config.url = config.url // config.url = config.url

3
utils/locales/en.js

@ -220,5 +220,8 @@ moreinformation:'Go to your browser for more information',
yourcredit: 'Sorry, your credit is running low', yourcredit: 'Sorry, your credit is running low',
addresserror: 'address error', addresserror: 'address error',
offchain: 'Please enter a note (off-chain)', offchain: 'Please enter a note (off-chain)',
TermsofServiceTxt:'This "Service Agreement" ("Agreement" or "Service Agreement") contains the terms and conditions governing your access and use of the websites and services (defined below) provided by us, and is between us and you or the entity you represent protocol. Please read this "Service Agreement" carefully before using this website or service. By using this website, or by clicking a button or check box to accept or agree to the terms of service of this "Service Agreement" (if this option is available), or fill in a service order, or, if earlier, use or otherwise access the service ("Effective Date"), you (1) accept and agree to this "Service Agreement" and any additional terms, rules and participation conditions that we publish from time to time, and (2) agree to the collection as described in our "Privacy Policy" , Use, disclosure, and other information processing activities. If you do not agree to this Service Agreement, you may not access or use the service.',
updateTitle:'Version upgrade prompt',
updateMsg:'A new version is found, do you want to update it?'
} }
} }

6
utils/locales/zh-F.js

@ -32,7 +32,7 @@ export default {
helpcen: '幫助中心', helpcen: '幫助中心',
aboutus: '關於我們', aboutus: '關於我們',
Hardware: '硬體', Hardware: '硬體',
math:'配套硬體', math: '配對硬體',
// wallet // wallet
Wallet: '錢包', Wallet: '錢包',
assets: '資產', assets: '資產',
@ -82,7 +82,6 @@ export default {
Etiamnisilorem2: '', Etiamnisilorem2: '',
Etiamnisilorem3: '', Etiamnisilorem3: '',
// privacy // privacy
TermsofService:'隱私政策',
// manage // manage
Address: '地址', Address: '地址',
Manage: '管理', Manage: '管理',
@ -219,5 +218,8 @@ export default {
yourcredit: '餘額不足', yourcredit: '餘額不足',
addresserror: '地址錯誤', addresserror: '地址錯誤',
offchain: '請輸入注釋(鏈外)', offchain: '請輸入注釋(鏈外)',
TermsofServiceTxt:'本《服務協議》(“協議”或“服務協議”)包含管理您訪問和使用我們提供的網站和服務(定義如下)的條款和條件,並且是我們與您或您所代表的實體之間的協議。在使用本網站或服務之前,請仔細閱讀本《服務協議》。通過使用本網站,或單擊按鈕或複選框以接受或同意本《服務協議》的服務條款(如有該選項),或者填寫服務訂單,或者,如果更早,使用或以其他方式訪問服務(“生效日期”),您(1)接受並同意本《服務協議》以及我們不時發布的任何附加條款、規則和參與條件,以及(2)同意如我們的《隱私政策》中所述的收集、使用、披露和其他處理信息的活動。如果您不同意本《服務協議》,則您不得訪問或使用服務。',
updateTitle:'版本升級提示',
updateMsg:'發現新版本,是否更新?'
} }
} }

6
utils/locales/zh.js

@ -32,7 +32,7 @@ export default {
helpcen: '帮助中心', helpcen: '帮助中心',
aboutus: '关于我们', aboutus: '关于我们',
Hardware: '硬件', Hardware: '硬件',
math:'配套硬件', math: '配对硬件',
// wallet // wallet
Wallet: '钱包', Wallet: '钱包',
assets: '资产', assets: '资产',
@ -81,7 +81,6 @@ export default {
Etiamnisilorem2: '', Etiamnisilorem2: '',
Etiamnisilorem3: '', Etiamnisilorem3: '',
// privacy // privacy
TermsofService:'隐私政策',
// manage // manage
Address: '地址', Address: '地址',
Manage: '管理', Manage: '管理',
@ -217,5 +216,8 @@ export default {
yourcredit: '余额不足', yourcredit: '余额不足',
addresserror: '地址错误', addresserror: '地址错误',
offchain: '请输入注释(链外)', offchain: '请输入注释(链外)',
TermsofServiceTxt:'本《服务协议》(“协议”或“服务协议”)包含管理您访问和使用我们提供的网站和服务(定义如下)的条款和条件,并且是我们与您或您所代表的实体之间的协议。在使用本网站或服务之前,请仔细阅读本《服务协议》。通过使用本网站,或单击按钮或复选框以接受或同意本《服务协议》的服务条款(如有该选项),或者填写服务订单,或者,如果更早,使用或以其他方式访问服务(“生效日期”),您(1)接受并同意本《服务协议》以及我们不时发布的任何附加条款、规则和参与条件,以及(2)同意如我们的《隐私政策》中所述的收集、使用、披露和其他处理信息的活动。如果您不同意本《服务协议》,则您不得访问或使用服务。',
updateTitle:'版本升级提示',
updateMsg:'发现新版本,是否更新?'
} }
} }

Loading…
Cancel
Save