Browse Source

commonUrl配置还原

yangc 7 years ago
parent
commit
5c4e8c9712

+ 1 - 1
components/applyPurchase/PublishApply.vue

@@ -301,7 +301,7 @@
             let inquiryItems = []
             inquiryItems.push(inquiryItem)
             inquiry.inquiryItems = inquiryItems
-            this.$http.post('https://api-inquiry.usoftmall.com/inquiry/buyer/save', inquiry)
+            this.$http.post('/inquiry/buyer/save', inquiry)
               .then(response => {
                 this.$message.success('发布成功')
 //                this.showRemindBox = true

+ 1 - 1
components/applyPurchase/SayPrice.vue

@@ -134,7 +134,7 @@
           if (!purchaseMan.currency) {
             purchaseMan.currency = this.sayPriceObj.currency
           }
-          this.$http.post('https://api-inquiry.usoftmall.com/inquiry/sale/item/save', purchaseMan).then(response => {
+          this.$http.post('/inquiry/sale/item/save', purchaseMan).then(response => {
             this.showLoading = false
             if (response.data.success === false) {
               this.$message.error(response.data.message)

+ 3 - 3
nuxt.config.js

@@ -1,7 +1,7 @@
 const path = require('path')
 const isProdMode = Object.is(process.env.NODE_ENV, 'production')
 const baseUrl = process.env.BASE_URL || (isProdMode ? 'http://192.168.253.60:9090/platform-b2c/' : 'http://10.1.51.88:8080/platform-b2c/')
-// const commonUrl = process.env.COMMON_URL || (isProdMode ? 'http://218.17.158.219:24000/' : 'http://218.17.158.219:24000/')
+const commonUrl = process.env.COMMON_URL || (isProdMode ? 'https://api-inquiry.usoftmall.com/' : 'http://218.17.158.219:24000/')
 
 module.exports = {
   router: {
@@ -82,8 +82,8 @@ module.exports = {
   ],
   dev: !isProdMode,
   env: {
-    baseUrl
-    // commonUrl
+    baseUrl,
+    commonUrl
   },
   plugins: [{
     src: '~plugins/axios.js'

+ 2 - 2
store/applyPurchase.js

@@ -31,7 +31,7 @@ export const actions = {
 // 采购商列表
   loadPurchaseManList ({ commit }, params = {}) {
     commit('purchaseManList/REQUEST_PURCHASEMAN')
-    return axios.get('https://api-inquiry.usoftmall.com/inquiry/public', {params})
+    return axios.get('/inquiry/public', {params})
       .then(response => {
         let list = response.data
         for (let i = 0; i < list.content.length; i++) {
@@ -48,7 +48,7 @@ export const actions = {
   // 求购排行榜
   loadPurchaseApplyRank ({ commit }, params = {}) {
     commit('purchaseApplyRank/REQUEST_PURCHASERANK', params)
-    return axios.get(`https://api-inquiry.usoftmall.com/inquiry/public/quotationList?_state=agreed&pageNumber=1&pageSize=5`)
+    return axios.get(`/inquiry/public/quotationList?_state=agreed&pageNumber=1&pageSize=5`)
       .then(response => {
         commit('purchaseApplyRank/GET_PURCHASERANK_SUCCESS', response.data)
       }, err => {