Merge branch 'master' of https://gitea.qinmian.online/a_bazu/cloud-web into dev
# Conflicts: # src/views/market/apitest/index.vuepull/7/head^2
commit
1413264068
|
@ -285,7 +285,7 @@
|
|||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible1 = false">取 消</el-button>
|
||||
<el-button type="primary" @click="confirmSelection(row)">确 定</el-button>
|
||||
<el-button type="primary" @click="dialogVisible1 = false">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
|
@ -384,10 +384,14 @@ export default {
|
|||
if (response.code!=200){
|
||||
alert(response.msg)
|
||||
}else {
|
||||
alert(JSON.stringify(myapi))
|
||||
this.getproductspecification(myapi)
|
||||
this.getproduct(myapi)
|
||||
this.dialogVisible1=true
|
||||
|
||||
this.newapi={
|
||||
productName: myapi.productName,
|
||||
productPrice: myapi.productPrice,
|
||||
productContent: myapi.productContent,
|
||||
productSpecification: myapi.productSpecification
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -413,6 +417,15 @@ export default {
|
|||
this.tableData=response.data
|
||||
})
|
||||
},
|
||||
//选择申请规格
|
||||
handleEdit(row){
|
||||
this.newapi={
|
||||
productName:this.myapi.productName,
|
||||
productSpecification: row.productSpecificationName,
|
||||
productPrice: row.middlePrice,
|
||||
productContent:this.myapi.productContent,
|
||||
}
|
||||
},
|
||||
//测试发送请求 无参数
|
||||
noForm(ruleForm){
|
||||
sendrequest2(ruleForm).then(response=>{
|
||||
|
@ -450,9 +463,23 @@ export default {
|
|||
container.appendChild(resultDiv);
|
||||
})
|
||||
//测试次数-1
|
||||
reducetestcount(this.myapi).then(response=>{
|
||||
}) },
|
||||
reducetestcount(this.myapi).then(response=>{})
|
||||
},
|
||||
//测试发送请求 单个参数
|
||||
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;
|
||||
})
|
||||
|
||||
//测试次数-1
|
||||
reducetestcount(this.myapi).then(response=>{
|
||||
})
|
||||
|
||||
},
|
||||
//测试发送请求 多个参数
|
||||
newsForm(ruleForm) {
|
||||
if (ruleForm.productName=='新闻头条'){
|
||||
|
@ -521,10 +548,6 @@ export default {
|
|||
const jsonData = JSON.parse(jsonData1);
|
||||
});
|
||||
}},
|
||||
handleEdit(row) {
|
||||
this.selectedRow = row;
|
||||
console.log(row)
|
||||
},
|
||||
confirmSelection(row) {
|
||||
this.dialogVisible1=false
|
||||
if (this.selectedRow) {
|
||||
|
@ -563,12 +586,9 @@ export default {
|
|||
|
||||
// 将结果div添加到容器中
|
||||
container.appendChild(resultDiv);
|
||||
})
|
||||
}
|
||||
//测试次数-1
|
||||
reducetestcount(this.myapi).then(response=>{})
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
//生命周期 - 创建完成(可以访问当前this实例)",
|
||||
|
@ -577,6 +597,8 @@ export default {
|
|||
//生命周期 -` 挂载完成(可以访问DOM元素)",
|
||||
mounted() {
|
||||
this.myapi = this.$route.query.myapi
|
||||
this.getHeader(this.myapi)
|
||||
this.getRequest((this.myapi))
|
||||
if (typeof this.myapi === 'string' && this.myapi.trim() !== '') {
|
||||
try {
|
||||
this.myapi = JSON.parse(this.myapi);
|
||||
|
|
Loading…
Reference in New Issue