1.增加测试国家UDI库接口连通性按钮

master
x_z 3 years ago
parent 804ddad15a
commit 5ce28bd81f

@ -61,6 +61,14 @@ export function getSubCompany2(query) {
);
}
//测试国家UDI库接口连通性
export function testConnection(query) {
return axios({
url: "/warehouse/info/testConnection",
method: "get",
params: query
})
}

@ -186,10 +186,13 @@
splaceholder="请输入内容"
v-model="inputQuery.appSecret"
></el-input>
<el-button type="primary" style="margin-left: 10px;" @click="testConnection()">
</el-button>
</el-form-item>
</div>
</el-col>
</el-row>
</el-card>
<div style="text-align: center">
<el-form-item>
@ -213,6 +216,7 @@
getCompany,
modifyCompany,
getRefid,
testConnection
} from "../../api/warehouse/company";
import store from "../../store/index";
@ -330,6 +334,26 @@
this.inputQuery.bussinessStatus = this.inputQuery.bussinessStatus + "";
});
},
//
testConnection() {
if (this.inputQuery.appId === '' || this.inputQuery.appSecret === '') {
this.$message.error("请输入授权参数");
} else {
let param = {
appId: this.inputQuery.appId,
appSecret: this.inputQuery.appSecret
};
testConnection(param).then((res) => {
if (res.code == 20000) {
this.$message.success("连接成功");
} else {
this.$message.error("无法连接");
}
}).catch(() => {
this.$message.error("无法连接");
})
}
}
},
};
</script>

Loading…
Cancel
Save