From da010bf09dca86f6dc5ad0c757f71d551febfbb4 Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Mon, 20 Nov 2023 18:37:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BA=86=E6=88=91=E7=9A=84?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=AC=AC=E4=B8=80=E6=AC=A1=E8=BF=9B=E5=85=A5?= =?UTF-8?q?=E7=BC=BA=E5=B0=91=E5=95=86=E5=AE=B6=E5=85=A5=E9=A9=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/user/index.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 => {}); + }, } }