Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
M
miniProgramsFormRender
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
王正
miniProgramsFormRender
Commits
d9112f9f
提交
d9112f9f
authored
2月 27, 2025
作者:
李程佳
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
调试小程序走访信息
上级
7745098b
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
32 行增加
和
33 行删除
+32
-33
common.js
common.js
+20
-20
index.html
index.html
+12
-13
没有找到文件。
common.js
浏览文件 @
d9112f9f
...
...
@@ -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
);
});
...
...
index.html
浏览文件 @
d9112f9f
...
...
@@ -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
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论