接口列表

master
chaiyapeng 2024-08-27 20:41:34 +08:00
parent 57470589d6
commit 6db0f6c962
2 changed files with 41 additions and 11 deletions

View File

@ -1,12 +1,5 @@
import request from '@/utils/request' import request from '@/utils/request'
export function getPhonePlace(tel) {
return request({
url: '/mart/list/getPhonePlace?tel='+tel,
method: 'get'
})
}
export function findConnectorList(data) { export function findConnectorList(data) {
return request({ return request({
url: '/mart/connector/findConnectorList', url: '/mart/connector/findConnectorList',
@ -36,5 +29,11 @@ export function updateConnector(data) {
method: 'post', method: 'post',
data:data data:data
}) })
} };
export function phonePlace(tel) {
return request({
url: '/port/list/phonePlace?tel='+tel,
method: 'get'
})
}

View File

@ -2,20 +2,38 @@
<div> <div>
<el-row :gutter="50"> <el-row :gutter="50">
<el-col :span="7" v-for="connector in connectorList" v-if="connectorList.length !== 0"> <el-col :span="7" v-for="connector in connectorList" v-if="connectorList.length !== 0">
<el-card class="box-card" style="margin-top: 15px;width: 500px; height: 700px;" shadow="hover"> <el-card class="box-card" style="margin-top: 15px;width: 500px; height: 600px;" shadow="hover">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<h1 style="font-weight: bold">{{connector.connectorName}}</h1> <h1 style="font-weight: bold">{{connector.connectorName}}</h1>
<el-button type="primary" style="float: right; padding: 10px 10px" @click="buyPhone(index)"></el-button> <el-button type="primary" style="float: right; padding: 10px 10px" @click="buyPhone(connector)"></el-button>
</div> </div>
<span style="font-weight: bold;font-size: 20px">产品图片:</span><br> <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> <el-image style="width: 300px; height: 300px" :src="connector.connectorPicture" :fit="fit"></el-image><br>
<span style="font-weight: bold;font-size: 20px">产品介绍</span> <span style="font-weight: bold;font-size: 20px">产品介绍</span>
{{connector.connectorDescribe}}<br> {{connector.connectorDescribe}}<br>
<span style="font-weight: bold;font-size: 20px">价格</span> <span style="font-weight: bold;font-size: 20px">价格</span>
{{connector.connectorPrice}} {{connector.connectorPrice}}/<br>
<el-button type="primary" style="float: right; padding: 10px 10px" @click="dialogFormVisible=true" v-if="connector.connectorName=='手机号查询归属地'"></el-button>
<el-button type="primary" style="float: right; padding: 10px 10px" @click="buyIP(connector)" v-if="connector.connectorName=='IP查询归属地'"></el-button>
<el-button type="primary" style="float: right; padding: 10px 10px" @click="buyNews(connector)" v-if="connector.connectorName=='新闻头条'"></el-button>
<el-button type="primary" style="float: right; padding: 10px 10px" @click="buyWeather(connector)" v-if="connector.connectorName=='气象预警'"></el-button>
<el-button type="primary" style="float: right; padding: 10px 10px" @click="buyBirthdate(connector)" v-if="connector.connectorName=='生辰助手'"></el-button>
<el-button type="primary" style="float: right; padding: 10px 10px" @click="buyMailbox(connector)" v-if="connector.connectorName=='邮编查询'"></el-button>
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
<el-dialog title="手机查询归属地" :visible.sync="dialogFormVisible">
<el-form :model="formInline">
<el-form-item label="手机号" :label-width="formLabelWidth">
<el-input v-model="formInline.tel" autocomplete="off"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="buyPhone(tel)"></el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
@ -24,6 +42,7 @@
//import from ', //import from ',
import {findConnectorList} from "@/api/port/port"; import {findConnectorList} from "@/api/port/port";
import index from "vuex"; import index from "vuex";
import {phonePlace} from "@/api/port/port";
export default { export default {
//import使" //import使"
components: {}, components: {},
@ -34,6 +53,8 @@ export default {
return { return {
connectorList:[], connectorList:[],
form:{}, form:{},
formInline:{},
dialogFormVisible:false,
}; };
}, },
// data", // data",
@ -49,6 +70,16 @@ export default {
watch: {}, watch: {},
//", //",
methods: { methods: {
buyPhone(tel){
getPhonePlace(tel).then((res)=>{
console.log(111);
console.log(res.data);
alert(res.msg);
if (200==res.code){
}
})
},
findConnectorList(){ findConnectorList(){
findConnectorList(this.form).then((res)=>{ findConnectorList(this.form).then((res)=>{
this.connectorList=res.data; this.connectorList=res.data;