xxm 6 years ago
parent
commit
18824da38b
2 changed files with 3 additions and 2 deletions
  1. 1 0
      pages/wo/bills.vue
  2. 2 2
      plugins/nuxtAxios.js

+ 1 - 0
pages/wo/bills.vue

@@ -236,6 +236,7 @@ export default {
         page: this.page,
         page_size: 15
       });
+       alert(res.info);
       if (res) {
         if (this.screenWidth > 960) {
           this.count = Number(res.data.count);

+ 2 - 2
plugins/nuxtAxios.js

@@ -10,7 +10,7 @@ export default function({ $axios, redirect, req, ...args }) {
 		}
 		console.log('Before, making request to ', config.url, config.baseURL);
 		const referer = config.headers.host || (config.headers.common && config.headers.common.referer);
-		const baseUrl = /https?/.test(referer) ? referer : 'https://' + referer;
+		const baseUrl = /http?/.test(referer) ? referer : 'http://' + referer;
 		const url = config.url;
 		// if (referer && !(/https?/.test(url))) {
 		if (typeof window === 'undefined') {
@@ -19,7 +19,7 @@ export default function({ $axios, redirect, req, ...args }) {
 			config.baseURL = baseUrl;
 		} else {
 			// client http
-			config.url = /https?/.test(url) ? `/${url.split('/').slice(3).join('/')}` : url;
+			config.url = /http?/.test(url) ? `/${url.split('/').slice(3).join('/')}` : url;
 			config.baseURL = '';
 		}
 		// stringify post data