luban-mall/jsFile/public-api.js

26 lines
647 B
JavaScript
Raw Normal View History

2022-07-08 08:15:29 +00:00
import requst from './requst.js';
import store from '@/store/index.js'
2022-07-12 10:07:08 +00:00
2022-07-08 08:15:29 +00:00
// 查询轮播位置
export function slidePosition(data) {
return requst.get("/api/common/slide-positions");
}
// 查询购物车数量
export function getCartNum(){
return requst.get('/api/order/shopping-cart-count').then(res=>{
if(res.code==0){
store.commit('setNum', res.data.count)
}
})
2022-07-13 08:04:38 +00:00
}
// 查询用户信息缓存商户id
export function userInfoEv(){
return requst.get('/api/user/info').then(res=>{
if(res.code==0){
uni.setStorageSync('business_id',res.data.business_id);
uni.setStorageSync('business_code',res.data.business_code);
}
})
2022-07-08 08:15:29 +00:00
}