import http from './request'

// 登录 授权 其他手机号授权
export async function getsLogin(params) {
	let data = await http('/oldApi/v1/user/login', params)
	return data
}

// 登录 手机号授权
export async function getLogin(params) {
	let data = await http('/oldApi/v1/user/phone-number', params)
	return data
}


// 登录 手机号登录发送短信
export async function getCodes(params) {
	let data = await http('/oldApi/v1/user/send-code', params)
	return data
}

// 登录
export async function getLogon(params) {
	let data = await http('/oldApi/v1/user/phone-number', params)
	return data
}

// 用户 协议
export async function getAgreem(params) {
	let data = await http('/oldApi/v1/user/agreement', params)
	return data
}

// 首页 门店  门店切换
export async function storeChange(params) {
	let data = await http('/oldApi/v1/store/store-change', params)
	return data
}

// 首页 门店  用户所有门店
export async function storeList(params) {
	let data = await http('/oldApi/v1/store/list', params)
	return data
}

// 首页 门店  门店信息
export async function storeInfo(params) {
	let data = await http('/oldApi/v1/store/info', params)
	return data
}

// 医生列表
export async function doctorList(params) {
	let data = await http('/oldApi/v1/doctor/all-list', params)
	return data
}

// 医生详情
export async function doctorDetail(params) {
	let data = await http('/oldApi/v1/doctor/detail', params)
	return data
}

// 科室列表
export async function getOfficeList(params) {
	let data = await http('/oldApi/v1/doctor/office-list', params)
	return data
}

// 医生 评价列表
export async function commentList(params) {
	let data = await http('/oldApi/v1/doctor/comment-list', params)
	return data
}

// 医生 评价列表顶部
export async function commentListTop(params) {
	let data = await http('/oldApi/v1/doctor/top', params)
	return data
}

// 医生 挂号信息
export async function registerList(params) {
	let data = await http('/oldApi/v1/register/doc-register-info', params)
	return data
}


// 就诊人列表
export async function userList(params) {
	let data = await http('/oldApi/v1/patient/list', params)
	return data
}

// 就诊人关系
export async function userRelation(params) {
	let data = await http('/oldApi/v1/patient/relation', params)
	return data
}

// 编辑就诊人信息
export async function userInfo(params) {
	let data = await http('/oldApi/v1/patient/edit-patient', params)
	return data
}

// 就诊人保存
export async function userAdd(params) {
	let data = await http('/oldApi/v1/patient/save', params)
	return data
}

// 就诊人详情
export async function userDetail(params) {
	let data = await http('/oldApi/v1/patient/info', params)
	return data
}

// 就诊人 切换默认接诊人
export async function userPatientChoose(params) {
	let data = await http('/oldApi/v1/patient/change-patient', params)
	return data
}


// 就诊人 - 健康信息
export async function userEidtPatient(params) {
	let data = await http('/oldApi/v1/patient/health-info', params)
	return data
}

// 挂号
export async function registe(params) {
	let data = await http('/oldApi/v1/register/register', params)
	return data
}

// 挂号详情
export async function registeInfo(params) {
	let data = await http('/oldApi/v1/register/register-detail', params)
	return data
}

// 支付挂号
export async function registePay(params) {
	let data = await http('/oldApi/v1/register/pay', params)
	return data
}

// 取消挂号
export async function registeUnpay(params) {
	let data = await http('/oldApi/v1/register/cancel', params)
	return data
}

// 挂号退款
export async function registeCancle(params) {
	let data = await http('/oldApi/v1/register/refund', params)
	return data
}

// 挂号列表
export async function registeList(params) {
	let data = await http('/oldApi/v1/register/list', params)
	return data
}

// 设置 服务协议
export async function service(params) {
	let data = await http('/oldApi/v1/other/service', params)
	return data
}

// 设置 客服热线
export async function serviceOnline(params) {
	let data = await http('/oldApi/v1/other/service-line', params)
	return data
}

// 设置 隐私保护政策
export async function servicePolicy(params) {
	let data = await http('/oldApi/v1/other/policy', params)
	return data
}


// 我的 添加收货地址
export async function getaddressAdd(params) {
	let data = await http('/oldApi/v1/my/save-address', params)
	return data
}

