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

function scoreshop(data) {
	return request({
		url: '/api/score/index',
		method: 'post',
		data
	})
}

function exchange(data) {
	return request({
		url: '/api/score/exchange',
		method: 'post',
		data
	})
}
/* 兑换详情 */
function goods(data) {
	return request({
		url: '/api/score/goods',
		method: 'post',
		data
	})
}
/* 积分商城-生成订单 */
function orderMake(data) {
	return request({
		url: '/api/score/orderMake',
		method: 'post',
		data
	})
}

/* 添加购物车 */
function addtobasket(data) {
	return request({
		url: '/api/Shop/addtobasket',
		method: 'post',
		data
	})
}
/* 积分商城-sku */
function shoopgoods(data) {
	return request({
		url: '/api/Shop/goods',
		method: 'post',
		data
	})
}
/* 积分商城-库存检测 */
function fastbuys(data) {
	return request({
		url: '/api/Shop/fastbuy',
		method: 'post',
		data
	})
}
/* 积分商城-支付订单获取 */
function orderIndex(data) {
	return request({
		url: '/api/score/orderIndex',
		method: 'post',
		data
	})
}

/* 商城-首页 */
function shop(data) {
	return request({
		url: '/api/shop/home',
		method: 'get',
		data
	})
}

/* 商城-订单信息 */
function shop_orderMake(data) {
	return request({
		url: '/api/shop/orderMake',
		method: 'get', // post 为提交
		data
	})
}
/* 商城-订单信息-提交 */
function shop_orderMake_post(data) {
	return request({
		url: '/api/shop/orderMake',
		method: 'post', // post 为提交
		data
	})
}

/* 商城-省份 && 城市*/
function getRegion(data) {
	return request({
		url: '/api/Api/getRegion',
		method: 'get',
		data
	})
}

/* 商城- 市区*/
function getTwon(data) {
	return request({
		url: '/api/Api/getTwon',
		method: 'get',
		data
	})
}

/* 商城- 拼团*/
function actlist(data) {
	return request({
		url: '/api/Activity/actlist',
		method: 'post',
		data
	})
}

/* 商城- 配送*/
function category(data) {
	return request({
		url: '/api/Shop/category2',
		method: 'post',
		data
	})
}

/* 商城- 配送*/
function goodslist(data) {
	return request({
		url: '/api/Shop/goodslist2',
		method: 'post',
		data
	})
}
/* 商城- 配送*/
function pay(data) {
	return request({
		url: '/api/Shop/pay',
		method: 'get',
		data
	})
}


/* 兑换记录     带来注册type=2    带来消费 type=5 */
function credit(data) {
	return request({
		url: '/api/Vip/credit',
		method: 'post', // post 为提交
		data
	})
}

/* 拼团- 列表*/
function actgoods(data) {
	return request({
		url: '/api/Activity/actgoods',
		method: 'post',
		data
	})
}
/* 拼团- 列表-详情*/
function joinGroup(data) {
	return request({
		url: '/api/Activity/joinGroup',
		method: 'post',
		data
	})
}
/* 拼团- 列表-分享*/
function groupShare(data) {
	return request({
		url: '/api/Activity/groupShare',
		method: 'post',
		data
	})
}



/* 砍价   type=1 全部砍价   type=2 砍价中  type=3 已购买*/
function barlist(data) {
	return request({
		url: '/api/Activity/barlist',
		method: 'post', // post 为提交
		data
	})
}

//砍价商品详情
function bargoods(data) {
	return request({
		url: '/api/activity/bargoods',
		method: 'post', // post 为提交
		data
	})
}

//砍价
function bargain(data) {
	return request({
		url: '/api/Activity/bargain',
		method: 'post', // post 为提交
		data
	})
}

//砍一刀
function help(data) {
	return request({
		url: '/api/Activity/help',
		method: 'post', // post 为提交
		data
	})
}

function wxpay(data) {
	return request({
		url: '/api/Wxpaycz/shoppay',
		method: 'post',
		data
	})
}

function advertisement(data) {
	return request({
		url: '/api/Article/ad_advertisement',
		method: 'post',
		data
	})
}

// 收藏
function goodslike(data) {
	return request({
		url: '/api/shop/goodslike',
		method: 'post',
		data
	})
}

//收藏列表
function goodslikelist(data) {
	return request({
		url: '/api/shop/goodslikelist',
		method: 'post',
		data
	})
}

//下单土地
function singleland(data) {
	return request({
		url: '/api/wxpaysoil/pay',
		method: 'post',
		data
	})
}
//获取后台实名认证状态
function getrecation(data) {
	return request({
		url: '/api/vip/isneedaudit',
		method: 'post',
		data
	})
}
//余额支付
function paybyinfo(data) {
	return request({
		url: '/api/wxpaysoil/pay_money',
		method: 'post',
		data
	})
}
//商城列表
function cardlist(data) {
	return request({
		url: '/api/shop/cardlist2',
		method: 'post',
		data
	})
}
//领取优惠卷
function getcoupon(data) {
	return request({
		url: '/api/shop/getcard',
		method: 'post',
		data
	})
}
//活动分类
function getofflineindex(data) {
	return request({
		url: '/api/offline_activity/offline_index',
		method: 'post',
		data
	})
}
//活动列表
function getofinlist(data) {
	return request({
		url: '/api/offline_activity/offline_activity_list',
		method: 'post',
		data
	})
}
//活动详情
function getdeitbyid(data) {
	return request({
		url: '/api/offline_activity/index',
		method: 'post',
		data
	})
}
//活动订单退款
function refund(data){
	return request({
		url: '/api/offline_activity/refund',
		method: 'post',
		data,
	})
}
//核销详情
function writeindex(data){
	return request({
		url: '/api/offline_activity/write_index',
		method: 'post',
		data,
	})
}
//确认核销
function writeoff(data){
	return request({
		url: '/api/offline_activity/writeoff',
		method: 'post',
		data,
	})
}
//收藏
function setcareheart(data) {
	return request({
		url: '/api/offline_activity/activity_collect',
		method: 'post',
		data
	})
}
//分销申请主页
function fxindex(data) {
	return request({
		url: '/api/vip/fx_index',
		method: 'post',
		data
	})
}
//分销申请
function dionation(data) {
	return request({
		url: '/api/vip/fx_apply',
		method: 'post',
		data
	})
}
//余额活动支付
function payfooice(data) {
	return request({
		url: '/api/wxpayoffline/pay_money',
		method: 'post',
		data
	})
}
//wx余额支付
function wxpayfooice(data) {
	return request({
		url: '/api/wxpayoffline/pay',
		method: 'post',
		data
	})
}
//我的活动
function myacunton(data) {
	return request({
		url: '/api/offline_activity/order_list',
		method: 'post',
		data
	})
}
//活动订单详情
function orderindex(data) {
	return request({
		url: '/api/offline_activity/order_index',
		method: 'post',
		data
	})
}
export default {
	writeoff,
	writeindex,
	refund,
	scoreshop,
	exchange,
	goods,
	orderMake,
	addtobasket,
	shoopgoods,
	fastbuys,
	orderIndex,
	shop,
	shop_orderMake,
	getRegion,
	getTwon,
	actlist,
	category,
	goodslist,
	credit,
	barlist,
	actgoods,
	joinGroup,
	groupShare,
	shop_orderMake_post,
	bargoods,
	bargain,
	fxindex,
	help,
	pay,
	wxpay,
	advertisement,
	goodslike,
	goodslikelist,
	singleland,
	getrecation,
	paybyinfo,
	cardlist,
	getcoupon,
	getofinlist,
	getdeitbyid,
	setcareheart,
	dionation,
	payfooice,
	wxpayfooice,
	myacunton,
	orderindex,
	getofflineindex
}
