Browse Source

下拉刷新

master
vee 4 years ago
parent
commit
fd50283974
  1. 7
      pages/menu/about/index.vue
  2. 39
      pages/menu/sendToken/addAddress2/index.vue
  3. 6
      pages/menu/wallet/index.vue
  4. 16
      unpackage/dist/dev/app-plus/app-service.js
  5. 2
      unpackage/dist/dev/app-plus/app-view.js
  6. 3
      utils/EthUtil.js
  7. 3
      utils/TronUtil.js
  8. 10
      utils/WalletUtil.js
  9. 44
      utils/locales/zh-F.js
  10. 20
      utils/locales/zh.js

7
pages/menu/about/index.vue

@ -67,7 +67,12 @@
}, },
onLoad() { onLoad() {
// #ifdef APP-PLUS // #ifdef APP-PLUS
this.version=plus.runtime.versionName; let that=this
plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
console.log(wgtinfo,123132)
that.version = wgtinfo.version;
})
// #endif // #endif
}, },
methods: { methods: {

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

@ -15,8 +15,11 @@
</view> </view>
</view> </view>
<view class="inputcon"> <view class="inputcon">
<input type="text" value="" v-model="value" placeholder-style="font-size: 30rpx; color: #D0D0D2;" :placeholder="teee1" class="input1" @click="showSelect()" :disabled="true"/> <input type="text" value="" v-model="value"
<image src="../../../../static/tongyonh/chevron_right_24px.png" mode="aspectFit" class="img1"></image> placeholder-style="font-size: 30rpx; color: #D0D0D2;" :placeholder="teee1" class="input1"
@click="showSelect()" :disabled="true" />
<image src="../../../../static/tongyonh/chevron_right_24px.png" mode="aspectFit" class="img1">
</image>
</view> </view>
</view> </view>
@ -27,8 +30,11 @@
</view> </view>
</view> </view>
<view class="inputcon"> <view class="inputcon">
<input type="text" value="" @input="showSave()" placeholder-style="font-size: 30rpx; color: #D0D0D2;" :placeholder="teee2" class="input1" v-model="bigAddress"/> <input type="text" value="" @input="showSave()"
<image src="../../../../static/tongyonh/Frame330.png" mode="aspectFit" class="img2" @click="chooseImage"></image> placeholder-style="font-size: 30rpx; color: #D0D0D2;" :placeholder="teee2" class="input1"
v-model="bigAddress" />
<image src="../../../../static/tongyonh/Frame330.png" mode="aspectFit" class="img2"
@click="chooseImage"></image>
</view> </view>
</view> </view>
@ -40,7 +46,9 @@
</view> </view>
</view> </view>
<view class="inputcon"> <view class="inputcon">
<input type="text" @input="showSave" value="" placeholder-style="font-size: 30rpx; color: #D0D0D2;" :placeholder="teee3" class="input1" v-model="addressName"/> <input type="text" @input="showSave" value=""
placeholder-style="font-size: 30rpx; color: #D0D0D2;" :placeholder="teee3" class="input1"
v-model="addressName" />
</view> </view>
</view> </view>
@ -72,12 +80,7 @@
</view> </view>
</view> </view>
<u-radio <u-radio :name="item.name" :disabled="item.disabled" active-color="#5B53FF">
:name="item.name"
:disabled="item.disabled"
active-color="#5B53FF"
>
</u-radio> </u-radio>
</view> </view>
@ -111,8 +114,7 @@
gai: {}, gai: {},
show: false, show: false,
checked: false, checked: false,
list: [ list: [{
{
url: '../../../../static/tongyonh/bye.png', url: '../../../../static/tongyonh/bye.png',
lang: 'Bitcoin', lang: 'Bitcoin',
disabled: false, disabled: false,
@ -153,14 +155,14 @@ show: false,
}, },
methods: { methods: {
// //
chooseImage() { chooseImage() {
var _this = this var _this = this
uni.chooseImage({ uni.scanCode({
count: 1, //9
sizeType: ['original', 'compressed'], //
sourceType: ['album', 'camera'], //
success: function(res) { success: function(res) {
_this.imgShow = res.tempFilePaths[0] console.log('扫码内容', res.result)
_this.bigAddress = res.result;
} }
}); });
// ass() // ass()
@ -251,6 +253,7 @@ if(this.info.coinList[0].name2=='TRX'){
} }
if (this.value == 'BTC') { if (this.value == 'BTC') {
this.gai = uni.getStorageSync('BTCAddressInfo') this.gai = uni.getStorageSync('BTCAddressInfo')
this.gai2 = uni.getStorageSync('TRXAddressInfo') this.gai2 = uni.getStorageSync('TRXAddressInfo')

6
pages/menu/wallet/index.vue

@ -116,9 +116,9 @@
if (currency) { if (currency) {
this.currency = currency; this.currency = currency;
} }
uni.setStorageSync('isWallet', true);
//
//
//console.log(this.$TronUtil.decode("TBk72yKTJWppCsa7XrsU7Qhfo4yNvbm8rE"))
this.userObj = uni.getStorageSync('wallet'); this.userObj = uni.getStorageSync('wallet');
this.userObj = await this.$walletUtil.updateBalance(); this.userObj = await this.$walletUtil.updateBalance();
@ -146,7 +146,7 @@
let param = { let param = {
'appId': uni.getSystemInfoSync().platform 'appId': uni.getSystemInfoSync().platform
} }
console.log('ss' + this.$api) console.log('ss' + JSON.stringify(uni.getSystemInfoSync()))
const response = await this.$api.versionUpgrade(param) const response = await this.$api.versionUpgrade(param)
plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => { plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
console.log('当前版本号' + wgtinfo.versionCode) console.log('当前版本号' + wgtinfo.versionCode)

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

File diff suppressed because one or more lines are too long

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

@ -14404,7 +14404,7 @@ if(false) {}
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ./node_modules/css-loader/dist/runtime/api.js */ 13); var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ./node_modules/css-loader/dist/runtime/api.js */ 13);
exports = ___CSS_LOADER_API_IMPORT___(false); exports = ___CSS_LOADER_API_IMPORT___(false);
// Module // Module
exports.push([module.i, "\nbody[data-v-7c44e0c6] {\n\t\tbackground: #FAFAFA;\n height: 100%;\n}\n", ""]); exports.push([module.i, "\nbody[data-v-7c44e0c6] {\n\tbackground: #FAFAFA;\n\theight: 100%;\n}\n", ""]);
// Exports // Exports
module.exports = exports; module.exports = exports;

3
utils/EthUtil.js

@ -51,7 +51,8 @@ let eth = {
url: systemConfiguration.constant.ethNode, //仅为示例,并非真实接口地址。 url: systemConfiguration.constant.ethNode, //仅为示例,并非真实接口地址。
method: 'POST', method: 'POST',
data: data, data: data,
dataType: 'json'}); dataType: 'json'
});
try { try {
let balance = Number(web3.utils.hexToNumberString(res[1].data.result)) / Math.pow(10, 18) let balance = Number(web3.utils.hexToNumberString(res[1].data.result)) / Math.pow(10, 18)
return balance return balance

3
utils/TronUtil.js

@ -142,7 +142,8 @@ let tron = {
} }
}); });
} },
} }
export default tron export default tron

