企业管理完善新增
parent
d0a13cc604
commit
0ba53a33eb
|
@ -13,7 +13,7 @@ export function apitest(email){
|
|||
|
||||
export function reducetestcount(data){
|
||||
return request({
|
||||
url:"/market/product/reducetestcount",
|
||||
url:"/market/producttest/reducetestcount",
|
||||
method: "POST",
|
||||
data: data
|
||||
})
|
||||
|
@ -27,6 +27,14 @@ export function iftest(data){
|
|||
})
|
||||
}
|
||||
|
||||
export function findcount(data){
|
||||
return request({
|
||||
url:"/market/producttest/findcount",
|
||||
method: "POST",
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
export function sendrequest(options){
|
||||
|
|
|
@ -7,3 +7,12 @@ export function gethostportList(){
|
|||
method: "GET",
|
||||
})
|
||||
}
|
||||
|
||||
export function getcompany(){
|
||||
return request({
|
||||
url:"/market/company/selectcompany",
|
||||
method: "POST",
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -148,7 +148,31 @@ export const constantRoutes = [
|
|||
path: 'index',
|
||||
name: 'apiupdmessage',
|
||||
component: () => import('@/views/background/apiupdmessage/index.vue'),
|
||||
meta: { title: '接口列表', icon: 'form' }
|
||||
meta: { title: '接口信息修改页面', icon: 'form' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/product',
|
||||
component: Layout,
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
name: 'product',
|
||||
component: () => import('@/views/market/product/index.vue'),
|
||||
meta: { title: '数据块', icon: 'form' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/Workbench',
|
||||
component: Layout,
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
name: 'Workbench',
|
||||
component: () => import('@/views/market/workbench/index.vue'),
|
||||
meta: { title: '信息', icon: 'form' }
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
@ -198,7 +198,7 @@
|
|||
<script>
|
||||
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等),
|
||||
//例如:import 《组件名称》 from '《组件路径》,
|
||||
import {iftest, reducetestcount, sendrequest, sendrequest1} from "@/api/apitest/apitest";
|
||||
import {findcount, iftest, reducetestcount, sendrequest, sendrequest1} from "@/api/apitest/apitest";
|
||||
import api from "js-cookie";
|
||||
import {companyauthentication, ifcompanyauthentication} from "@/api/authentication/authentication";
|
||||
import {selectproductspecification} from "@/api/market/product";
|
||||
|
@ -231,7 +231,6 @@ export default {
|
|||
watch: {},
|
||||
//方法集合",
|
||||
methods: {
|
||||
api,
|
||||
//标签页
|
||||
handleClick(tab, event) {
|
||||
console.log(tab, event);
|
||||
|
@ -239,9 +238,10 @@ export default {
|
|||
//测试
|
||||
test(myapi){
|
||||
//判断测试次数是否<=0
|
||||
iftest(myapi).then(response=>{
|
||||
if (response.data=='' || response.data<=0){
|
||||
alert("使用次数已到期")
|
||||
findcount(myapi).then(response=>{
|
||||
alert(response.data.testCount)
|
||||
if (response.data.testCount<=0){
|
||||
alert("使用次数已到期,若像继续使用请先充值!")
|
||||
}else{
|
||||
this.dialogVisible=true
|
||||
this.ruleForm={
|
||||
|
@ -379,6 +379,8 @@ export default {
|
|||
//测试次数-1
|
||||
reducetestcount(this.myapi).then(response=>{
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
//生命周期 - 创建完成(可以访问当前this实例)",
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
<el-row :gutter="20">
|
||||
<el-col :span="16">
|
||||
<div class="grid-content bg-purple" style="border: 2px solid #ebeef5;">
|
||||
<span>HI,上海八维宏烨集团<br>
|
||||
<span>HI,{{companymessage.companyName}}<br>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6"><div class="grid-content bg-purple">地区:上海市 上海市</div></el-col>
|
||||
<el-col :span="6"><div class="grid-content bg-purple">IP:114.85.72.211</div></el-col>
|
||||
<el-col :span="6"><div class="grid-content bg-purple">时间:2021年-1月-12日</div></el-col>
|
||||
<el-col :span="6"><div class="grid-content bg-purple">地址:{{companymessage.companyAddress}}</div></el-col>
|
||||
<el-col :span="6"><div class="grid-content bg-purple">企业法人:{{companymessage.companyLeader}}</div></el-col>
|
||||
<el-col :span="6"><div class="grid-content bg-purple">时间:{{companymessage.registrantDate}}</div></el-col>
|
||||
<el-col :span="6"><div class="grid-content bg-purple">
|
||||
<el-row>
|
||||
<el-col :span="12"><div class="grid-content bg-purple"><el-button type="primary">登录日志</el-button></div></el-col>
|
||||
|
@ -21,8 +21,8 @@
|
|||
<div class="grid-content bg-purple" style="border: 1px solid #ebeef5;">
|
||||
<span>账户余额:<br>
|
||||
<el-row>
|
||||
<el-col :span="12"><div class="grid-content bg-purple">¥8544344.00</div></el-col>
|
||||
<el-col :span="12"><div class="grid-content bg-purple-light"><el-button type="primary">充值</el-button></div></el-col>
|
||||
<el-col :span="12"><div class="grid-content bg-purple">¥{{companymessage.companyMoney}}</div></el-col>
|
||||
<el-col :span="12"><div class="grid-content bg-purple-light"><el-button type="primary" @click="addmoney()">充值</el-button></div></el-col>
|
||||
</el-row>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -33,7 +33,7 @@
|
|||
<div class="grid-content bg-purple-dark" style="border: 2px solid #ebeef5;">
|
||||
<el-row>
|
||||
<el-col :span="20"><div class="grid-content bg-purple"><span>热点接口</span></div></el-col>
|
||||
<el-col :span="4"><div class="grid-content bg-purple-light"><el-button type="primary">申请新的接口</el-button></div></el-col>
|
||||
<el-col :span="4"><div class="grid-content bg-purple-light"><el-button type="primary" @click="otherapi">申请其他接口</el-button></div></el-col>
|
||||
</el-row><br>
|
||||
<el-row>
|
||||
<el-col :span="24"><div class="grid-content bg-purple-dark flex-container">
|
||||
|
@ -41,7 +41,7 @@
|
|||
<el-form ref="form" :model="form" label-width="80px">
|
||||
<el-form-item >
|
||||
<span>{{form.productName}}</span>
|
||||
<el-button @click="tovalidation()">查看</el-button>
|
||||
<el-button @click="tovalidation(form)">查看</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
@ -103,6 +103,41 @@
|
|||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<!--充值页面-->
|
||||
<el-dialog
|
||||
title="充值"
|
||||
:visible.sync="dialogVisible2"
|
||||
width="30%"
|
||||
:before-close="handleClose2"
|
||||
:close-on-click-modal="false">
|
||||
<h2 style="color: #1ab394">请选择充值金额</h2>
|
||||
<el-divider></el-divider>
|
||||
<el-form :model="moneyForm" status-icon :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
|
||||
<el-form-item label="请选择">
|
||||
<el-radio-group v-model="moneyForm.resource">
|
||||
<el-radio label="5"></el-radio>
|
||||
<el-radio label="20"></el-radio>
|
||||
<el-radio label="50"></el-radio>
|
||||
<el-radio label="100"></el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="自定义充值" prop="pass" style="width: 50%">
|
||||
<el-input type="text" v-model="moneyForm.pass" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-divider></el-divider>
|
||||
<el-form-item label="选择支付方式">
|
||||
<el-radio-group v-model="moneyForm.resource">
|
||||
<el-radio label="1">支付宝</el-radio>
|
||||
<el-radio label="2">微信</el-radio>
|
||||
<el-radio label="3">银行卡</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="insertmoney()">充值</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -111,7 +146,8 @@
|
|||
//例如:import 《组件名称》 from '《组件路径》,
|
||||
|
||||
|
||||
import {gethostportList} from "@/api/market/workbench";
|
||||
import {getcompany, gethostportList} from "@/api/market/workbench";
|
||||
import {ifbuy} from "@/api/market/product";
|
||||
|
||||
export default {
|
||||
name: 'Workbench',
|
||||
|
@ -126,8 +162,11 @@ export default {
|
|||
hostportList:[],
|
||||
dialogVisible: false,
|
||||
dialogVisible1:false,
|
||||
dialogVisible2:false,
|
||||
//企业信息
|
||||
ruleForm:{}
|
||||
ruleForm:{},
|
||||
companymessage:{},
|
||||
moneyForm:{}
|
||||
};
|
||||
},
|
||||
//计算属性 类似于data概念",
|
||||
|
@ -136,6 +175,27 @@ export default {
|
|||
watch: {},
|
||||
//方法集合",
|
||||
methods: {
|
||||
//绑定的企业信息
|
||||
getcompany(){
|
||||
getcompany().then(response=>{
|
||||
this.companymessage=response.data
|
||||
})
|
||||
},
|
||||
//打开充值页面
|
||||
addmoney(){
|
||||
this.dialogVisible2=true
|
||||
},
|
||||
//确认充值
|
||||
insertmoney(){
|
||||
this.dialogVisible2=false
|
||||
// addmoney(this.companymessage).then(response=>{
|
||||
//
|
||||
// })
|
||||
},
|
||||
//申请其他接口
|
||||
otherapi(){
|
||||
this.$router.push("/product/index")
|
||||
},
|
||||
//热点数据列表
|
||||
gethostportList(){
|
||||
gethostportList().then(response=>{
|
||||
|
@ -156,8 +216,15 @@ export default {
|
|||
})
|
||||
.catch(_ => {});
|
||||
},
|
||||
tovalidation(){
|
||||
this.dialogVisible=true
|
||||
tovalidation(form){
|
||||
// this.dialogVisible=true
|
||||
//判断是否已购买
|
||||
ifbuy(form).then(response=>{
|
||||
if (response.code!=200) {
|
||||
alert(response.msg)
|
||||
}
|
||||
})
|
||||
this.$router.push({path:"/apitest/index",query:{myapi:JSON.stringify(form)}})
|
||||
},
|
||||
validationYes(){
|
||||
this.dialogVisible1=true
|
||||
|
@ -170,6 +237,7 @@ export default {
|
|||
//生命周期 - 创建完成(可以访问当前this实例)",
|
||||
created() {
|
||||
this.gethostportList()
|
||||
this.getcompany()
|
||||
},
|
||||
//生命周期 - 挂载完成(可以访问DOM元素)",
|
||||
mounted() {
|
||||
|
|
Loading…
Reference in New Issue