constant.ts 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. import { MediaTypeEnum } from '@/interface';
  2. export const QQ_CLIENT_ID = '101958191';
  3. export const QQ_OAUTH_URL = 'https://graph.qq.com/oauth2.0';
  4. export const QQ_REDIRECT_URI = 'https://live.hsslive.cn/oauth/qq_login';
  5. export const WECHAT_GZH_APPID = 'wxbd243c01ac5ad1b7'; // 公众号
  6. export const WECHAT_GZH_OAUTH_URL =
  7. 'https://open.weixin.qq.com/connect/oauth2/authorize?';
  8. export const WECHAT_REDIRECT_URI = `http://www.hfgmupw.cn/oauth/wechat_login`;
  9. export const QRCODE_LOGIN_URI = `http://www.hfgmupw.cn/qrcodeLogin`;
  10. export const AUTHOR_GITHUB = 'https://github.com/galaxy-s10';
  11. // wss://srs-pull.hsslive.cn
  12. // ws://www.hfgmupw.cn
  13. export const WEBSOCKET_URL =
  14. process.env.NODE_ENV === 'development'
  15. ? 'ws://localhost:4300'
  16. : 'wss://srs-pull.hsslive.cn';
  17. // https://live-api.hsslive.cn
  18. // http://www.hfgmupw.cn/api/
  19. export const AXIOS_BASEURL =
  20. process.env.NODE_ENV === 'development'
  21. ? '/api'
  22. : 'https://live-api.hsslive.cn';
  23. // .hsslive.cn
  24. // .hfgmupw.cn
  25. export const COOKIE_DOMAIN =
  26. process.env.NODE_ENV === 'development' ? undefined : '.hsslive.cn';
  27. export const COMMON_URL = {
  28. apifox:
  29. 'https://apifox.com/apidoc/shared-c7556b54-17b2-494e-a039-572d83f103ed/',
  30. admin: 'https://live-admin.hsslive.cn',
  31. mobileApk: 'https://resource.hsslive.cn/billd-live/image/app-release.apk',
  32. bilibiliCollectiondetail:
  33. 'https://space.bilibili.com/381307133/channel/collectiondetail?sid=1458070&ctype=0',
  34. payCoursesArticle: 'https://www.hsslive.cn/article/151',
  35. };
  36. export const SRS_CB_URL_PARAMS = {
  37. publishKey: 'pushkey',
  38. publishType: 'pushtype',
  39. userToken: 'usertoken',
  40. userId: 'userid',
  41. randomId: 'randomid',
  42. };
  43. export const QINIU_LIVE = {
  44. domain: 'resource.hsslive.cn',
  45. url: 'https://resource.hsslive.cn/',
  46. bucket: 'hssblog',
  47. prefix: {
  48. 'billd-live/image/': 'billd-live/image/',
  49. 'billd-live/msg-image/': 'billd-live/msg-image/',
  50. },
  51. };
  52. export const DEFAULT_AUTH_INFO = {
  53. ALL_AUTH: {
  54. id: 1,
  55. auth_value: 'ALL_AUTH',
  56. },
  57. USER_MANAGE: {
  58. id: 2,
  59. auth_value: 'USER_MANAGE',
  60. },
  61. ROLE_MANAGE: {
  62. id: 3,
  63. auth_value: 'ROLE_MANAGE',
  64. },
  65. AUTH_MANAGE: {
  66. id: 4,
  67. auth_value: 'AUTH_MANAGE',
  68. },
  69. COMMONENT_MANAGE: {
  70. id: 5,
  71. auth_value: 'COMMONENT_MANAGE',
  72. },
  73. LOG_MANAGE: {
  74. id: 6,
  75. auth_value: 'LOG_MANAGE',
  76. },
  77. LIVE_MANAGE: {
  78. id: 7,
  79. auth_value: 'LIVE_MANAGE',
  80. },
  81. LIVE_PUSH: {
  82. id: 8,
  83. auth_value: 'LIVE_PUSH',
  84. },
  85. LIVE_PULL: {
  86. id: 9,
  87. auth_value: 'LIVE_PULL',
  88. },
  89. LIVE_PULL_SVIP: {
  90. id: 10,
  91. auth_value: 'LIVE_PULL_SVIP',
  92. },
  93. };
  94. // 全局的cookie的key
  95. export const COOKIE_KEY = {
  96. thirdLoginInfo: 'thirdLoginInfo',
  97. };
  98. export const lsKeyPrefix = 'billd_live___';
  99. export const MODULE_CONFIG_SWITCH = {
  100. // 后台入口
  101. admin: true,
  102. // app下载入口
  103. appdownload: true,
  104. // 文档
  105. doc: true,
  106. // 生态系统
  107. ecosystem: true,
  108. // 关于
  109. about: true,
  110. // 赞助
  111. sponsors: true,
  112. // 私有化部署
  113. privatizationDeployment: true,
  114. // github
  115. github: true,
  116. // 轮播
  117. slider: true,
  118. // 底部版权提示
  119. copyrightNotice: true,
  120. // 侧边栏
  121. sidebar: true,
  122. // 侧边栏排行榜
  123. sidebarRank: true,
  124. // 侧边栏商店
  125. sidebarShop: true,
  126. // 侧边栏订单
  127. sidebarOrder: true,
  128. // 支付
  129. pay: true,
  130. // 第三方登录
  131. thirdLogin: true,
  132. // qq登录
  133. qqLogin: true,
  134. // 微信扫码登录
  135. wechatQrcodeLogin: false,
  136. // 微信登录
  137. wechatLogin: false,
  138. // github登录
  139. githubLogin: true,
  140. // 我要开播按钮
  141. startLive: true,
  142. // srs开播
  143. startLiveSRS: true,
  144. // webrtc开播
  145. startLiveWebRTC: true,
  146. // msr开播
  147. startLiveWebMSR: true,
  148. };
  149. // 全局的localStorage的key
  150. export const lsKey = {
  151. lastBuildDate: 'lastBuildDate',
  152. token: 'token',
  153. };
  154. export const mediaTypeEnumMap = {
  155. [MediaTypeEnum.camera]: '摄像头',
  156. [MediaTypeEnum.microphone]: '麦克风',
  157. [MediaTypeEnum.screen]: '窗口',
  158. [MediaTypeEnum.img]: '图片',
  159. [MediaTypeEnum.txt]: '文字',
  160. [MediaTypeEnum.media]: '视频',
  161. [MediaTypeEnum.time]: '时间',
  162. [MediaTypeEnum.stopwatch]: '秒表',
  163. };
  164. export const sliderList = [
  165. {
  166. img: 'https://resource.hsslive.cn/billd-live/image/a4039f86e5352bcfccaddecc4b72a1df.webp',
  167. txt: 'SRS',
  168. link: 'https://ossrs.net',
  169. },
  170. {
  171. img: 'https://resource.hsslive.cn/image/c3c342f6852706e0b70d011e8753d2d6.webp',
  172. txt: 'FFmpeg',
  173. link: 'https://ffmpeg.org',
  174. },
  175. {
  176. img: 'https://resource.hsslive.cn/image/0214acde5f5f5e3caf278ce446cc4414.webp',
  177. txt: 'WebRTC',
  178. link: 'https://github.com/webrtc',
  179. },
  180. {
  181. img: 'https://resource.hsslive.cn/billd-live/image/1277df4371045310acbc4bf2fc0811b8.webp',
  182. txt: 'Vue3',
  183. link: 'https://vuejs.org',
  184. },
  185. {
  186. img: 'https://resource.hsslive.cn/image/dd907463af7fdec395e5f6d088b0308b.webp',
  187. txt: 'Pinia',
  188. link: 'https://pinia.vuejs.org',
  189. },
  190. {
  191. img: 'https://resource.hsslive.cn/image/9d54ed9673f2ca4ffc78fc6348f2b736.png',
  192. txt: 'TypeScript',
  193. link: 'https://www.typescriptlang.org',
  194. },
  195. {
  196. img: 'https://resource.hsslive.cn/image/a6473eed036e5d35ca2c9f7118c974cd.webp',
  197. txt: 'Vite4',
  198. link: 'https://vitejs.dev',
  199. },
  200. {
  201. img: 'https://resource.hsslive.cn/image/627105f0e5674018cb03c8da036ae5d5.webp',
  202. txt: 'Webpack5',
  203. link: 'https://webpack.js.org',
  204. },
  205. {
  206. img: 'https://resource.hsslive.cn/billd-live/image/5304af2ea6864369df3ba895d20e3d14.png',
  207. txt: 'swc',
  208. link: 'https://swc.rs',
  209. },
  210. {
  211. img: 'https://resource.hsslive.cn/image/dd8ffe33c22723381a3664684eaca237.png',
  212. txt: 'esbuild',
  213. link: 'https://esbuild.github.io',
  214. },
  215. {
  216. img: 'https://resource.hsslive.cn/image/f6b9f5cfade1d96634dddb0b89b056be.png',
  217. txt: 'Pnpm',
  218. link: 'https://pnpm.io',
  219. },
  220. {
  221. img: 'https://resource.hsslive.cn/image/89fadfed21f1dd6389dfeb227b3d1ca6.webp',
  222. txt: 'naive-ui',
  223. link: 'https://www.naiveui.com',
  224. },
  225. {
  226. img: 'https://resource.hsslive.cn/image/5ce36cab3d6b23974625900dc4cf39a3.webp',
  227. txt: 'Node',
  228. link: 'https://nodejs.org',
  229. },
  230. {
  231. img: 'https://resource.hsslive.cn/image/0dcabc80c616240edc3111450fbf79aa.webp',
  232. txt: 'socket.io',
  233. link: 'https://socket.io',
  234. },
  235. {
  236. img: 'https://resource.hsslive.cn/image/2009474c455813d487803e2acfcbb4af.webp',
  237. txt: 'mysql',
  238. link: 'https://www.mysql.com/',
  239. },
  240. {
  241. img: 'https://resource.hsslive.cn/image/e66deaf779edb2a94e91f9b0f2995f6d.webp',
  242. txt: 'redis',
  243. link: 'https://redis.io',
  244. },
  245. {
  246. img: 'https://resource.hsslive.cn/image/fd783552a400643c611c62e9200bb429.webp',
  247. txt: 'Sequelize',
  248. link: 'https://sequelize.org',
  249. },
  250. {
  251. img: 'https://resource.hsslive.cn/image/dce3470845321ce654d09ce811837749.webp',
  252. txt: '腾讯云云直播 CSS',
  253. link: 'https://cloud.tencent.com/product/css',
  254. },
  255. {
  256. img: 'https://resource.hsslive.cn/image/074835fbbaf976992e78bc6a585530e6.webp',
  257. txt: '阿里云轻量服务器',
  258. link: 'https://www.aliyun.com',
  259. },
  260. {
  261. img: 'https://resource.hsslive.cn/image/9a934ebf993f5d3b4146f050f7071518.webp',
  262. txt: '七牛云对象存储',
  263. link: 'https://www.qiniu.com',
  264. },
  265. {
  266. img: 'https://resource.hsslive.cn/image/e247f6fd39320051d236f3f844b9056f.webp',
  267. txt: '支付宝当面付',
  268. link: 'https://opendocs.alipay.com/open/194',
  269. },
  270. {
  271. img: 'https://resource.hsslive.cn/image/d5eb237bd54bc4e729186115e89e5935.webp',
  272. txt: 'Docker',
  273. link: 'https://www.docker.com',
  274. },
  275. {
  276. img: 'https://resource.hsslive.cn/image/92a6f3e295634ddd21b6b8034fa3b25f.webp',
  277. txt: 'Jenkins',
  278. link: 'https://www.jenkins.io',
  279. },
  280. {
  281. img: 'https://resource.hsslive.cn/image/354823b72eb805264c940f5232d824fe.webp',
  282. txt: 'PM2',
  283. link: 'https://github.com/Unitech/pm2',
  284. },
  285. {
  286. img: 'https://resource.hsslive.cn/image/d4417f70fa36edbc62b5aa3840cbf25f.webp',
  287. txt: 'bilibili',
  288. link: 'https://www.bilibili.com',
  289. },
  290. ];