接口列表
parent
57470589d6
commit
6db0f6c962
|
@ -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'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue