import { uniRequest } from '../utils/request.js'
const root ='http://127.0.0.2'; //服务端正式域名 
//const root ='http://sssxcx.hsycms.com';
export default{
	getSite: (params) => uniRequest(params, root + '/index/api/getSite'), //获取站点信息
	getOne: (params) => uniRequest(params, root + '/index/api/getOne'), //根据ID获取单篇文章
	getOpenId: (params) => uniRequest(params, root + '/index/api/getOpenId'), //获取openid
	getList: (params) => uniRequest(params, root + '/index/api/getList'), //获取openid
	getCate: (params) => uniRequest(params, root + '/index/api/getCate'), //获取分类
	xcxLogin: (params) => uniRequest(params, root + '/index/api/xcxLogin'), //小程序登录
	mobileLogin: (params) => uniRequest(params, root + '/index/api/mobileLogin'), //手机号登录
	bindMobile: (params) => uniRequest(params, root + '/index/api/bindMobile'), //绑定手机号	
	submitOrder: (params) => uniRequest(params, root + '/index/api/submitOrder'), //提交订单
	calcPayPrice: (params) => uniRequest(params, root + '/index/api/calcPayPrice'), //支付计算
	orderPay: (params) => uniRequest(params, root + '/index/api/orderPay'), //订单支付
	orderList: (params) => uniRequest(params, root + '/index/api/orderList'), //订单列表
	orderDetail: (params) => uniRequest(params, root + '/index/api/orderDetail'), //订单详情
	cancelOrder: (params) => uniRequest(params, root + '/index/api/cancelOrder'), //订单取消
	confirmSh: (params) => uniRequest(params, root + '/index/api/confirmSh'), //确认收货
	memCouponList: (params) => uniRequest(params, root + '/index/api/memCouponList'), //获取用户优惠券列表
	toast(msg){ uni.showToast({title:msg,icon:'none'});},
	img(url){ return root+url; },
	go(url){ uni.navigateTo({url:url}) },
	getQs(e) { if(typeof(e) == 'undefined' || e == "" || e == "null"){return false;}else{ return true; }	}
}