Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ElectricitySheep
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
黄媛媛
ElectricitySheep
Commits
06d34b8b
Commit
06d34b8b
authored
Aug 19, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
730b91b8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
15 deletions
+26
-15
shareFriend.vue
src/components/Share/shareFriend.vue
+26
-15
No files found.
src/components/Share/shareFriend.vue
View file @
06d34b8b
...
...
@@ -38,6 +38,11 @@
<el-table-column
prop=
"MaterialInfo"
label=
"发圈文案"
width=
"300"
>
</el-table-column>
<el-table-column
prop=
"MaterialImg"
label=
"图片视频"
width=
"300"
>
<
template
slot-scope=
"scope"
>
<div
v-for=
"(item,index) in scope.row.ImgList"
:key=
"index"
>
<img
:src=
"item"
/>
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"GoodsId"
label=
"商品信息"
width=
"220"
>
</el-table-column>
...
...
@@ -78,9 +83,9 @@
</el-table-column>
<el-table-column
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<img
@
click=
"get
Category
(scope.row.Id)"
style=
"width:32px;height:32px;margin:0 10px"
<img
@
click=
"get
ShareFriend
(scope.row.Id)"
style=
"width:32px;height:32px;margin:0 10px"
src=
"../../assets/img/userman/edit.png"
alt=
""
>
<img
@
click=
"remove
Category
(scope.row.Id)"
style=
"width:32px;height:32px;margin:0 10px"
<img
@
click=
"remove
ShareFriend
(scope.row.Id)"
style=
"width:32px;height:32px;margin:0 10px"
src=
"../../assets/img/userman/del.png"
alt=
""
>
</
template
>
</el-table-column>
...
...
@@ -108,11 +113,11 @@
<el-button
size=
"mini"
@
click=
"imgDialog=true"
>
选择文件
</el-button>
</el-tooltip>
<div>
<div
class=
"zk_pic_box"
v-if=
"
dynamicArr
.length==0"
style=
"width:90px;height:90px;"
<div
class=
"zk_pic_box"
v-if=
"
addMsg.ImgList
.length==0"
style=
"width:90px;height:90px;"
flex=
"main:center cross:center"
>
<i
class=
"el-icon-picture-outline"
></i>
</div>
<div
v-else
class=
"zk_pic_box"
v-for=
"(item,index) in
dynamicArr
"
:key=
"index"
<div
v-else
class=
"zk_pic_box"
v-for=
"(item,index) in
addMsg.ImgList
"
:key=
"index"
style=
"width:90px;height:90px;display:inline-block;margin-right:10px;"
flex=
"main:center cross:center"
:style=
"
{backgroundImage:'url(' + item + ')'}">
<i
v-if=
"item==''"
class=
"el-icon-picture-outline"
></i>
...
...
@@ -185,17 +190,17 @@
pageSize
:
10
,
total
:
0
,
},
dynamicArr
:
[],
//动态图片数组
addMsg
:
{
Id
:
0
,
//编号
CateId
:
0
,
//分类编号
GoodsId
:
0
,
//商品编号
CoverImg
:
""
,
//封面图
MaterialImg
:
""
,
//素材图片
MaterialInfo
:
""
,
//素材文案
LinkUrl
:
""
,
//链接地址
IsTop
:
0
,
//是否置顶
SortNum
:
0
,
//排序
ImgList
:
[],
//动态图片数组
},
imgDialog
:
false
,
//图片弹窗
rules
:
{
...
...
@@ -234,7 +239,6 @@
submitForm
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
addMsg
.
MaterialImg
=
this
.
dynamicArr
.
toString
();
this
.
apipost
(
"/api/Share/SetShareFriend"
,
this
.
addMsg
,
res
=>
{
this
.
loading
=
false
;
...
...
@@ -267,12 +271,16 @@
this
.
addMsg
.
CateId
=
tempObj
.
CateId
;
this
.
addMsg
.
GoodsId
=
tempObj
.
GoodsId
;
this
.
addMsg
.
CoverImg
=
tempObj
.
CoverImg
;
this
.
addMsg
.
MaterialImg
=
tempObj
.
MaterialImg
;
this
.
addMsg
.
MaterialInfo
=
tempObj
.
MaterialInfo
;
if
(
tempObj
.
LinkUrl
)
{
this
.
addMsg
.
LinkUrl
=
tempObj
.
LinkUrl
;
}
this
.
addMsg
.
IsTop
=
tempObj
.
IsTop
;
this
.
addMsg
.
SortNum
=
tempObj
.
SortNum
;
this
.
addMsg
.
ImgList
=
tempObj
.
ImgList
;
}
this
.
IsShowCategory
=
false
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
...
...
@@ -304,7 +312,7 @@
this
.
addMsg
.
CateId
=
0
;
this
.
addMsg
.
GoodsId
=
0
;
this
.
addMsg
.
CoverImg
=
""
;
this
.
addMsg
.
MaterialImg
=
""
;
this
.
addMsg
.
MaterialInfo
=
""
;
this
.
addMsg
.
LinkUrl
=
""
;
this
.
addMsg
.
IsTop
=
1
;
...
...
@@ -346,7 +354,6 @@
},
//更新排序
updateSortNum
(
item
)
{
console
.
log
(
item
,
'item'
);
this
.
apipost
(
"/api/Share/SetShareFriendSortNum"
,
{
Id
:
item
.
Id
,
SortNum
:
item
.
SortNum
...
...
@@ -382,16 +389,20 @@
//选择图片
SelectId
(
msg
)
{
let
that
=
this
;
if
(
this
.
dynamicArr
.
length
<
9
)
{
this
.
dynamicArr
.
push
(
that
.
getIconLink
(
msg
[
0
].
url
));
}
else
{
if
(
msg
&&
msg
.
length
>
0
)
{
msg
.
forEach
(
item
=>
{
this
.
addMsg
.
ImgList
.
push
(
that
.
getIconLink
(
item
.
url
))
})
};
if
(
this
.
addMsg
.
ImgList
.
length
>
9
)
{
this
.
addMsg
.
ImgList
.
length
=
9
;
this
.
Error
(
'最多选择9张图片哟!'
);
}
this
.
imgDialog
=
false
;
},
//删除图片
delImgArr
(
index
)
{
this
.
dynamicArr
.
splice
(
index
,
1
);
this
.
addMsg
.
ImgList
.
splice
(
index
,
1
);
},
},
...
...
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