开放平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447
  1. <template>
  2. <div class="app-detail">
  3. <div class="detail-title">
  4. <span>我的应用</span>
  5. </div>
  6. <div class="detail-header-box">
  7. <div class="detail-header-item">
  8. <div class="item1">嗨</div>
  9. <div class="item2">
  10. <div class="div1">Google App</div>
  11. <div class="div2">这是一个全新的app</div>
  12. <div class="div3">
  13. <span style="background: #deedff; color: #2f89fc">电脑版网站</span>
  14. <span style="background: #ffeeee; color: #ff4c4c">H5移动网站</span>
  15. <span style="background: #e8f7f7; color: #1ab1b0">iOS客户端</span>
  16. <span style="background: #fff2ec; color: #ff7742"
  17. >Android客户端</span
  18. >
  19. <span style="background: #ebf7e8; color: #3ab11a">微信小程序</span>
  20. </div>
  21. </div>
  22. <div class="item3">
  23. <div>管理应用</div>
  24. </div>
  25. </div>
  26. <div class="detail-buttom-box">
  27. <div class="button-box">
  28. <div class="button-item1">
  29. <span class="span1">APP_KEY:</span>
  30. <span class="span2">604c2475ad4f9</span>
  31. <span class="span3">复制</span>
  32. </div>
  33. <div class="button-item1" style="margin: 20px 0">
  34. <span class="span1">APP_SECRET:</span>
  35. <span class="span2">cf8062d60e74de8edd3ac32ccd3b7bab</span>
  36. <i
  37. class="el-icon-view"
  38. style="margin-right: 10px; font-size: 12px; color: #999999"
  39. ></i>
  40. <span class="span3">重置</span>
  41. <span class="span3" style="margin-left: 10px">复制</span>
  42. </div>
  43. <div class="button-item1">
  44. <span class="span1">PID:</span>
  45. <span class="span2">未绑定</span>
  46. <span class="span3">绑定</span>
  47. </div>
  48. </div>
  49. <div class="button-box" style="margin-left: auto">
  50. <div class="button-item1">
  51. <span class="span1">API请求速度:</span>
  52. <span class="span2">600次 / 分钟</span>
  53. <span class="span4"
  54. >当前应用内的所有API每分钟请求总和不得超过600次</span
  55. >
  56. </div>
  57. <div class="button-item1" style="margin: 20px 0">
  58. <span class="span1">API请求量:</span>
  59. <span class="span2">30万次/天</span>
  60. <span class="span3">申请提量</span>
  61. </div>
  62. <div class="button-item1">
  63. <span class="span1">URL:</span>
  64. <span class="span2">未设置</span>
  65. <span class="span3">设置</span>
  66. </div>
  67. </div>
  68. </div>
  69. </div>
  70. <div class="banner-text">
  71. <span
  72. >调用接口推荐使用SDK(省去验签环节和请求编码环节,帮助您高效快速接入</span
  73. >
  74. <span style="color: #1890ff; margin-left: auto">SDK下载</span>
  75. </div>
  76. <div class="detail-title2">
  77. <div>
  78. <div style="color: #333333; font-size: 20px">我的API</div>
  79. <div style="color: #999999; font-size: 14px">
  80. 您可以选择任意API在此应用中使用,每个应用中所有API的数据请求频率和数量,将以应用规格为准
  81. </div>
  82. </div>
  83. <div class="title-btn">添加API</div>
  84. </div>
  85. <div class="myApi-box">
  86. <el-table :data="tableData" stripe :border="false" style="width: 100%">
  87. <el-table-column prop="name" label="API名称" align="center" width="260">
  88. <template slot-scope="scope">
  89. <div class="scope-name-box">
  90. <div class="scope-name"></div>
  91. <div>{{ scope.row.name }}</div>
  92. </div>
  93. </template>
  94. </el-table-column>
  95. <el-table-column prop="content" align="center" label="API" width="440">
  96. <template slot-scope="scope">
  97. <div class="scope-name-box">
  98. <div>{{ scope.row.content }}</div>
  99. </div>
  100. </template>
  101. </el-table-column>
  102. <el-table-column prop="operation" align="center" label="操作">
  103. <template slot-scope="scope">
  104. <div class="scope-box">
  105. <div @click="handleClick(scope.row)">接口文档</div>
  106. <div @click="handleClick(scope.row)" style="margin: 0 20px">
  107. 接口测试
  108. </div>
  109. <div @click="handleClick(scope.row)" style="color: #ff4242">
  110. 移除
  111. </div>
  112. </div>
  113. </template>
  114. </el-table-column>
  115. </el-table>
  116. </div>
  117. <div class="detail-title">
  118. <span>推荐API</span>
  119. </div>
  120. <div class="recommend-box">
  121. <div class="recommend-item" v-for="(item, index) in 10" :key="index">
  122. <div class="item-1"></div>
  123. <div class="item-2">一个接口</div>
  124. <div class="item-3">这是一个接口的简单描述</div>
  125. <div class="item-4">申请接入</div>
  126. </div>
  127. </div>
  128. <div class="detail-title2" style="margin-top: 20px">
  129. <div>
  130. <div style="color: #333333; font-size: 20px">使用方法</div>
  131. <div style="color: #999999; font-size: 14px">
  132. 为规范使用和保障数据安全,API调用需要通过验签规则,我们为您准备了各语言的验签及调用示例:
  133. </div>
  134. </div>
  135. </div>
  136. <div class="detail-border">
  137. <span>PythonSDK及调用示例</span>
  138. <span>java调用示例</span>
  139. <span>php调用示例</span>
  140. <span>更多示例</span>
  141. </div>
  142. <ApiAdd @onClose="onClose" v-if="isApiAdd" />
  143. </div>
  144. </template>
  145. <script>
  146. import ApiAdd from '@/components/domain/apiAdd';
  147. export default {
  148. components: {
  149. ApiAdd
  150. },
  151. data() {
  152. return {
  153. isApiAdd: true,
  154. tableData: [
  155. {
  156. name: "我的收藏",
  157. content:
  158. "https://openapi.zhiying.com/api.goods/gets/get-collection-list",
  159. operation: "操作",
  160. },
  161. {
  162. name: "我的收藏",
  163. content:
  164. "https://openapi.zhiying.com/api.goods/gets/get-collection-list",
  165. operation: "操作",
  166. },
  167. {
  168. name: "我的收藏",
  169. content:
  170. "https://openapi.zhiying.com/api.goods/gets/get-collection-list",
  171. operation: "操作",
  172. },
  173. ],
  174. };
  175. },
  176. methods:{
  177. onClose: function(){
  178. this.isApiAdd = false
  179. }
  180. }
  181. };
  182. </script>
  183. <style lang="scss" scoped>
  184. .app-detail {
  185. background: #fff;
  186. padding: 0 20px 70px;
  187. border-radius: 12px;
  188. .detail-title {
  189. height: 63px;
  190. line-height: 63px;
  191. font-size: 20px;
  192. span {
  193. padding-left: 12px;
  194. height: 20px;
  195. line-height: 20px;
  196. border-left: 4px solid #1890ff;
  197. }
  198. }
  199. .detail-title2 {
  200. height: 42px;
  201. padding-left: 12px;
  202. border-left: 4px solid #1890ff;
  203. display: flex;
  204. align-items: center;
  205. .title-btn {
  206. padding: 5px 15px;
  207. font-size: 16px;
  208. color: #fff;
  209. margin-left: auto;
  210. background: #1890ff;
  211. border-radius: 6px;
  212. cursor: pointer;
  213. }
  214. }
  215. .detail-header-box {
  216. width: 100%;
  217. height: 297px;
  218. background: #ffffff;
  219. border-radius: 14px;
  220. border: 1px solid #dddddd;
  221. padding: 0 20px 26px;
  222. box-sizing: border-box;
  223. .detail-header-item {
  224. padding: 20px 0px 30px;
  225. height: 141px;
  226. box-sizing: border-box;
  227. border-bottom: solid 1px #e1e1e1;
  228. display: flex;
  229. .item1 {
  230. width: 90px;
  231. height: 90px;
  232. background: #2f89fc;
  233. border-radius: 14px;
  234. text-align: center;
  235. color: #fff;
  236. line-height: 90px;
  237. font-size: 32px;
  238. margin-right: 12px;
  239. }
  240. .item2 {
  241. display: flex;
  242. flex-flow: column;
  243. .div1 {
  244. color: #333333;
  245. font-size: 24px;
  246. }
  247. .div2 {
  248. color: #999999;
  249. font-size: 14px;
  250. }
  251. .div3 {
  252. margin-top: auto;
  253. span {
  254. font-size: 12px;
  255. margin-right: 10px;
  256. padding: 5px 10px;
  257. display: inline-block;
  258. border-radius: 6px;
  259. }
  260. }
  261. }
  262. .item3 {
  263. margin-left: auto;
  264. display: flex;
  265. align-items: center;
  266. justify-content: center;
  267. div {
  268. width: 96px;
  269. height: 40px;
  270. background: #1890ff;
  271. border-radius: 6px;
  272. color: #fff;
  273. font-size: 16px;
  274. text-align: center;
  275. line-height: 40px;
  276. cursor: pointer;
  277. }
  278. }
  279. }
  280. .detail-buttom-box {
  281. display: flex;
  282. padding: 20px 20px 0px;
  283. box-sizing: border-box;
  284. .button-box {
  285. display: flex;
  286. flex-flow: column;
  287. .button-item1 {
  288. display: flex;
  289. align-items: center;
  290. .span1 {
  291. text-align: right;
  292. color: #5f6279;
  293. font-size: 14px;
  294. width: 100px;
  295. }
  296. .span2 {
  297. text-align: left;
  298. margin-right: 10px;
  299. color: #999999;
  300. font-size: 14px;
  301. }
  302. .span3 {
  303. padding: 5px 10px;
  304. color: #2f89fc;
  305. font-size: 12px;
  306. background: #deedff;
  307. line-height: 12px;
  308. border-radius: 6px;
  309. cursor: pointer;
  310. }
  311. .span4 {
  312. color: #1890ff;
  313. font-size: 14px;
  314. }
  315. }
  316. }
  317. }
  318. }
  319. .banner-text {
  320. display: flex;
  321. height: 56px;
  322. box-sizing: border-box;
  323. border-radius: 14px;
  324. border: 1px solid #feeebb;
  325. background: #fffcec;
  326. color: #6a3904;
  327. padding: 16px 20px;
  328. font-size: 14px;
  329. margin: 20px 0;
  330. }
  331. .detail-border {
  332. width: 100%;
  333. line-height: 57px;
  334. height: 57px;
  335. background: #ffffff;
  336. border-radius: 14px;
  337. border: 1px solid #dddddd;
  338. margin-top: 20px;
  339. padding: 0 20px;
  340. box-sizing: border-box;
  341. span {
  342. margin-right: 60px;
  343. color: #1890ff;
  344. font-size: 14px;
  345. cursor: pointer;
  346. }
  347. }
  348. .myApi-box {
  349. background: #ffffff;
  350. border-radius: 14px;
  351. border: 1px solid #dddddd;
  352. padding: 20px;
  353. margin-top: 20px;
  354. .scope-name-box {
  355. display: flex;
  356. justify-content: center;
  357. align-items: center;
  358. width: 100%;
  359. font-size: 14px;
  360. color: #999999;
  361. .scope-name {
  362. width: 40px;
  363. height: 40px;
  364. background: linear-gradient(180deg, #ffc298 0%, #ff4747 100%);
  365. border-radius: 6px;
  366. margin-right: 10px;
  367. }
  368. }
  369. .scope-box {
  370. display: flex;
  371. width: 100%;
  372. justify-content: center;
  373. color: #1890ff;
  374. div {
  375. cursor: pointer;
  376. }
  377. }
  378. }
  379. .recommend-box {
  380. display: flex;
  381. flex-flow: wrap;
  382. width: 100%;
  383. justify-content: space-between; /* 横向中间自动空间 */
  384. .recommend-item {
  385. width: 215px;
  386. height: 264px;
  387. background: #ffffff;
  388. border-radius: 14px;
  389. border: 1px solid #dddddd;
  390. box-sizing: border-box;
  391. margin-bottom: 20px;
  392. display: flex;
  393. flex-flow: column;
  394. align-items: center;
  395. .item-1 {
  396. width: 90px;
  397. height: 90px;
  398. background: linear-gradient(180deg, #ffc298 0%, #ff4747 100%);
  399. border-radius: 14px;
  400. margin: 30px 0 20px;
  401. }
  402. .item-2 {
  403. color: #333333;
  404. font-size: 16px;
  405. }
  406. .item-3 {
  407. color: #999999;
  408. font-size: 12px;
  409. margin: 5px 20px;
  410. line-height: 12px;
  411. }
  412. .item-4 {
  413. width: 122px;
  414. height: 31px;
  415. border-radius: 8px;
  416. border: 1px solid #1890ff;
  417. color: #1890ff;
  418. font-size: 14px;
  419. line-height: 31px;
  420. text-align: center;
  421. margin-top: 15px;
  422. cursor: pointer;
  423. }
  424. }
  425. }
  426. }
  427. </style>