chenxiong 3 жил өмнө
parent
commit
118c54d172

+ 2 - 1
common/httpList/base.js

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

+ 1 - 1
common/request.js

@@ -15,7 +15,7 @@ export const BASE_IMG_URL = 'https://file-dev.xyyxt.net/'  //test
 
 export const socket_url = 'ws://42.192.164.187:19005/webSocket/'  //test
 
-
+export const version = '5.1' 
 export const tenantId = '867735392558919680' 
 export const myRequest = (options) => {
 	if (store.state.allowLoading && !options.noLoading) {

+ 4 - 2
pages/index/index.vue

@@ -134,7 +134,7 @@
 <script>
 import { mapGetters, mapActions } from 'vuex';
 import { websocket } from '@/common/socket.js';
-import {socket_url} from '@/common/request.js';
+import { socket_url, version} from '@/common/request.js';
 export default {
 	components: {},
 	data() {
@@ -214,7 +214,9 @@ export default {
 			uni.removeStorageSync('updateHome'); //消费首页刷新事件
 		}
 		
-		this.appCommonConfig();
+		this.appCommonConfig({
+			version
+		});
 		
 		if(this.$method.isLogin()){
 			this.$store.state.allowLoading = false;

+ 2 - 2
store/index.js

@@ -156,8 +156,8 @@ const store = new Vuex.Store({
 				}
 			})
 		},
-		async appCommonConfig(context) {
-			const resdata = await api.appCommonConfig()
+		async appCommonConfig(context,data) {
+			const resdata = await api.appCommonConfig(data)
 			if (resdata.data.code == 200) {
 				context.state.hideBuyState = resdata.data.data.hide;
 			}