10
utils/WalletUtil.js

@ -67,7 +67,7 @@ let WalletUtil = {
walletInfo.BTC[0].privateKey = btc.privateKey; walletInfo.BTC[0].privateKey = btc.privateKey;
walletInfo.BTC[0].address = btc.address; walletInfo.BTC[0].address = btc.address;
walletInfo.BTC[0].ellipsisAddress = walletInfo.BTC[0].address.substring(0, 6) + '...' + walletInfo.BTC[ walletInfo.BTC[0].ellipsisAddress = walletInfo.BTC[0].address.substring(0, 6) + '...' + walletInfo.BTC[
0].address.substring(25, 0].address.substring(walletInfo.BTC[0].address.length-6,
walletInfo.BTC[0].address.length) walletInfo.BTC[0].address.length)
let eth = TokenUtil.generateEth(mnemonic) let eth = TokenUtil.generateEth(mnemonic)
walletInfo.ETH[0].password = password; walletInfo.ETH[0].password = password;
@ -173,7 +173,7 @@ let WalletUtil = {
walletList = walletInfo[type] walletList = walletInfo[type]
for (var k = 0, length = walletList.length; k < length; k++) { for (var k = 0, length = walletList.length; k < length; k++) {
let address = walletList[k].address; let address = walletList[k].address;
walletList[k].ellipsisAddress = address.substring(0, 6) + '...' + address.substring(25, walletList[k].ellipsisAddress = address.substring(0, 6) + '...' + address.substring(address.length - 6,
address.length) address.length)
} }
} else { } else {
@ -208,6 +208,7 @@ let WalletUtil = {
} }
}, },
updateBalance: async function(success) { updateBalance: async function(success) {
uni.setStorageSync('isWallet', true);
const wallet = uni.getStorageSync('wallet'); const wallet = uni.getStorageSync('wallet');
let params = { let params = {
coinName: wallet.type coinName: wallet.type
@ -282,7 +283,9 @@ let WalletUtil = {
} }
wallet.ellipsisAddress=wallet.address.substring(0, 6) + '...' + wallet.address.substring(
wallet.address.length - 6,
wallet.address.length);
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);
@ -301,6 +304,7 @@ let WalletUtil = {
} }
} }
uni.setStorageSync('walletInfo', walletInfo); uni.setStorageSync('walletInfo', walletInfo);
uni.setStorageSync('isWallet', false);
return wallet; return wallet;
}, },

