const host = window.location.origin;
const baseUrl = host.indexOf('localhost') > -1 ? 'http://www.gicdev.com' : host;

const urlConfig = {
  updateBabyInfo: '/api-member/update-member-baby-info',// 更新宝宝信息
  cliqueGradeList: '/api-admin/clique-grade-list',
  doLogin: '/api-auth/dologin', // 登录
  enterprise: '/api-auth/list-login-enterprise',//企业列表
  clerkMenu: '/api-auth/login-clerk-menu',
  tagManageList:  '/api-member/tag-manage-list',//标签列表展示
  insertParentTag:  '/api-member/insert-parent-tag',//新建父级标签
  insertSonTag:  '/api-member/insert-son-tag',//新建子级标签
  deleteParentTag:  '/api-member/delete-parent-tag',//删除父级标签
  deleteSonTag:  '/api-member/delete-son-tag',//删除子级标签
  memberMissionList:  '/api-member/member-mission-list',//会员任务列表展示-商户
  memberMissionUpdate:  '/api-member/member-mission-update',//会员任务获取积分设置-商户
  memberMissionOpen:  '/api-member/member-mission-open',//会员任务开启关闭-商户
  achievementList:  '/api-member/achievement-list',//消费类/互动类 成就列表展示_商户
  achievementUpdate:  '/api-member/achievement-update',//成就额度、奖励积分修改_商户
  achievementOpen:  '/api-member/achievement-open',//成就开启关闭_商户
  findMemberGroups:  '/api-member/find-member-groups-page',//会员分组列表展示-分页
  insertMemberGroup:  '/api-member/insert-member-group',//新建会员分组
  updateMemberGroup:  '/api-member/update-member-group',//修改会员分组
  checkCard:  '/api-member/member-card-write-off-order-page',  //卡券手动核销_核销订单列表_new
  chooseDestory:  '/api-member/member-card-destroy', // 手动选取销毁
  ajaxMembers:  '/api-member/ajax-members',// 会员分组的会员列表
  deteleMemberGroup:  '/api-member/detele-member-group', //删除会员分组
  findMemberGroupInfo:  '/api-member/find-member-group-info',//查询单个会员分组信息
  findMemberFields:  '/api-member/find-member-fields',//列表自定义字段
  updateFields:  '/api-member/update-fields',//列表自定义字段选择保存
  memberCount:  '/api-member/ecommerce-member-count',//微信会员、POS会员、电商会员和电商买家 人数统计
  updateIntegrals:  '/api-member/members-batch-update-integrals',//批量修改会员积分
  storeCodeName:  '/api-plug/query-store-by-code-name',//查询门店(code和name)
  getOnlineStore: '/api-admin/store-list-paging', // 获取门店列表
  gradeList:  '/api-admin/grade-list',//获取会员等级列表
  updateGrade:  '/api-member/members-batch-update-grade',//批量修改会员等级
  updateStore:  '/api-member/members-batch-update-store',//批量修改会员服务门店、协管门店
  batchProcess:  '/api-member/get-members-batch-process',//查看批量处理进度
  membersSubStoreList:  '/api-member/members-sub-store-list',//获取选中会员的协管门店
  singleInfo:  '/api-member/load-member-single-info',//会员简易信息(会员头像浮层显示)
  memberCardsPage:  '/api-member/member-cards-page', //会员卡券列表
  writeOff:  '/api-member/member-card-write-off',//卡券手动核销
  cardDestroy:  '/api-member/member-card-destroy',//卡券手动销毁
  cardChannelType:  '/api-member/card-channel-type',//发卡券渠道(字典列表)
  memberDetail:  '/api-member/member-load-member-detail',//微信 - 会员详情(头部+会员卡号+9宫格)
  baseDetail:  '/api-member/member-load-base-detail',//微信- 会员基本信息(可编辑修改)
  addressPage:  '/api-member/member-load-receiving-address-page',//收货地址
  extendInfo:  '/api-member/member-load-extend-info',//标准+扩展+类目
  logPage:  '/api-member/member-load-operate-log-page',//操作日志
  memberGrade:  '/api-member/member-load-update-member-grade',//修改会员等级
  updateBaseDetail:  '/api-member/member-load-update-base-detail',//修改微信会员基本信息
  updateImgUrl:  '/api-member/member-load-update-imgUrl',//修改头像
  ajaxMembersInfo:  '/api-member/ajax-members-info',//会员消费统计信息
  memberOrderPage:  '/api-member/member-order-page',///会员order列表
  orderDetail:  '/api-member/member-order-detail',//会员order-查看详情（订单详情+评价+回复）
  orderDetailNew:  '/api-member/member-order-amount',//会员order-查看详情（订单详情+评价+回复）11月迭代新增
  infoMall:  '/api-member/ajax-members-info-mall',//微信商城 - 会员消费统计信息
  ajaxWechatMembers: '/api-member/ajaxMembers',//会员微信商城order列表
  getWMList: '/api-member/query-member-eorder',//微盟订单order列表
  getOtherList:'/api-member/query-member-eorder-other', // 非微盟线上订单
  talkLogPage:  '/api-member/member-talk-log-page',//会员通话记录列表
  clerkTags:  '/api-member/member-load-find-clerk-tags',//获取导购标签列表
  updateClerkTags:  '/api-member/member-load-update-clerk-tags', //修改导购标签
  codeList:  '/api-member/get-naction-code-list',//手机号段 列表
  updateRemark:  '/api-member/member-load-update-remark',//修改导购备注信息
  integralDataPage:  '/api-member/member-integral-data-page',//积分列表(积分明细列表)
  integralOperateType:  '/api-member/member-integral-operate-type',//积分操作类型(字典列表)
  enterpriseIntegralDetailData: '/api-member/page_clique_member_integral_log', // 集团积分(集团积分明细列表)
  enterpriseIntegralWithholdData: '/api-member/member-integral-pre-deduction-page', // 预扣积分(集团积分明细列表)
  memberIntegralUpdate:  '/api-member/member-integral-update', //调整积分进行保存
  enterpriseInfo: '/api-member/enterprise-info',//获取企业配置信息
  memberLoadBaseDetail: '/api-member/member-load-base-detail',//获取客户基本信息
  memberLoadTagDetail: '/api-member/member-load-tag-remark',//获取客户标签信息
  memberLoadmemberInfo: '/api-member/member-load-member-info',//获取客户会员卡信息
  posInfo: '/api-member/member-load-member-pos-info',//pos会员详情 会员信息
  posBaseDetail: '/api-member/member-load-update-pos-base-detail',//修改pos会员基本信息
  batchUpdateStore: '/api-member/batch-update-members-store', // 回收站修改服务门店
  getStorePicture: '/api-member/enterprise-info', // 获取企业配置信息
  getReturnMember: '/api-member/query-members-page', // 回收站门店
  getSubStoreList: 'api-member/members-sub-store-list', // 获取选中会员的协管门店
  updateMemberStore: '/api-member/member-load-update-store', // 修改单个会员的服务门店和协管门店
  getBatchRecord: '/api-member/queryBatchRecord', // 批量积分导入-获取积分导入数据
  downLoadExcelTemplate: '/api-member/downLoadExcelTemplate', // 批量积分导入-下载积分导入模板
  uploadExecl: '/api-member/uploadExecl', // 批量积分导入-导入数据
  queryBatchRetErrInfo: '/api-member/queryBatchRetErrInfo', // 批量积分导入-日志详情-获取数据
  downloadErrorData: '/api-member/downloadErrorData', // 批量积分导入-日志详情-下载错误数据
  getClerkList: '/api-member/query-clerk-by-storeId', // 获取导购选项
  modifyClerk: '/api-member/member-load-update-clerk', // 更改专属导购
  switchPos: '/api-member/member-change-wechat-member-pos', // 微信转pos
  getBlockList: '/api-member/enteprise-black-list-page', // 黑名单列表
  addToWhiteList: '/api-member/update-member-white-list', // 加入白名单
  memberTagGroupDetail: '/api-member/member-tag-group-detail', //会员分组详情
  memberStoredRecordList: '/api-member/member-stored-record-list', //储值列表(储值明细列表)
  memberStoredTypeList: '/api-member/member-stored-type-list',// 储值列表-储值类型
  ecmLogPage: '/api-marketing/member/ecm-log-page',
  cardLogPage: '/api-marketing/member/card-log-page',
  messageLogPage: '/api-marketing/member/sms-log-page',
  wechatLogPage: '/api-marketing/member/wechat-log-page',
  getMarketingRecordNum: '/api-marketing/member/marketing-count',
  aiLogPage: '/api-marketing/member/page-ai-member-log',
  getOrderList: '/api-member/member-all-order-page',
  getFrozenList: "/api-member/ajax-frozen-members",
  batchUpdateFrozen: "/api-member/members-batch-update-frozen",
  getExceptionList: '/api-member/list-exception-member',
  getMemberSourceList: '/api-plug/member-source-list',
  getMemberLogType: '/api-plug/member-oper-type-list',
  getMemberLogReason: '/api-plug/member-oper-reason-list',
  getFrozenList: "/api-member/ajax-frozen-members",
  batchUpdateFrozen: "/api-member/members-batch-update-frozen",
  getExceptionList: '/api-member/list-exception-member',

  getErpIntegral: '/api-member/member-erp-integral',

  getExceptionMemberList: '/api-member/exception-member-list',// 获取异常列表
  exceptionMemberExportExcel: '/api-admin/exception-member-export-excel',// 异常会员数据导出
  exceptionMemberBatchFrozen: '/api-member/exception-batch-frozen',// 异常会员批量冻结
  getAbnormalSetting: '/api-member/exception-config-view',// 异常配置详情
  saveAbnormalSetting: '/api-member/exception-config-save',// 保存异常配置
  getUnfreezeCount: '/api-member/no_froze_member_count',// 获取当前选中的异常会员的未冻结数量
  getEnableDownload:'/api-auth/get-enable-download-data-config-by-user',
  updateFrozen: '/api-member/exception-frozen',// 异常更新冻结状态
  getMembersForFrozen:'/api-member/ajax-members-do-frozen',
  getFrozenWhiteList: '/api-member/white-member-list',//获取冻结白名单列表
  removeFrozenWhiteMember:'/api-member//white-member-remove',// 移出白名单
  frozenMemberExportExcel: '/api-admin/frozen-member-export-excel',// 异常会员搜索结果导出

  cliqueMemberRelation: '/api-member/clique-member-relation',//判断是否有展示会员导入的权限  1不可，2，null可
  weChantToPos: '/api-member/member-change-wechat-member-pos'
}

const defaultUrl = Object.assign({}, urlConfig);

for (let k in defaultUrl) {
  defaultUrl[k] = `${baseUrl}${defaultUrl[k]}`;
}

export default defaultUrl;
