|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542 |
- <template>
- <div class="api-box">
- <div class="apiBox-head">
- <div class="api-title">API市场</div>
- <div class="seek-input">
- <el-input placeholder="搜索接口连接/方法名/接口中文名" v-model="input2">
- </el-input>
- <span class="seek-slod">搜索</span>
- </div>
- </div>
-
- <div class="api-boxs">
- <div class="box-head-title">
- <ul class="ul-list">
- <li :class="{ itemColor: isList === '1' }" @click="isList = '1'">
- 全部
- </li>
- <li :class="{ itemColor: isList === '2' }" @click="isList = '2'">
- 节日活动类
- </li>
- <li :class="{ itemColor: isList === '3' }" @click="isList = '3'">
- 工具类
- </li>
- <li :class="{ itemColor: isList === '4' }" @click="isList = '4'">
- 特色版块类
- </li>
- <li :class="{ itemColor: isList === '5' }" @click="isList = '5'">
- 数据搜索类
- </li>
- <li :class="{ itemColor: isList === '6' }" @click="isList = '6'">
- 入库类
- </li>
- <li :class="{ itemColor: isList === '7' }" @click="isList = '7'">
- 开源类
- </li>
- </ul>
- <div class="btn-test" @click="onSkip('/domain/debugApi')">接口测试</div>
- </div>
-
- <div>
- <div v-for="(item, index) in apiData" :key="index">
- <div class="for-title">{{ item.title }}</div>
- <div class="data-box">
- <div
- class="data-item"
- v-for="(data, i) in item.data"
- :key="i"
- :class="{ backColor: data.state }"
- >
- <div v-if="data.hot" class="new-content">
- <img class="huo-png" src="@/static/img/huo.png" alt="" />
- <span>HOT</span>
- </div>
-
- <div v-if="data.new" class="new-content">
- <span>NEW</span>
- </div>
-
- <img :src="data.img" alt="" />
- <div class="data-box">
- <div class="data-1">{{ data.title }}</div>
- <div class="data-2">{{ data.content }}</div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </template>
-
- <script>
- export default {
- data() {
- return {
- input2: "",
- isList: "1",
- apiData: [
- {
- title: "节日活动类",
- data: [
- {
- type: 1,
- title: "京东商品转链",
- content: "京东商品转链返回京东推广短链接",
- state: true,
- new: true,
- img: require("@/static/img/beiyong1.png"),
- },
- ],
- },
- {
- title: "工具类",
- data: [
- {
- type: 1,
- title: "京东商品转链",
- content: "京东商品转链返回京东推广短链接",
-
- new: false,
- hot: true,
- img: require("@/static/img/beiyong1.png"),
- },
- {
- type: 1,
- title: "京东商品转链",
- content: "京东商品转链返回京东推广短链接",
-
- new: false,
- hot: true,
-
- img: require("@/static/img/beiyong2.png"),
- },
- {
- type: 1,
- title: "京东商品转链",
- content: "京东商品转链返回京东推广短链接",
-
- new: false,
- hot: false,
- img: require("@/static/img/beiyong3.png"),
- },
- {
- type: 1,
- title: "京东商品转链",
- content: "京东商品转链返回京东推广短链接",
-
- new: false,
- hot: true,
- img: require("@/static/img/beiyong4.png"),
- },
- {
- type: 1,
- title: "京东商品转链",
- content: "京东商品转链返回京东推广短链接",
-
- hot: true,
-
- img: require("@/static/img/beiyong1.png"),
- },
- {
- type: 1,
- title: "京东商品转链",
- content: "京东商品转链返回京东推广短链接",
-
- hot: true,
-
- img: require("@/static/img/beiyong2.png"),
- },
- {
- type: 1,
- title: "京东商品转链",
- content: "京东商品转链返回京东推广短链接",
-
- img: require("@/static/img/beiyong3.png"),
- },
- {
- type: 1,
- title: "京东商品转链",
- content: "京东商品转链返回京东推广短链接",
-
- img: require("@/static/img/beiyong4.png"),
- },
- {
- type: 1,
- title: "京东商品转链",
- content: "京东商品转链返回京东推广短链接",
-
- img: require("@/static/img/beiyong1.png"),
- },
- {
- type: 1,
- title: "京东商品转链",
- content: "京东商品转链返回京东推广短链接",
-
- img: require("@/static/img/beiyong2.png"),
- },
- {
- type: 1,
- title: "京东商品转链",
- content: "京东商品转链返回京东推广短链接",
-
- hot: true,
-
- img: require("@/static/img/beiyong3.png"),
- },
- {
- type: 1,
- title: "京东商品转链",
- content: "京东商品转链返回京东推广短链接",
-
- img: require("@/static/img/beiyong4.png"),
- },
- {
- type: 1,
- title: "京东商品转链",
- content: "京东商品转链返回京东推广短链接",
-
- new: true,
- img: require("@/static/img/beiyong1.png"),
- },
- {
- type: 1,
- title: "京东商品转链",
- content: "京东商品转链返回京东推广短链接",
-
- hot: true,
-
- img: require("@/static/img/beiyong2.png"),
- },
- {
- type: 1,
- title: "京东商品转链",
- content: "京东商品转链返回京东推广短链接",
-
- img: require("@/static/img/beiyong3.png"),
- },
- {
- type: 1,
- title: "京东商品转链",
- content: "京东商品转链返回京东推广短链接",
-
- img: require("@/static/img/beiyong4.png"),
- },
- ],
- },
- {
- title: "特色版块类",
- data: [
- {
- type: 1,
- title: "京东商品转链",
- content: "京东商品转链返回京东推广短链接",
-
- hot: true,
-
- img: require("@/static/img/beiyong1.png"),
- },
- {
- type: 1,
- title: "京东商品转链",
- content: "京东商品转链返回京东推广短链接",
-
- new: true,
- img: require("@/static/img/beiyong2.png"),
- },
- {
- type: 1,
- title: "京东商品转链",
- content: "京东商品转链返回京东推广短链接",
-
- new: true,
- img: require("@/static/img/beiyong3.png"),
- },
- {
- type: 1,
- title: "京东商品转链",
- content: "京东商品转链返回京东推广短链接",
-
- hot: true,
-
- img: require("@/static/img/beiyong4.png"),
- },
- {
- type: 1,
- title: "京东商品转链",
- content: "京东商品转链返回京东推广短链接",
-
- img: require("@/static/img/beiyong1.png"),
- },
- {
- type: 1,
- title: "京东商品转链",
- content: "京东商品转链返回京东推广短链接",
-
- img: require("@/static/img/beiyong2.png"),
- },
- {
- type: 1,
- title: "京东商品转链",
- content: "京东商品转链返回京东推广短链接",
-
- img: require("@/static/img/beiyong3.png"),
- },
- {
- type: 1,
- title: "京东商品转链",
- content: "京东商品转链返回京东推广短链接",
-
- hot: true,
-
- img: require("@/static/img/beiyong4.png"),
- },
- {
- type: 1,
- title: "京东商品转链",
- content: "京东商品转链返回京东推广短链接",
-
- img: require("@/static/img/beiyong1.png"),
- },
- {
- type: 1,
- title: "京东商品转链",
- content: "京东商品转链返回京东推广短链接",
-
- new: true,
- img: require("@/static/img/beiyong2.png"),
- },
- {
- type: 1,
- title: "京东商品转链",
- content: "京东商品转链返回京东推广短链接",
-
- img: require("@/static/img/beiyong3.png"),
- },
- {
- type: 1,
- title: "京东商品转链",
- content: "京东商品转链返回京东推广短链接",
-
- hot: true,
-
- img: require("@/static/img/beiyong4.png"),
- },
- {
- type: 1,
- title: "京东商品转链",
- content: "京东商品转链返回京东推广短链接",
-
- img: require("@/static/img/beiyong1.png"),
- },
- {
- type: 1,
- title: "京东商品转链",
- content: "京东商品转链返回京东推广短链接",
-
- img: require("@/static/img/beiyong2.png"),
- },
- {
- type: 1,
- title: "京东商品转链",
- content: "京东商品转链返回京东推广短链接",
-
- img: require("@/static/img/beiyong3.png"),
- },
- {
- type: 1,
- title: "京东商品转链",
- content: "京东商品转链返回京东推广短链接",
-
- hot: true,
-
- img: require("@/static/img/beiyong4.png"),
- },
- ],
- },
- ],
- };
- },
- methods:{
- onSkip: function(path){
- this.$router.push(path)
- }
- }
- };
- </script>
-
-
- <style lang="scss" scoped>
- .api-box {
- width: 1200px;
- border-radius: 14px;
- overflow: hidden;
- background: #fff;
-
- .apiBox-head {
- height: 184px;
- width: 100%;
- background: url("../../static/img/index-bar.png");
- background-size: 100% 100%;
- background-repeat: no-repeat;
- display: flex;
- align-items: center;
- flex-direction: column;
-
- .api-title {
- color: #fff;
- font-weight: bold;
- font-size: 40px;
- margin-top: 40px;
- }
- .seek-input {
- width: 350px;
- height: 34px;
- display: flex;
- background: #fff;
- border-radius: 17px;
- margin-top: 18px;
- overflow: hidden;
- .seek-slod {
- background: #1890ff;
- color: #fff;
- width: 70px;
- height: 34px;
- text-align: center;
- line-height: 34px;
- border-radius: 17px;
- padding: 0;
- margin: 0;
- cursor: pointer;
- }
- }
- }
- .api-boxs {
- min-height: 777px;
- width: 100%;
- padding: 0 20px;
- box-sizing: border-box;
-
- .box-head-title {
- width: 100%;
- display: flex;
- height: 80px;
- .ul-list {
- list-style: none;
- display: flex;
- margin: 0;
- padding: 23px 0 0px 0;
- color: #333333;
- font-size: 16px;
- height: 16px;
- line-height: 16px;
- margin-right: auto;
- li {
- margin-right: 40px;
- height: 16px;
- padding-bottom: 8px;
- cursor: pointer;
- border-bottom: 4px solid transparent;
- transition: border-color 0.3s;
- }
- .itemColor {
- border-bottom: 4px solid #2f89fc;
- transition: border-color 0.3s;
- }
- }
- .btn-test {
- width: 104px;
- height: 33px;
- background: linear-gradient(180deg, #1890ff 0%, #2f89fc 100%);
- box-shadow: 0px 2px 10px 0px rgba(24, 144, 255, 0.2);
- border-radius: 17px;
- line-height: 33px;
- font-size: 16px;
- color: #ffffff;
- text-align: center;
- margin: 20px 0 0 0;
- cursor: pointer;
- }
- }
- }
- }
-
- .for-title {
- margin: 0px 0 30px;
- padding-left: 12px;
- border-left: 4px solid #1890ff;
- font-size: 20px;
- line-height: 20px;
- height: 20px;
- }
-
- .data-box {
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
- width: 100%;
- }
-
- .data-item {
- flex-shrink: 0;
- width: 275px;
- height: 90px;
- background: #ffffff;
- border-radius: 14px;
- border: 1px solid #eeeeee;
- margin-bottom: 20px;
- padding: 20px 15px;
- box-sizing: border-box;
- display: flex;
- cursor: pointer;
- position: relative;
- .data-box {
- display: flex;
- flex-direction: column;
- margin-left: 15px;
- padding: 4px 0;
- .data-1 {
- color: #333333;
- font-size: 16px;
- }
- .data-2 {
- color: #999999;
- font-size: 12px;
- margin-top: auto;
- }
- }
- .new-content {
- width: 65px;
- height: 20px;
- background: #ff4242;
- border-radius: 0px 14px 0px 14px;
- position: absolute;
- right: 0;
- top: 0;
- z-index: 9;
- color: #fff;
- text-align: center;
- line-height: 18px;
- font-size: 12px;
- span {
- margin-left: 0px;
- }
- .huo-png {
- vertical-align: 0px;
- }
- }
- }
-
- .backColor {
- background: #2f89fc;
- box-shadow: 0px 3px 10px 0px rgba(24, 144, 255, 0.3);
- .data-box {
- .data-1 {
- color: #fff;
- }
- .data-2 {
- color: #97c4fd;
- }
- }
- }
- </style>
|