Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
贷
贷超管理后台
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhanhai
贷超管理后台
Commits
399771c6
Commit
399771c6
authored
May 07, 2022
by
caimeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
编辑产品
parent
cd33ef55
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
1339 additions
and
795 deletions
+1339
-795
.env.production
.env.production
+1
-1
aliyun-oss-sdk.min.js
public/aliyun-oss-sdk.min.js
+4
-0
index.html
public/index.html
+1
-0
blockHeader.vue
src/components/blockHeader.vue
+1
-1
request.js
src/utils/request.js
+84
-66
index.vue
src/views/login/index.vue
+0
-1
list.vue
src/views/merchant/list.vue
+1
-4
comAPI.vue
src/views/prod/components/comAPI.vue
+642
-0
comH5.vue
src/views/prod/components/comH5.vue
+469
-0
index.scss
src/views/prod/components/index.scss
+44
-0
edit.vue
src/views/prod/edit.vue
+33
-265
index.scss
src/views/prod/index.scss
+0
-36
list.vue
src/views/prod/list.vue
+1
-1
new.vue
src/views/prod/new.vue
+58
-420
No files found.
.env.production
View file @
399771c6
BASE_URL=''
VUE_APP_API_PATH=http
://crm.newbuytek
.com
VUE_APP_API_PATH=http
s://friday.rockstect
.com
public/aliyun-oss-sdk.min.js
0 → 100644
View file @
399771c6
This diff is collapsed.
Click to expand it.
public/index.html
View file @
399771c6
...
...
@@ -4,6 +4,7 @@
<meta
charset=
"utf-8"
/>
<meta
content=
"IE=edge"
http-equiv=
"X-UA-Compatible"
/>
<meta
content=
"width=device-width,initial-scale=1.0"
name=
"viewport"
/>
<script
src=
"./aliyun-oss-sdk.min.js"
></script>
<link
href=
"<%= BASE_URL %>favicon.ico"
rel=
"icon"
/>
<title><
%=
VUE_APP_TITLE
%
></title>
<meta
...
...
src/components/blockHeader.vue
View file @
399771c6
...
...
@@ -14,7 +14,7 @@ export default {
}
</
script
>
<
style
lang=
"
le
ss"
scoped
>
<
style
lang=
"
sc
ss"
scoped
>
.block-header
{
display
:
flex
;
...
...
src/utils/request.js
View file @
399771c6
import
Vue
from
'vue'
import
axios
from
'axios'
import
Vue
from
"vue"
;
import
axios
from
"axios"
;
import
{
contentType
,
debounce
,
requestTimeout
,
successCode
,
tokenName
,
}
from
'@/config'
import
store
from
'@/store'
import
qs
from
'qs'
import
router
from
'@/router'
import
{
isArray
}
from
'@/utils/validate'
tokenName
}
from
"@/config"
;
import
store
from
"@/store"
;
import
qs
from
"qs"
;
import
router
from
"@/router"
;
import
{
isArray
}
from
"@/utils/validate"
;
const
API_URL
=
process
.
env
.
VUE_APP_API_PATH
;
//console.log(API_URL,'是啥');
let
loadingInstance
let
loadingInstance
;
// 操作正常Code数组
const
codeVerificationArray
=
isArray
(
successCode
)
?
[...
successCode
]
:
[...[
successCode
]]
:
[...[
successCode
]]
;
const
CODE_MESSAGE
=
{
200
:
'服务器成功返回请求数据'
,
201
:
'新建或修改数据成功'
,
202
:
'一个请求已经进入后台排队(异步任务)'
,
204
:
'删除数据成功'
,
400
:
'发出信息有误'
,
401
:
'用户没有权限(令牌、用户名、密码错误)'
,
403
:
'用户得到授权,但是访问是被禁止的'
,
404
:
'访问资源不存在'
,
406
:
'请求格式不可得'
,
410
:
'请求资源被永久删除,且不会被看到'
,
500
:
'服务器发生错误'
,
502
:
'网关错误'
,
503
:
'服务不可用,服务器暂时过载或维护'
,
504
:
'网关超时'
,
}
200
:
"服务器成功返回请求数据"
,
201
:
"新建或修改数据成功"
,
202
:
"一个请求已经进入后台排队(异步任务)"
,
204
:
"删除数据成功"
,
400
:
"发出信息有误"
,
401
:
"用户没有权限(令牌、用户名、密码错误)"
,
403
:
"用户得到授权,但是访问是被禁止的"
,
404
:
"访问资源不存在"
,
406
:
"请求格式不可得"
,
410
:
"请求资源被永久删除,且不会被看到"
,
500
:
"服务器发生错误"
,
502
:
"网关错误"
,
503
:
"服务不可用,服务器暂时过载或维护"
,
504
:
"网关超时"
}
;
//code: "500"
//message: "验证码发送过于频繁请稍后重试!"
...
...
@@ -46,15 +46,15 @@ const CODE_MESSAGE = {
//success: false
const
handleData
=
({
config
,
data
,
status
,
statusText
})
=>
{
if
(
loadingInstance
)
loadingInstance
.
close
()
if
(
loadingInstance
)
loadingInstance
.
close
()
;
// 若data.code存在,覆盖默认code
let
code
=
data
&&
data
.
code
?
data
.
code
:
status
let
code
=
data
&&
data
.
code
?
data
.
code
:
status
;
// 若code属于操作正常code,则status修改为200
if
(
codeVerificationArray
.
includes
(
code
))
code
=
200
if
(
codeVerificationArray
.
includes
(
code
))
code
=
200
;
// 若data.msg存在,覆盖默认提醒消息
const
msg
=
!
data
?
`后端接口
${
config
.
url
}
异常
${
code
}
:
${
CODE_MESSAGE
[
code
]}
`
:
!
data
.
message
?
`后端接口
${
config
.
url
}
异常
${
code
}
:
${
statusText
}
`
:
data
.
message
const
msg
=
!
data
?
`后端接口
${
config
.
url
}
异常
${
code
}
:
${
CODE_MESSAGE
[
code
]}
`
:
!
data
.
message
?
`后端接口
${
config
.
url
}
异常
${
code
}
:
${
statusText
}
`
:
data
.
message
;
code
=
code
*
1
;
code
=
code
*
1
;
switch
(
code
)
{
case
200
:
...
...
@@ -65,55 +65,73 @@ const handleData = ({ config, data, status, statusText }) => {
// 修改返回内容为 `data` 内容,对于绝大多数场景已经无须再关心业务状态码(code)和消息(msg)
// return data.data
// 或者依然保持完整的格式
return
data
return
data
;
case
401
:
Vue
.
prototype
.
$baseMessage
(
msg
,
'error'
)
store
.
dispatch
(
'user/resetAll'
).
catch
(()
=>
{})
break
Vue
.
prototype
.
$baseMessage
(
msg
,
"error"
);
store
.
dispatch
(
"user/resetAll"
).
catch
(()
=>
{
});
break
;
case
403
:
store
.
dispatch
(
'user/resetAll'
).
catch
(()
=>
{})
router
.
push
({
path
:
'/login'
}).
catch
(()
=>
{})
break
store
.
dispatch
(
"user/resetAll"
).
catch
(()
=>
{
});
router
.
push
({
path
:
"/login"
}).
catch
(()
=>
{
});
break
;
default
:
Vue
.
prototype
.
$baseMessage
(
msg
,
'error'
)
break
Vue
.
prototype
.
$baseMessage
(
msg
,
"error"
);
break
;
}
return
data
}
return
data
;
}
;
/**
* @description axios初始化
*/
const
instance
=
axios
.
create
({
baseURL
:
API_URL
,
baseURL
:
API_URL
,
timeout
:
requestTimeout
,
withCredentials
:
true
,
headers
:
{
'Content-Type'
:
contentType
,
}
,
})
"Content-Type"
:
contentType
}
})
;
/**
* @description axios请求拦截器
*/
instance
.
interceptors
.
request
.
use
(
(
config
)
=>
{
if
(
store
.
getters
[
'user/accessToken'
])
config
.
headers
[
tokenName
]
=
store
.
getters
[
'user/accessToken'
]
if
(
config
.
data
&&
config
.
headers
[
'Content-Type'
]
===
'application/x-www-form-urlencoded;charset=UTF-8'
)
config
.
data
=
qs
.
stringify
(
config
.
data
)
if
(
debounce
.
some
((
item
)
=>
config
.
url
.
includes
(
item
)))
loadingInstance
=
Vue
.
prototype
.
$baseLoading
()
return
config
if
(
store
.
getters
[
"user/accessToken"
])
{
config
.
headers
[
tokenName
]
=
store
.
getters
[
"user/accessToken"
];
}
if
(
config
.
data
&&
config
.
headers
[
"Content-Type"
]
===
"application/x-www-form-urlencoded;charset=UTF-8"
)
{
config
.
data
=
qs
.
stringify
(
config
.
data
);
}
if
(
debounce
.
some
((
item
)
=>
config
.
url
.
includes
(
item
)))
{
loadingInstance
=
Vue
.
prototype
.
$baseLoading
();
}
// 处理get 请求的数组 springmvc 可以处理
if
(
config
.
method
===
"post"
)
{
//请求头转换为表单形式
//config.headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8'
//config.transformRequest = [function (data) {
// 在请求之前对data传参进行格式转换
// data = qs.stringify(data,{ indices: false })
// return data
//}]
return
config
//config.data = qs.stringify(config.data,{ indices: false })
}
return
config
;
},
(
error
)
=>
{
return
Promise
.
reject
(
error
)
return
Promise
.
reject
(
error
)
;
}
)
)
;
/**
* @description axios响应拦截器
...
...
@@ -121,15 +139,15 @@ instance.interceptors.request.use(
instance
.
interceptors
.
response
.
use
(
(
response
)
=>
handleData
(
response
),
(
error
)
=>
{
const
{
response
}
=
error
const
{
response
}
=
error
;
if
(
response
===
undefined
)
{
Vue
.
prototype
.
$baseMessage
(
'未可知错误,大部分是由于后端不支持跨域CORS或无效配置引起'
,
'error'
)
return
{}
}
else
return
handleData
(
response
)
"未可知错误,大部分是由于后端不支持跨域CORS或无效配置引起"
,
"error"
)
;
return
{}
;
}
else
return
handleData
(
response
)
;
}
)
)
;
export
default
instance
export
default
instance
;
src/views/login/index.vue
View file @
399771c6
...
...
@@ -252,7 +252,6 @@ export default {
if
(
valid
)
{
try
{
this
.
loading
=
true
;
this
.
form
.
vfcode
=
"000000"
;
await
this
.
login
(
this
.
form
);
console
.
log
(
this
.
handleRoute
(),
"打算跳转的地址"
);
await
this
.
$router
.
push
(
this
.
handleRoute
());
...
...
src/views/merchant/list.vue
View file @
399771c6
...
...
@@ -147,13 +147,11 @@ export default {
{
order
:
1
,
label
:
"机构编号"
,
prop
:
"tenantNo"
},
{
order
:
2
,
label
:
"机构名称"
,
prop
:
"tenantFullName"
},
{
...
...
@@ -177,8 +175,7 @@ export default {
},
{
order
:
6
,
label
:
"小贷拍照"
,
label
:
"小贷牌照"
,
prop
:
"loanLicenseUrl"
},
{
...
...
src/views/prod/components/comAPI.vue
0 → 100644
View file @
399771c6
This diff is collapsed.
Click to expand it.
src/views/prod/components/comH5.vue
0 → 100644
View file @
399771c6
This diff is collapsed.
Click to expand it.
src/views/prod/components/index.scss
0 → 100644
View file @
399771c6
.merchant-new
{
box-sizing
:
border-box
;
padding
:
20px
;
}
.form-item
{
width
:
500px
;
margin-bottom
:
24px
!
important
;
}
.mc-form-item
{
width
:
800px
;
margin-bottom
:
24px
!
important
;
}
.avatar-uploader
.el-upload
{
border
:
1px
dashed
#d9d9d9
;
border-radius
:
6px
;
cursor
:
pointer
;
position
:
relative
;
overflow
:
hidden
;
width
:
120px
;
height
:
120px
;
line-height
:
120px
;
}
.avatar-uploader
.el-upload
:hover
{
border-color
:
#409eff
;
}
.avatar-uploader-icon
{
font-size
:
28px
;
color
:
#8c939d
;
width
:
120px
;
height
:
120px
;
line-height
:
120px
;
text-align
:
center
;
}
.avatar
{
width
:
120px
;
height
:
120px
;
display
:
block
;
}
//.el-input{
// width:200px;
//}
src/views/prod/edit.vue
View file @
399771c6
...
...
@@ -44,271 +44,6 @@
/>
</el-select>
</el-form-item>
<block-header
title=
"产品信息"
/>
<el-form-item
prop=
"appName"
class=
"form-item"
label=
"产品名称"
>
<el-input
v-model=
"form.appName"
/>
</el-form-item>
<el-form-item
prop=
"appLogo"
class=
"form-item"
label=
"产品LOGO"
>
<el-upload
class=
"avatar-uploader"
:action=
"uploadUrl"
:with-credentials=
"true"
list-type=
"picture-card"
:show-file-list=
"false"
:on-success=
"handleSuccessLogo"
:before-upload=
"beforeAvatarUpload"
>
<img
v-if=
"form.appLogo"
:src=
"form.appLogo"
class=
"avatar"
>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
/>
</el-upload>
</el-form-item>
<el-form-item
prop=
"appInfo"
class=
"form-item"
label=
"产品描述"
>
<el-input
v-model=
"form.appInfo"
/>
</el-form-item>
<el-form-item
prop=
"customerNumbers"
class=
"form-item"
label=
"客服电话"
>
<el-input
v-model=
"form.customerNumbers"
class=
"el-input"
/>
</el-form-item>
<el-form-item
prop=
"abstratInfo"
class=
"form-item"
label=
"产品摘要"
>
<el-input
v-model=
"form.abstratInfo"
type=
"textarea"
:rows=
"3"
/>
</el-form-item>
<el-form-item
class=
"form-item"
label=
"产品备注"
>
<el-input
v-model=
"form.memo"
type=
"textarea"
:rows=
"3"
/>
</el-form-item>
<block-header
title=
"配置信息"
/>
<template
v-if=
"appNo"
>
<el-form-item
prop=
"gradeSort"
class=
"form-item"
label=
"产品等级"
>
<el-input-number
v-model=
"form.gradeSort"
controls-position=
"right"
:min=
"1"
:max=
"1000"
/>
</el-form-item>
</
template
>
<el-form-item
prop=
"creditWay"
label=
"授信方式"
>
<el-radio-group
v-model=
"form.creditWay"
>
<el-radio
:label=
"1"
>
一次授信一次借款
</el-radio>
<el-radio
:label=
"2"
>
一次授信多次借款
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
required
class=
"form-item"
label=
"额度"
>
<el-row>
<el-col
:span=
"5"
>
<el-form-item
prop=
"applyAmtMin"
>
<el-input
v-model=
"form.applyAmtMin"
style=
"width: 80px"
/>
</el-form-item>
</el-col>
<el-col
:span=
"4"
>
<div
style=
"text-align: center"
>
~
</div>
</el-col>
<el-col
:span=
"5"
>
<el-form-item
prop=
"applyAmtMin"
>
<el-input
v-model=
"form.applyAmtMax"
style=
"width: 130px"
>
<
template
slot=
"append"
>
元
</
template
>
</el-input>
</el-form-item>
</el-col>
</el-row>
</el-form-item>
<el-form-item
prop=
"withdrawSpan"
class=
"form-item"
label=
"提现跨度"
>
<el-input-number
v-model=
"form.withdrawSpan"
controls-position=
"right"
:min=
"1"
:max=
"1000"
/>
</el-form-item>
<el-form-item
prop=
"approvalTime"
class=
"form-item"
label=
"审批时间"
>
<el-input
v-model=
"form.approvalTime"
class=
"el-input"
>
<
template
slot=
"append"
>
小时
</
template
>
</el-input>
<div
class=
"el-extra"
>
从提交授信到授信结果返回时间
</div>
</el-form-item>
<el-form-item
required
class=
"form-item"
label=
"放款时间"
>
<el-row>
<el-col
:span=
"5"
>
<el-form-item
prop=
"raiseTimeMin"
>
<el-input
v-model=
"form.raiseTimeMin"
style=
"width: 80px"
/>
</el-form-item>
</el-col>
<el-col
:span=
"4"
>
<div
style=
"text-align: center;"
>
~
</div>
</el-col>
<el-col
:span=
"5"
>
<el-form-item
prop=
"raiseTimeMax"
>
<el-input
v-model=
"form.raiseTimeMax"
style=
"width: 130px"
>
<
template
slot=
"append"
>
天
</
template
>
</el-input>
</el-form-item>
</el-col>
</el-row>
</el-form-item>
<el-form-item
required
class=
"form-item"
label=
"每日进件时间"
>
<el-row>
<el-col
:span=
"5"
>
<el-form-item
prop=
"incomeTimeBefore"
>
<el-time-picker
v-model=
"form.incomeTimeBefore"
value-format=
"HH:mm:ss"
style=
"width: 120px"
placeholder=
"起始时间"
:picker-options=
"{
selectableRange: '00:00:00 - 23:59:59'
}"
/>
</el-form-item>
</el-col>
<el-col
:span=
"4"
>
<div
style=
"text-align: center;"
>
~
</div>
</el-col>
<el-col
:span=
"5"
>
<el-form-item
prop=
"incomeTimeLate"
>
<el-time-picker
v-model=
"form.incomeTimeLate"
value-format=
"HH:mm:ss"
style=
"width: 120px"
placeholder=
"结束时间"
:picker-options=
"{
selectableRange: '00:00:00 - 23:59:59'
}"
/>
</el-form-item>
</el-col>
</el-row>
<span
class=
"el-extra"
>
请输入0~24之间的整数
</span>
</el-form-item>
<el-form-item
prop=
"incomeCount"
class=
"form-item"
label=
"每日进件上限"
>
<el-input
v-model=
"form.incomeCount"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"onSubmit('h5form')"
>
保存
</el-button>
<el-button
@
click=
"$router.go(-1)"
>
取消
</el-button>
<el-button
@
click=
"onReset('h5form')"
>
重置
</el-button>
</el-form-item>
</el-form>
</div>
</
template
>
...
...
@@ -461,6 +196,12 @@ export default {
if
(
query
&&
query
.
appNo
)
{
this
.
appNo
=
query
.
appNo
;
await
this
.
initProd
();
await
this
.
initDict
(
"SYS_USER_SEX"
);
await
this
.
initDict
(
"EDUCATIONAL"
);
await
this
.
initDict
(
"MONTHLY_INCOME"
);
await
this
.
initDict
(
"MARRIAGE"
);
await
this
.
initDict
(
"REGION"
);
}
},
...
...
@@ -482,6 +223,33 @@ export default {
this
.
form
=
result
;
}
},
// 初始化字典
async
initDict
(
dictType
)
{
const
result
=
await
API
.
dict
({
dictType
});
if
(
result
.
success
)
{
const
data
=
result
.
result
;
switch
(
dictType
)
{
case
"SYS_USER_SEX"
:
this
.
dict
.
sex
=
data
;
break
;
case
"EDUCATIONAL"
:
this
.
dict
.
edu
=
data
;
break
;
case
"MARRIAGE"
:
this
.
dict
.
marriage
=
data
;
break
;
case
"REGION"
:
this
.
dict
.
region
=
data
;
break
;
case
"MONTHLY_INCOME"
:
this
.
dict
.
money
=
data
;
break
;
}
}
},
handleSuccessLogo
(
res
)
{
this
.
form
.
appLogo
=
res
.
result
;
},
...
...
src/views/prod/index.scss
View file @
399771c6
...
...
@@ -2,39 +2,3 @@
box-sizing
:
border-box
;
padding
:
20px
;
}
.form-item
{
width
:
500px
;
margin-bottom
:
24px
!
important
;
}
.avatar-uploader
.el-upload
{
border
:
1px
dashed
#d9d9d9
;
border-radius
:
6px
;
cursor
:
pointer
;
position
:
relative
;
overflow
:
hidden
;
width
:
120px
;
height
:
120px
;
line-height
:
120px
;
}
.avatar-uploader
.el-upload
:hover
{
border-color
:
#409eff
;
}
.avatar-uploader-icon
{
font-size
:
28px
;
color
:
#8c939d
;
width
:
120px
;
height
:
120px
;
line-height
:
120px
;
text-align
:
center
;
}
.avatar
{
width
:
120px
;
height
:
120px
;
display
:
block
;
}
//.el-input{
// width:200px;
//}
src/views/prod/list.vue
View file @
399771c6
...
...
@@ -242,7 +242,7 @@ export default {
handleView
(
row
)
{
const
{
appNo
}
=
row
;
this
.
$router
.
push
({
path
:
"/prod/
edit
"
,
path
:
"/prod/
new
"
,
query
:
{
appNo
}
});
},
...
...
src/views/prod/new.vue
View file @
399771c6
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment