Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
intel_promotion_manage
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
张伯涛
intel_promotion_manage
Commits
0fd2e333
Commit
0fd2e333
authored
Jul 16, 2024
by
张伯涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修改
parent
b6ddaf4e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
13 deletions
+70
-13
index.vue
src/views/contentManagement/banner/index.vue
+64
-13
index.vue
src/views/contentManagement/clickManagement/index.vue
+6
-0
No files found.
src/views/contentManagement/banner/index.vue
View file @
0fd2e333
...
...
@@ -184,7 +184,17 @@
</el-form-item>
<el-form-item
label=
"链接地址:"
prop=
"linkUrl"
>
<el-input
v-model
.
trim=
"form.linkUrl"
show-word-limit
:maxlength=
"255"
placeholder=
"请输入链接地址"
/>
<div
style=
"display: flex"
>
<el-select
v-model=
"addressType"
style=
"width: 20%"
>
<el-option
v-for=
"(item,index) in addressTypeOptions"
:key=
"index"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
<el-input
v-model
.
trim=
"form.linkUrl"
show-word-limit
:maxlength=
"255"
placeholder=
"请输入链接地址"
@
blur=
"linkUrlBlur"
/>
</div>
</el-form-item>
<el-form-item
label=
"排序:"
prop=
"weight"
>
<el-input-number
v-model
.
trim=
"form.weight"
style=
"width: 100%"
controls-position=
"right"
:min=
"0"
/>
...
...
@@ -294,8 +304,20 @@ export default {
},
showImg
:
false
,
imagUrl
:
''
,
addressType
:
'1'
,
// 表单参数
form
:
{},
form
:
{
bannerName
:
''
,
bannerPicture
:
''
,
linkUrl
:
''
,
weight
:
''
,
flag
:
'1'
,
type
:
'1'
},
addressTypeOptions
:
[
{
value
:
'1'
,
label
:
'http://'
},
{
value
:
'2'
,
label
:
'https://'
}
],
ruleForm
:
{
shops
:
[],
row
:
''
...
...
@@ -472,14 +494,14 @@ export default {
reset
()
{
this
.
form
=
{
businessId
:
undefined
,
bannerPicture
:
undefined
,
bannerName
:
undefined
,
type
:
undefined
,
weight
:
undefined
,
remarks
:
undefined
,
linkUrl
:
undefined
,
flag
:
'1'
bannerName
:
''
,
bannerPicture
:
''
,
linkUrl
:
''
,
weight
:
''
,
flag
:
'1'
,
type
:
'1'
}
this
.
addressType
=
'1'
,
this
.
resetForm
(
'form'
)
},
/** 查询按钮操作 */
...
...
@@ -509,7 +531,14 @@ export default {
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
()
this
.
form
=
{
...
row
}
this
.
form
=
JSON
.
parse
(
JSON
.
stringify
(
row
))
if
(
this
.
form
.
linkUrl
&&
(
this
.
form
.
linkUrl
.
indexOf
(
'http://'
)
!==
-
1
||
this
.
form
.
linkUrl
.
indexOf
(
'https://'
)
!==
-
1
))
{
this
.
addressType
=
this
.
form
.
linkUrl
.
split
(
'//'
)[
0
]
===
'http:'
?
'1'
:
'2'
this
.
form
.
linkUrl
=
this
.
form
.
linkUrl
.
split
(
'//'
)[
1
]
}
else
{
this
.
addressType
=
'1'
this
.
form
.
linkUrl
=
''
}
this
.
imageUrl
=
row
.
url
this
.
open
=
true
this
.
title
=
'修改banner'
...
...
@@ -532,6 +561,12 @@ export default {
row
.
flag
=
row
.
flag
===
'0'
?
'1'
:
'0'
})
},
/** 链接地址blur事件*/
linkUrlBlur
()
{
if
(
this
.
form
.
linkUrl
.
indexOf
(
'http://'
)
!==
-
1
||
this
.
form
.
linkUrl
.
indexOf
(
'https://'
)
!==
-
1
)
{
this
.
form
.
linkUrl
=
this
.
form
.
linkUrl
.
split
(
'//'
)[
1
]
}
},
/** 提交按钮 */
submitForm
:
function
()
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
...
...
@@ -542,9 +577,16 @@ export default {
this
.
form
.
unitId
=
unitId
}
if
(
this
.
form
.
businessId
!==
undefined
)
{
const
typeName
=
this
.
addressType
===
'1'
?
'http://'
:
'https://'
const
temp
=
{
bannerId
:
this
.
form
.
businessId
,
...
this
.
form
businessId
:
this
.
form
.
businessId
,
// ...this.form
bannerName
:
this
.
form
.
bannerName
,
bannerPicture
:
this
.
form
.
bannerPicture
,
linkUrl
:
this
.
form
.
linkUrl
?
typeName
+
this
.
form
.
linkUrl
:
''
,
weight
:
this
.
form
.
weight
,
flag
:
this
.
form
.
flag
,
type
:
this
.
form
.
type
}
updateCmsBanner
(
temp
).
then
(
response
=>
{
this
.
msgSuccess
(
'修改成功'
)
...
...
@@ -552,7 +594,16 @@ export default {
this
.
getList
()
})
}
else
{
addCmsBanner
(
this
.
form
).
then
(
response
=>
{
const
typeName
=
this
.
addressType
===
'1'
?
'http://'
:
'https://'
const
params
=
{
bannerName
:
this
.
form
.
bannerName
,
bannerPicture
:
this
.
form
.
bannerPicture
,
linkUrl
:
this
.
form
.
linkUrl
?
typeName
+
this
.
form
.
linkUrl
:
''
,
weight
:
this
.
form
.
weight
,
flag
:
this
.
form
.
flag
,
type
:
this
.
form
.
type
}
addCmsBanner
(
params
).
then
(
response
=>
{
this
.
msgSuccess
(
'新增成功'
)
this
.
open
=
false
this
.
getList
()
...
...
src/views/contentManagement/clickManagement/index.vue
View file @
0fd2e333
...
...
@@ -833,7 +833,9 @@
drag
:show-file-list=
"true"
:file-list=
"files"
:limit=
"1"
:http-request=
"handleUploadAddFile"
:on-exceed=
"handleExceed"
:on-remove=
"handleRemoveAddFile"
>
<i
class=
"el-icon-upload"
/>
...
...
@@ -1151,6 +1153,10 @@ export default {
this
.
saveFile
=
file
.
file
this
.
$refs
.
formModel
.
clearValidate
(
'file'
)
},
/** 超出数量限制的回调*/
handleExceed
()
{
this
.
$message
.
warning
(
'只能上传一个文件!'
)
},
/** 新增的附件上传删除*/
handleRemoveAddFile
()
{
console
.
log
(
'remove'
)
...
...
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