diff --git a/pages/user/index.vue b/pages/user/index.vue index 11c8d06..91e3c40 100644 --- a/pages/user/index.vue +++ b/pages/user/index.vue @@ -249,7 +249,8 @@ setVisit } from '@/api/user.js'; import { - getVersion + getVersion, + getconfig } from "@/api/public"; import { orderData @@ -437,6 +438,7 @@ let curRoute = routes[routes.length - 1].route this.activeRouter = '/' + curRoute this.getNav(); + this.getConfigData(); if (that.isLogin) { this.getUserInfo(); this.orderNum(); @@ -677,6 +679,13 @@ this.openAuto() } }, + // 获取配置 + getConfigData() { + getconfig().then(res => { + uni.$emit('update', res.data) + this.$store.commit('GLOBAL_DATA', res.data); + }).catch(err => {}); + }, } }