新增三个接口调用
parent
0df439daaa
commit
ecead0f5bf
|
@ -0,0 +1,40 @@
|
|||
import request from "@/utils/request";
|
||||
|
||||
|
||||
//发送邮箱验证码
|
||||
export function apitest(email){
|
||||
return request({
|
||||
url:"/market/company/sendcode/"+email,
|
||||
method: "POST",
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function sendrequest(options){
|
||||
// 确保options是一个对象,并且包含必要的属性
|
||||
if (!options || typeof options !== 'object' || !options.apiRouter || typeof options.parameter === 'undefined') {
|
||||
throw new Error('Invalid options: must be an object with apiRouter and optional parameter properties');
|
||||
}
|
||||
// 构建完整的URL
|
||||
const fullUrl = `/background/api/${options.apiRouter}/${options.parameter || ''}`;
|
||||
return request({
|
||||
url:fullUrl,
|
||||
method: "get",
|
||||
data: options.parameter,
|
||||
})
|
||||
}
|
||||
|
||||
export function sendrequest1(options){
|
||||
// 确保options是一个对象,并且包含必要的属性
|
||||
if (!options || typeof options !== 'object' || !options.apiRouter ) {
|
||||
throw new Error('Invalid options: must be an object with apiRouter ');
|
||||
}
|
||||
// 构建完整的URL
|
||||
const fullUrl = `/background/api/${options.apiRouter}`;
|
||||
return request({
|
||||
url:fullUrl,
|
||||
method: "post",
|
||||
data: options
|
||||
})
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
import request from "@/utils/request";
|
||||
export function companyauthentication(data){
|
||||
return request({
|
||||
url:"/market/company/companyauthentication",
|
||||
method: "POST",
|
||||
data: data
|
||||
})
|
||||
}
|
|
@ -1,5 +1,15 @@
|
|||
import request from "@/utils/request";
|
||||
|
||||
|
||||
//发送邮箱验证码
|
||||
export function sendcode(email){
|
||||
return request({
|
||||
url:"/market/company/sendcode/"+email,
|
||||
method: "POST",
|
||||
})
|
||||
}
|
||||
|
||||
//绑定邮箱
|
||||
export function linkemail(data){
|
||||
return request({
|
||||
url:"/market/company/list",
|
||||
|
|
|
@ -120,11 +120,11 @@
|
|||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
@click="handleEdit(scope.$index, scope.row)">编辑</el-button>
|
||||
@click="handleEdit(scope.$index, scope.row)">审核通过</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
@click="handleDelete(scope.$index, scope.row)">删除</el-button>
|
||||
@click="handleDelete(scope.$index, scope.row)">审核不通过</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
|
@ -12,9 +12,13 @@
|
|||
<el-form-item label="产品介绍:">
|
||||
{{myapi.productContent}}
|
||||
</el-form-item>
|
||||
<el-form-item label="重要路由:">
|
||||
{{myapi.apiRouter}}
|
||||
</el-form-item>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24"><div class="grid-content bg-purple-dark">
|
||||
<el-button type="info" @click="test()">测试</el-button>
|
||||
<el-button type="info" @click="test(myapi)">测试</el-button>
|
||||
<el-button type="primary">立即申请</el-button>
|
||||
</div></el-col>
|
||||
</el-row>
|
||||
|
@ -22,34 +26,33 @@
|
|||
</div></el-col>
|
||||
</el-row>
|
||||
<el-divider></el-divider>
|
||||
|
||||
|
||||
<el-row class="first-row" >
|
||||
<el-col :span="24"><div class="grid-content bg-purple-dark" >
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="API文档" name="first">
|
||||
<el-form ref="form" :model="myapi" label-width="120px" :rules="rules">
|
||||
<el-form-item label="接口地址:" >
|
||||
{{myapi.productName}}
|
||||
{{myapi.apiAddress}}
|
||||
</el-form-item>
|
||||
<el-form-item label="返回格式:">
|
||||
{{myapi.productPrice}}元/次
|
||||
{{myapi.returnFormat}}元/次
|
||||
</el-form-item>
|
||||
<el-form-item label="请求方式:">
|
||||
{{myapi.productContent}}
|
||||
</el-form-item>
|
||||
<el-form-item label="简介:">
|
||||
{{myapi.productContent}}
|
||||
{{myapi.requestMethod}}
|
||||
</el-form-item>
|
||||
<el-form-item label="请求参数说明:">
|
||||
{{myapi.productContent}}
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="返回参数说明:">
|
||||
{{myapi.productContent}}
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="JSON返回示例:">
|
||||
{{myapi.productContent}}
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="XML返回示例:">
|
||||
{{myapi.productContent}}
|
||||
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
|
@ -58,12 +61,69 @@
|
|||
</el-tabs>
|
||||
</div></el-col>
|
||||
</el-row>
|
||||
|
||||
<!--测试对话框-->
|
||||
<el-dialog
|
||||
title="接口测试"
|
||||
:visible.sync="dialogVisible"
|
||||
width="30%"
|
||||
:before-close="handleClose">
|
||||
<el-form :model="ruleForm" status-icon :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
|
||||
<el-form-item label="接口名称" prop="pass">
|
||||
<el-input type="text" v-model="ruleForm.productName" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="接口地址" prop="pass">
|
||||
<el-input type="text" v-model="ruleForm.apiAddress" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="请求方式" prop="pass">
|
||||
<el-input type="text" v-model="ruleForm.requestMethod" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="请求参数" prop="pass" v-if="ruleForm.productName!=='新闻头条'" >
|
||||
<el-input type="text" v-model="ruleForm.parameter" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<div v-if="ruleForm.productName=='新闻头条'">
|
||||
<el-form-item label="type" prop="pass" >
|
||||
<el-input type="text" v-model="ruleForm.type" autocomplete="off"></el-input>
|
||||
<span>说明:支持类型top(推荐,默认)guonei(国内)guoji(国际)yule(娱乐)tiyu(体育)junshi(军事)keji(科技)caijing(财经)youxi(游戏)qiche(汽车)jiankang(健康)</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="page" prop="pass" >
|
||||
<el-input type="text" v-model="ruleForm.page" autocomplete="off"></el-input>
|
||||
<span>说明:当前页数, 默认1, 最大50</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="page_size" prop="pass" >
|
||||
<el-input type="text" v-model="ruleForm.pageSize" autocomplete="off"></el-input>
|
||||
<span>说明:每页返回条数, 默认30 , 最大30</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="is_filter" prop="pass" >
|
||||
<el-input type="text" v-model="ruleForm.isFilter" autocomplete="off"></el-input>
|
||||
<span>说明:是否只返回有内容详情的新闻, 1:是, 默认0</span>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<el-form-item v-if="ruleForm.productName!=='新闻头条'">
|
||||
<el-button type="primary" @click="submitForm(ruleForm)">发送请求</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="ruleForm.productName=='新闻头条'">
|
||||
<el-button type="primary" @click="newsForm(ruleForm)">发送请求</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<pre id="json-display">
|
||||
|
||||
</pre>
|
||||
<ul id="news-list">
|
||||
<!-- 这里将动态插入新闻项 -->
|
||||
</ul>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">返回</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等),
|
||||
//例如:import 《组件名称》 from '《组件路径》,
|
||||
import {sendrequest, sendrequest1} from "@/api/apitest/apitest";
|
||||
|
||||
export default {
|
||||
name: "Apitest",
|
||||
//import引入的组件需要注入到对象中才能使用"
|
||||
|
@ -78,7 +138,9 @@
|
|||
productPrice: '',
|
||||
productContent: ''
|
||||
},
|
||||
activeName: 'first'
|
||||
activeName: 'first',
|
||||
dialogVisible: false,
|
||||
ruleForm:{}
|
||||
};
|
||||
},
|
||||
//计算属性 类似于data概念",
|
||||
|
@ -90,6 +152,93 @@
|
|||
//标签页
|
||||
handleClick(tab, event) {
|
||||
console.log(tab, event);
|
||||
},
|
||||
//测试
|
||||
test(myapi){
|
||||
this.dialogVisible=true
|
||||
this.ruleForm={
|
||||
productName: myapi.productName,
|
||||
apiAddress: myapi.apiAddress,
|
||||
requestMethod: myapi.requestMethod,
|
||||
apiRouter: myapi.apiRouter
|
||||
}
|
||||
},
|
||||
//关闭测试对话框
|
||||
handleClose(done) {
|
||||
this.$confirm('确认关闭?')
|
||||
.then(_ => {
|
||||
done();
|
||||
})
|
||||
.catch(_ => {});
|
||||
},
|
||||
//测试发送请求 单个参数
|
||||
submitForm(ruleForm){
|
||||
sendrequest(ruleForm).then(response=>{
|
||||
const jsonData = response.data;
|
||||
// 使用JSON.stringify()来格式化JSON数据,并设置缩进为2个空格
|
||||
const formattedJson = JSON.stringify(jsonData, null, 2);
|
||||
// 获取<pre>元素并设置其innerHTML为格式化的JSON字符串
|
||||
document.getElementById('json-display').innerHTML = formattedJson;
|
||||
})
|
||||
},
|
||||
//测试发送请求 多个参数
|
||||
newsForm(ruleForm) {
|
||||
sendrequest1(ruleForm).then(response => {
|
||||
console.log(response)
|
||||
const jsonData1 = response.data; // 假设response.data是解析后的JSON对象
|
||||
|
||||
// 解析JSON字符串为JavaScript对象
|
||||
const jsonData = JSON.parse(jsonData1);
|
||||
|
||||
// 创建一个容器来展示数据
|
||||
var container = document.getElementById('news-list');
|
||||
// 清空容器内容
|
||||
container.innerHTML = '';
|
||||
|
||||
// 创建一个div来存放结果
|
||||
var resultDiv = document.createElement('div');
|
||||
|
||||
// 检查jsonData.reason
|
||||
if (jsonData.reason !== undefined) {
|
||||
// 移除reason中的感叹号(如果存在)
|
||||
resultDiv.innerHTML += '<h2>Reason: ' + jsonData.reason.replace(/!/g, '') + '</h2>';
|
||||
} else {
|
||||
resultDiv.innerHTML += '<h2>Reason: Not available</h2>';
|
||||
}
|
||||
|
||||
// 检查jsonData.result
|
||||
if (jsonData.result !== undefined) {
|
||||
// 添加其他结果信息
|
||||
resultDiv.innerHTML += '<p>Stat: ' + jsonData.result.stat + '</p>';
|
||||
resultDiv.innerHTML += '<p>Page: ' + jsonData.result.page + '</p>';
|
||||
resultDiv.innerHTML += '<p>Page Size: ' + jsonData.result.pageSize + '</p>';
|
||||
|
||||
// 检查jsonData.result.data
|
||||
if (Array.isArray(jsonData.result.data)) {
|
||||
// 遍历数据并生成HTML
|
||||
jsonData.result.data.forEach(item => {
|
||||
resultDiv.innerHTML += `
|
||||
<div>
|
||||
<h3>${item.title}</h3>
|
||||
<p>Unique Key: ${item.uniquekey}</p>
|
||||
<p>Date: ${item.date}</p>
|
||||
<p>Category: ${item.category}</p>
|
||||
<p>Author: ${item.author_name}</p>
|
||||
<p>URL: <a href="${item.url.replace(/\\/g, '')}">${item.url}</a></p>
|
||||
</div>
|
||||
`;
|
||||
});
|
||||
} else {
|
||||
resultDiv.innerHTML += '<p>No data available.</p>';
|
||||
}
|
||||
} else {
|
||||
resultDiv.innerHTML += '<p>Result information is not available.</p>';
|
||||
}
|
||||
|
||||
// 将结果div添加到容器中
|
||||
container.appendChild(resultDiv);
|
||||
|
||||
});
|
||||
}
|
||||
},
|
||||
//生命周期 - 创建完成(可以访问当前this实例)",
|
||||
|
@ -128,4 +277,13 @@
|
|||
.first-row {
|
||||
margin-bottom: 20px; /* 创建一个空间,以便可以清晰地看到边框 */
|
||||
}
|
||||
pre {
|
||||
background-color: #f4f4f4; /* 浅灰色背景 */
|
||||
border: 1px solid #ddd; /* 边框 */
|
||||
padding: 10px; /* 内边距 */
|
||||
overflow-x: auto; /* 水平滚动条(如果需要的话) */
|
||||
white-space: pre-wrap; /* 保留空白符序列,但是正常地进行换行 */
|
||||
word-wrap: break-word; /* 防止长单词或URL地址破坏布局 */
|
||||
font-family: monospace, Menlo, Courier, 'Courier New', monospace; /* 使用等宽字体 */
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -58,10 +58,47 @@
|
|||
<el-dialog
|
||||
:title="dialogtitle"
|
||||
:visible.sync="dialogVisible"
|
||||
width="30%"
|
||||
width="50%"
|
||||
:before-close="handleClose">
|
||||
<!--个人认证-->
|
||||
<div v-if="this.index==1">
|
||||
<h2>基本信息填写</h2><br>
|
||||
<el-form :model="personForm" status-icon :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
|
||||
<el-form-item label="实名认证附件上传:" prop="pass">
|
||||
<el-upload
|
||||
action="/dev-api/market/user/upload"
|
||||
list-type="picture-card"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:on-remove="handleRemove"
|
||||
:on-success="handleSuccess1"
|
||||
:limit="2">
|
||||
<i class="el-icon-plus"></i>
|
||||
</el-upload>
|
||||
<el-dialog :visible.sync="dialogVisiblepicture">
|
||||
<img width="100%" :src="dialogImageUrl" alt="">
|
||||
</el-dialog>
|
||||
<span>请上传清晰完整的营业执照副本照片</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="公司名称:" prop="companyName">
|
||||
<el-input type="text" v-model="personForm.companyName" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="真实姓名:" prop="USCI">
|
||||
<el-input type="text" v-model="personForm.USCI" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="证件类型:" prop="companyLeader">
|
||||
<span>居民身份证</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="证件号码:" prop="registrantName">
|
||||
<el-input type="text" v-model="personForm.registrantName" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号码:" prop="registrantPhone">
|
||||
<el-input type="text" v-model="personForm.registrantPhone" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<center>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="personyes()">提交审核</el-button>
|
||||
</center>
|
||||
|
||||
</div>
|
||||
<!--企业认证-->
|
||||
|
@ -74,7 +111,8 @@
|
|||
list-type="picture-card"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:on-remove="handleRemove"
|
||||
:on-success="handleSuccess">
|
||||
:on-success="handleSuccess"
|
||||
:limit="1">
|
||||
<i class="el-icon-plus"></i>
|
||||
</el-upload>
|
||||
<el-dialog :visible.sync="dialogVisiblepicture">
|
||||
|
@ -104,11 +142,12 @@
|
|||
<el-input type="text" v-model="companyForm.companyAddress" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<center>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="companyyes(companyForm)">提交审核</el-button>
|
||||
</center>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="yes()">提交审核</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
@ -130,6 +169,9 @@
|
|||
index:'',
|
||||
dialogtitle:'',
|
||||
companyForm:{},
|
||||
personForm:{
|
||||
personCardPicture:[]
|
||||
},
|
||||
dialogImageUrl: '',
|
||||
dialogVisiblepicture: false
|
||||
};
|
||||
|
@ -158,8 +200,14 @@
|
|||
})
|
||||
.catch(_ => {});
|
||||
},
|
||||
yes(){
|
||||
this.index=''
|
||||
//个人认证上交
|
||||
personyes(){
|
||||
|
||||
this.dialogVisible=false
|
||||
},
|
||||
//企业认证上交
|
||||
companyyes(companyForm){
|
||||
companyauthentication()
|
||||
this.dialogVisible=false
|
||||
},
|
||||
//图片上传
|
||||
|
@ -170,8 +218,16 @@
|
|||
this.dialogImageUrl = file.url;
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
//单图片上传
|
||||
handleSuccess(response,file,fileList){
|
||||
this.companyForm.businessLicense=response.data
|
||||
},
|
||||
//多图片上传
|
||||
handleSuccess1(response,file,fileList){
|
||||
this.personForm.personCardPicture=[]
|
||||
for(const i in fileList){
|
||||
this.personForm.personCardPicture.push(fileList[i]).response.data
|
||||
}
|
||||
}
|
||||
},
|
||||
//生命周期 - 创建完成(可以访问当前this实例)",
|
||||
|
|
|
@ -29,12 +29,16 @@
|
|||
<el-dialog
|
||||
title="邮箱绑定"
|
||||
:visible.sync="dialogVisible"
|
||||
width="30%"
|
||||
width="50%"
|
||||
:before-close="handleClose">
|
||||
<el-form :model="EmailForm" status-icon :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
|
||||
<el-form-item label="邮箱" prop="email">
|
||||
<el-input type="text" v-model="EmailForm.email" autocomplete="off" placeholder="请输入绑定的邮箱"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input type="text" v-model="EmailForm.code" placeholder="请输入验证码"></el-input>
|
||||
<button type="primary" @click="docode(EmailForm.email)">发送验证码</button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
|
@ -47,7 +51,7 @@
|
|||
<script>
|
||||
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等),
|
||||
//例如:import 《组件名称》 from '《组件路径》,
|
||||
import {linkemail} from "@/api/authentication/message";
|
||||
import {linkemail, sendcode} from "@/api/authentication/message";
|
||||
|
||||
export default {
|
||||
name: "Easymessage",
|
||||
|
@ -81,6 +85,12 @@ export default {
|
|||
})
|
||||
.catch(_ => {});
|
||||
},
|
||||
//发送邮箱验证码
|
||||
docode(email){
|
||||
sendcode(email).then(response=>{
|
||||
alert(response.data)
|
||||
})
|
||||
},
|
||||
//提交邮箱绑定
|
||||
yes(EmailForm){
|
||||
linkemail(EmailForm).then(response=>{
|
||||
|
|
|
@ -73,19 +73,6 @@ export default {
|
|||
myapiList:[],
|
||||
myapi:{},
|
||||
ruleForm:{},
|
||||
options: [{
|
||||
value: '选项1',
|
||||
label: '全部'
|
||||
}, {
|
||||
value: '选项2',
|
||||
label: '申请中'
|
||||
}, {
|
||||
value: '选项3',
|
||||
label: '申请通过'
|
||||
}, {
|
||||
value: '选项4',
|
||||
label: '审核失败'
|
||||
}],
|
||||
value: ''
|
||||
};
|
||||
},
|
||||
|
@ -102,6 +89,7 @@ export default {
|
|||
//我购买的api列表
|
||||
getList(){
|
||||
selectmyapiList(this.ruleForm).then(response=>{
|
||||
console.log(response)
|
||||
this.myapiList=response.data
|
||||
})
|
||||
},
|
||||
|
@ -111,13 +99,14 @@ export default {
|
|||
},
|
||||
//测试
|
||||
test(myapi) {
|
||||
if (myapi && myapi.productAddress) {
|
||||
let url = myapi.productAddress; // 使用 product.address 的值
|
||||
window.open(url, '_blank'); // 在新标签页中打开 URL
|
||||
} else {
|
||||
console.error('无效的 address 或 product 未定义');
|
||||
// 或者您可以根据需要处理错误情况
|
||||
}
|
||||
// if (myapi && myapi.productAddress) {
|
||||
// let url = myapi.productAddress; // 使用 product.address 的值
|
||||
// window.open(url, '_blank'); // 在新标签页中打开 URL
|
||||
// } else {
|
||||
// console.error('无效的 address 或 product 未定义');
|
||||
// // 或者您可以根据需要处理错误情况
|
||||
// }
|
||||
this.$router.push({path:"/apitest/index",query:{myapi:JSON.stringify(myapi)}})
|
||||
}
|
||||
},
|
||||
//生命周期 - 创建完成(可以访问当前this实例)",
|
||||
|
|
|
@ -34,6 +34,9 @@
|
|||
<el-form-item label="产品介绍:">
|
||||
<el-textarea v-model="product.productContent">{{product.productContent}}</el-textarea>
|
||||
</el-form-item>
|
||||
<el-form-item label="重要路由:">
|
||||
<el-textarea v-model="product.apiRouter">{{product.apiRouter}}</el-textarea>
|
||||
</el-form-item>
|
||||
<el-row>
|
||||
<el-col :span="9"><div class="grid-content bg-purple">
|
||||
<el-button type="primary" @click="test(product)">立即申请</el-button>
|
||||
|
@ -128,22 +131,18 @@ export default {
|
|||
this.getList()
|
||||
},
|
||||
//接口测试页面
|
||||
// test(product){
|
||||
// // let url = `http://21.12.0.10/prod-api/doc.html#/cloud-market/客户控制层/findListByuserPhone?userId=${this.userId}`;
|
||||
// let url = `product`;
|
||||
// window.open(url, '_blank'); // 在新标签页中打开 URL
|
||||
//
|
||||
// // this.$router.push({path:"/apitest/index",query:{myapi:JSON.stringify(product)}})
|
||||
// },
|
||||
test(product){
|
||||
if (product && product.productAddress) {
|
||||
let url = product.productAddress; // 使用 product.address 的值
|
||||
window.open(url, '_blank'); // 在新标签页中打开 URL
|
||||
} else {
|
||||
console.error('无效的 address 或 product 未定义');
|
||||
// 或者您可以根据需要处理错误情况
|
||||
}
|
||||
this.$router.push({path:"/apitest/index",query:{myapi:JSON.stringify(product)}})
|
||||
},
|
||||
// test(product) {
|
||||
// if (product && product.productAddress) {
|
||||
// let url = product.productAddress; // 使用 product.address 的值
|
||||
// window.open(url, '_blank'); // 在新标签页中打开 URL
|
||||
// } else {
|
||||
// console.error('无效的 address 或 product 未定义');
|
||||
// // 或者您可以根据需要处理错误情况
|
||||
// }
|
||||
// },
|
||||
handleSizeChange(val) {
|
||||
console.log(`每页 ${val} 条`);
|
||||
this.ruleForm.pageSize=val
|
||||
|
|
Loading…
Reference in New Issue