【类 型】:refactor

【主	题】:actions 函数 加上async await关键字
【描	述】:
	[原因]:之前并没有做异步请求的处理
	[过程]:
	[影响]:
【结	束】

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
This commit is contained in:
tk 2024-06-12 17:36:24 +08:00
parent 3c35089f07
commit be06835a6d

View File

@ -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
}