/**
 * @flow
 */
import moment from 'moment';
import {
  baseCoreURLMapping,
} from '../constants';
import type { ENV_TYPE } from '../constants';


export const ServiceContent = ''

export const APICodeToUrl = {


  '001001': '/sysapp/getPolicyList', // 获取我的保单
  '001002': '/sysapp/getProductList', // 获取保险产品

  //实时贷请求
  '06001': '/lifems/loan/checkLoanLimit', // 获取保单列表，额度
  '06002': '/lifems/loan/policyLoanAgreementSign', // 签订可贷协议
  '06003': '/lifems/kht/loan/repayLoanMent/getPolicyInfoList', // 查询还款保单列表
  '06004': '/lifems/loan/checkPolicyloan', // 贷款保单列表
  '06005': '/lifems/loan/queryPolicyInfoFromPolicy', // 贷款保单列表
  '06006': '/lifems/queryBankInfo', // 查询还款银行
  '06007': '/lifems/kht/loan/appApplyPolicyDischargeLoan', // 提交还款申请
  '06008': '/lifems/queryLimitQuotaInfo', // 查询还款限额
  '06009': '/lifems/kht/loan/repayLoanMent/sendVerifyCode', //发送验证码
  '06010': '/lifems/kht/loan/repayLoanMent/verifyMsgCode', //验证验证码
  '06011': '/lifems/loan/applyPolicyLoan', //提交贷款申请
  '06012': '/lifems/kht/loan/reapy/firstPage', //查询还款
  '06013': '/lifems/kht/loan/getUser/userInfo', //查询用户开户名
  '06014': '/lifems/loan/queryLimitQuatoInfo', //查询贷款限额
  // 理赔报案
  '05001': '/pensionms/claimReport/getRiskTakerList', // 养老获取理赔服务出险人
  '05003': '/pensionms/claimReport/submitClaimReport', // 养老理赔报案提交

  '05005': '/lifems/claimsBusiness/getInsuredInfo', // 获取人寿报案被保人
  '05006': '/lifems/claimsBusiness/claimReport', // 人寿理赔报案
  '05007': '/caixianms/claimReport/queryByUserInfo', // 查询车牌、人名
  '05008': '/caixianms/claimReport/queryByUserOrCar', // 财险查询
  '05009': '/caixianms/claimReport/submitClaimReport', // 财险提交报案

  '05010': '/pensionms/common/getHospitalList', // 获取医院列表
  '05011': '/lifems/claimsBusiness/queryHospitalInfo', // 人寿根据地址获取医院列表
  '05012': '/pensionms/hospitalInquiry/getHospitalInfo', // 人寿根据地址获取医院列表

  //门诊
  '07001': '/pensionms/claimApplicate/modifyCommonInsured', //修改常用被保险人接口
  '07002': '/pensionms/claimApplicate/getCommonInsuredList', //修改常用被保人接口（删除和新增）
  '07003': '/pensionms/claimApplicate/permissionCheck', //下一步权限接口（门诊选择出险人页面）
  '07004': '/pensionms/claimApplicate/getHospitalCompensateList', //门诊快赔医院查询接口
  '07005': '/pensionms/claimApplicate/verifyPolicyAvailable', //验证是否有可用保单接口
  '07006': '/pensionms/claimApplicate/getHospitalCompensationInfo', //获取医院快赔信息接口
  '07007': '/pensionms/claimApplicate/saveHospitalVisitDate', //医院和就诊日期保存接口
  '07008': '/pensionms/claimApplicate/claimsControl', //理赔申请次数控制接口
  '07009': '/pensionms/claimApplicate/submitClaimApplicate', //提交理赔申请
  '07010': '/pensionms/claimApplicate/addClaimApplication', //新增理赔申请接口
  '07011': '/pensionms/claimApplicate/getHosCardInpatientInfo', //用户卡号记录接口
  '07012': '/pensionms/claimApplicate/updateHosCardInpatientInfo', //反欺诈接口记录第一次显示

  '07018': '/lifems/accountChange/verifyDealPassword', //保险服务密码校验

  '07021': '/pensionms/claimApplicate/imageDataProcessing', // 理赔申请异步影像上传
  '07022': '/pensionms/claimApplicate/antiMoneyLaunderingInfo', // 反洗钱

  // 系统
  '09001': '/commonms/sys/getSystemParamsApp', //系统字典

  // 文件上传
  '00003': '/commonms/file/authUploadFile',
  // 实名认证
  '00007': '/sysapp/tencentIdascStartSign',
  // 实名认证验证
  '00008': '/sysapp/tencentIdascResultVerfy',
  // 日志
  '98001': '/log/appLog',
  // 金币任务
  '08001': '/campaignsms/integral/queryIntegralDetailList',
  '08002': '/campaignsms/integral/queryUserPoints',
  '08003': '/campaignsms/sign/signCalendar',
  '08004': '/campaignsms/coin/queryTasks',
  '08005': '/campaignsms/coin/queryConsumeList',
  '08006': '/campaignsms/coin/coinBaseInfo',
  '08007': '/campaignsms/vigorouswalk/getVigorousWalk',
  '08008': '/campaignsms/vigorouswalk/updateVigorousWalkMonth',
  // 在线客服
  '10001': '/imms/ws/getImInfo',
  '10002': '/imms/ws/sendMQ',
  '10003': '/imms/ws/sendMsg',
  '10004': '/imms/ws/ccchatmessage/pager',
  '10005': '/imms/ws/ccchatmessage/unreadmessages',
  '10006': '/imms/ws/customerServiceConnect',
  '10007': '/imms/ws/customerServiceDisConnect',
  // 邀请有礼
  '02101': '/campaignsms/qrcode/getQrcodeInfo', //二维码
  '02102': '/campaignsms/getRewardForInvit/inviteRecord', //获取被邀请人记录及邀请人奖励接口
  '02103': '/campaignsms/getRewardForInvit/bindReferral', //绑定邀请人

}

export const getCoreAPIRequestUrl = ({ env = 'DEV', APICode = '' } : {
  env : ENV_TYPE,
  APICode : string,
}) => {
  const url = APICodeToUrl[APICode]
  return `${baseCoreURLMapping[env]}${url}?traceno=${moment()},}`;
};
