提交 d9112f9f 作者: 李程佳

调试小程序走访信息

上级 7745098b
......@@ -96,8 +96,8 @@ let urlConfig = {
// 出售计划请求类
function initRequest(commonHeader,modeEvn,vm) {
let request = axios.create({
// baseURL: 'http://124.239.130.105:10021' + `${urlConfig[modeEvn]}`,
baseURL: 'http://loan.git.com.cn/elc',
baseURL: 'http://124.239.130.105:10021' + `${urlConfig[modeEvn]}`,
// baseURL: 'http://loan.git.com.cn/elc',
timeout: 10000,
headers: commonHeader
});
......@@ -105,8 +105,8 @@ function initRequest(commonHeader,modeEvn,vm) {
request.interceptors.request.use(function (config) {
let {headers,url,data,method} = config
headers['TRAN_CODE'] = url.slice(1)
// headers['Authorization'] ='Bearer ' + localStorage.getItem('token')
headers['Authorization'] ='Bearer ' + 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTc0MDM2NTk1MiwiaWF0IjoxNzQwMzYyMzUyfQ.tsWSrd3Laby1gy9BQkhNDab00DFHTpAenOaG7ipFJjQZxLkNeBASOgxa8Uy15A1NpVJzH2gcVObP5jw3N_Sv2Q'
headers['Authorization'] ='Bearer ' + localStorage.getItem('token')
// headers['Authorization'] ='Bearer ' + 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTc0MDM2NTk1MiwiaWF0IjoxNzQwMzYyMzUyfQ.tsWSrd3Laby1gy9BQkhNDab00DFHTpAenOaG7ipFJjQZxLkNeBASOgxa8Uy15A1NpVJzH2gcVObP5jw3N_Sv2Q'
headers['USER_ID'] = localStorage.getItem('userCode') || ''
config["data"] = {
Request:{
......@@ -123,23 +123,23 @@ function initRequest(commonHeader,modeEvn,vm) {
// 添加响应拦截器
request.interceptors.response.use(function (response) {
console.log('response',response);
return response;
// return response;
let {data:{Response}} =response
// if(Response.code && Response.code !== '000000') {
// ELEMENT.Message({
// message: Response.errorMessage,
// type: 'error'
// })
// return Response
// }
// if(Response.RET_CODE && Response.RET_CODE !== '200') {
// ELEMENT.Message({
// message: Response.RET_MSG,
// type: 'error'
// })
// return Response
// }
// return Response;
if(Response.code && Response.code !== '000000') {
ELEMENT.Message({
message: Response.errorMessage,
type: 'error'
})
return Response
}
if(Response.RET_CODE && Response.RET_CODE !== '200') {
ELEMENT.Message({
message: Response.RET_MSG,
type: 'error'
})
return Response
}
return Response;
}, function (error) {
return Promise.reject(error);
});
......
......@@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="element-ui.min.css">
<link rel="stylesheet" href="./VFormRender.css">
<link rel="stylesheet" href="VFormRender.css">
<style type="text/css">
* {
margin: 0;
......@@ -118,22 +118,21 @@
async created() {
this.loading = true
// 获取字典
// await this.getDic()
await this.getDic()
// alert("获取字典完毕")
// 获取funcNo
// let res = await this.getFuncNo()
// if (res.code === '000000') {
// // 获取json串
// let res1 = await this.getJsonCode(res.retObj.funcNo)
// if (res1.code === '000000') {
// this.$refs.vFormRef.setFormJson(res1.retObj.code)
// }
// }
let res = await this.getFuncNo()
if (res.code === '000000') {
// 获取json串
let res1 = await this.getJsonCode(res.retObj.funcNo)
if (res1.code === '000000') {
this.$refs.vFormRef.setFormJson(res1.retObj.code)
}
}
// 这里是模拟数据
let json = await MockJson()
// let json = await MockJson()
// 设置json串
this.$refs.vFormRef.setFormJson(json)
// this.$refs.vFormRef.setFormJson(json)
this.loading = false
// await this.getLoanJsonCode()
},
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论