开放平台
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

3 роки тому
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542
  1. <template>
  2. <div class="api-box">
  3. <div class="apiBox-head">
  4. <div class="api-title">API市场</div>
  5. <div class="seek-input">
  6. <el-input placeholder="搜索接口连接/方法名/接口中文名" v-model="input2">
  7. </el-input>
  8. <span class="seek-slod">搜索</span>
  9. </div>
  10. </div>
  11. <div class="api-boxs">
  12. <div class="box-head-title">
  13. <ul class="ul-list">
  14. <li :class="{ itemColor: isList === '1' }" @click="isList = '1'">
  15. 全部
  16. </li>
  17. <li :class="{ itemColor: isList === '2' }" @click="isList = '2'">
  18. 节日活动类
  19. </li>
  20. <li :class="{ itemColor: isList === '3' }" @click="isList = '3'">
  21. 工具类
  22. </li>
  23. <li :class="{ itemColor: isList === '4' }" @click="isList = '4'">
  24. 特色版块类
  25. </li>
  26. <li :class="{ itemColor: isList === '5' }" @click="isList = '5'">
  27. 数据搜索类
  28. </li>
  29. <li :class="{ itemColor: isList === '6' }" @click="isList = '6'">
  30. 入库类
  31. </li>
  32. <li :class="{ itemColor: isList === '7' }" @click="isList = '7'">
  33. 开源类
  34. </li>
  35. </ul>
  36. <div class="btn-test" @click="onSkip('/domain/debugApi')">接口测试</div>
  37. </div>
  38. <div>
  39. <div v-for="(item, index) in apiData" :key="index">
  40. <div class="for-title">{{ item.title }}</div>
  41. <div class="data-box">
  42. <div
  43. class="data-item"
  44. v-for="(data, i) in item.data"
  45. :key="i"
  46. :class="{ backColor: data.state }"
  47. >
  48. <div v-if="data.hot" class="new-content">
  49. <img class="huo-png" src="@/static/img/huo.png" alt="" />
  50. <span>HOT</span>
  51. </div>
  52. <div v-if="data.new" class="new-content">
  53. <span>NEW</span>
  54. </div>
  55. <img :src="data.img" alt="" />
  56. <div class="data-box">
  57. <div class="data-1">{{ data.title }}</div>
  58. <div class="data-2">{{ data.content }}</div>
  59. </div>
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65. </div>
  66. </template>
  67. <script>
  68. export default {
  69. data() {
  70. return {
  71. input2: "",
  72. isList: "1",
  73. apiData: [
  74. {
  75. title: "节日活动类",
  76. data: [
  77. {
  78. type: 1,
  79. title: "京东商品转链",
  80. content: "京东商品转链返回京东推广短链接",
  81. state: true,
  82. new: true,
  83. img: require("@/static/img/beiyong1.png"),
  84. },
  85. ],
  86. },
  87. {
  88. title: "工具类",
  89. data: [
  90. {
  91. type: 1,
  92. title: "京东商品转链",
  93. content: "京东商品转链返回京东推广短链接",
  94. new: false,
  95. hot: true,
  96. img: require("@/static/img/beiyong1.png"),
  97. },
  98. {
  99. type: 1,
  100. title: "京东商品转链",
  101. content: "京东商品转链返回京东推广短链接",
  102. new: false,
  103. hot: true,
  104. img: require("@/static/img/beiyong2.png"),
  105. },
  106. {
  107. type: 1,
  108. title: "京东商品转链",
  109. content: "京东商品转链返回京东推广短链接",
  110. new: false,
  111. hot: false,
  112. img: require("@/static/img/beiyong3.png"),
  113. },
  114. {
  115. type: 1,
  116. title: "京东商品转链",
  117. content: "京东商品转链返回京东推广短链接",
  118. new: false,
  119. hot: true,
  120. img: require("@/static/img/beiyong4.png"),
  121. },
  122. {
  123. type: 1,
  124. title: "京东商品转链",
  125. content: "京东商品转链返回京东推广短链接",
  126. hot: true,
  127. img: require("@/static/img/beiyong1.png"),
  128. },
  129. {
  130. type: 1,
  131. title: "京东商品转链",
  132. content: "京东商品转链返回京东推广短链接",
  133. hot: true,
  134. img: require("@/static/img/beiyong2.png"),
  135. },
  136. {
  137. type: 1,
  138. title: "京东商品转链",
  139. content: "京东商品转链返回京东推广短链接",
  140. img: require("@/static/img/beiyong3.png"),
  141. },
  142. {
  143. type: 1,
  144. title: "京东商品转链",
  145. content: "京东商品转链返回京东推广短链接",
  146. img: require("@/static/img/beiyong4.png"),
  147. },
  148. {
  149. type: 1,
  150. title: "京东商品转链",
  151. content: "京东商品转链返回京东推广短链接",
  152. img: require("@/static/img/beiyong1.png"),
  153. },
  154. {
  155. type: 1,
  156. title: "京东商品转链",
  157. content: "京东商品转链返回京东推广短链接",
  158. img: require("@/static/img/beiyong2.png"),
  159. },
  160. {
  161. type: 1,
  162. title: "京东商品转链",
  163. content: "京东商品转链返回京东推广短链接",
  164. hot: true,
  165. img: require("@/static/img/beiyong3.png"),
  166. },
  167. {
  168. type: 1,
  169. title: "京东商品转链",
  170. content: "京东商品转链返回京东推广短链接",
  171. img: require("@/static/img/beiyong4.png"),
  172. },
  173. {
  174. type: 1,
  175. title: "京东商品转链",
  176. content: "京东商品转链返回京东推广短链接",
  177. new: true,
  178. img: require("@/static/img/beiyong1.png"),
  179. },
  180. {
  181. type: 1,
  182. title: "京东商品转链",
  183. content: "京东商品转链返回京东推广短链接",
  184. hot: true,
  185. img: require("@/static/img/beiyong2.png"),
  186. },
  187. {
  188. type: 1,
  189. title: "京东商品转链",
  190. content: "京东商品转链返回京东推广短链接",
  191. img: require("@/static/img/beiyong3.png"),
  192. },
  193. {
  194. type: 1,
  195. title: "京东商品转链",
  196. content: "京东商品转链返回京东推广短链接",
  197. img: require("@/static/img/beiyong4.png"),
  198. },
  199. ],
  200. },
  201. {
  202. title: "特色版块类",
  203. data: [
  204. {
  205. type: 1,
  206. title: "京东商品转链",
  207. content: "京东商品转链返回京东推广短链接",
  208. hot: true,
  209. img: require("@/static/img/beiyong1.png"),
  210. },
  211. {
  212. type: 1,
  213. title: "京东商品转链",
  214. content: "京东商品转链返回京东推广短链接",
  215. new: true,
  216. img: require("@/static/img/beiyong2.png"),
  217. },
  218. {
  219. type: 1,
  220. title: "京东商品转链",
  221. content: "京东商品转链返回京东推广短链接",
  222. new: true,
  223. img: require("@/static/img/beiyong3.png"),
  224. },
  225. {
  226. type: 1,
  227. title: "京东商品转链",
  228. content: "京东商品转链返回京东推广短链接",
  229. hot: true,
  230. img: require("@/static/img/beiyong4.png"),
  231. },
  232. {
  233. type: 1,
  234. title: "京东商品转链",
  235. content: "京东商品转链返回京东推广短链接",
  236. img: require("@/static/img/beiyong1.png"),
  237. },
  238. {
  239. type: 1,
  240. title: "京东商品转链",
  241. content: "京东商品转链返回京东推广短链接",
  242. img: require("@/static/img/beiyong2.png"),
  243. },
  244. {
  245. type: 1,
  246. title: "京东商品转链",
  247. content: "京东商品转链返回京东推广短链接",
  248. img: require("@/static/img/beiyong3.png"),
  249. },
  250. {
  251. type: 1,
  252. title: "京东商品转链",
  253. content: "京东商品转链返回京东推广短链接",
  254. hot: true,
  255. img: require("@/static/img/beiyong4.png"),
  256. },
  257. {
  258. type: 1,
  259. title: "京东商品转链",
  260. content: "京东商品转链返回京东推广短链接",
  261. img: require("@/static/img/beiyong1.png"),
  262. },
  263. {
  264. type: 1,
  265. title: "京东商品转链",
  266. content: "京东商品转链返回京东推广短链接",
  267. new: true,
  268. img: require("@/static/img/beiyong2.png"),
  269. },
  270. {
  271. type: 1,
  272. title: "京东商品转链",
  273. content: "京东商品转链返回京东推广短链接",
  274. img: require("@/static/img/beiyong3.png"),
  275. },
  276. {
  277. type: 1,
  278. title: "京东商品转链",
  279. content: "京东商品转链返回京东推广短链接",
  280. hot: true,
  281. img: require("@/static/img/beiyong4.png"),
  282. },
  283. {
  284. type: 1,
  285. title: "京东商品转链",
  286. content: "京东商品转链返回京东推广短链接",
  287. img: require("@/static/img/beiyong1.png"),
  288. },
  289. {
  290. type: 1,
  291. title: "京东商品转链",
  292. content: "京东商品转链返回京东推广短链接",
  293. img: require("@/static/img/beiyong2.png"),
  294. },
  295. {
  296. type: 1,
  297. title: "京东商品转链",
  298. content: "京东商品转链返回京东推广短链接",
  299. img: require("@/static/img/beiyong3.png"),
  300. },
  301. {
  302. type: 1,
  303. title: "京东商品转链",
  304. content: "京东商品转链返回京东推广短链接",
  305. hot: true,
  306. img: require("@/static/img/beiyong4.png"),
  307. },
  308. ],
  309. },
  310. ],
  311. };
  312. },
  313. methods:{
  314. onSkip: function(path){
  315. this.$router.push(path)
  316. }
  317. }
  318. };
  319. </script>
  320. <style lang="scss" scoped>
  321. .api-box {
  322. width: 1200px;
  323. border-radius: 14px;
  324. overflow: hidden;
  325. background: #fff;
  326. .apiBox-head {
  327. height: 184px;
  328. width: 100%;
  329. background: url("../../static/img/index-bar.png");
  330. background-size: 100% 100%;
  331. background-repeat: no-repeat;
  332. display: flex;
  333. align-items: center;
  334. flex-direction: column;
  335. .api-title {
  336. color: #fff;
  337. font-weight: bold;
  338. font-size: 40px;
  339. margin-top: 40px;
  340. }
  341. .seek-input {
  342. width: 350px;
  343. height: 34px;
  344. display: flex;
  345. background: #fff;
  346. border-radius: 17px;
  347. margin-top: 18px;
  348. overflow: hidden;
  349. .seek-slod {
  350. background: #1890ff;
  351. color: #fff;
  352. width: 70px;
  353. height: 34px;
  354. text-align: center;
  355. line-height: 34px;
  356. border-radius: 17px;
  357. padding: 0;
  358. margin: 0;
  359. cursor: pointer;
  360. }
  361. }
  362. }
  363. .api-boxs {
  364. min-height: 777px;
  365. width: 100%;
  366. padding: 0 20px;
  367. box-sizing: border-box;
  368. .box-head-title {
  369. width: 100%;
  370. display: flex;
  371. height: 80px;
  372. .ul-list {
  373. list-style: none;
  374. display: flex;
  375. margin: 0;
  376. padding: 23px 0 0px 0;
  377. color: #333333;
  378. font-size: 16px;
  379. height: 16px;
  380. line-height: 16px;
  381. margin-right: auto;
  382. li {
  383. margin-right: 40px;
  384. height: 16px;
  385. padding-bottom: 8px;
  386. cursor: pointer;
  387. border-bottom: 4px solid transparent;
  388. transition: border-color 0.3s;
  389. }
  390. .itemColor {
  391. border-bottom: 4px solid #2f89fc;
  392. transition: border-color 0.3s;
  393. }
  394. }
  395. .btn-test {
  396. width: 104px;
  397. height: 33px;
  398. background: linear-gradient(180deg, #1890ff 0%, #2f89fc 100%);
  399. box-shadow: 0px 2px 10px 0px rgba(24, 144, 255, 0.2);
  400. border-radius: 17px;
  401. line-height: 33px;
  402. font-size: 16px;
  403. color: #ffffff;
  404. text-align: center;
  405. margin: 20px 0 0 0;
  406. cursor: pointer;
  407. }
  408. }
  409. }
  410. }
  411. .for-title {
  412. margin: 0px 0 30px;
  413. padding-left: 12px;
  414. border-left: 4px solid #1890ff;
  415. font-size: 20px;
  416. line-height: 20px;
  417. height: 20px;
  418. }
  419. .data-box {
  420. display: flex;
  421. flex-wrap: wrap;
  422. justify-content: space-between;
  423. width: 100%;
  424. }
  425. .data-item {
  426. flex-shrink: 0;
  427. width: 275px;
  428. height: 90px;
  429. background: #ffffff;
  430. border-radius: 14px;
  431. border: 1px solid #eeeeee;
  432. margin-bottom: 20px;
  433. padding: 20px 15px;
  434. box-sizing: border-box;
  435. display: flex;
  436. cursor: pointer;
  437. position: relative;
  438. .data-box {
  439. display: flex;
  440. flex-direction: column;
  441. margin-left: 15px;
  442. padding: 4px 0;
  443. .data-1 {
  444. color: #333333;
  445. font-size: 16px;
  446. }
  447. .data-2 {
  448. color: #999999;
  449. font-size: 12px;
  450. margin-top: auto;
  451. }
  452. }
  453. .new-content {
  454. width: 65px;
  455. height: 20px;
  456. background: #ff4242;
  457. border-radius: 0px 14px 0px 14px;
  458. position: absolute;
  459. right: 0;
  460. top: 0;
  461. z-index: 9;
  462. color: #fff;
  463. text-align: center;
  464. line-height: 18px;
  465. font-size: 12px;
  466. span {
  467. margin-left: 0px;
  468. }
  469. .huo-png {
  470. vertical-align: 0px;
  471. }
  472. }
  473. }
  474. .backColor {
  475. background: #2f89fc;
  476. box-shadow: 0px 3px 10px 0px rgba(24, 144, 255, 0.3);
  477. .data-box {
  478. .data-1 {
  479. color: #fff;
  480. }
  481. .data-2 {
  482. color: #97c4fd;
  483. }
  484. }
  485. }
  486. </style>