chenxiong 3 anni fa
parent
commit
49709a50bb
3 ha cambiato i file con 21 aggiunte e 4 eliminazioni
  1. 7 0
      common/httpList/base.js
  2. 4 4
      common/request.js
  3. 10 0
      store/index.js

+ 7 - 0
common/httpList/base.js

@@ -40,5 +40,12 @@ export default {
 			noToken: true
 		})
 	},
+	appCommonConfig() {
+		return myRequest({
+			url: '/app/common/config',
+			method: 'get',
+			noToken: true
+		})
+	}
 	
 }

+ 4 - 4
common/request.js

@@ -4,13 +4,13 @@ import store from '@/store/index.js'
 import api from './api.js'
 var num = 1
 //接口api   
-// export const BASE_URL = 'https://api.xyyxt.net'   //release
-export const BASE_URL = 'http://42.192.164.187:19005'    //test
+export const BASE_URL = 'https://api.xyyxt.net'   //release
+// export const BASE_URL = 'http://42.192.164.187:19005'    //test
 // export const BASE_URL = 'http://192.168.1.222:5055'    //dev
 
  //图片上传api
-// export const BASE_IMG_URL = 'https://file.xyyxt.net/'     //release
-export const BASE_IMG_URL = 'https://file-dev.xyyxt.net/'  //test
+export const BASE_IMG_URL = 'https://file.xyyxt.net/'     //release
+// export const BASE_IMG_URL = 'https://file-dev.xyyxt.net/'  //test
 export const tenantId = '867735392558919680' 
 export const myRequest = (options) => {
 	if (store.state.allowLoading && !options.noLoading) {

+ 10 - 0
store/index.js

@@ -4,6 +4,7 @@ import api from '@/common/api.js'
 Vue.use(Vuex);
 const store = new Vuex.Store({
 	state: {
+		hideBuyState:true, //是否隐藏购买流程和订单列表
 		login: true,
 		token: '',
 		avatarUrl: '',
@@ -63,6 +64,9 @@ const store = new Vuex.Store({
 		goodsAuditionConfigIdList: state => {
 			return state.goodsAuditionConfigIdList
 		},
+		hideBuyState: state => {
+			return state.hideBuyState
+		},
 		shoppingCartList: state => {
 			return state.shoppingCartList
 		},
@@ -151,6 +155,12 @@ const store = new Vuex.Store({
 					resolve()
 				}
 			})
+		},
+		async appCommonConfig(context) {
+			const resdata = await api.appCommonConfig()
+			if (resdata.data.code == 200) {
+				context.state.hideBuyState = resdata.data.data.hide;
+			}
 		}
 	}
 })