import ajax from '../utils/request.js'


export default {
	// 获取注册身份下拉框信息
	getIdentifyList(data) {
		return ajax.get('/sp-admin/app/AppRole/getList', data)
	},
	//服务协议
	getAgreement(data) {
		return ajax.get('/level-one-server/app/TbAgreement/getById', data)
	},
	// 轮播图
	getBanner(data) {
		return ajax.get('/level-one-server/app/TbBanner/getList', data)
	},
	// 根据职务获取菜单
	getRoleMenu(data) {
		return ajax.get('/sp-admin/ReRoleMenu/getList', data)
	},
	// 首页菜单
	getMenu(data) {
		return ajax.get('/sp-admin/AppMenu/getList', data)
	},
	//登录
	doLogin(data) {
		return ajax.postForm('/sp-admin/app/AppUser/login', data)
	},
	//获取注册手机验证码
	getPhoneSmsCode() {
		return ajax.get('/sp-admin/app/AppUser/getPhoneSmsCode')
	},
	//注册
	doRefister(data) {
		return ajax.postJson('/sp-admin/app/AppUser/register', data)
	},
	//获取轮播图
	getBannerList() {
		return ajax.get('/level-one-server/app/TbBanner/getList')
	},
	//获取最新资讯
	getNewestList(data) {
		return ajax.get('/level-one-server/app/TbPortNews/getNewestList', data)
	},
	//获取商品列表
	getGoodsList(data) {
		return ajax.get('/level-one-server/TbGoodsTransit/getTransitList', data)
	},
	//查看商品详情
	getGoodsDetails(data) {
		return ajax.get('/level-one-server/TbGoodsTransit/getById', data)
	},
	// 添加购物车
	addCar(data) {
		return ajax.postJson('/level-one-server/app/TbGoodsCart/addGoodsInShopCart',data)
	},
	// 获取商户发布的商品
	getTransitList() {
		return ajax.postJson('/level-one-server/app/TbGoodsTransit/getTransitList')
	} 
}