44
utils/locales/zh-F.js

@ -27,8 +27,8 @@ export default {
protit: '我的', protit: '我的',
apps: '應用程序設定', apps: '應用程序設定',
magew: '管理錢包', magew: '管理錢包',
addBook: '地址目錄', addBook: '地址',
Settings: '設', Settings: '設',
helpcen: '幫助中心', helpcen: '幫助中心',
aboutus: '關於我們', aboutus: '關於我們',
Hardware: '硬體', Hardware: '硬體',
@ -87,21 +87,21 @@ export default {
Manage: '管理', Manage: '管理',
Name: '名字', Name: '名字',
Setname: '設定錢包名稱', Setname: '設定錢包名稱',
Backupprivatekey: '備份私密金鑰', Backupprivatekey: '備份私鑰',
Newwalletname: '新的錢包名稱', Newwalletname: '新的錢包名稱',
// transPawMan // transPawMan
keepyourmnemonics: '請保留你的記憶法。 任何獲得你的助記符的人都可以控制你的帳戶,包括轉移所有資金', keepyourmnemonics: '請保留你的助記詞。 任何獲得你的助記詞的人都可以控制你的帳戶,包括轉移所有資金',
Incorrectpassword: '密碼不正確', Incorrectpassword: '密碼不正確',
// keyout // keyout
keepyourprivatekey: '請保留您的私密金鑰。任何獲得您私密金鑰的人都可以控制您的帳戶,包括轉移所有資金', keepyourprivatekey: '請保留您的私鑰。任何獲得您私鑰的人都可以控制您的帳戶,包括轉移所有資金',
// showkey // showkey
Showprivatekey: '顯示私密金鑰', Showprivatekey: '顯示私鑰',
Showprivatekeytext: '文本', Showprivatekeytext: '文本',
ShowQRCode: '二維碼', ShowQRCode: '二維碼',
ShowCopy: '複製', ShowCopy: '複製',
ScantheQR: '掃描二維碼至....', ScantheQR: '掃描二維碼至....',
CopyprivatekeySuccessful: '複製私密金鑰成功', CopyprivatekeySuccessful: '複製私鑰成功',
Onemomentplease: '請稍等', Onemomentplease: '請稍等',
// market // market
TrandingPairs: '幣種', TrandingPairs: '幣種',
@ -125,10 +125,10 @@ export default {
// nftCollection // nftCollection
NFTcollection: 'NFT收藏品', NFTcollection: 'NFT收藏品',
Contractaddress: '合約地址', Contractaddress: '合約地址',
TokenID: '權杖ID', TokenID: '令牌ID',
entercontractaddress: '請輸入契约地址', entercontractaddress: '請輸入合約地址',
entertokenID: '請輸入權杖ID', entertokenID: '請輸入令牌ID',
Contracts: '契约', Contracts: '合約',
ID: 'ID', ID: 'ID',
Collectiondetails: '收藏品詳情', Collectiondetails: '收藏品詳情',
// btc index // btc index
@ -139,7 +139,7 @@ export default {
Receive: '接收', Receive: '接收',
// sendToken index // sendToken index
Receivingaddress: '接收地址', Receivingaddress: '接收地址',
ReceivingaddressError: '接地址錯誤', ReceivingaddressError: '接地址錯誤',
ScanQR: '掃描二維碼以轉移到資產', ScanQR: '掃描二維碼以轉移到資產',
Copyaddress: '複製地址', Copyaddress: '複製地址',
CopySuccessful: '複製地址成功!', CopySuccessful: '複製地址成功!',
@ -150,8 +150,8 @@ export default {
Balance: '餘額', Balance: '餘額',
ALL: "所有", ALL: "所有",
Remark: '備註', Remark: '備註',
Transactionfee: '交易費', Transactionfee: '礦工費',
Transferconfirmation: '轉帳確認', Transferconfirmation: '轉帳確認',
Amount: '金額', Amount: '金額',
Sendaddress: '發送地址', Sendaddress: '發送地址',
Fingerprintpassword: '指紋密碼', Fingerprintpassword: '指紋密碼',
@ -172,16 +172,16 @@ export default {
Hotassets: '熱門資產', Hotassets: '熱門資產',
Addedsuccessfully: '添加成功', Addedsuccessfully: '添加成功',
// backup5 // backup5
Importviaprivatekey: '通過私密金鑰導入', Importviaprivatekey: '通過私鑰導入',
Privatekeyimportverification: '私密金鑰導入驗證', Privatekeyimportverification: '私鑰導入驗證',
privatekeyanddo: '請輸入您的私密金鑰,不要將其洩露給其他人外部地址無法通過助記鍵恢復。 請妥善保管', privatekeyanddo: '請輸入您的私鑰,不要將其洩露給其他人外部地址無法通過助記鍵恢復。 請妥善保管',
enteryourprivatekey: '請輸入您的私密金鑰', enteryourprivatekey: '請輸入您的私鑰',
beempty: '不能為空', beempty: '不能為空',
beenimported: '錢包已經被導入', beenimported: '錢包已經被導入',
MnemonicsError:'助記詞錯誤', MnemonicsError:'助記詞錯誤',
// backup4 // backup4
Importmnemonics: '導入助記詞', Importmnemonics: '導入助記詞',
Mnemonicsimportverification: '助記輸入驗證', Mnemonicsimportverification: '助記輸入驗證',
Language: '語言', Language: '語言',
langfan: '繁體中文', langfan: '繁體中文',
langjian: '簡體中文', langjian: '簡體中文',
@ -192,16 +192,16 @@ export default {
Addaddress: '添加地址', Addaddress: '添加地址',
Save: '保存', Save: '保存',
selectcurrency: '請選擇幣種', selectcurrency: '請選擇幣種',
Pleaserecipientaddress: '請輸入收件人地址', Pleaserecipientaddress: '地址',
enterthename: '請輸入名稱', enterthename: '請輸入名稱',
Addressorname: '地址或名稱不能為空', Addressorname: '地址或名稱不能為空',
loading: '加載中', loading: '加載中',
closevalidation: '確認關閉驗證?', closevalidation: '確認關閉驗證?',
Login: '登入', Login: '登入',
Transactiondetails: '交易詳情', Transactiondetails: '交易詳情',
Confirmed: '確認交易', Confirmed: '成功',
Time: '時間', Time: '時間',
TxFee: '發送費', TxFee: '礦工費',
TransactionID: '交易ID', TransactionID: '交易ID',
others: '其他', others: '其他',
me: '我', me: '我',

20
utils/locales/zh.js

@ -27,7 +27,7 @@ export default {
protit: '我的', protit: '我的',
apps: '应用程序设置', apps: '应用程序设置',
magew: '管理钱包', magew: '管理钱包',
addBook: '地址目录', addBook: '地址',
Settings: '设置', Settings: '设置',
helpcen: '帮助中心', helpcen: '帮助中心',
aboutus: '关于我们', aboutus: '关于我们',
@ -136,20 +136,20 @@ export default {
Send: '发送', Send: '发送',
Receive: '接收', Receive: '接收',
// sendToken index // sendToken index
Receivingaddress: '接地址', Receivingaddress: '接地址',
ReceivingaddressError: '接地址错误', ReceivingaddressError: '接地址错误',
ScanQR: '扫描二维码以转移到资产', ScanQR: '扫描二维码以转移到资产',
Copyaddress: '复制地址', Copyaddress: '复制地址',
CopySuccessful: '复制地址成功!', CopySuccessful: '复制地址成功!',
// transfer // transfer
Transfer: '转账', Transfer: '转账',
AddressBook: '地址', AddressBook: '地址',
Transferamount: '转账金额', Transferamount: '转账金额',
Balance: '余额', Balance: '余额',
ALL: "所有", ALL: "所有",
Remark: '备注', Remark: '备注',
Transactionfee: '交易费', Transactionfee: '矿工费',
Transferconfirmation: '转账确认', Transferconfirmation: '转账确认',
Amount: '金额', Amount: '金额',
Sendaddress: '发送地址', Sendaddress: '发送地址',
Fingerprintpassword: '指纹密码', Fingerprintpassword: '指纹密码',
@ -179,7 +179,7 @@ export default {
MnemonicsError:'助记词错误', MnemonicsError:'助记词错误',
// backup4 // backup4
Importmnemonics: '导入助记词', Importmnemonics: '导入助记词',
Mnemonicsimportverification: '助记输入验证', Mnemonicsimportverification: '助记输入验证',
Language: '语言', Language: '语言',
langfan: '繁体中文', langfan: '繁体中文',
langjian: '简体中文', langjian: '简体中文',
@ -190,16 +190,16 @@ export default {
Addaddress: '添加地址', Addaddress: '添加地址',
Save: '保存', Save: '保存',
selectcurrency: '请选择币种', selectcurrency: '请选择币种',
Pleaserecipientaddress: '请输入收件人地址', Pleaserecipientaddress: '请输入地址',
enterthename: '请输入名称', enterthename: '请输入名称',
Addressorname: '地址或名称不能为空', Addressorname: '地址或名称不能为空',
loading: '加载中', loading: '加载中',
closevalidation: '确认关闭验证?', closevalidation: '确认关闭验证?',
Login: '登录', Login: '登录',
Transactiondetails: '交易详情', Transactiondetails: '交易详情',
Confirmed: '确认交易', Confirmed: '成功',
Time: '时间', Time: '时间',
TxFee: '发送费', TxFee: '矿工费',
TransactionID: '交易ID', TransactionID: '交易ID',
others: '其他', others: '其他',
me: '我', me: '我',

Loading…
Cancel
Save