Browse Source

代码

master
Dread 4 years ago
parent
commit
70a05daacd
  1. 52
      pages/menu/sendToken/addAddress2/index.vue
  2. 10
      pages/menu/wallet/index.vue
  3. 32086
      unpackage/dist/dev/app-plus/app-service.js
  4. 14
      unpackage/dist/dev/app-plus/app-view.js
  5. 5
      utils/EthUtil.js
  6. 5
      utils/WalletUtil.js
  7. 9
      utils/locales/zh-F.js
  8. 4
      utils/locales/zh.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,

10
pages/menu/wallet/index.vue

@ -111,13 +111,7 @@
this.isStop = true
uni.setStorageSync('isWallet', false);
},
<<<<<<< HEAD
async onLoad() {
console.log('eth有走这吗')
=======
onLoad() {
>>>>>>> b5a6c0c02905415727eb685f944bf652207b8af9
let currency = uni.getStorageSync('currency');
if (currency) {
this.currency = currency;
@ -126,12 +120,8 @@
//
//console.log(this.$TronUtil.decode("TBk72yKTJWppCsa7XrsU7Qhfo4yNvbm8rE"))
this.userObj = uni.getStorageSync('wallet');
<<<<<<< HEAD
this.userObj = await this.$walletUtil.updateBalance();
console.log('eth有走这吗')
=======
this.updateBalance();
>>>>>>> b5a6c0c02905415727eb685f944bf652207b8af9
uni.setStorageSync('isWallet', false);
// #ifdef APP-PLUS
//this.appVersion()

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

File diff suppressed because one or more lines are too long

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

@ -22261,9 +22261,19 @@ __webpack_require__.r(__webpack_exports__);
!*** ./node_modules/babel-loader/lib!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--12-1!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/view/script.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/using-components.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/view/style.js!C:/Users/Administrator/Desktop/bitcoo/pages/menu/wallet/index.vue?vue&type=script&lang=js&mpType=page ***!
\********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default =
{
throw new Error("Module build failed (from ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/view/script.js):\nSyntaxError: Unexpected token (114:0)\n at Object._raise (C:\\Users\\Administrator\\Desktop\\HBuilderX\\plugins\\uniapp-cli\\node_modules\\@babel\\parser\\lib\\index.js:746:17)\n at Object.raiseWithData (C:\\Users\\Administrator\\Desktop\\HBuilderX\\plugins\\uniapp-cli\\node_modules\\@babel\\parser\\lib\\index.js:739:17)\n at Object.raise (C:\\Users\\Administrator\\Desktop\\HBuilderX\\plugins\\uniapp-cli\\node_modules\\@babel\\parser\\lib\\index.js:733:17)\n at Object.unexpected (C:\\Users\\Administrator\\Desktop\\HBuilderX\\plugins\\uniapp-cli\\node_modules\\@babel\\parser\\lib\\index.js:8807:16)\n at Object.parseIdentifierName (C:\\Users\\Administrator\\Desktop\\HBuilderX\\plugins\\uniapp-cli\\node_modules\\@babel\\parser\\lib\\index.js:10823:18)\n at Object.parseIdentifier (C:\\Users\\Administrator\\Desktop\\HBuilderX\\plugins\\uniapp-cli\\node_modules\\@babel\\parser\\lib\\index.js:10800:23)\n at Object.parseMaybePrivateName (C:\\Users\\Administrator\\Desktop\\HBuilderX\\plugins\\uniapp-cli\\node_modules\\@babel\\parser\\lib\\index.js:10157:19)\n at Object.parsePropertyName (C:\\Users\\Administrator\\Desktop\\HBuilderX\\plugins\\uniapp-cli\\node_modules\\@babel\\parser\\lib\\index.js:10624:126)\n at Object.parseObjectMember (C:\\Users\\Administrator\\Desktop\\HBuilderX\\plugins\\uniapp-cli\\node_modules\\@babel\\parser\\lib\\index.js:10525:10)\n at Object.parseObj (C:\\Users\\Administrator\\Desktop\\HBuilderX\\plugins\\uniapp-cli\\node_modules\\@babel\\parser\\lib\\index.js:10448:25)\n at Object.parseExprAtom (C:\\Users\\Administrator\\Desktop\\HBuilderX\\plugins\\uniapp-cli\\node_modules\\@babel\\parser\\lib\\index.js:10055:28)\n at Object.parseExprSubscripts (C:\\Users\\Administrator\\Desktop\\HBuilderX\\plugins\\uniapp-cli\\node_modules\\@babel\\parser\\lib\\index.js:9656:23)\n at Object.parseMaybeUnary (C:\\Users\\Administrator\\Desktop\\HBuilderX\\plugins\\uniapp-cli\\node_modules\\@babel\\parser\\lib\\index.js:9636:21)\n at Object.parseMaybeUnary (C:\\Users\\Administrator\\Desktop\\HBuilderX\\plugins\\uniapp-cli\\node_modules\\@babel\\parser\\lib\\index.js:6877:20)\n at Object.parseExprOps (C:\\Users\\Administrator\\Desktop\\HBuilderX\\plugins\\uniapp-cli\\node_modules\\@babel\\parser\\lib\\index.js:9506:23)\n at Object.parseMaybeConditional (C:\\Users\\Administrator\\Desktop\\HBuilderX\\plugins\\uniapp-cli\\node_modules\\@babel\\parser\\lib\\index.js:9479:23)");
data: function data() {
return {
wxsProps: {} };
},
components: {} };exports.default = _default;
/***/ }),
/* 544 */

5
utils/EthUtil.js

@ -12,15 +12,10 @@ if (typeof web3 !== 'undefined') {
let eth = {
<<<<<<< HEAD
// //获取主币eth余额
getBalance: async function(address) {
web3 = new Web3(new Web3.providers.HttpProvider(systemConfiguration.constant.ethNode));
=======
//获取主币eth余额
getBalance: async function(address) {
console.log("查询余额:",address)
>>>>>>> b5a6c0c02905415727eb685f944bf652207b8af9
let balance = await web3.eth.getBalance(address);
console.log("余额:",balance)
return Number(balance) / Math.pow(10, 18);

5
utils/WalletUtil.js

@ -319,13 +319,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') {

9
utils/locales/zh-F.js

@ -140,11 +140,8 @@ export default {
// sendToken index
Receivingaddress: '接收地址',
ReceivingaddressError: '接收地址錯誤',
<<<<<<< HEAD
ScanQR: '掃描二維碼轉賬至資產',
=======
ScanQR: '掃描二維碼以轉移到資產',
>>>>>>> b5a6c0c02905415727eb685f944bf652207b8af9
Copyaddress: '複製地址',
CopySuccessful: '複製地址成功!',
// transfer
@ -178,11 +175,7 @@ export default {
// backup5
Importviaprivatekey: '通過私鑰導入',
Privatekeyimportverification: '私鑰導入驗證',
<<<<<<< HEAD
privatekeyanddo: '請輸入您的私鑰,不要洩露給他人,外部地址無法通過助記詞恢復。請妥善保管',
=======
privatekeyanddo: '請輸入您的私鑰,不要將其洩露給其他人外部地址無法通過助記鍵恢復。 請妥善保管',
>>>>>>> b5a6c0c02905415727eb685f944bf652207b8af9
enteryourprivatekey: '請輸入您的私鑰',
beempty: '不能為空',
beenimported: '錢包已經被導入',

4
utils/locales/zh.js

@ -138,11 +138,7 @@ export default {
// sendToken index
Receivingaddress: '接收地址',
ReceivingaddressError: '接收地址错误',
<<<<<<< HEAD
ScanQR: '扫描二维码转账至资产',
=======
ScanQR: '扫描二维码以转移到资产',
>>>>>>> b5a6c0c02905415727eb685f944bf652207b8af9
Copyaddress: '复制地址',
CopySuccessful: '复制地址成功!',
// transfer

Loading…
Cancel
Save