import http from '@/http/api.js'

export const getjwtdSpgl = (current,size) => {
	return http.request({
		url: '/api/jwtdSpgl/pageApp',
		method: 'get',
		params:{
			current,size
		}
	})
}


export const jwtdSpgldetail = (id) => {
	return http.request({
		url: '/api/jwtdSpgl/detail',
		method: 'get',
		params:{
			id
		}
	})
}


// jwtdJfjl/getJlList  get  积分明细   传type（积分获取，积分兑换）不传为全部记录

export const getJlList = (type) => {
	return http.request({
		url: '/api/jwtdJfjl/getJlList',
		method: 'get',
		params:{
			type
		}
	})
}

// jwtdSpglDhjl/gwcjs  post  购物车结算  传list
export const jwtdSpglDhjl = (row) => {
	return http.request({
		url: '/api/jwtdSpglDhjl/gwcjs',
		method: 'post',
		data:row
	})
}


//jwtdSpglDhjl/getDdList我的订单  传type（待领取，历史）
export const getDdList = (type,spmc,current) => {
	return http.request({
		url: '/api/jwtdSpglDhjl/getDdList',
		method: 'get',
		params:{
			type,spmc,current
		}
	})
}


//    jwtdSzqyJyz/save   post   加油站登记
export const jyzdjSave = (row) => {
	return http.request({
		url: '/api/jwtdSzqyJyz/save',
		method: 'post',
		data:row
	})
}

//jwtdSzqyCsjl/page  get   出售记录
export const jyzSellPage = (spmc,current) => {
	return http.request({
		url: '/api/jwtdSzqyCsjl/page',
		method: 'get',
		params:{
			spmc,current
		}
	})
}

//jwtdSzqyCsjl/detail  get   出售记录详情   传id
export const jyzSellDetail = (id) => {
	return http.request({
		url: '/api/jwtdSzqyCsjl/detail',
		method: 'get',
		params:{
			id
		}
	})
}

//加入购物车   传spId商品id，userId用户id
export const jwtdGwc = (row) => {
	return http.request({
		url: '/api/jwtdGwc/save',
		method: 'post',
		data:row
	})
}
//jwtdGwc/page    get     购物车列表     传userId
export const jwtdGwcList = (userId) => {
	return http.request({
		url: '/api/jwtdGwc/page',
		method: 'get',
		params:{
			userId
		}
	})
}


export const jwtdGwcRemove = (row) => {
	return http.request({
		url: '/api/jwtdGwc/remove',
		method: 'post',
		data:row
	})
}

export const jfsclqsp = (ddbh) => {
	return http.request({
		url: '/api/jwtdSpglDhjl/lqsp',
		method: 'post',
		params:{
			ddbh
		}
	})
}
//获取当前登陆人积分
export const getJf = () => {
	return http.request({
		url: '/api/blade-system/user/getJf',
		method: 'get',
		params:{
			
		}
	})
}