// 我的 收货地址列表
export async function getaddressList(params) {
	let data = await http('/oldApi/v1/my/address-list', params)
	return data
}

// 我的 修改收货地址
export async function getaddressEdit(params) {
	let data = await http('/oldApi/v1/my/edit-address', params)
	return data
}

// 我的 修改默认地址
export async function getDefault(params) {
	let data = await http('/oldApi/v1/my/update-default', params)
	return data
}

// 我的 删除收货地址
export async function getaddressDel(params) {
	let data = await http('/oldApi/v1/my/del-address', params)
	return data
}

// 我的 更新收货地址
// export async function getaddressNew(params) {
// 	let data = await http('/oldApi/v1/product-order/address-update', params)
// 	return data
// }

// 我的 用户信息
export async function getuserInfo(params) {
	let data = await http('/oldApi/v1/user/info', params)
	return data
}

// 我的 编辑信息
export async function getEditUser(params) {
	let data = await http('/oldApi/v1/user/edit-info', params)
	return data
}

// 我的 处方记录
export async function getPrescript(params) {
	let data = await http('/oldApi/v1/my/prescription-list', params)
	return data
}

// 我的 处方详情
export async function getPrescriptInfo(params) {
	let data = await http('/oldApi/v1/my/prescription-detail', params)
	return data
}

// 我的 处方支付
export async function getPrescriptPay(params) {
	let data = await http('/oldApi/v1/product-order/pay', params)
	return data
}

// 我的 处方-产品订单信息
export async function getProductInfo(params) {
	let data = await http('/oldApi/v1/product-order/appoint-medicine', params)
	return data
}

// 消息
// 消息首页  http://xiaokang.com/member/v1/system-notice/index?store_id=11001
export async function getseesionInfo(params) {
	let data = await http('/oldApi/v1/system-notice/index', params)
	return data
}

// 消息-订单消息  http://xiaokang.com/member/v1/system-notice/order?store_id=11001
export async function getseesionOrder(params) {
	let data = await http('/oldApi/v1/system-notice/order', params)
	return data
}

// 消息-系统消息  http://xiaokang.com/member/v1/system-notice/system?store_id=11001
export async function getseesionSystem(params) {
	let data = await http('/oldApi/v1/system-notice/system', params)
	return data
}

// 消息-已读消息  http://xiaokang.com/member/v1/system-notice/read
export async function getseesionRead(params) {
	let data = await http('/oldApi/v1/system-notice/read', params)
	return data
}

// 消息-医生信息列表
export async function getseesionDoctorList(params) {
	let data = await http('/oldApi/v1/system-notice/doctor-news', params)
	return data
}

// 消息-医生信息详情
export async function getseesionDoctor(params) {
	let data = await http('/oldApi/v1/system-notice/new-info', params)
	return data
}

// 开关  https://zjxk.api.ctkj88.com/member/v1/store/issue
export async function getOpen(params) {
	let data = await http('/oldApi/v1/store/issue', params)
	return data
}

// 中间页 product-order/online-to-local
export async function getToNext(params) {
	let data = await http('/oldApi/v1/product-order/online-to-local', params)
	return data
}

// 煎法  https://hy.api.ctkj88.com/member/v1/prescrip-order/use-way
export async function getUseWay(params) {
	let data = await http('/oldApi/v1/prescrip-order/use-way', params)
	return data
}

// 代煎费提示 https://app.xiaokang88.com/member/v1/product-order/decoct-service
export async function getUseWayPay(params) {
	let data = await http('/oldApi/v1/product-order/decoct-service', params)
	return data
}

// 更新配送方式 http://xiaokang.com/member/v1/product-order/update-delivery
export async function getDelivery(params) {
	let data = await http('/oldApi/v1/product-order/update-delivery', params)
	return data
}

// 更新代煎服务费用 http://xiaokang.com/member/v1/product-order/update-decoct-service
export async function getUpdateUseWay(params) {
	let data = await http('/oldApi/v1/product-order/update-decoct-service', params)
	return data
}

//资讯列表  /v1/info/article-list
export async function articleList(params) {
	let data = await http('/oldApi/v1/info/article-list', params)
	return data
}

