接口列表

master
chaiyapeng 2024-08-27 19:27:51 +08:00
parent 1d5e6f8fd8
commit f5ebb0104d
1 changed files with 25 additions and 13 deletions

View File

@ -1,16 +1,18 @@
<template> <template>
<div> <div>
<el-row> <el-row :gutter="50">
<el-col :span="8" v-for="(o, index) in 2" :key="o" :offset="index > 0 ? 2 : 0"> <el-col :span="7" v-for="connector in connectorList" v-if="connectorList.length !== 0">
<el-card :body-style="{ padding: '0px' }"> <el-card class="box-card" style="margin-top: 15px;width: 500px; height: 700px;" shadow="hover">
<img src="https://shadow.elemecdn.com/app/element/hamburger.9cf7b091-55e9-11e9-a976-7f4d0b07eef6.png" class="image"> <div slot="header" class="clearfix">
<div style="padding: 14px;"> <h1 style="font-weight: bold">{{connector.connectorName}}</h1>
<span>好吃的汉堡</span> <el-button type="primary" style="float: right; padding: 10px 10px" @click="buyPhone(index)"></el-button>
<div class="bottom clearfix">
<time class="time">{{ currentDate }}</time>
<el-button type="text" class="button">操作按钮</el-button>
</div>
</div> </div>
<span style="font-weight: bold;font-size: 20px">产品图片:</span><br>
<el-image style="width: 300px; height: 300px" :src="connector.connectorPicture" :fit="fit"></el-image><br>
<span style="font-weight: bold;font-size: 20px">产品介绍</span>
{{connector.connectorDescribe}}<br>
<span style="font-weight: bold;font-size: 20px">价格</span>
{{connector.connectorPrice}}
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
@ -21,6 +23,7 @@
//jsjsjson, //jsjsjson,
//import from ', //import from ',
import {findConnectorList} from "@/api/port/port"; import {findConnectorList} from "@/api/port/port";
import index from "vuex";
export default { export default {
//import使" //import使"
components: {}, components: {},
@ -29,24 +32,33 @@ export default {
//" //"
return { return {
ConnectorList:[], connectorList:[],
form:{}, form:{},
}; };
}, },
// data", // data",
computed: {}, computed: {
index() {
return index
},
node() {
return node
}
},
//data", //data",
watch: {}, watch: {},
//", //",
methods: { methods: {
findConnectorList(){ findConnectorList(){
findConnectorList(this.form).then((res)=>{ findConnectorList(this.form).then((res)=>{
this.ConnectorList=res.data; this.connectorList=res.data;
console.log(res.data);
}) })
} }
}, },
// - 访this", // - 访this",
created() { created() {
this.findConnectorList();
}, },
// - 访DOM", // - 访DOM",
mounted() { mounted() {