// 引用网络请求中间件
import request from '../js/request.js';

export default {

	// get请求 通过电话及名称获取老系统会员信息
	getOldMember(data) {
		return request({
			url: '/member/wechat/getOldMember',
			method: 'GET',
			data: data
		})
	},

	// get请求 通过会员编号获取老系统充值记录
	getOrderRechargeOldList(data) {
		return request({
			url: '/member/wechat/getOrderRechargeOldList',
			method: 'GET',
			data: data
		})
	},

	// get请求，通过会员编号获取老系统消费记录
	getOrderConsumeLogOld(data) {
		return request({
			url: '/member/wechat/getOrderConsumeLogOld',
			method: 'GET',
			data: data
		})
	},

	// post请求 通过会员编号提交迁移申请，默认迁移到当前迁移账户上
	submitOldData(data) {
		return request({
			url: '/member/wechat/submitOldData',
			method: 'POST',
			data: data
		})
	},
	// get请求，获取订单列表
	getOrderList(data) {
		return request({
			url: '/business/wechat/order/list',
			method: 'GET',
			data: data
		})
	},
	// get请求，获取订单详情
	getOrderDetailByOrderId(data) {
		return request({
			url: '/business/wechat/order/detail',
			method: 'GET',
			data: data
		})
	},
	// get请求，保存订单评价
	saveOrderComment(data) {
		return request({
			url: '/business/wechat/order/comment' + data.orderId,
			method: 'GET',
			data: data
		})
	},
	// post请求，再来一单
	comeOrder(data) {
		return request({
			url: '/business/wechat/order/copy/' + data.orderId,
			method: 'POST',
			data: data
		})
	},

	// post请求  删除订单
	deleteOrder(data) {
		return request({
			url: '/business/wechat/order/' + data.orderId,
			method: 'POST',
			data: data
		})
	},
	// put请求  取消订单
	cancelOrder(data) {
		return request({
			url: '/business/wechat/order/cancel/' + data.orderId,
			method: 'PUT',
			data: data
		})
	},

	// post请求，通用下单接口
	commonGeneralOrder(data) {
		return request({
			url: '/business/wechat/order/common',
			method: 'POST',
			data: data
		})
	},

	// post请求，查询充值订单列表
	orderRechargeList(data) {
		return request({
			url: '/business/wechat/orderRecharge/list',
			method: 'POST',
			data: data
		})
	},

	// post请求，充值订单退款
	orderRechargeRefund(data) {
		return request({
			url: '/business/wechat/orderRecharge/refund',
			method: 'POST',
			data: data
		})
	},

	// post请求，获取用户余额
	getUserBalance(data) {
		return request({
			url: '/business/wechat/orderRecharge/getBalance',
			method: 'POST',
			data: data
		})
	},

	// get请求，订单签到
	orderSign(data) {
		return request({
			url: '/business/wechat/scheduling/orderSign',
			method: 'GET',
			data: data
		})
	},
	// get请求，查看订单排号情况
	getOrderSign(data) {
		return request({
			url: '/business/wechat/scheduling/getOrderSign',
			method: 'GET',
			data: data
		})
	},

	// post请求，微信支付（根据订单ID）
	wechatPay(data) {
		return request({
			url: '/business/wxPay/jsapiPay',
			method: 'POST',
			data: data
		})
	},

	// post请求，余额支付（根据订单ID）
	balancePay(data) {
		return request({
			url: '/business/balancePay/pay',
			method: 'POST',
			data: data
		})
	},
	// get请求，查询交易记录列表
	transactionRecordsList(data) {
		return request({
			url: '/business/wechat/transactionFlow/list',
			method: 'GET',
			data: data
		})
	},
	// get请求，查询充值优惠列表
	getRechargeList(data) {
		return request({
			url: '/business/wechat/getRechargeList',
			method: 'GET',
			data: data
		})
	},

	// get请求，查询交易流水统计
	transactionFlowstatistic(data) {
		return request({
			url: '/business/wechat/transactionFlow/statistic',
			method: 'GET',
			data: data
		})
	},

	// get请求 获取预约价格
	getAppointmentPrice(data) {
		return request({
			url: '/business/wechat/sp/subPrice',
			method: 'GET',
			data: data
		})
	},
	// post请求，识别人脸
	verifyFace(data) {
		return request({
			url: '/member/wechat/verifyFace',
			method: 'POST',
			data: data
		})
	},

	// post请 查询服务对象列表
	listServiceObject(data) {
		return request({
			url: '/member/wechat/listServiceObject',
			method: 'POST',
			data: data
		})
	},

	// post请 获取服务对象协议
	getServiceDealFile(data) {
		return request({
			url: '/member/wechat/getServiceDealFile',
			method: 'POST',
			data: data
		})
	},

	// post请求 服务对象签名
	serviceObjectSignPdf(data) {
		return request({
			url: '/member/wechat/signPdf',
			method: 'POST',
			data: data
		})
	},
	// post请求 保存服务对象
	saveServiceObject(data) {
		return request({
			url: '/member/wechat/saveServiceObject',
			method: 'POST',
			data: data
		})
	},

	// post请求 绑定服务对象
	bindServiceObject(data) {
		return request({
			url: '/member/wechat/bindServiceObject',
			method: 'POST',
			data: data
		})
	},

	// post请求 修改服务对象
	updateServiceObject(data) {
		return request({
			url: '/member/wechat/updateServiceObject',
			method: 'POST',
			data: data
		})
	},
	// post请求，用户实名认证
	userRealNameAuth(data) {
		return request({
			url: '/member/wechat/idCardAuthentication',
			method: 'POST',
			data: data
		})
	},

	// post请求，用户信息保存
	saveUserInfo(data) {
		return request({
			url: '/member/wechat/saveUserInfo',
			method: 'POST',
			data: data
		})
	},
	// post请求，修改用户账号密码
	updateUserAccountPassword(data) {
		return request({
			url: '/member/wechat/setPassword',
			method: 'POST',
			data: data
		})
	},

	// post请求，修改用户交易密码
	updateUserTransactionPassword(data) {
		return request({
			url: '/member/wechat/setTransactionPassword',
			method: 'POST',
			data: data
		})
	},

	// post请求，绑定微信
	bindWechat(data) {
		return request({
			url: '/member/wechat/setOpenId',
			method: 'POST',
			data: data
		})
	},

	// get请求，获取服务条款协议
	getTermOfServiceByType(data) {
		return request({
			url: '/system/openapi/getAboutByType',
			method: 'GET',
			data: data
		})
	},

	// get请求，获取公共文件路径
	getCommonFile(data) {
		return request({
			url: '/resource/oss/listByIds/' + data.ossId,
			method: 'GET',
			data: data
		})
	},

	// post请求，重新设置手机号
	setPhone(data) {
		return request({
			url: '/member/wechat/setPhone',
			method: 'POST',
			data: data
		})
	},

	// get请求，获取用户信息
	getUserInfo(data) {
		return request({
			url: '/member/wechat/getUserInfo',
			method: 'GET',
			data: data
		})
	},
	// post请求，保存用户信息
	saveWechatUser(data) {
		return request({
			url: '/auth/wechat/saveWeChatUserInfo',
			method: 'POST',
			data: data
		})
	},

	// post请求，获取微信电话号码

	getWechatUserPhoneNumber(data) {
		return request({
			url: '/auth/wechat/getWechatUserPhoneNumber',
			method: 'POST',
			data: data
		})
	},
	// post请求，验证手机号码是否被注册
	phoneIsExist(data) {
		return request({
			url: '/member/wechat/phoneIsExist',
			method: 'POST',
			data: data
		})
	},

	// post请求，新微新手机绑定
	wechatRegister(data) {
		return request({
			url: '/auth/xcxRegister',
			method: 'POST',
			data: data
		})
	},

	// get请求，获取手机验证码
	getSmsCode(data) {
		return request({
			url: '/resource/sms/code',
			method: 'GET',
			data: data
		})
	},

	// post请求，验证手机验证码
	validateSmsCode(data) {
		return request({
			url: '/member/wechat/validateSmsCode',
			method: 'POST',
			data: data
		})
	},

	// post请求，找回账号密码登录
	wechatRetrieveAccountPwdLogin(data) {
		return request({
			url: '/auth/xcxRetrieveMemberByPwd',
			method: 'POST',
			data: data
		})
	},

	// post请求，实名认证登录(新微信老手机)
	realNameAuthLogin(data) {
		return request({
			url: '/auth/xcxRetrieveMember',
			method: 'POST',
			data: data
		})
	},

	// post请求，验证身份证是滞存在
	idCardIsExist(data) {
		return request({
			url: '/member/wechat/idCardIsExist',
			method: 'POST',
			data: data
		})
	},

	// post请求验证手机找回密码
	passwordByPhone(data) {
		return request({
			url: '/member/wechat/passwordByPhone',
			method: 'POST',
			data: data
		})
	},

	// post请求，获取积分列表信息

	getIntegralRecordList(data) {
		return request({
			url: '/member/wechat/getIntegralRecordVo',
			method: 'POST',
			data: data
		})
	},
	// post请求，用户绑定门店
	userBindStore(data) {
		return request({
			url: '/member/wechat/bindStore',
			method: 'POST',
			data: data
		})
	},

	// get请求 获取门店列表
	// storeList(data) {
	// 	return request({
	// 		url: '/store/uniapp/store-list',
	// 		method: 'GET',
	// 		data: data
	// 	})
	// },

	// get请求 获取公告列表
	noticeList(data) {
		return request({
			url: '/system/openapi/notice/list',
			method: 'GET',
			data: data
		})
	},

	// get请求 获取公告详情

	getNoticeDetail(data) {
		return request({
			url: '/system/openapi/notice/' + data.noticeId,
			method: 'GET',
			data: data
		})
	},

	// get请求 获取banner图列表

	getSlideshowList(data) {
		return request({
			url: '/system/openapi/getSlideshowList',
			method: 'GET',
			data: data
		})
	},
	// get请求 获取门店所有服务列表

	storeAllServiceList(data) {
		return request({
			url: '/business/wechat/sp/all/' + data.storeId,
			method: 'GET',
			data: data
		})
	},

	// get请求 获取门店列表

	storeList(data) {
		return request({
			url: '/store/uniapp/store-list/distance',
			method: 'GET',
			data: data
		})
	},

	// get请求 获取门店工作人员列表 关联岗位、工作时段、服务项目


	workPersonList(data) {
		return request({
			url: '/store/uniapp/work-person-ist/' + data.storeId,
			method: 'GET',
			data: data
		})
	},

	// get请求 根据服务日期及服务时段查询排班人员
	serviceWorkPersonList(data) {
		return request({
			url: '/business/wechat/scheduling/crewPageList',
			method: 'GET',
			data: data
		})
	},

	// get请求 根据门店查询排班日期

	selectDate(data) {
		return request({
			url: '/business/wechat/scheduling/selectDate',
			method: 'POST',
			data: data
		})
	},

	// get请求 根据门店、排班日期查询可用时段
	selectPeriodByDate(data) {
		return request({
			url: '/business/wechat/scheduling/selectPeriodByDate',
			method: 'POST',
			data: data
		})
	},

	// get请求 查询可领取的优惠劵列表
	getUserDiscountsList(data) {
		return request({
			url: '/business/wechat/getUserDiscountsList',
			method: 'GET',
			data: data
		})
	},

	// get请求 我的优惠卷列表（0未使用， 1已使用， 2已过期 null查询全部）
	getMyCouponList(data) {
		return request({
			url: '/member/wechat/getCoupon',
			method: 'GET',
			data: data
		})
	},

	// get请求 查询可使用的优惠券
	getCanUseCouponList(data) {
		return request({
			url: '/member/wechat/getMemberCouponn',
			method: 'POST',
			data: data
		})
	},

	// post请求 领取优惠券
	claimCoupon(data) {
		return request({
			url: '/member/wechat/claimCoupon',
			method: 'POST',
			data: data
		})
	},

	getImgUrlByOssId(data) {
		return request({
			url: '/resource/oss/listByIds/' + data.ossId,
			method: 'GET'
		})

	},

	/**
	 * 微信静默登录
	 */
	wxAuthLogin(data) {
		return request({
			url: '/auth/xcxLogin',
			method: 'POST',
			data: data
		})
	},











}
