企业管理完善新增
parent
143527169a
commit
2cbfcd45f2
|
@ -86,7 +86,7 @@
|
|||
<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-form-item label="请求参数" prop="pass" v-if="ruleForm.productName!=='新闻头条' && ruleForm.productName!=='身份证实名认证'" >
|
||||
<el-input type="text" v-model="ruleForm.parameter" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<div v-if="ruleForm.productName=='新闻头条'">
|
||||
|
@ -107,10 +107,22 @@
|
|||
<span>说明:是否只返回有内容详情的新闻, 1:是, 默认0</span>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<el-form-item v-if="ruleForm.productName!=='新闻头条'">
|
||||
<div v-if="ruleForm.productName=='身份证实名认证'">
|
||||
<el-form-item label="身份证号码" prop="pass" >
|
||||
<el-input type="text" v-model="ruleForm.idcard" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名" prop="pass">
|
||||
<el-input type="text" v-model="ruleForm.realname" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否返回单号" prop="pass" >
|
||||
<el-input type="text" v-model="ruleForm.orderid" autocomplete="off"></el-input>
|
||||
<span>传1时返回单号,默认不返回单号(建议传入)</span>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<el-form-item v-if="ruleForm.productName!=='新闻头条' && ruleForm.productName!=='身份证实名认证'">
|
||||
<el-button type="primary" @click="submitForm(ruleForm)">发送请求</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="ruleForm.productName=='新闻头条'">
|
||||
<el-form-item v-if="ruleForm.productName=='新闻头条' ||ruleForm.productName=='身份证实名认证' " >
|
||||
<el-button type="primary" @click="newsForm(ruleForm)">发送请求</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
@ -320,6 +332,7 @@ export default {
|
|||
},
|
||||
//测试发送请求 多个参数
|
||||
newsForm(ruleForm) {
|
||||
if (ruleForm.productName=='新闻头条'){
|
||||
sendrequest1(ruleForm).then(response => {
|
||||
console.log(response)
|
||||
const jsonData1 = response.data; // 假设response.data是解析后的JSON对象
|
||||
|
@ -342,7 +355,6 @@ export default {
|
|||
} else {
|
||||
resultDiv.innerHTML += '<h2>Reason: Not available</h2>';
|
||||
}
|
||||
|
||||
// 检查jsonData.result
|
||||
if (jsonData.result !== undefined) {
|
||||
// 添加其他结果信息
|
||||
|
@ -376,6 +388,45 @@ export default {
|
|||
container.appendChild(resultDiv);
|
||||
|
||||
});
|
||||
}
|
||||
if (ruleForm.productName=='身份证实名认证'){
|
||||
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) {
|
||||
// 添加result中的信息
|
||||
resultDiv.innerHTML += '<p>Real Name: ' + jsonData.result.realname + '</p>';
|
||||
resultDiv.innerHTML += '<p>ID Card: ' + jsonData.result.idcard + '</p>';
|
||||
resultDiv.innerHTML += '<p>Order ID: ' + jsonData.result.orderid + '</p>';
|
||||
resultDiv.innerHTML += '<p>Result: ' + jsonData.result.res + '</p>';
|
||||
} else {
|
||||
resultDiv.innerHTML += '<p>Result information is not available.</p>';
|
||||
}
|
||||
|
||||
// 将结果div添加到容器中
|
||||
container.appendChild(resultDiv);
|
||||
})
|
||||
}
|
||||
//测试次数-1
|
||||
reducetestcount(this.myapi).then(response=>{
|
||||
})
|
||||
|
|
|
@ -8,19 +8,18 @@
|
|||
<el-row>
|
||||
<el-col :span="20"><div class="grid-content bg-purple">
|
||||
<el-form :model="ruleForm" status-icon :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
|
||||
<el-select v-model="ruleForm.productState" placeholder="请选择状态">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<!-- <el-select v-model="ruleForm.productState" placeholder="请选择状态">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in options"-->
|
||||
<!-- :key="item.value"-->
|
||||
<!-- :label="item.label"-->
|
||||
<!-- :value="item.value">-->
|
||||
<!-- </el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<el-input type="text" v-model="ruleForm.productName" style="width: 200px" autocomplete="off" placeholder="名称搜索"></el-input>
|
||||
<el-button type="primary" @click="submitForm('ruleForm')">提交</el-button>
|
||||
</el-form>
|
||||
</div></el-col>
|
||||
<el-col :span="4"><div class="grid-content bg-purple-light"><el-button type="primary">新增数据</el-button></div></el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="12">
|
||||
|
|
Loading…
Reference in New Issue