From be06835a6d0fdd16c2637de5b6807fd5762cf2b8 Mon Sep 17 00:00:00 2001 From: tk Date: Wed, 12 Jun 2024 17:36:24 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=B1=BB=09=E5=9E=8B=E3=80=91?= =?UTF-8?q?=EF=BC=9Arefactor=20=E3=80=90=E4=B8=BB=09=E9=A2=98=E3=80=91?= =?UTF-8?q?=EF=BC=9Aactions=20=E5=87=BD=E6=95=B0=20=E5=8A=A0=E4=B8=8Aasync?= =?UTF-8?q?=20await=E5=85=B3=E9=94=AE=E5=AD=97=20=E3=80=90=E6=8F=8F=09?= =?UTF-8?q?=E8=BF=B0=E3=80=91=EF=BC=9A=20=09[=E5=8E=9F=E5=9B=A0]=EF=BC=9A?= =?UTF-8?q?=E4=B9=8B=E5=89=8D=E5=B9=B6=E6=B2=A1=E6=9C=89=E5=81=9A=E5=BC=82?= =?UTF-8?q?=E6=AD=A5=E8=AF=B7=E6=B1=82=E7=9A=84=E5=A4=84=E7=90=86=20=09[?= =?UTF-8?q?=E8=BF=87=E7=A8=8B]=EF=BC=9A=20=09[=E5=BD=B1=E5=93=8D]=EF=BC=9A?= =?UTF-8?q?=20=E3=80=90=E7=BB=93=09=E6=9D=9F=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # 类型 包含: # feat:新功能(feature) # fix:修补bug # docs:文档(documentation) # style: 格式(不影响代码运行的变动) # refactor:重构(即不是新增功能,也不是修改bug的代码变动) # test:增加测试 # chore:构建过程或辅助工具的变动 --- store/index.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/store/index.js b/store/index.js index 809f0d0..54c41fe 100644 --- a/store/index.js +++ b/store/index.js @@ -156,11 +156,11 @@ const store = new Vuex.Store({ //异步修改 actions: { //获取订单列表 - fetchOrderList({ + async fetchOrderList({ state, commit }) { - uni.$u.http.get('/Api/Check/getOrderList', { + await uni.$u.http.get('/Api/Check/getOrderList', { header:{ 'Token': state.userInfo.token, } @@ -174,11 +174,11 @@ const store = new Vuex.Store({ }) }, //获取站点列表 - fetchSiteList({ + async fetchSiteList({ state, commit }) { - uni.$u.http.get('/Api/Normal/getSiteList', { + await uni.$u.http.get('/Api/Normal/getSiteList', { params: { shop_id: state.shop_id } @@ -199,11 +199,11 @@ const store = new Vuex.Store({ }) }, //获取分类列表 - fetchMenuList({ + async fetchMenuList({ state, commit }) { - uni.$u.http.get('/Api/Normal/getCategoryList', { + await uni.$u.http.get('/Api/Normal/getCategoryList', { params: { shop_id: state.shop_id } @@ -294,11 +294,11 @@ const store = new Vuex.Store({ }) }, //获取商品信息 - fetchShopCon({ + async fetchShopCon({ state, commit }) { - uni.$u.http.get('/Api/Normal/getShopCon', { + await uni.$u.http.get('/Api/Normal/getShopCon', { params: { shop_id: state.shop_id }