//分类列表  /v1/info/categories
export async function categoriesList(params) {
	let data = await http('/oldApi/v1/info/categories', params)
	return data
}

//资讯详情  /v1/info/article-info
export async function articleInfo(params) {
	let data = await http('/oldApi/v1/info/article-info', params)
	return data
}

// v1/product-order/list
export async function getOrdlist(params) {
	let data = await http('/oldApi/v1/product-order/list', params)
	return data
}

// v1/product-order/list
export async function getToken(params) {
	let data = await http('/oldApi/v1/user/login-platform', params)
	return data
}

// v1/product-order/list
export async function getBanner(params) {
	let data = await http('/oldApi/v1/store/detail', params)
	return data
}



// 商城相关

// 药品分类
export async function drugCategorys(params) {
	let data = await http('/newApi/drug/drugCategory', params)
	return data
}
//药品列表
export async function drugLists(params) {
	let data = await http('/newApi/drug/drugLists', params)
	return data
}
//药品详情
export async function drugDetails(params) {
	let data = await http('/newApi/drug/drugDetail', params)
	return data
}
//药品运费ee
export async function drugFee(params) {
	let data = await http('/newApi/express/feeInfo', params)
	return data
}


//加入购物车
export async function addCart(params) {
	let data = await http('/newApi/cart/cartAdd', params)
	return data
}
//购物车列表
export async function CartList(params) {
	let data = await http('/newApi/cart/cartLists', params)
	return data
}
//订单预览
export async function OrderPreview(params) {
	let data = await http('/newApi/order/preview', params)
	return data
}

//支付接口
export async function PayList(params) {
	let data = await http('/newApi/order/submit', params)
	return data
}
//获取支付配置
// export async function getPayConfig(params) {
// 	let data = await http('/newApi/order/getPay', params)
// 	return data
// }

export async function getPayConfig(params) {
	let data = await http('/oldApi/v1/product-order/pay', params)
	return data
}
// getOrdlist 获取订单列表  https://zjxk.app.ctkj88.com/member/order/lists
// export async function getOrdlist(params) {
// 	let data = await http('/newApi/order/lists', params)
// 	return data
// }

// 取消订单  https://app.xiaokang88.com/member/v1/product-order/cancel
export async function getCancle(params) {
	let data = await http('/oldApi/v1/product-order/cancel', params)
	return data
}
// 订单详情  https://zjxk.app.ctkj88.com/member/order/detail
// export async function getOrdDetail(params) {
// 	let data = await http('/newApi/order/detail', params)
// 	return data
// }

// 更换 订单详情 https://app.xiaokang88.com/member/v1/product-order/info
export async function getOrdDetail(params) {
	let data = await http('/oldApi/v1/product-order/info', params)
	return data
}



// 申请退款原因   https://app.xiaokang88.com/member/v1/product-order/refund-reason
export async function getRefundReson(params) {
	let data = await http('/oldApi/v1/product-order/refund-reason', params)
	return data
}
// 申请退款信息  https://app.xiaokang88.com/member/v1/product-order/refund-base
export async function infoRefundBase(params) {
	let data = await http('/oldApi/v1/product-order/refund-base', params)
	return data
}

//申请退款提交  http://xiaokang.com/member/v1/product-order/refund
export async function postRefundBased(params) {
	let data = await http('/oldApi/v1/product-order/refund', params)
	return data
}
//物流详情
// export async function getLogistics(params) {
// 	let data = await http('/newApi/order/expressDetail', params)
// 	return data

// }
export async function getLogistics(params) {
	let data = await http('/oldApi/v1/product-order/express', params)
	return data

}


//确认收货  https://zjxk.app.ctkj88.com/member/order/confirm
// https://zjxk.app.ctkj88.com/member/order/confirm
export async function confirmAccept(params) {
	let data = await http('/newApi/order/confirm', params)
	return data
}
//清空购物车
export async function clearAll(params) {
	let data = await http('/newApi/cart/clearAll', params)
	return data
}

export async function getVersion(params) {
	let data = await http('/v1/other/xcx-version?store_id=11001', params)
	return data
}

// 获取系统配置信息
export async function getSystemConfig(params) {
	// let data = await http('/xkApi/platform/config', params)
	let data = await http('/xkApi/platform/config', params, 3)
	return data
}

