26 lines
647 B
JavaScript
26 lines
647 B
JavaScript
import requst from './requst.js';
|
||
import store from '@/store/index.js'
|
||
|
||
// 查询轮播位置
|
||
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)
|
||
}
|
||
})
|
||
}
|
||
|
||
// 查询用户信息,缓存商户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);
|
||
}
|
||
})
|
||
} |