'use strict';
const HOST_xinli     = 'https://www.xiaodongai.com/xiaodongai/xinli';
// var HOST_xinli    = 'https://www.xiaodongai.com/xiaodongai/xinli_ceshi_copy';

const HOST_xinli_lb  = 'https://static.xiaodongai.com/';
const HOST_P         = "https://static.xiaodongai.com/xiaodongai/";
const HOST_P_K       = "https://static.xiaodongai.com/xiaodongai/kongtian/";

// const HOST        = "https://test-wechat.xiaodongai.com/";
const HOST           = 'https://www.xiaodongai.com/xiaodongai/kongtian/';
// const HOST        = 'https://www.xiaodongai.com/xiaodongai/ceshi/';           //测试库
// var HOST          = 'http://192.168.0.123:8081/xiaodongai/ceshi/';            //本地
// var HOST          = 'http://localhost/xiaodongai/kongtian/';                  //本地
const patient        = "https://online-patient.xiaodongai.com/"                  //推荐产品正式新地址
// const patient     = "http://test.patient.xiaodongai.com/"                     //测试新地址
const orders         = "https://online-cjob.xiaodongai.com/index.php/order/"      //订单
// const orders      = "http://120.53.134.66/index.php/api/"

const HOST_info      = 'https://vivshi.com/xiaodongai/kongtian/';                // 弃用

