government.js 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. import {
  2. yghttp
  3. } from '@/common/request/index-yg.js';
  4. /**
  5. * 获取金刚区
  6. *
  7. */
  8. export const getAPPList = (identityCode = '') => {
  9. return yghttp.get(`/quick/link/select?identityCode=${identityCode}`)
  10. }
  11. /**
  12. * 获取应用地址
  13. */
  14. export const getThirdWebAddress = (thirdApplicationId) => {
  15. return yghttp.post('/auth/getThirdWebAddress', {
  16. "thirdApplicationId": thirdApplicationId,
  17. }, {
  18. "sign": new Date().getTime() + Math.random()
  19. })
  20. }
  21. /**
  22. * 获取消息应用地址
  23. */
  24. export const getThirdWebAddressByMessage = (appId, messageAddress) => {
  25. return yghttp.post('/auth/getThirdWebAddressByMessage', {
  26. "appId": appId,
  27. "messageAddress": messageAddress
  28. })
  29. }
  30. /**
  31. * 获取广告位广告
  32. */
  33. export const getBannerList = (adLocationCode) => {
  34. return yghttp.get(`/ad/list/${adLocationCode}`)
  35. }
  36. /**
  37. * 获取频道下的应用分类和分类下的应用
  38. */
  39. export const getChannelDictCode = (channelDictCode) => {
  40. return yghttp.get(`/applicationCategory/all/${channelDictCode}`)
  41. }
  42. /**
  43. * 获取聚合主题
  44. */
  45. export const getThemeModule = (markCode) => {
  46. return yghttp.get(`/themeModule/list/${markCode}`)
  47. }
  48. /**
  49. * 获取聚合列表
  50. */
  51. export const getThemeInfo = (themeId) => {
  52. return yghttp.get(`/themeModule/listById/${themeId}`)
  53. }
  54. // /**
  55. // * 获取资讯
  56. // */
  57. export const getInformation = (Params) => {
  58. return yghttp.get(`/information/type-page`, Params)
  59. }
  60. /**
  61. * 获取资讯列表
  62. */
  63. export const getInformationList = (Params) => {
  64. return yghttp.get(`/information/page`, Params)
  65. }
  66. /**
  67. * 获取资讯滚动通知
  68. */
  69. export const getRecommend = (num) => {
  70. return yghttp.get(`/information/recommend?limit=${num}`)
  71. }
  72. /**
  73. * 获取搜索配置详细信息
  74. */
  75. export const getSearchInfo = () => {
  76. return yghttp.get("/search/config/info")
  77. }
  78. /**
  79. * 第三方h5应用搜索
  80. */
  81. export const getThirdSearch = (Params) => {
  82. return yghttp.get("/third/search", Params)
  83. }
  84. // 获取用户信息
  85. export const getUserInfo = () => {
  86. return yghttp.get(`/user/info`)
  87. }
  88. // 获取最新APP版本
  89. export const versionNewest = (param) => {
  90. return yghttp.get(`/app/version/newest`, param)
  91. }
  92. // 新增用户实名认证
  93. export const certificationAdd = (param) => {
  94. return yghttp.post(`/user/certification/add`, param)
  95. }
  96. // 获取用户实名认证详细信息
  97. export const certificationInfo = () => {
  98. return yghttp.get(`/user/certification/info`)
  99. }
  100. // 退出登录
  101. export const userLogout = () => {
  102. return yghttp.post(`/user/logout`)
  103. }
  104. // 我的
  105. export const myUserInfo = () => {
  106. return yghttp.get(`/user/my/info`)
  107. }
  108. // 新闻分类/资讯
  109. export const newsClassify = (param) => {
  110. return yghttp.get(`/information/type-page`, param)
  111. }
  112. // 新闻列表
  113. export const newsList = (param) => {
  114. return yghttp.get(`/information/page`, param)
  115. }
  116. // 新闻列表详情
  117. export const newsDetial = (id) => {
  118. return yghttp.get(`/information/info/${id}`)
  119. }
  120. // 发现页资讯列表
  121. export const getInformationFindPage = (param) => {
  122. return yghttp.get(`/information/find-page`, param)
  123. }
  124. // 设置用户关注/取关
  125. export const setUserFollow = (data) => {
  126. return yghttp.post(`/userFollow/operation`, data)
  127. }
  128. // 设置用户收藏/取消收藏
  129. export const setUserCollect = (data) => {
  130. return yghttp.post(`/userCollect/operation`, data)
  131. }
  132. // 获取用户关注
  133. export const getUserFollowList = (param) => {
  134. return yghttp.get(`/userFollow/page`, param)
  135. }
  136. // 获取用户收藏
  137. export const getUserCollectList = (param) => {
  138. return yghttp.get(`/userCollect/page`, param)
  139. }
  140. // 靓码 -----
  141. /**
  142. *
  143. * 权益卡
  144. */
  145. export const getAppCard = () => {
  146. return yghttp.get(`/yima/request/appCard/card`)
  147. }
  148. /**
  149. *
  150. * 优惠券
  151. */
  152. export const getAppCoupon = () => {
  153. return yghttp.get(`/yima/request/appCard/coupon`)
  154. }
  155. /**
  156. *
  157. * 靓码
  158. */
  159. export const getAppCode = () => {
  160. return yghttp.get(`/yima/request/appUser/newCode`)
  161. }
  162. /**
  163. *
  164. * 发现
  165. */
  166. export const getDiscover = (Params) => {
  167. return yghttp.get(`/yima/request/appMoment/pageList`, Params)
  168. }
  169. /**
  170. *
  171. * 发现详情
  172. */
  173. export const getDiscoverInfo = (id) => {
  174. return yghttp.get(`/yima/request/appMoment/info?informationId=${id}`)
  175. }
  176. /**
  177. * 人脸参数处理
  178. */
  179. // 处理人脸加密参数
  180. export const facParamsHandle = (data) => {
  181. return yghttp.post(`/auth/thrid-user`, data)
  182. }
  183. // 处理人脸返回参数
  184. export const facResultHandle = (data) => {
  185. return yghttp.post(`/user/certification/yige-real-auth`, data)
  186. }
  187. // 发送短信
  188. export const smsCode = (data) => {
  189. return yghttp.post(`/common/sms-code`, data)
  190. }
  191. // 地图
  192. // 获取地图分类
  193. export const getLocationClassify = () => {
  194. return yghttp.get(`/location/map/classify/list`)
  195. }
  196. //获取地图列表
  197. export const getLocationNearbyList = (params) => {
  198. return yghttp.get(`/location/map/nearbyList`, params)
  199. }
  200. //获取地图周边
  201. export const getCircumList = (params) => {
  202. return yghttp.get(`/location/map/placeAround`, params)
  203. }
  204. //获取地图详情
  205. export const getLocationIinfo = (id, latitude, longitude) => {
  206. return yghttp.get(`/location/map/info/${id}?latitude=${latitude}&longitude=${longitude}`)
  207. }
  208. // 根据类型id获取类型的模块
  209. export const classifyModuleList = (classifyId) => {
  210. return yghttp.get(`/location/map/classify/module-list`,{classifyId:classifyId})
  211. }
  212. // 获取积分列表
  213. export const getIntegralList= (params) => {
  214. return yghttp.get(`/user/integral/page`, params)
  215. }