Browse Source

代码

master
Dread 4 years ago
parent
commit
2e40a105b7
  1. 4
      pages/menu/wallet/index.vue
  2. 12934
      unpackage/dist/dev/app-plus/app-service.js
  3. 31444
      unpackage/dist/dev/app-plus/app-view.js
  4. 6
      utils/WalletUtil.js
  5. 12
      utils/axios.js

4
pages/menu/wallet/index.vue

@ -105,9 +105,6 @@
this.userObj = uni.getStorageSync('wallet'); this.userObj = uni.getStorageSync('wallet');
// this.userObj2 = uni.getStorageSync('wallet'); // this.userObj2 = uni.getStorageSync('wallet');
this.updateData(); this.updateData();
}, },
// onPullDownRefresh() { // onPullDownRefresh() {
@ -127,6 +124,7 @@
// thar.userObj.address = thar.userObj.ellipsisAddress; // thar.userObj.address = thar.userObj.ellipsisAddress;
thar.userObj.address =thar.userObj.address.substring(0, 6) + '...' + thar.userObj.address.substring(25, thar.userObj.address =thar.userObj.address.substring(0, 6) + '...' + thar.userObj.address.substring(25,
thar.userObj.address.length); thar.userObj.address.length);
thar.$walletUtil.updateBalance();
thar.updateData(); thar.updateData();
}, 0); }, 0);

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

File diff suppressed because one or more lines are too long

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

File diff suppressed because one or more lines are too long

6
utils/WalletUtil.js

@ -278,12 +278,6 @@ let WalletUtil = {
success(res.data.price_in_usd) success(res.data.price_in_usd)
// coinList: [{
// name: "ETH",
// xname: 'Ethereum',
// balance: 0,
// icon: require('@/static/tongyonh/Frame3299.png')
// },
} }
}); });

12
utils/axios.js

@ -20,14 +20,14 @@ service.interceptors.request.use(
mask: true mask: true
}) })
console.log('============================') console.log('============================')
if (config.url.indexOf('http')<-1) { // if (config.urlType=='eth') {
config.url = config.url // config.url = config.url
} else { // } else {
// config.url = baseURL.serverUrl + config.url
// }
config.url = baseURL.serverUrl + config.url config.url = baseURL.serverUrl + config.url
}
// if (token) { // if (token) {
// // config.headers['Authori-zation'] = token // // config.headers['Authori-zation'] = token
@ -71,7 +71,9 @@ service.interceptors.response.use(res => {
// 在main.js中放入这段自定义适配器的代码,就可以实现uniapp的app和小程序开发中能使用axios进行跨域网络请求,并支持携带cookie // 在main.js中放入这段自定义适配器的代码,就可以实现uniapp的app和小程序开发中能使用axios进行跨域网络请求,并支持携带cookie
axios.defaults.adapter = function(config) { axios.defaults.adapter = function(config) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if(config.baseURL){
config.url=config.baseURL+'/'+config.url config.url=config.baseURL+'/'+config.url
}
var settle = require('axios/lib/core/settle'); var settle = require('axios/lib/core/settle');
var buildURL = require('axios/lib/helpers/buildURL'); var buildURL = require('axios/lib/helpers/buildURL');
uni.request({ uni.request({

Loading…
Cancel
Save