const HOST_yiyuan    = "https://www.xiaodongai.com/xiaodong_yiyuan/xd_admin/public/index.php/apitest/"; //互联网医院测试
// var HOST_yiyuan   = "https://www.xiaodongai.com/xiaodong_yiyuan/xd_admin/public/index.php/api/";     //互联网医院正式
const url = {
  /**
   * begin
   * 推荐产品
   */
  getNormalProduct  :patient+"wechatIteration/Zcprescription/zckyxqs",        //正常购买产品
  getQuickProduct   :patient+"wechatIteration/Prescription/kskyxqs",          //快速购买产品，扫二维码购买
  productPay        :patient+"wechatIteration/Place_order/place_order",       //推荐产品支付
  buyProductList    :patient+"wechatIteration/order_list/apiOrder",           //推荐产品列表
  getPayStatusB     :patient+"wechatIteration/is_purchase/purchase",          //获取产品支付状态
  productOrderDetail:patient+"Drugorder/prescription_order_detail",           //获取产品订单详情
  /**
   * end
   */
  /**
   * begin
   * 订单中心
   */
  getOrdersAddress:orders+"order_address/getOneByOrderNumber",//获取订单地址
  /**
   * end
   */
  getUserSig        :HOST + 'wechatIm.php?s=/Im/wechat_get_sign', //获取usersig以及userID
  getOpenId         :HOST + 'applet.php?s=Applet/getopenid', ///获取openid
  getUserData       :HOST + 'wechatIteration.php?s=/Home/index', ///获取用户数据
  addUserInfo       :HOST + 'applet.php?s=/Applet/new_user_add', //添加用户
  seeOpenId         :HOST + "wechatIteration.php?s=/Inquisition/get_openid",//查询openid
  getRoomUserSig    :HOST + "wechatIteration.php?s=/Inquisition/get_room",//获取room的userSig
  /**IM用户关系 */
  addFriend         :HOST + "wechatIteration.php?s=/Im/add_firends", //添加好友
  delFriend         :HOST + "wechatIteration.php?s=/Personal/delDoctor", //删除好友
  appAddFriend      :HOST + "wechatIteration.php?s=/Im/gauge_unionid", //app.js添加好友
  /**end */
  /**chat页面接口 */
  getFriendList     :HOST + "wechatIteration.php?s=/Personal/myDoctor", //获取医生列表
  getFreeChat       :HOST + "wechatIteration.php?s=/InquiryUser/judge_free",//获取免费咨询次数
  setFreeSend       :HOST + "wechatIteration.php?s=/InquiryUser/drug_free_send",//修改免费咨询次数
  getSendReports    :HOST + "wechatIteration.php?s=/Inquisition/send_test_result",//获取发送报告列表
  get_online        :HOST + "wechatIteration.php?s=/Inquisition/get_online",//获取在线状态
  acceptFollowUp    :HOST + "wechatIteration.php?s=/Inquisition/jieshou",//接受预约
  getPayStatusA     :HOST + "wechatIteration.php?s=/Prescription/drug_order_list_payresult",//获取药方支付状态
  getChatMsgLog     :HOST + "wechatIteration.php?s=/Im/chat_message_logging",//获取历史记录
  getIsAnswer       :HOST + "wechatIteration.php?s=home/testing_gauge",//获取当前量表是否已答
  /**end */
  /**服务设置 begin*/
  myServerList      :HOST + "wechatIteration.php?s=/InquiryUser/inquiryImList",//我的服务记录
  getDoctorDetail   :HOST + "wechatIteration.php?s=/WechatDoctor/doctorDetail", //医生服务详情
  getDoctorInfo     :HOST + 'wechatIteration.php?s=/WechatDoctor/doctor', //医生信息
  payRecord         :HOST + "wechatIteration.php?s=/Home/PayRecord", //支付生成订单
  GZPayRecord       :HOST + "wechatIteration.php?s=/Home/guangzhou_pay_record", //广州互联网支付下单
  servicePay        :HOST + "wechatIteration.php?s=/WechatDoctor/servicePay", //插入支付记录
  isInquiry         :HOST + "wechatIteration.php?s=/WechatDoctor/conductService", //判断是否有正在进行中或者未接诊的在线问诊服务
  switchService     :HOST + "wechatIteration.php?s=/InquiryUser/switchInquiry", //切换服务
  serviceDetail     :HOST + "wechatIteration.php?s=/Inquisition/inquiry_detail", //服务详情
  endInquiry        :HOST + "wechatIteration.php?s=/InquiryUser/endInquiry", //同意结束服务
  refuseInquiry     :HOST + "wechatIteration.php?s=/InquiryUser/refuseInquiry",//拒绝提前结束
  seeBuyStaus       :HOST + "wechatIteration.php?s=/InquiryUser/seeStatus",//用户购买服务状态
  /**end */
  /**药方详情 begin */
  getPrescription   :HOST + "wechatIteration.php?s=/Prescription/detailPrescription", //药方详情
  isDrugEnough      :HOST + "wechatIteration.php?s=/Prescription/judgeStock", //查询药物充足
  prescriptionPay   :HOST + "wechatIteration.php?s=/Prescription/zfxds", //药品支付
  addAddress        :HOST + "wechatIteration.php?s=/Prescription/address", //新增地址
  editAddress       :HOST + "wechatIteration.php?s=/Prescription/editAddress", //修改地址
  isEditAddress     :HOST + "wechatIteration.php?s=/Prescription/canEditAddress",//判断是否可修改地址
  // addressList: HOSTTEST + "wechatIteration.php?s=/Prescription/listAddress", //地址列表
  addressList       :HOST + "wechatIteration.php?s=/Prescription/listAddress", //地址列表
  defaultAddress    :HOST + "wechatIteration.php?s=/Prescription/addressDefault", //默认地址
  getDrugList       :HOST + "wechatIteration.php?s=/Prescription/openDrug",//处方列表
  getDrugDetail     :HOST + "wechatIteration.php?s=/Prescription/myDrugDetail",//处方详情
  confirmReceipt    :HOST + "wechatIteration.php?s=/Drugorder/confirmReceipt",//确认收货
  delBuyDrug        :HOST + "wechatIteration.php?s=/Drugorder/drugOrderDel",//删除购药记录
  getRecipeDetails  :HOST + "wechatIteration.php?s=/Prescription/zckyxqs",//正常开药
  getQuick          :HOST + "wechatIteration.php?s=/Prescription/kskyxqs",//快速开药
  paySucceedCallback:HOST + "wechatIteration.php?s=/Prescription/query_order_status",//支付成功回调
  logisticsInfo     :HOST + "wechatIteration.php?s=/Express/sfRouteService",//物流信息
  drogOrderDetail   :HOST + "wechatIteration.php?s=/Drugorder/prescription_order_detail",//药品订单详情
  /**end */
  /**公共 begin*/
  isReport          :HOST + "wechatIteration.php?s=/Inquisition/check_istype", //检测是否允许查看报告
  forcedUpdate      :HOST + 'wechatIteration.php?s=/Public/wechatVer', //强制更新
  getWxUserPhone    :HOST + "wechatIteration.php?s=/InquiryUser/getUserPhone", //微信授权获取用户手机号
  getCode           :HOST + "wechatIteration.php?s=/Home/getCode", //获取验证码
  checkCard         :HOST_yiyuan+'Idcard/checkCard',//验证身份证与姓名
  /**end */
  /**量表 */
  loadScene         :HOST + "wechatIteration.php?s=/Measure/is_price",//判断量表二维码场景
  loadIMScene       :HOST + "wechatIteration.php?s=/Measure/is_price_to",//判断IM量表支付场景
  getTestInfo       :HOST + "wechatIteration.php?s=/InquiryUser/findInquiry",//获取检测信息
  /**end */
  /**用户购买问诊信息 begin*/
  addUserBuyInfo    :HOST + "wechatIteration.php?s=/InquiryUser/addUser", //添加用户购买信息
  editUserBuyInfo   :HOST + "wechatIteration.php?s=/InquiryUser/editUser", //修改用户购买信息
  delUserbuyInfo    :HOST + "wechatIteration.php?s=/InquiryUser/delUser", //删除用户购买信息
  userBuyInfoList   :HOST + "wechatIteration.php?s=/InquiryUser/listUser", //用户购买信息列表
  lastUserBuyInfo   :HOST + "wechatIteration.php?s=/InquiryUser/lastUser", //上次用户购买信息
  sendCard          :HOST + "wechatIteration.php?s=/InquiryUser/sendCard", //保存发送给医生的用户信息
  servicePayEdit    :HOST + "wechatIteration.php?s=/WechatDoctor/servicePayEdit", //支付信息请求
  /**end */
  /**tab我的 begin*/
  profileDetails    :HOST + "wechatIteration.php?s=/Inquisition/detail", //问诊详情
  buyDrugList       :HOST + "wechatIteration.php?s=/Drugorder/drug_orders", //药品订单列表
  delBuyDrug        :HOST+"wechatIteration.php?s=/Drugorder/drugOrderDel",//删除购药记录
  getInvoiceList    : HOST + "wechatIteration.php?s=/Receipt/invoiceList", //发票列表
  saveInvoiceInfo   : HOST + "wechatIteration.php?s=/Receipt/riseSave", //保存开票信息
  getInvoiceStatus  : HOST + "wechatIteration.php?s=/invoice/setStatus", //发票状态
  getInvoiceDetail  : HOST + "wechatIteration.php?s=/invoice/invoice_res", //发票详情
  getInvoiceInfo    : HOST + "wechatIteration.php?s=/Receipt/riseDetail", //发票信息
  editAgainEmail    : HOST + "wechatIteration.php?s=/invoice/again_email", //修改发票邮箱
  getTaxpayers      : HOST + "wechatIteration.php?s=/XdInvoice/searchSbh", //自动获取纳税人识别号
  sendEmail         :HOST+"wechatIteration.php?s=/Receipt/receiptOpen",//确认开票
  seeInvoice        :HOST+ "wechatIteration.php?s=/invoice/chakan_invoice",//查看发票
  contactDoctor     :HOST+"wechatIteration.php?s=/Personal/personal_home",//联系医生
  firendAfterRoom   :HOST+"wechatIteration.php?s=/Im/firend_after_room",//成功加好友之后选择身份信息进入群聊房间
  /**end */

  /**首页Index */
  getNotResult      : HOST + "wechatIteration.php?s=/Home/testresult", //未做量表提醒
  getDoctorIndex    : HOST + "wechatIteration.php?s=/Personal/doctorIndex", //首页医生数据
  screenDoctor      : HOST + "wechatIteration.php?s=/personal/screenDoctor", //查询医生数据
  /**end */
  getChatDoctor     : HOST + "wechatIteration.php?s=/Inquisition/aptitude",
  getDealDetails    : HOST + "wechatIteration.php?s=/Inquisition/patient_details",//支付记录
  getReportList     : HOST + "wechatIteration.php?s=/Home/testresult",//量表列表
  goSetTel          : HOST + "wechatIteration.php?s=/Index/getPhone",//获取手机号
  getServiceList    : HOST + "wechatIteration.php?s=/InquiryUser/chat_inquiry",//服务记录集合
  delService        :HOST+"wechatIteration.php?s=/InquiryUser/delInquiry",
  /**
   * 修改
   * 后台和二维码改路径
   */
  getFollowUpList   : HOST + 'appIteration.php?s=/Inquisition/wechat_yuyue',
  delReport         : HOST + 'wechatIteration.php?s=/Home/del_result', //无效
  goSetTel          : HOST + "wechatIteration.php?s=/Index/getPhone", //code值需规范
}
module.exports = {
  url           : url,
  HOST          : HOST,
  patient       : patient,
  HOST_P        : HOST_P,
  HOST_P_K      : HOST_P_K,
  HOST_info     : HOST_info,
  HOST_yiyuan   : HOST_yiyuan,
  HOST_xinli    : HOST_xinli,
  HOST_xinli_lb : HOST_xinli_lb,

}