Browse Source

代码

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

6
pages/menu/wallet/index.vue

@ -104,10 +104,7 @@
// //
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);

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

File diff suppressed because one or more lines are too long

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

File diff suppressed because one or more lines are too long

8
utils/WalletUtil.js

@ -277,13 +277,7 @@ let WalletUtil = {
console.log(res.data.price_in_usd) console.log(res.data.price_in_usd)
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')
// },
} }
}); });

16
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) => {
config.url=config.baseURL+'/'+config.url if(config.baseURL){
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