后台接口及企业管理完善
parent
9a87b64c6b
commit
f427e262ce
|
@ -38,3 +38,6 @@ export function sendrequest1(options){
|
|||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -6,3 +6,11 @@ export function companyauthentication(data){
|
|||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function ifcompanyauthentication(data){
|
||||
return request({
|
||||
url:"/market/company/ifcompanyauthentication",
|
||||
method: "POST",
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
|
|
@ -15,5 +15,15 @@ export function selectTypeList(data){
|
|||
method: "POST",
|
||||
data: data
|
||||
})
|
||||
|
||||
|
||||
}export function selectproductspecification(data){
|
||||
return request({
|
||||
url:"/market/product/specification",
|
||||
method: "POST",
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<template>
|
||||
<div>
|
||||
{{myapi}}
|
||||
<el-row>
|
||||
<el-col :span="24"><div class="grid-content bg-purple-dark">
|
||||
<el-form ref="form" :model="myapi" label-width="120px" :rules="rules">
|
||||
|
@ -19,7 +20,7 @@
|
|||
<el-row>
|
||||
<el-col :span="24"><div class="grid-content bg-purple-dark">
|
||||
<el-button type="info" @click="test(myapi)">测试</el-button>
|
||||
<el-button type="primary">立即申请</el-button>
|
||||
<el-button type="primary" @click="apply(myapi)">立即申请</el-button>
|
||||
</div></el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
@ -37,7 +38,7 @@
|
|||
{{myapi.apiAddress}}
|
||||
</el-form-item>
|
||||
<el-form-item label="返回格式:">
|
||||
{{myapi.returnFormat}}元/次
|
||||
{{myapi.returnFormat}}
|
||||
</el-form-item>
|
||||
<el-form-item label="请求方式:">
|
||||
{{myapi.requestMethod}}
|
||||
|
@ -116,6 +117,69 @@
|
|||
<el-button @click="dialogVisible = false">返回</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<!--支付规格选择对话框-->
|
||||
<el-dialog
|
||||
title="提示"
|
||||
:visible.sync="dialogVisible1"
|
||||
width="50%"
|
||||
:before-close="handleClose1">
|
||||
<el-form ref="form" :model="myapi" label-width="120px" :rules="rules">
|
||||
<el-form-item label="产品名称:" >
|
||||
{{myapi.productName}}
|
||||
</el-form-item>
|
||||
<el-form-item label="产品价格:">
|
||||
{{myapi.productPrice}}元/次
|
||||
</el-form-item>
|
||||
<el-form-item label="产品介绍:">
|
||||
{{myapi.productContent}}
|
||||
</el-form-item>
|
||||
<el-form-item label="重要路由:">
|
||||
{{myapi.apiRouter}}
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-divider></el-divider>
|
||||
<span style="color: #1ab394">请选择申请规格</span>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
label="支付规格"
|
||||
width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-popover trigger="hover" placement="top">
|
||||
<div slot="reference" class="name-wrapper">
|
||||
<el-tag size="medium">{{ scope.row.productSpecificationName }}</el-tag>
|
||||
</div>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="价格"
|
||||
width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-popover trigger="hover" placement="top">
|
||||
<div slot="reference" class="name-wrapper">
|
||||
<el-tag size="medium">{{ scope.row.middlePrice }}</el-tag>
|
||||
</div>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
@click="handleEdit(scope.row)">选择</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible1 = false">取 消</el-button>
|
||||
<el-button type="primary" @click="dialogVisible1 = false">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -123,6 +187,9 @@
|
|||
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等),
|
||||
//例如:import 《组件名称》 from '《组件路径》,
|
||||
import {sendrequest, sendrequest1} from "@/api/apitest/apitest";
|
||||
import api from "js-cookie";
|
||||
import {companyauthentication, ifcompanyauthentication} from "@/api/authentication/authentication";
|
||||
import {selectproductspecification} from "@/api/market/product";
|
||||
|
||||
export default {
|
||||
name: "Apitest",
|
||||
|
@ -140,7 +207,9 @@ export default {
|
|||
},
|
||||
activeName: 'first',
|
||||
dialogVisible: false,
|
||||
ruleForm:{}
|
||||
dialogVisible1: false,
|
||||
ruleForm:{},
|
||||
tableData:[]
|
||||
};
|
||||
},
|
||||
//计算属性 类似于data概念",
|
||||
|
@ -149,6 +218,7 @@ export default {
|
|||
watch: {},
|
||||
//方法集合",
|
||||
methods: {
|
||||
api,
|
||||
//标签页
|
||||
handleClick(tab, event) {
|
||||
console.log(tab, event);
|
||||
|
@ -163,6 +233,20 @@ export default {
|
|||
apiRouter: myapi.apiRouter
|
||||
}
|
||||
},
|
||||
//立即申请
|
||||
apply(myapi){
|
||||
//先判断是否已经进行了认证
|
||||
ifcompanyauthentication().then(response=>{
|
||||
if (response.code!=200){
|
||||
alert(response.msg)
|
||||
}else {
|
||||
alert(JSON.stringify(myapi))
|
||||
this.getproductspecification(myapi)
|
||||
this.dialogVisible1=true
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
//关闭测试对话框
|
||||
handleClose(done) {
|
||||
this.$confirm('确认关闭?')
|
||||
|
@ -171,6 +255,20 @@ export default {
|
|||
})
|
||||
.catch(_ => {});
|
||||
},
|
||||
//关闭支付规格选择对话框
|
||||
handleClose1(done) {
|
||||
this.$confirm('确认关闭?')
|
||||
.then(_ => {
|
||||
done();
|
||||
})
|
||||
.catch(_ => {});
|
||||
},
|
||||
//产品规格
|
||||
getproductspecification(specification){
|
||||
selectproductspecification(specification).then(response=>{
|
||||
this.tableData=response.data
|
||||
})
|
||||
},
|
||||
//测试发送请求 单个参数
|
||||
submitForm(ruleForm){
|
||||
sendrequest(ruleForm).then(response=>{
|
||||
|
|
Loading…
Reference in New Issue