diff --git a/App.vue b/App.vue index 404da71..de0941c 100644 --- a/App.vue +++ b/App.vue @@ -21,7 +21,9 @@ uni.$resMessage = this.$t('message') }, - onShow: function() {}, + onShow: function() { + // this.$store.commit('getUnit') + }, onHide: function() {} } diff --git a/pages/order/order.vue b/pages/order/order.vue index b9030d5..199b393 100644 --- a/pages/order/order.vue +++ b/pages/order/order.vue @@ -73,7 +73,9 @@ - + {{ $t('page.order.Submit_New') }} diff --git a/store/index.js b/store/index.js index 49c804e..2f2b30a 100644 --- a/store/index.js +++ b/store/index.js @@ -3,13 +3,21 @@ import Vue from 'vue' import Vuex from 'vuex' Vue.use(Vuex) +import request from '@/utils/request.js' + //实例store对象 const store = new Vuex.Store({ state: { - count: 6 + }, mutations: { - /*......*/ + getUnit(){ + request('getUnit').theen(res => { + if(res.code == 200){ + console.log(res); + } + }) + }, } }) diff --git a/utils/shop.js b/utils/shop.js index c56d9b3..033731d 100644 --- a/utils/shop.js +++ b/utils/shop.js @@ -71,4 +71,6 @@ export default { withdrawal2 : { url : '/info/withdrawal2' , method : 'GET' , auth : true }, //获取登录页面上面的banner getImage : { url : '/index/getImage' , method : 'GET' }, + //获取Unit + getUnit : { url : '/index/getUnit' , method : 'GET' }, } \ No newline at end of file