requestConfig.js 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456
  1. import request from './request';
  2. import regeneratorRuntime from '@/common/static/lib/runtime';
  3. import config from '../config.js';
  4. import util from '../utils/util.js';
  5. const endpoints = {
  6. upload: 'elab-marketing-system/behavior/brandMiniWeb/upload', //埋点接口
  7. login: 'elab-marketing-user/login/xcxLogin', //小程序登录接口
  8. brandXcxLogin: 'elab-marketing-user/applet/login', //集团小程序登录
  9. webXcxLogin: 'elab-marketing-user/htmlLogin/login', //H5平台小程序登录
  10. sign: 'elab-marketing-user/share/sign',
  11. signature: 'elab-marketing-user/tencent/signature',
  12. decrypt: 'elab-marketing-user/share/decrypt', //解密分享参数fromChannel
  13. detail: 'elab-marketing-user/mimiapp/parameter/detail', //获取小程序参数配置信息
  14. queryOnline: 'elab-marketing-content/block/queryOnline', //获取线上小程序首页数据
  15. imAdviserList: 'elab-marketing-user/adviser/online/im/list',
  16. getIpAddr: 'elab-marketing-user/ipAddr/getIpAddr',
  17. leavePhone: 'elab-marketing-user/brandXcx/leavePhone',
  18. queryMomentCurrent: 'elab-marketing-content/moment/queryMomentCurrent', //获取此时此刻当前播放内容
  19. modifyMomentView: 'elab-marketing-content/module/modifyMomentView', //更新此时此刻视频的观看人数
  20. getTDHouseList: 'elab-marketing-user/layoutVr/house', //获取3D房列表
  21. queryPositionHome: 'elab-marketing-content/module/queryPositionHome', //获取首页配置数据-例如:图集是否可以点击进入等后台配置内容
  22. queryModuleShowable: 'elab-marketing-content/module/queryModuleShowable', //检查户型和图集是否可以点击进入的查询接口
  23. authorizedMobile: 'elab-marketing-user/applet/auth_mobile', //解密手机号接口
  24. querySendCode: 'elab-marketing-user/vcode/verifyCodeForLeavePhone/send', //请求发送验证码接口
  25. opt: 'elab-marketing-user/vcode/verifyCode/validate', //验证码接口
  26. updateLike: 'elab-marketing-content/atlas/updateLike', //更新图集点赞数
  27. imagesListGroup: 'elab-marketing-content/atlas/listGroup', //获取图集图片列表
  28. listBuilding: 'elab-marketing-content/layout/listBuilding', //获取楼栋列表
  29. queryLayoutList: 'elab-marketing-content/layout/queryLayoutList', //获取所有户型列表
  30. pageListLayoutByBuilding: 'elab-marketing-content/layout/pageListLayoutByBuilding', //获取楼栋列表
  31. queryLayoutDetail: 'elab-marketing-content/layout/queryLayoutDetail', //查询户型详情
  32. successfulList: 'elab-marketing-user/brandXcx/queryRecommendList', //获取成功推荐列表
  33. myReport: 'elab-marketing-user/c_report/myReport', //我的报备(新版)
  34. visitQrCode: 'elab-marketing-user/pre3post4/visitQrCode',
  35. myRecommendCount: 'elab-marketing-user/count/myRecommendCount',
  36. getBaobeiExpand: 'elab-marketing-user/c_report/expand',
  37. completePhone: 'elab-marketing-user/pre3post4/completePhone',
  38. reportAdviserListNew: 'elab-marketing-user/bindAdviser/reportAdviserListNew',
  39. noticeList: 'elab-marketing-notify/customer/pageList', //获取notice信息列表
  40. createImages: 'elab-marketing-user/image/create', //生成分享卡片接口
  41. queryMomentCurrentList: 'elab-marketing-content/moment/queryMomentCurrentList', //查看更多视频
  42. queryWeather: 'elab-marketing-content/module/queryWeather', //查看天气
  43. getCityInfo: 'elab-marketing-user/house/detail', //获取项目城市信息
  44. getCallLog: 'elab-marketing-user/adviser/video/callLog', //获取客户是否有视频电话的权限
  45. queryImChatRecord: 'elab-marketing-user/adviser/text/queryImChatRecord', //获取IM消息列表数据
  46. validateCode: 'elab-marketing-user/vcode/login/validate', //手机验证码验证
  47. customerSign: 'elab-marketing-user/customer/source/sign', //客户签约
  48. customerVisit: 'elab-marketing-user/customer/addEcrmUser', //客户到访
  49. selectHouseLeadWork: 'elab-marketing-user/house/house/selectHouseLeadWork', //设置小程序顾问标语
  50. pushIMInfo: 'elab-marketing-notify/message/push', //IM消息通知顾问
  51. getCustomerDetail: 'elab-marketing-user/adviser/text/getCustomerDetail', //获取客户信息
  52. chatSms: 'elab-marketing-user/vcode/send/chatSms',
  53. connect: 'elab-marketing-user/adviser/text/connect',
  54. selfInfo: 'elab-marketing-user/worker/account/selfInfo',
  55. bindImAdviser: 'elab-marketing-user/invitation/bindImAdviser', //绑定IM顾问
  56. adviserInfo: 'elab-marketing-user/worker/account/adviserInfo', //获取指定顾问信息
  57. dialVideo: 'elab-marketing-user/adviser/dialVideo', //拨打视频通话
  58. submitEvaluate: 'elab-marketing-user/feedback/insertFeedback', //提交用户评价 一分钟一下以及主动挂断
  59. submitEvaluate2: 'elab-marketing-user/evalute/adviser/insert',
  60. switchStatus: 'elab-marketing-user/worker/adviser/switchStatus', //修改视频顾问的在线状态 1忙碌 0空闲
  61. insertData: 'elab-marketing-system/imlog/insert', //视频监控日志
  62. modifyUserInfo: 'elab-marketing-user/brand/modify', //修改用户个人信息
  63. insertFormId: 'elab-marketing-user/customer/insertFormId', //修改用户个人信息
  64. reportToProject: 'elab-marketing-user/invitation/recordToProject', //修改用户个人信息
  65. createBusinessCard: 'elab-marketing-user/image/createBusinessCard', //生成小程序分享名片
  66. getAutoRepeatList: 'elab-marketing-user/cQuestion/selectQuestionAndAnswer', //生成小程序分享名片
  67. scHouseAndBuilding4back: 'elab-wuxi-project/scHouse/scHouseAndBuilding4back', //获取销售楼栋列表
  68. scRoomDetailById: 'elab-wuxi-project/scRoom/detailById', //根据Id查询楼栋详情
  69. queryPositionPhone: 'elab-marketing-user/position/queryPositionPhone', //手机号
  70. tempLockRoom: 'elab-wuxi-project/scRoom/tempLockRoom', //查询锁房
  71. listBySCBuildingId: 'elab-wuxi-project/scFloor/listBySCBuildingId', //查询锁房
  72. queryEnumList: 'elab-marketing-user/enum/queryEnumList', //获取基础数据配置信息
  73. isAdviserInRoom: 'elab-marketing-user/app/websocket/selectStatusData',
  74. getPdInfo: 'elab-marketing-user/adviser/dispatchAdviser',
  75. updateDispatchStatus: 'elab-marketing-user/adviser/updateDispatchStatus',
  76. insertOrUpdate: 'elab-marketing-user/pushMessageAdviser/insertOrUpdate',
  77. adviserResponseTime: 'elab-marketing-user/adviser/adviserResponseTime',
  78. createXcxQrCode: 'elab-marketing-user/image/createXcxQrCode',
  79. queryViewCustomer: 'elab-marketing-user/invitation/queryViewCustomer',
  80. queryShareConfig: 'elab-marketing-user/mimiapp/parameter/queryShareConfig',
  81. queryActivity: 'elab-marketing-user/activities/queryActivity',
  82. queryCustomerActivity: 'elab-marketing-user/activities/queryCustomerActivity',
  83. addActivityRecord: 'elab-marketing-user/activities/addActivityRecord',
  84. editActivityRecord: 'elab-marketing-user/activities/editActivityRecord',
  85. questionnaireSubmit: 'elab-marketing-system/daren/insert',
  86. nuClearList: 'elab-marketing-user/brand/fission/pageList',
  87. querySearchCondition: 'elab-marketing-user/house/querySearchCondition',
  88. searchHouseData: 'elab-marketing-user/house/searchHouseData',
  89. queryXcxPage: 'elab-marketing-content/master/brandXcxPage',
  90. queryXcxPageNew: 'elab-marketing-content/master/brandXcxPageNew', // 小程序页面查询
  91. queryPageFrame: 'elab-marketing-content/frame/queryPageFrame', // 查询页面框架
  92. addCityHistory: 'elab-marketing-content/cityHistory/add', // 客户城市搜索记录
  93. selectCityHistory: 'elab-marketing-content/cityHistory/select',
  94. queryBrandDetail: 'elab-marketing-user/brand/queryBrandDetail', //查询品牌详情
  95. queryNewsByPage: 'elab-marketing-content/news/queryNewsByPage',
  96. queryLinkNews: 'elab-marketing-content/news/queryLinkNews',
  97. enterHouse: 'elab-marketing-user/applet/enter_house',
  98. liveTextSuspension: 'elab-marketing-file/tfk_promote/liveTextSuspension',
  99. houseCollection: 'elab-marketing-user/house/collection',
  100. collectionStatus: 'elab-marketing-user/house/collectionStatus',
  101. oldProprietorAutoVerifyByBrand: 'elab-marketing-user/brandXcx/oldProprietorAutoVerifyByBrand',
  102. drawInformationQrcode: 'elab-marketing-user/image/drawInformationQrcode',
  103. drawQrcode: 'elab-marketing-user/image/drawQrcode',
  104. drawPersonQrcode: 'elab-marketing-user/image/drawPersonQrcode',
  105. generateShareSign: 'elab-marketing-user/brand/shareSign/generateShareSign',
  106. decryptShareSign: 'elab-marketing-user/brand/shareSign/decryptShareSign',
  107. collection: 'elab-marketing-content/layout/collection',
  108. unCollection: 'elab-marketing-content/layout/unCollection',
  109. shareConfDetail: 'elab-marketing-content/brand/shareSetting/shareConfDetail',
  110. queryMyCollection: 'elab-marketing-user/house/queryMyCollection',
  111. queryCityData: 'elab-marketing-content/cityHistory/queryCityData',
  112. queryCityNews: 'elab-marketing-content/news/queryNewsByCity',
  113. queryNewsById: 'elab-marketing-content/news/queryNewsById',
  114. addCustomerCity: 'elab-marketing-content/cityHistory/addCustomerCity',
  115. queryPageCard: 'elab-marketing-content/house/page/queryPageCard',
  116. getBrandShareFriendList: 'elab-marketing-user/brandXcx/queryRecommendList',
  117. getLockOnDataCount: 'elab-marketing-user/brandXcx/getLookOnData',
  118. getLockOnCount: 'elab-marketing-user/brandXcx/getLookOnCount',
  119. getRecommendCount: 'elab-marketing-user/brandXcx/getRecommendCount',
  120. getFissionCount: 'elab-marketing-user/brandXcx/getFissionCount',
  121. getRecommendDynamicData: 'elab-marketing-user/brandXcx/getRecommendDynamicData',
  122. querySearchContent: 'elab-marketing-user/house/querySearchContent',
  123. searchContent: 'elab-marketing-user/house/searchContent',
  124. searchContentTwo: 'elab-marketing-user/house/searchContentTwo',
  125. houseUnCollection: 'elab-marketing-user/house/unCollection',
  126. addRoute: 'elab-marketing-user/customer/rules/add',
  127. thinkKeyword: 'elab-marketing-user/house/thinkKeyword',
  128. thinkKeywordTwo: 'elab-marketing-user/house/thinkKeywordTwo',
  129. msgSecCheck: 'elab-marketing-user/wx/msgSecCheck',
  130. imgSecCheck: 'elab-marketing-user/wx/imgSecCheck',
  131. queryCityInfo: 'elab-marketing-content/houseManagement/queryCityInfo',
  132. houseSort: 'elab-marketing-content/houseManagement/houseSort',
  133. qrCodeGetStatus: 'elab-marketing-user/qrCode/getStatus',
  134. visitAddVisitQueue: 'elab-marketing-user/visit/addVisitQueue',
  135. brandRoleEntrance: 'elab-marketing-user/organize/v2.0/verification/brandRoleEntrance',
  136. getAuthenticationStatusOnBrand: 'elab-marketing-user/organize/v2.0/verification/getAuthenticationStatusOnBrand',
  137. recommendList: 'elab-marketing-user/customerRecord/recommendList',
  138. record: 'elab-marketing-user/customerRecord/record',
  139. recordList: 'elab-marketing-user/customerRecord/recordList',
  140. adviserListByManualRecord: 'elab-marketing-user/customerRecord/adviserListByManualRecord',
  141. manualRecord: 'elab-marketing-user/c_report/manualRecord/v2',
  142. bindIdentity: 'elab-marketing-user/customerRecord/bindIdentity',
  143. noVerifiedRecommendList: 'elab-marketing-user/customerRecord/noVerifiedRecommendList',
  144. agentName: 'elab-marketing-user/customerRecord/agentName',
  145. organizeHouseInfo: 'elab-marketing-user/customerRecord/organizeHouseInfo',
  146. queryBindIdentityInfo: 'elab-marketing-user/customerRecord/queryBindIdentityInfo',
  147. entrance: 'elab-marketing-user/organize/v2.0/verification/entrance',
  148. verificationList: 'elab-marketing-user/organize/v2.0/verification/list',
  149. getAuthenticationStatus: 'elab-marketing-user/organize/v2.0/verification/getAuthenticationStatus',
  150. authentication: 'elab-marketing-user/organize/v2.0/verification/authentication',
  151. authenticationByBrand: 'elab-marketing-user/organize/v2.0/verification/authenticationByBrand',
  152. resetAuthentication: 'elab-marketing-user/organize/v2.0/verification/resetAuthentication',
  153. autoAuthentication: 'elab-marketing-user/organize/v2.0/verification/autoAuthentication',
  154. synchronousVerificationBetweenBrandHouses: 'elab-marketing-user/organize/v2.0/verification/synchronousVerificationBetweenBrandHouses',
  155. organizeInfoByBrand: 'elab-marketing-user/customerRecord/organizeInfoByBrand',
  156. manualReportOnBrand: 'elab-marketing-user/brandXcx/manualReportOnBrand',
  157. manualReportOnBrandNew: 'elab-marketing-user/brandXcx/manualReportOnBrandNew',
  158. validate: 'elab-marketing-user/vcode/verifyCode/validate',
  159. getVideoChatCount: 'elab-marketing-content/house/video/videoHouseCount',
  160. brandCustomerBehaviorRecording: 'elab-marketing-user/adviser/online/video/brandCustomerBehaviorRecording',
  161. getOrganizeUserByMobile: 'elab-marketing-user/organize/v2.0/members/getOrganizeUserByMobile',
  162. relationNetwork: 'elab-marketing-user/invitation/relationNetwork',
  163. getUserScoreCount: 'elab-marketing-user/integrals/userinfo/getUserScoreCount',
  164. getScoreListDetail: 'elab-marketing-user/integrals/userinfo/list',
  165. getUnReadObject: 'elab-marketing-user/integrals/userinfo/getUnReadObject',
  166. getScoreRuleList: 'elab-marketing-user/integrals/rule/list',
  167. intergralShare: 'elab-marketing-user/integrals/userinfo/share',
  168. authenticationTicketNo: 'elab-marketing-user/zhidi/activity/authenticationTicketNo',
  169. getUserMobile: 'elab-marketing-user/zhidi/activity/getUserMobile',
  170. shareActivity: 'elab-marketing-user/zhidi/activity/shareActivity',
  171. actionVerification: 'elab-marketing-content/miniAction/actionVerification',
  172. getProjectGUIDByHouseId: 'elab-marketing-user/projectManage/getProjectGUIDByHouseId',
  173. getUserMobileNew: 'elab-marketing-user/zhidi/activity/getUserMobileNew',
  174. toExchange: 'elab-marketing-user/product/config/exchange',
  175. getExcableList: 'elab-marketing-user/product/config/excableList',
  176. getTicketList: 'elab-marketing-user/zhidi/ticket/list',
  177. activitySignIn: 'elab-marketing-user/zhidi/activity/signIn',
  178. twiceReport: 'elab-marketing-user/twiceReport/twiceReportNew',
  179. maxRecordTip: 'elab-marketing-user/customerRecord/maxRecordTip',
  180. assignAdviserList: 'elab-marketing-user/bindAdviser/assignAdviserList',
  181. chooseAdviser: 'elab-marketing-user/bindAdviser/bind',
  182. unBindCheeseAdviser: 'elab-marketing-user/bindAdviser/unbind',
  183. reportType: 'elab-marketing-user/pre3post4/reportType',
  184. reportByPre3Post4: 'elab-marketing-user/pre3post4/reportByPre3Post4/v2',
  185. authentication4Zd: 'elab-marketing-user/organize/v2.0/verification/authentication4Zd',
  186. authenticationByBrand4Zd: 'elab-marketing-user/organize/v2.0/verification/authenticationByBrand4Zd',
  187. resetAuthentication4Zd: 'elab-marketing-user/organize/v2.0/verification/resetAuthentication4Zd',
  188. getLivingRoomList: 'elab-marketing-user/liveRoom/mini/list',
  189. getNewLivingRoomListNew: 'elab-marketing-user/liveRoom/liveLikeList',
  190. getNewLivingRoomList: 'elab-marketing-user/liveRoom/live/list',
  191. getNewLivingRoomDetail: 'elab-marketing-user/liveRoom/detailNew',
  192. getRecordRoomList: 'elab-marketing-user/liveRoom/vod/list',
  193. turntableActivity: 'elab-marketing-user/zhidi/activity/concurrent/turntableActivity',
  194. prizesList: 'elab-marketing-user/zhidi/activity/prizesList',
  195. getObjectByIdForActive: 'elab-marketing-user/zhidi/info/getObjectById',
  196. activityRegistration: 'elab-marketing-user/zhidi/activity/concurrent/activityRegistration',
  197. register: 'elab-marketing-user/zhidi/99buyHouse/register',
  198. hasVerification: 'elab-marketing-user/zhidi/99buyHouse/hasVerification',
  199. getCommonVerifyCode: 'elab-marketing-user/vcode/send/verifyCode',
  200. getNewOpenHouse: 'elab-marketing-content/houseManagement/getNewOpenHouse',
  201. recommendCities: 'elab-marketing-content/houseManagement/recommendCities',
  202. selectRoomOnline: 'elab-marketing-content/houseManagement/selectRoomOnline',
  203. recommendCityList: 'elab-marketing-user/adviser/online/video/recommendCityList',
  204. countForRecommendAdviser: 'elab-marketing-user/adviser/online/video/countForRecommendAdviser',
  205. getHouseAddress: 'elab-marketing-content/houseManagement/getHouseAddress',
  206. onlineHouseDetailById: 'elab-marketing-content/soRoom/detailById',
  207. thumbsUp: 'elab-marketing-content/soRoom/thumbsUp',
  208. thumbsUpRoomList: 'elab-marketing-content/soRoom/thumbsUpRoomList',
  209. getSoHouseDetailById: 'elab-marketing-content/soHouse/detailById',
  210. getSoBuildingListAll: 'elab-marketing-content/soBuilding/listAll',
  211. getSoRoomUnitList: 'elab-marketing-content/soRoom/unitList',
  212. getSoRoomPageList: 'elab-marketing-content/soRoom/pageList',
  213. getRoomPageList: 'elab-marketing-content/zhuangHu/roomList',
  214. earthAndFormat: 'elab-marketing-content/zhuangHu/earthAndFormat',
  215. onlineHouseLeavePhone: 'elab-marketing-content/leavePhone/add',
  216. detailByName: 'elab-marketing-content/soCopyWriting/detailByName',
  217. addOrder: 'elab-marketing-content/zhuangHu/addOrder',
  218. orderDetail: 'elab-marketing-content/zhuangHu/orderDetail',
  219. ZHorderList: 'elab-marketing-content/zhuangHu/orderList',
  220. payOrder: 'elab-marketing-content/zhuangHu/payOrder',
  221. payOrder2: 'elab-marketing-content/wx/native/unifiedOrder',
  222. orderNotice: 'elab-marketing-content/zhuangHu/orderNotice',
  223. createOrder: 'elab-marketing-content/soOrder/insert',
  224. queryOrderDetailById: 'elab-marketing-content/soOrder/detailById',
  225. getSoOrderListByCustomerId: 'elab-marketing-content/soOrder/listByCustomerId',
  226. getSoOrderOrderRecordList: 'elab-marketing-content/soOrder/orderRecordList',
  227. downloadPayProof: 'elab-marketing-content/zhuangHu/downloadPayProof',
  228. querySubscribeStatus: 'elab-marketing-user/templateMessage/querySubscribeStatus',
  229. subscribe: 'elab-marketing-user/templateMessage/subscribe',
  230. activityDetail: 'elab-marketing-content/activityInfo/activityDetail',
  231. pageDetail: 'elab-marketing-content/activityInfo/pageDetail',
  232. getMyWorkList: 'elab-marketing-user/activityProduction/myProduction',
  233. getAllWorkList: 'elab-marketing-user/activityProduction/allProduction',
  234. subPageList: 'elab-marketing-content/activityInfo/subPageList',
  235. likeWork: 'elab-marketing-user/activityProduction/like',
  236. activityHouseRank: 'elab-marketing-user/activityProduction/houseRank',
  237. activityHouseList: 'elab-marketing-content/activityInfo/activityHouseList',
  238. getShareHouse: 'elab-marketing-user/activityProduction/shareProductionInfo',
  239. activityApplay: 'elab-marketing-user/activityProduction/apply',
  240. activityAuthentication: 'elab-marketing-user/activityProduction/authentication',
  241. createQRCode: 'elab-marketing-user/zhidi/ticket/createQRCode',
  242. proprietorApplyEntrance: 'elab-marketing-user/activityProduction/proprietorApplyEntrance',
  243. publishProduction: 'elab-marketing-user/activityProduction/publishProduction',
  244. applyOrNot: 'elab-marketing-user/activityProduction/applyOrNot',
  245. openShareActivity: 'elab-marketing-user/activityProduction/openShareActivity',
  246. productionIsCheckPass: 'elab-marketing-user/activityProduction/productionIsCheckPass',
  247. queryAllHouseByBrandId: 'elab-marketing-user/brandHouseRelate/queryAllHouseByBrandId',
  248. sharePrize: 'elab-marketing-user/zhidi/99buyHouse/share',
  249. dealPrize: 'elab-marketing-user/zhidi/99buyHouse/deal',
  250. visitPrize: 'elab-marketing-user/zhidi/99buyHouse/visit',
  251. realTimeRanking: 'elab-marketing-user/activityProduction/realTimeRanking',
  252. drawPersonQrcodeInHouse: 'elab-marketing-user/image/houseShareCodeOnBrand',
  253. myRecommend: 'elab-marketing-user/report/upgrade/myRecommend',
  254. myRecommendv2: 'elab-marketing-user/report/upgrade/myRecommend/v2',
  255. recommendCount: 'elab-marketing-user/report/upgrade/recommendCount',
  256. newMyReport: 'elab-marketing-user/report/upgrade/myReport/v3',
  257. myReportRecord: 'elab-marketing-user/report/upgrade/myReportRecord',
  258. reportCountPlus: 'elab-marketing-user/report/upgrade/reportCount/v3',
  259. reportCount: 'elab-marketing-user/report/upgrade/reportCount',
  260. recommendHouseList: 'elab-marketing-user/report/upgrade/recommendHouseList',
  261. reReport: 'elab-marketing-user/report/upgrade/reReport',
  262. editUserInfo: 'elab-marketing-user/report/upgrade/editUserInfo',
  263. reportHouseList: 'elab-marketing-user/report/upgrade/reportHouseList',
  264. userInfoDetail: 'elab-marketing-user/zhiDiUser/userInfoDetail',
  265. userReportDetail: 'elab-marketing-user/zhiDiUser/userReportDetail',
  266. queryBrandAuthenticationInfo: 'elab-marketing-user/customerRecord/queryBrandAuthenticationInfo',
  267. photoActivityTime: 'elab-marketing-user/activityProduction/activityProductionTime',
  268. photoCreatorRank: 'elab-marketing-user/activityProduction/photographerRank', // 摄影师排行
  269. queryPhotoCreatorInfo: 'elab-marketing-user/activityProduction/photographerPersonalInformation', // 作者个人中心信息
  270. queryPhotoCreatorProduct: 'elab-marketing-user/activityProduction/photographerProductionList', // 单个作者作品
  271. queryCustomerBankInfoByUserId: 'elab-marketing-content/customerBank/queryCustomerBankInfoByUserId', //根据id查询用户银行信息
  272. bindBankInfo: 'elab-marketing-content/customerBank/bindBankInfo', //绑定银行信息
  273. updateBankInfo: 'elab-marketing-content/customerBank/updateBankInfo', //修改银行信息
  274. findCityList: 'elab-marketing-content/CityManagement/findCityList', //城市列表
  275. queryVideoHouseList: 'elab-marketing-content/brandVideo/queryVideoHouseList',
  276. selectLotMatchingByhouseIdOrTitle: 'elab-marketing-system/lotMatchingService/selectLotMatchingByhouseIdOrTitle', //根据组件id查询关联项目
  277. queryGenList: 'elab-marketing-content/productJen/queryGenList',
  278. listLayoutInfo: 'elab-marketing-content/layout/listLayoutInfo', //获取项目主推户型
  279. busCommercial: 'elab-marketing-content/mortgageCalculator/busCommercial', //房贷计算器计算接口
  280. initialization: 'elab-marketing-content/mortgageCalculator/initialization', //房贷计算器初始化配置
  281. monthlyDetail: 'elab-marketing-content/mortgageCalculator/monthlyDetail', //月供明细
  282. intelligentRecommendationPage: 'elab-marketing-content/materialLabel/intelligentRecommendationPage', //智能推荐,千人前面
  283. houseQueryById: 'elab-marketing-content/mortgageCalculator/houseQueryById', //查询项目所在城市
  284. queryKjlLayoutList: 'elab-xiaomai-analyse/kjl/houseList', //查询酷家乐关联户型列表
  285. getKjlHouseTypeDetail: 'elab-xiaomai-analyse/kjl/houseMessage', //查询酷家乐关联户型列表
  286. getVirtualPhone: 'elab-xiaomai-analyse/kjl/getVirtualPhone', //查询酷家乐关联顾问信息
  287. getVrToken: 'elab-xiaomai-analyse/kjl/getVrToken', //查询酷家乐关联顾问信息
  288. queryByActivityIdForHelp: 'elab-marketing-content/phase/award/queryByActivityId', //查询助力组件信息
  289. queryOneById: 'elab-marketing-content/partake/log/queryOneById', //根据活动id和用户id查询
  290. queryByPartakeUserId: 'elab-marketing-content/ranking/queryByPartakeUserId', //查询参与活动详情
  291. queryRankByActivityId: 'elab-marketing-content/ranking/award/queryRankByActivityId', //根据活动id查询
  292. getVoucherForHelp: 'elab-marketing-content/ranking/rewarding', //助力活动领奖
  293. findHouseByAlbum: 'elab-marketing-content/atlas/findHouseByAlbum', //查询相册数量以及第一张图片
  294. selectProjectParamsNew: 'elab-marketing-content/houseManagement/selectParamsNew', //查询当前项目信息
  295. getObjectByIdNew: 'elab-marketing-user/zhidi/info/getObjectByIdNew', //查询单个置地活动表对象
  296. querySubscribeNewStatus: 'elab-marketing-user/templateMessage/querySubscribeNewStatus', //查询消息订阅状态(多条)
  297. subscribeNew: 'elab-marketing-user/templateMessage/subscribeNew', //消息订阅(新)
  298. getOneById: 'elab-marketing-content/question/getOneById', //查询题目
  299. addAnswerSheet: 'elab-marketing-content/examination/addAnswerSheet', //用户提交问卷
  300. getExaminationByPageId: 'elab-marketing-content/examination/getExaminationByPageId', //用户提交问卷
  301. findByUserIdAndActivityId: 'elab-marketing-content/examination/findByUserIdAndActivityId', //根据用户id活动id查询问卷
  302. newFindUserFollow: 'elab-marketing-user/c_follow/newFindUserFollow', //查询跟进记录
  303. automaticBinding: 'elab-marketing-user/imVideoVr/automaticBinding', //查询酷家乐关联顾问信息
  304. send: 'elab-marketing-user/vcode/userMerge/send', //发送短信验证码
  305. authUserMergeByVerificationCode: 'elab-marketing-user/userMerge/authUserMergeByVerificationCode', //用户合并接口
  306. queryUserMobileAuth: 'elab-marketing-user/userMerge/queryUserMobileAuth', //查询是否清空手机号
  307. roleExplain: 'elab-marketing-user/organize/v2.0/verification/roleExplain', //查询角色文案是否开启
  308. getDetailInfo: 'elab-marketing-user/report/upgrade/myReport/detail', //查询单个用户信息
  309. addHelpLog: 'elab-marketing-content/help/log/addHelpLog', //新增用户助力表,
  310. checkUserJoinStatusForHelp: 'elab-marketing-content/partake/log/queryOneById', //根据活动id和用户id查询用户是否已参与助力活动
  311. addPartakeLog: 'elab-marketing-content/partake/log/addPartakeLog', //新增用户参与表
  312. pageFindRank: 'elab-marketing-content/ranking/pageFindRank',
  313. queryOnlineCityConfig: 'elab-marketing-user/brandStyle/getConfigByBrandId',
  314. queryCityDetail: 'elab-marketing-content/houseManagement/cityDetail', //排名列表
  315. newHouseSort: 'elab-marketing-content/houseManagement/newHouseSort', //项目观看人数等接口
  316. applet_failed: 'elab-marketing-user/report/wait_confirm/applet_failed', //小程序报备失败台账
  317. applet: 'elab-marketing-user/report/wait_confirm/applet', //小程序待确认台账
  318. app_retry: 'elab-marketing-user/report/wait_confirm/app_retry', //小程序待确认台账
  319. wait_confirmList: 'elab-marketing-user/business_notify/wait_confirm/list', //待确认通知列表接口
  320. searchContentTwoNew: 'elab-marketing-content/house/searchContentThree',//新版搜索接口
  321. searchHouseDataNew: 'elab-marketing-content/house/searchHouseDataThree', //新版按类别查询接口
  322. newAuthentication4Zd: 'elab-marketing-user/organize/v2.0/verification/newAuthentication4Zd', //置地老业主认证-城市认证
  323. checkValid: 'elab-marketing-user/qrCode/checkValid', //置地老业主认证-城市认证
  324. houseActivityDetail:'elab-marketing-content/zhuangHu/houseActivityDetail', //查询装户活动信息
  325. checkRoomStatus:'elab-marketing-content/wx/zhuanghu', //查询装户活动信息
  326. querySubscribeLiveStatus:'elab-marketing-user/templateMessage/querySubscribeLiveStatus', //置地老业主认证-城市认证
  327. queryTemplateLiveList:'elab-marketing-user/templateMessage/queryTemplateLiveList', //置地老业主认证-城市认证
  328. subscribeByLive:'elab-marketing-user/templateMessage/subscribeByLive', //置地老业主认证-城市认证
  329. layoutByBrandList:'elab-marketing-content/layout/layoutByBrandList', //置地老业主认证-城市认证
  330. liveStreamList:'elab-marketing-user/liveRoom/liveStreamList', //直播流列表
  331. userOuponInfo:'elab-marketing-user/tfl/userOuponInfo', //查询用户卡卷详情
  332. getObjectByList:'elab-marketing-user/ticket/wraps/getObjectByList', //查询卡券包集合数据
  333. getObjectById:'elab-marketing-user/ticket/wraps/getObjectById', //查询卡券包集合数据
  334. assessFlag:'elab-marketing-user/assess/assessFlag', //根据活动判断是否可以评论
  335. commentsInsert: "elab-marketing-user/assess/insert", //添加评论
  336. listComments: "elab-marketing-user/assess/list", //查询评论列表
  337. unifiedOrder: 'elab-marketing-content/wx/general/unifiedOrder',//微信支付-小程序-统一下单(通用版)
  338. selectByOrder: 'elab-marketing-content/wx/selectByOrder',//微信支付-小程序-查询订单(通用版)
  339. liveSuspension:'elab-marketing-user/liveRoom/liveSuspension', //直播入口悬浮球
  340. anchorSave:'elab-marketing-file/tfk_promote/save', //添加主播认证
  341. anchorInfo:'elab-marketing-file/tfk_promote/anchorInfo', //查询单条主播信息
  342. wholeCount:'elab-marketing-analyse/tfk/wholeCount', //淘房客整体统计
  343. xcxAmount:'elab-marketing-analyse/tfk/xcxAmount', //淘房客整体统计
  344. queryAllEnumByType:'elab-marketing-file/tfk_promote/queryAllEnumByType', //查询主播标签
  345. queryCityListByPid:'elab-marketing-file/tfk_promote/queryCityListByPid', //查询城市列表
  346. findCityListByTree:'elab-marketing-file/tfk_promote/findCityListByTree', //查询城市列表
  347. xcxAuthProtocol: 'elab-marketing-user/enum/xcxAuthProtocol',//小程序授权协议
  348. encodeInsert: 'elab-marketing-content/lay_in/insert',//数据存储【添加】
  349. decodeQuery: 'elab-marketing-content/lay_in/queryOneById',//数据存储【根据id查询】
  350. createGroup: 'elab-marketing-sms/im/createGroup',//创建群组
  351. destroyGroup: 'elab-marketing-sms/im/destroyGroup',//解散群组
  352. deleteGroupMember: 'elab-marketing-sms/im/deleteGroupMember',//删除群成员
  353. queryByComponentId: 'elab-marketing-content/clocked_in/applet/activity/info',//小程序端获取活动信息
  354. qrClockedCode: 'elab-marketing-content/clocked_in/qr_code',//生成打卡二维码
  355. treatyInfo: 'elab-marketing-user/customerRecord/treatyInfo', //报备协议详情
  356. };
  357. var doubleClickList = [];
  358. export default async (endpoint, options, isHideLoading = null, preventDoubleClick = false) => {
  359. var app = getApp();
  360. if (!endpoints.hasOwnProperty(endpoint)) {
  361. console.error(`no such endpoint: ${endpoint}`);
  362. return {
  363. message: "不存在该接口"
  364. };
  365. }
  366. if(endpoint.indexOf('queryUserMobileAuth')==-1
  367. && endpoint.indexOf('upload')==-1
  368. && endpoint.indexOf('brandXcxLogin')==-1){
  369. app && app.queryUserMobileAuth();//除了以上接口,其他接口发送之前都需要检查下是否需要清空手机号
  370. }
  371. let encryptedData = '';
  372. // const requestOptions = endpoints[endpoint].call(null, options);
  373. const requestOptions = {
  374. path: endpoints[endpoint],
  375. data: options,
  376. method: "POST",
  377. };
  378. if (requestOptions.data) {
  379. requestOptions.data.terminal = (app && app.globalData) ? app.globalData.terminal : "1";
  380. }
  381. if (endpoint.indexOf('authorizedMobile') >= 0 || endpoint.indexOf('enterHouse') >= 0 || endpoint.indexOf(
  382. 'brandXcxLogin') >= 0) {
  383. encryptedData = await util.AES_encrypt(requestOptions.data);
  384. requestOptions.data = {};
  385. }
  386. if (preventDoubleClick) {
  387. //说明该接口需要防止连击
  388. if (doubleClickList[requestOptions.path] && doubleClickList[requestOptions.path].isRunning) {
  389. console.log(`${requestOptions.path}触发连击,屏蔽该请求`)
  390. return
  391. } else {
  392. console.log(`${requestOptions.path}触发连击,通过`)
  393. doubleClickList[requestOptions.path] = {
  394. isRunning: true
  395. }
  396. }
  397. }
  398. console.log(`获取${requestOptions.path}请求的参数:`, requestOptions.data)
  399. requestOptions.url = config.newUrl + requestOptions.path;
  400. requestOptions.header = {
  401. xcx_token: (app && app.globalData && app.globalData.xcx_token) || '',
  402. elabBrandId: config.brandId,
  403. elabProjectName: config.projectEngName || '',
  404. elabSystem: 2,
  405. customerId: (app && app.globalData && app.globalData.single && app.globalData.single.id) ? app
  406. .globalData
  407. .single.id : '',
  408. elabEnvironment: 3,
  409. 'content-type': 'application/json;charset=UTF-8', // 默认值
  410. 'tonken': (app && app.globalData && app.globalData.tonken) ? app.globalData.tonken : "",
  411. };
  412. if (encryptedData) {
  413. requestOptions.header.sign = encryptedData;
  414. }
  415. try {
  416. if (requestOptions.data && requestOptions.data.md && typeof requestOptions.data.md == 'object') {
  417. let currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages()
  418. .length -
  419. 1].$vm :
  420. null;
  421. var _route = currPage ? (currPage.route || currPage.__route__ || "") : "";
  422. let MustO = { //必传参数
  423. user_id: (app && app.globalData.single && app.globalData.single.id) ? app.globalData.single.id :
  424. '',
  425. brand_id: config.brandId,
  426. house_id: (currPage && currPage.houseId ? currPage.houseId : ''),
  427. pagePath: _route,
  428. session_id: (app && app.globalData.session_id) || ''
  429. }
  430. Object.assign(MustO, requestOptions.data.md);
  431. Object.assign(requestOptions.header, MustO);
  432. requestOptions.data.md = null;
  433. }
  434. requestOptions.data = JSON.stringify(requestOptions.data)
  435. } catch (e) {
  436. console.log(e, 'eeeeeeeeeeeee')
  437. }
  438. var t = Math.round(new Date());
  439. requestOptions.time = t;
  440. const response = await request(requestOptions, isHideLoading);
  441. //说明该接口需要防止连击
  442. if (preventDoubleClick && doubleClickList[requestOptions.path] && doubleClickList[requestOptions.path]
  443. .isRunning) {
  444. console.log(`${requestOptions.path}连击接口已返回,清空连击数组`)
  445. doubleClickList[requestOptions.path].isRunning = false
  446. }
  447. console.log('返回' + requestOptions.path + '请求的结果:', response)
  448. // console.log({ url: requestOptions.url, req: requestOptions, res: response });
  449. return response;
  450. }