mall-laonong/jsFile/public-api.js

18 lines
473 B
JavaScript
Raw Normal View History

2022-07-31 02:14:22 +00:00
import requst from './requst.js';
import store from '@/store/index.js'
// 查询轮播位置
export function slidePosition(data) {
return requst.get("/api/common/slide-positions");
}
// 查询购物车信息
export function getCartInfo(){
return requst.get('/api/user/info').then(res=>{
if(res.code==0){
let cartObj = res.data.shopping_cart_info;
store.commit('setNum', cartObj.count)
store.commit('setPrice', cartObj.total_price)
}
})
}