Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
Madara
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
viitto
Madara
Commits
d0134562
Commit
d0134562
authored
Oct 25, 2019
by
华国豪
🙄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善朋友圈!
parent
e6f9fb92
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
589 additions
and
42 deletions
+589
-42
plugin.js
src/plugin/plugin.js
+1
-0
friendsEdit.vue
src/renderer/components/friends/friendsEdit.vue
+85
-6
friendsFynamic.vue
src/renderer/components/friends/friendsFynamic.vue
+20
-15
friendsItem.vue
src/renderer/components/friends/friendsItem.vue
+66
-8
friendsItemZD.vue
src/renderer/components/friends/friendsItemZD.vue
+26
-0
friendsQuan.vue
src/renderer/components/friends/friendsQuan.vue
+7
-1
friendsQuanContent.vue
src/renderer/components/friends/friendsQuanContent.vue
+41
-6
friendsRelatedme.vue
src/renderer/components/friends/friendsRelatedme.vue
+49
-4
friendsRelatedmeItem.vue
src/renderer/components/friends/friendsRelatedmeItem.vue
+248
-0
friendsReleased.vue
src/renderer/components/friends/friendsReleased.vue
+46
-2
No files found.
src/plugin/plugin.js
View file @
d0134562
...
@@ -22,6 +22,7 @@ export default {
...
@@ -22,6 +22,7 @@ export default {
PostUrl
:
domainUrl
+
"/api/common/post"
,
PostUrl
:
domainUrl
+
"/api/common/post"
,
//上传站点
//上传站点
UploadUrl
:
"http://upload.oytour.com"
,
UploadUrl
:
"http://upload.oytour.com"
,
ImgUrl
:
"http://imgfile.oytour.com"
,
};
};
return
obj
;
return
obj
;
}
}
...
...
src/renderer/components/friends/friendsEdit.vue
View file @
d0134562
...
@@ -4,13 +4,26 @@
...
@@ -4,13 +4,26 @@
<el-input
<el-input
type=
"textarea"
type=
"textarea"
:rows=
"3"
:rows=
"3"
placeholder=
"
请输入内容
"
placeholder=
"
分享个产品
"
v-model=
"content"
>
v-model=
"content"
>
</el-input>
</el-input>
</div>
</div>
<div
class=
"friendsEdit-ctrl"
>
<div
class=
"friendsEdit-ctrl"
>
<i
class=
"iconfont icontupian2"
></i>
<i
class=
"iconfont icontupian2"
:style=
"
{color: imgBoxShow ? '#4780FF' : ''}" @click="imgBoxShow = !imgBoxShow, imgList = []">
</i>
<div
class=
""
>
发表
</div>
<div
@
click=
"SaveDynamic"
:class=
"
{'text-yes' : content.length > 0, 'text-no' : content == ''}">发表
</div>
</div>
<div
style=
"margin: 10px 0;"
v-if=
"imgBoxShow"
>
<el-upload
action=
""
:file-list=
"imgList"
:http-request=
"uploadImg"
:multiple=
"false"
:limit=
"9"
accept=
"image/jpeg,image/gif,image/png,image/bmp"
list-type=
"picture-card"
:on-remove=
"handleRemoveImg"
>
<i
class=
"el-icon-plus"
></i>
</el-upload>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -18,11 +31,66 @@
...
@@ -18,11 +31,66 @@
export
default
{
export
default
{
data
(){
data
(){
return
{
return
{
content
:
''
content
:
''
,
imgList
:
[],
imgBoxShow
:
false
,
addDynamicMsg
:
{
content
:
""
,
fileList
:
[],
latAndLong
:
""
,
address
:
""
,
rB_GroupId
:
"-1"
,
rB_BranchId
:
"-1"
,
coverPhoto
:
""
},
}
}
},
mounted
()
{
},
mounted
()
{
let
userInfo
=
JSON
.
parse
(
localStorage
.
user
)
this
.
addDynamicMsg
.
rB_GroupId
=
userInfo
.
RB_Group_id
;
this
.
addDynamicMsg
.
rB_BranchId
=
userInfo
.
RB_Branch_id
;
},
methods
:
{
},
methods
:
{
SaveDynamic
()
{
//发布动态
if
(
this
.
content
===
''
)
return
this
.
addDynamicMsg
.
content
=
encodeURIComponent
(
this
.
content
);
this
.
apipost
(
"user_publish_dynamic"
,
this
.
addDynamicMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
$message
.
success
(
res
.
data
.
message
);
this
.
MsgBus
.
$emit
(
'get-list'
)
this
.
content
=
''
this
.
imgList
=
[]
}
},
err
=>
{}
);
},
uploadImg
(
file
)
{
//上传
let
newArr
=
[];
newArr
.
push
(
file
.
file
);
let
path
=
"/Upload/Temporary/"
;
this
.
UploadSelfFileT
(
path
,
newArr
,
x
=>
{
let
url
=
this
.
domainManager
().
ImgUrl
+
x
.
data
.
FilePath
this
.
addDynamicMsg
.
fileList
.
push
(
url
);
this
.
imgList
.
push
({
url
:
url
});
});
},
handleRemoveImg
(
file
)
{
//删除
this
.
imgList
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
url
==
file
.
url
)
{
this
.
imgList
.
splice
(
index
,
1
);
}
});
this
.
addDynamicMsg
.
fileList
.
forEach
((
item
,
index
)
=>
{
if
(
item
==
file
.
url
)
{
this
.
addDynamicMsg
.
fileList
.
splice
(
index
,
1
);
}
});
},
}
}
}
}
</
script
>
</
script
>
...
@@ -45,10 +113,21 @@ export default {
...
@@ -45,10 +113,21 @@ export default {
color
:
#47A5FF
;
color
:
#47A5FF
;
}
}
.friendsEdit-ctrl
div
{
.friendsEdit-ctrl
div
{
cursor
:
pointer
;
padding
:
6px
16px
;
padding
:
6px
16px
;
font-size
:
12px
;
border
:
1px
solid
#4780FF
;
}
.friendsEdit-ctrl
div
.text-yes
{
cursor
:
pointer
;
background
:
linear-gradient
(
60deg
,
rgba
(
71
,
121
,
255
,
1
),
rgba
(
71
,
165
,
255
,
1
));
background
:
linear-gradient
(
60deg
,
rgba
(
71
,
121
,
255
,
1
),
rgba
(
71
,
165
,
255
,
1
));
color
:
rgba
(
255
,
254
,
254
,
1
);
color
:
rgba
(
255
,
254
,
254
,
1
);
}
.friendsEdit-ctrl
div
.text-no
{
background
:
#fff
;
color
:
#4780FF
;
font-size
:
12px
;
font-size
:
12px
;
}
}
.friendsEdit
textarea
{
padding
:
5px
10px
;
}
</
style
>
</
style
>
\ No newline at end of file
src/renderer/components/friends/friendsFynamic.vue
View file @
d0134562
...
@@ -2,17 +2,22 @@
...
@@ -2,17 +2,22 @@
<div
class=
"friendsFynamic"
>
<div
class=
"friendsFynamic"
>
<friendsEdit
v-if=
"editShow"
/>
<friendsEdit
v-if=
"editShow"
/>
<ul
v-loading=
"loading"
>
<ul
v-loading=
"loading"
>
<friendsItem
v-for=
"item in list"
:item=
"item"
/>
<template
v-for=
"item in list"
>
<friendsItem
v-if=
"item.fileType!==3"
:item=
"item"
/>
<friendsItemZD
v-else
:item=
"item"
/>
</
template
>
</ul>
</ul>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
friendsEdit
from
'./friendsEdit'
import
friendsEdit
from
'./friendsEdit'
import
friendsItem
from
'./friendsItem'
import
friendsItem
from
'./friendsItem'
import
friendsItemZD
from
'./friendsItemZD'
export
default
{
export
default
{
components
:
{
components
:
{
friendsEdit
,
friendsEdit
,
friendsItem
friendsItem
,
friendsItemZD
},
props
:
{
},
props
:
{
editShow
:
{
editShow
:
{
type
:
Boolean
,
type
:
Boolean
,
...
@@ -26,29 +31,26 @@ export default {
...
@@ -26,29 +31,26 @@ export default {
dynamicMsg
:
{
dynamicMsg
:
{
groupId
:
""
,
groupId
:
""
,
pageIndex
:
1
,
pageIndex
:
1
,
pageSize
:
3
pageSize
:
6
},
},
}
}
},
created
()
{
},
mounted
()
{
},
mounted
()
{
let
userInfo
=
JSON
.
parse
(
localStorage
.
user
)
let
userInfo
=
JSON
.
parse
(
localStorage
.
user
)
this
.
dynamicMsg
.
groupId
=
userInfo
.
RB_Group_id
;
this
.
dynamicMsg
.
groupId
=
userInfo
.
RB_Group_id
;
this
.
getList
()
this
.
getList
()
let
_this
=
this
let
_this
=
this
this
.
MsgBus
.
$on
(
'get-list'
,
function
()
{
this
.
MsgBus
.
$on
(
'get-list'
,
function
()
{
console
.
log
(
11111
)
_this
.
getList
(
1
)
_this
.
getList
(
1
)
_this
.
MsgBus
.
$emit
(
"edit-show"
)
})
})
setTimeout
(()
=>
{
document
.
getElementById
(
"friendsQuanContent"
)
.
addEventListener
(
"scroll"
,
function
()
{
if
(
this
.
scrollHeight
-
this
.
scrollTop
===
this
.
clientHeight
)
{
_this
.
dynamicMsg
.
pageIndex
=
_this
.
dynamicMsg
.
pageIndex
+
1
;
_this
.
getList
();
}
});
},
2000
);
},
methods
:
{
},
methods
:
{
scrollBottom
(
dom
){
if
(
dom
.
scrollHeight
-
dom
.
scrollTop
===
dom
.
clientHeight
)
{
this
.
dynamicMsg
.
pageIndex
=
this
.
dynamicMsg
.
pageIndex
+
1
;
this
.
getList
();
}
},
getList
:
function
(
params
)
{
getList
:
function
(
params
)
{
this
.
loading
=
true
this
.
loading
=
true
if
(
params
)
{
if
(
params
)
{
...
@@ -67,7 +69,10 @@ export default {
...
@@ -67,7 +69,10 @@ export default {
this
.
loading
=
false
this
.
loading
=
false
}
}
},
err
=>
{});
},
err
=>
{});
}
},
},
beforeDestroy
()
{
this
.
MsgBus
.
$off
(
'get-list'
)
}
}
}
}
</
script
>
</
script
>
...
...
src/renderer/components/friends/friendsItem.vue
View file @
d0134562
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
<div
class=
"right"
>
<div
class=
"right"
>
<i
class=
"iconfont icondianzan"
:style=
"
{color: items.hasLike ? '#4780FF' : ''}" @click="LikeArticleFun">
</i>
<i
class=
"iconfont icondianzan"
:style=
"
{color: items.hasLike ? '#4780FF' : ''}" @click="LikeArticleFun">
</i>
<i
class=
"iconfont iconpinglunbiao"
:style=
"
{color: msgBox ? '#4780FF' : ''}" @click="msgBox = !msgBox, reviewMsgId = 0">
</i>
<i
class=
"iconfont iconpinglunbiao"
:style=
"
{color: msgBox ? '#4780FF' : ''}" @click="msgBox = !msgBox, reviewMsgId = 0">
</i>
<i
v-if=
"mySelf"
class=
'el-icon-delete'
:style=
"
{color: msgBox ? '#4780FF' : ''}" @click="deleteArticle">
</i>
</div>
</div>
</div>
</div>
<div
class=
"review"
v-if=
"item.commentList.length>0"
>
<div
class=
"review"
v-if=
"item.commentList.length>0"
>
...
@@ -56,7 +57,7 @@
...
@@ -56,7 +57,7 @@
placeholder=
"老铁,说点什么吧"
placeholder=
"老铁,说点什么吧"
v-model=
"content"
>
v-model=
"content"
>
</el-input>
</el-input>
<div
class=
"send"
@
click=
"reviewArticle"
>
发表
</div>
<div
class=
"send"
:class=
"
{'send-yes' : content.length > 0}"
@click="reviewArticle">发表
</div>
</div>
</div>
</li>
</li>
</
template
>
</
template
>
...
@@ -68,6 +69,10 @@ export default {
...
@@ -68,6 +69,10 @@ export default {
item
:
{
item
:
{
type
:
Object
,
type
:
Object
,
default
:
{}
default
:
{}
},
mySelf
:
{
type
:
Boolean
,
default
:
false
}
}
},
},
filters
:
{
filters
:
{
...
@@ -117,7 +122,11 @@ export default {
...
@@ -117,7 +122,11 @@ export default {
content
:
""
,
content
:
""
,
msgBox
:
false
,
msgBox
:
false
,
userId
:
''
,
userId
:
''
,
reviewMsgId
:
0
reviewMsgId
:
0
,
deleteMsg
:
{
groupId
:
"-1"
,
articleId
:
""
}
}
}
},
watch
:
{
},
watch
:
{
item
(
newVal
,
oldVal
){
item
(
newVal
,
oldVal
){
...
@@ -126,10 +135,38 @@ export default {
...
@@ -126,10 +135,38 @@ export default {
},
created
()
{
},
created
()
{
let
userInfo
=
JSON
.
parse
(
localStorage
.
user
)
let
userInfo
=
JSON
.
parse
(
localStorage
.
user
)
this
.
userId
=
userInfo
.
EmployeeId
;
this
.
userId
=
userInfo
.
EmployeeId
;
this
.
deleteMsg
.
groupId
=
userInfo
.
RB_Group_id
this
.
items
=
this
.
item
this
.
items
=
this
.
item
},
mounted
()
{
},
mounted
()
{
},
methods
:
{
},
methods
:
{
deleteArticle
()
{
//删除动态
this
.
deleteMsg
.
articleId
=
this
.
items
.
id
;
this
.
$confirm
(
"是否删除?"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
})
.
then
(()
=>
{
this
.
apipost
(
"delete_dynamic"
,
this
.
deleteMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
$message
.
success
(
res
.
data
.
message
);
this
.
MsgBus
.
$emit
(
'get-list'
)
}
else
{
this
.
$message
.
error
(
res
.
data
.
message
);
}
},
err
=>
{}
);
})
.
catch
(()
=>
{
this
.
$message
.
info
(
"已取消删除!"
);
});
},
deleteComments
(
id
)
{
deleteComments
(
id
)
{
//从全部动态删除评论
//从全部动态删除评论
this
.
apipost
(
this
.
apipost
(
...
@@ -148,6 +185,7 @@ export default {
...
@@ -148,6 +185,7 @@ export default {
},
},
reviewArticle
()
{
reviewArticle
()
{
//从全部动态回复
//从全部动态回复
if
(
this
.
content
===
''
)
return
let
msg
=
{};
let
msg
=
{};
msg
.
articleId
=
this
.
items
.
id
;
msg
.
articleId
=
this
.
items
.
id
;
msg
.
commentId
=
this
.
reviewMsgId
;
msg
.
commentId
=
this
.
reviewMsgId
;
...
@@ -196,10 +234,11 @@ export default {
...
@@ -196,10 +234,11 @@ export default {
width
:
38px
;
width
:
38px
;
height
:
38px
;
height
:
38px
;
margin-right
:
10px
;
margin-right
:
10px
;
border-radius
:
50%
}
}
.f-item-top
.name
,
.f-item-top
.time
{
.f-item-top
.name
,
.f-item-top
.time
{
font-size
:
12px
;
font-size
:
12px
;
font-family
:
PingFang
SC
;
font-family
:
"pingfang"
!important
;
color
:
#000
;
color
:
#000
;
}
}
.f-item-top
.time
{
.f-item-top
.time
{
...
@@ -208,6 +247,7 @@ export default {
...
@@ -208,6 +247,7 @@ export default {
.f-item-content
{
.f-item-content
{
margin-top
:
10px
;
margin-top
:
10px
;
line-height
:
20px
;
line-height
:
20px
;
margin-bottom
:
5px
;
font-size
:
14px
;
font-size
:
14px
;
color
:
#000
;
color
:
#000
;
}
}
...
@@ -255,18 +295,36 @@ export default {
...
@@ -255,18 +295,36 @@ export default {
padding
:
5px
75px
5px
5px
;
padding
:
5px
75px
5px
5px
;
border-radius
:
0
;
border-radius
:
0
;
}
}
.msgBox
.send
{
.
f-item
.
msgBox
.send
{
cursor
:
pointer
;
cursor
:
pointer
;
padding
:
3px
16px
;
padding
:
3px
16px
;
background
:
linear-gradient
(
60deg
,
rgba
(
71
,
121
,
255
,
1
),
rgba
(
71
,
165
,
255
,
1
));
border
:
1px
solid
#4780FF
;
color
:
rgba
(
255
,
254
,
254
,
1
);
background
:
#fff
;
color
:
#4780FF
;
font-size
:
12px
;
font-size
:
12px
;
position
:
absolute
;
position
:
absolute
;
right
:
10px
;
right
:
10px
;
bottom
:
5px
;
bottom
:
5px
;
}
}
.f-item
.review
{
width
:
100%
;
background
:
#C8D8DF
;
padding
:
10px
;
position
:
relative
;}
.f-item
.msgBox
.send-yes
{
.f-item
.review
.reviewIcon
{
width
:
18px
;
height
:
12px
;
background
:
#73BFFF
;
position
:
absolute
;
top
:
16px
;
border-radius
:
4px
;}
background
:
linear-gradient
(
60deg
,
rgba
(
71
,
121
,
255
,
1
),
rgba
(
71
,
165
,
255
,
1
));
color
:
rgba
(
255
,
254
,
254
,
1
);
}
.f-item
.review
{
width
:
100%
;
background
:
#C8D8DF
;
padding
:
10px
;
position
:
relative
;
margin-top
:
10px
;
}
.f-item
.review
.reviewIcon
{
width
:
18px
;
height
:
12px
;
background
:
#73BFFF
;
position
:
absolute
;
top
:
16px
;
border-radius
:
4px
;
}
.f-item
.review
.reviewIcon
.sjx
{
.f-item
.review
.reviewIcon
.sjx
{
position
:
absolute
;
position
:
absolute
;
left
:
5px
;
left
:
5px
;
...
...
src/renderer/components/friends/friendsItemZD.vue
0 → 100644
View file @
d0134562
<
template
>
</
template
>
<
script
>
export
default
{
components
:
{
},
props
:{
},
data
(){
return
{
}
},
mounted
()
{
},
methods
:
{
},
}
</
script
>
<
style
>
</
style
>
\ No newline at end of file
src/renderer/components/friends/friendsQuan.vue
View file @
d0134562
<
template
>
<
template
>
<div>
<div>
<searchBox
:list=
"list"
:activeID=
"activeID"
@
changeType=
"changeType"
:hideSearch=
"true"
/>
<searchBox
:list=
"list"
:activeID=
"activeID"
@
changeType=
"changeType"
:hideSearch=
"true"
/>
<friendsQuanContent
:activeName=
"activeName"
:activeID=
"activeID"
/>
<friendsQuanContent
v-if=
"loding"
:activeName=
"activeName"
:activeID=
"activeID"
/>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -15,6 +15,7 @@ export default {
...
@@ -15,6 +15,7 @@ export default {
data
(){
data
(){
return
{
return
{
activeID
:
0
,
activeID
:
0
,
loding
:
true
,
activeName
:
'圈友动态'
,
activeName
:
'圈友动态'
,
list
:
[
list
:
[
{
{
...
@@ -41,6 +42,11 @@ export default {
...
@@ -41,6 +42,11 @@ export default {
this
.
showData
=
[]
this
.
showData
=
[]
this
.
activeID
=
id
;
this
.
activeID
=
id
;
this
.
activeName
=
this
.
list
[
id
].
name
;
this
.
activeName
=
this
.
list
[
id
].
name
;
let
_this
=
this
;
_this
.
loding
=
false
setTimeout
(()
=>
{
_this
.
loding
=
true
},
500
);
}
}
}
}
}
}
...
...
src/renderer/components/friends/friendsQuanContent.vue
View file @
d0134562
...
@@ -2,13 +2,14 @@
...
@@ -2,13 +2,14 @@
<div
class=
"friendsQuanContent"
id=
"friendsQuanContent"
>
<div
class=
"friendsQuanContent"
id=
"friendsQuanContent"
>
<div
class=
"F-top"
>
<div
class=
"F-top"
>
<span>
{{
activeName
}}
</span>
<span>
{{
activeName
}}
</span>
<i
class=
"iconfont iconzhongmingming"
v-if=
"activeID === 0"
@
click=
"editShow =
true
"
></i>
<i
class=
"iconfont iconzhongmingming"
v-if=
"activeID === 0"
@
click=
"editShow =
!editShow
"
></i>
</div>
</div>
<div>
<div>
<friendsFynamic
v-if=
"activeID === 0"
:editShow=
"editShow"
/>
<friendsFynamic
v-if=
"activeID === 0"
:editShow=
"editShow"
ref=
"mychild"
/>
<friendsRelatedme
v-if=
"activeID === 1"
/>
<friendsRelatedme
v-if=
"activeID === 1"
ref=
"mychild"
/>
<friendsReleased
v-if=
"activeID === 2"
/>
<friendsReleased
v-if=
"activeID === 2"
ref=
"mychild"
/>
</div>
</div>
<div
class=
"backtop"
style=
"right: 20px; bottom: 20px;"
@
click=
"backTop"
><i
class=
"el-icon-caret-top"
></i></div>
</div>
</div>
</
template
>
</
template
>
...
@@ -35,15 +36,49 @@ export default {
...
@@ -35,15 +36,49 @@ export default {
data
(){
data
(){
return
{
return
{
editShow
:
false
,
editShow
:
false
,
dom
:
null
,
}
}
},
mounted
()
{
},
mounted
()
{
let
_this
=
this
setTimeout
(()
=>
{
document
.
getElementById
(
"friendsQuanContent"
)
.
addEventListener
(
"scroll"
,
_this
.
scrollBottom
,
false
);
},
2000
);
this
.
MsgBus
.
$on
(
"edit-show"
,
function
(
params
)
{
_this
.
editShow
=
false
})
},
methods
:
{
},
methods
:
{
scrollBottom
(){
}
let
dom
=
document
.
getElementById
(
"friendsQuanContent"
)
if
(
dom
.
scrollHeight
-
dom
.
scrollTop
===
dom
.
clientHeight
)
{
this
.
$refs
.
mychild
.
scrollBottom
(
dom
);
}
},
backTop
(){
document
.
getElementById
(
"friendsQuanContent"
).
scrollTop
=
0
}
},
destroyed
()
{
let
_this
=
this
;
if
(
!
document
.
getElementById
(
"friendsQuanContent"
))
return
document
.
getElementById
(
"friendsQuanContent"
).
removeEventListener
(
"scroll"
,
_this
.
scrollBottom
,
false
);
},
}
}
</
script
>
</
script
>
<
style
>
<
style
>
.backtop
{
position
:
fixed
;
border-radius
:
50%
;
color
:
#409eff
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
font-size
:
20px
;
box-shadow
:
0
0
6px
rgba
(
0
,
0
,
0
,
.12
);
cursor
:
pointer
;
z-index
:
5
;
}
.friendsQuanContent
*
{
.friendsQuanContent
*
{
margin
:
0
;
margin
:
0
;
padding
:
0
;
padding
:
0
;
...
...
src/renderer/components/friends/friendsRelatedme.vue
View file @
d0134562
<
template
>
<
template
>
<
div
class=
"friendsRelatedme
"
>
<
ul
class=
"friendsRelatedme"
v-loading=
"loading
"
>
与我相关
<friendsRelatedmeItem
v-for=
"item in list"
:item=
"item"
/>
</
div
>
</
ul
>
</
template
>
</
template
>
<
script
>
<
script
>
import
friendsRelatedmeItem
from
"./friendsRelatedmeItem"
;
export
default
{
export
default
{
components
:
{
components
:
{
friendsRelatedmeItem
},
},
data
(){
data
(){
return
{
return
{
list
:
[],
aboutMeDynamicMsg
:
{
pageIndex
:
1
,
pageSize
:
10
},
loading
:
false
,
}
}
},
mounted
()
{
},
mounted
()
{
this
.
getList
();
let
_this
=
this
this
.
MsgBus
.
$on
(
'friendsRelatedme-get'
,
function
(
params
)
{
_this
.
getList
(
1
)
})
},
methods
:
{
},
methods
:
{
scrollBottom
(
dom
){
if
(
dom
.
scrollHeight
-
dom
.
scrollTop
===
dom
.
clientHeight
)
{
this
.
aboutMeDynamicMsg
.
pageIndex
=
this
.
aboutMeDynamicMsg
.
pageIndex
+
1
;
this
.
getList
();
}
},
getList
(
params
)
{
this
.
loading
=
true
if
(
params
)
{
this
.
aboutMeDynamicMsg
.
pageSize
=
this
.
aboutMeDynamicMsg
.
pageSize
*
this
.
aboutMeDynamicMsg
.
pageIndex
this
.
aboutMeDynamicMsg
.
pageIndex
=
1
}
this
.
apipost
(
"user_about_me_dynamic_list"
,
this
.
aboutMeDynamicMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
params
)
{
this
.
list
=
res
.
data
.
data
.
pageData
}
else
{
this
.
list
=
this
.
list
.
concat
(
res
.
data
.
data
.
pageData
);
}
this
.
loading
=
false
;
}
},
err
=>
{}
);
}
}
}
}
}
</
script
>
</
script
>
<
style
>
<
style
>
.friendsRelatedme
{
background-color
:
#F1F1F1
;
}
</
style
>
</
style
>
\ No newline at end of file
src/renderer/components/friends/friendsRelatedmeItem.vue
0 → 100644
View file @
d0134562
<
template
>
<li
class=
"friendsRelatedmeItem"
>
<div
class=
"fme-item-top"
>
<div>
<img
:src=
"items.crearteEmPhoto"
>
</div>
<div>
<p
class=
"name"
>
{{
items
.
createEmName
}}
</p>
<p
class=
"time"
>
{{
items
.
createTime
|
diaplayTime
(
items
.
createTime
)
}}
</p>
</div>
</div>
<div
class=
"fme-content"
>
<div
class=
"fme-item-img"
v-if=
"items.fileType === 1"
>
<div
@
click=
"showImg(items.fileList[0])"
:style=
"`background-image: url($
{items.fileList[0]})`">
</div>
</div>
<el-tooltip
popper-class=
"tooltip-item"
effect=
"dark"
:content=
"items.content | decodeURIComponent(items.content)"
placement=
"top"
>
<div
class=
"text-row3"
>
{{
items
.
content
|
decodeURIComponent
(
items
.
content
)
}}
</div>
</el-tooltip>
</div>
<div
class=
"fme-talk"
:style=
"
{'background-color': items.realtionType === 2 ? '' : '#e4e4e4'}">
<p
v-if=
"items.realtionType === 2"
><i
class=
"iconfont icondianzan"
></i>
点赞
</p>
<p
v-else
class=
"msg-p"
>
<span
class=
"reviewIcon"
>
<span
class=
"sjx"
></span>
</span>
{{
items
.
commentContent
|
decodeURIComponent
(
items
.
commentContent
)
}}
<i
class=
"iconfont iconpinglunbiao"
@
click=
"msgBox = !msgBox"
></i>
</p>
</div>
<div
class=
"msgBox"
v-if=
"items.realtionType === 1 && msgBox"
>
<el-input
type=
"textarea"
:rows=
"2"
placeholder=
"老铁,说点什么吧"
v-model=
"content"
>
</el-input>
<div
class=
"send"
:class=
"
{'send-yes' : content.length > 0}" @click="reviewArticle">发表
</div>
</div>
</li>
</
template
>
<
script
>
export
default
{
filters
:
{
decodeURIComponent
(
val
)
{
return
decodeURIComponent
(
val
);
},
diaplayTime
(
data
)
{
var
str
=
data
;
// 将字符串转换成时间格式
var
timePublish
=
new
Date
(
str
);
var
timeNow
=
new
Date
();
var
minute
=
1000
*
60
;
var
hour
=
minute
*
60
;
var
day
=
hour
*
24
;
var
month
=
day
*
30
;
var
diffValue
=
timeNow
-
timePublish
;
var
diffMonth
=
diffValue
/
month
;
var
diffWeek
=
diffValue
/
(
7
*
day
);
var
diffDay
=
diffValue
/
day
;
var
diffHour
=
diffValue
/
hour
;
var
diffMinute
=
diffValue
/
minute
;
var
result
=
""
;
if
(
diffValue
<
0
)
{
}
else
if
(
diffMonth
>
3
)
{
result
=
timePublish
.
getFullYear
()
+
"-"
;
result
+=
timePublish
.
getMonth
()
+
"-"
;
result
+=
timePublish
.
getDate
();
}
else
if
(
diffMonth
>
1
)
{
result
=
parseInt
(
diffMonth
)
+
"月前"
;
}
else
if
(
diffWeek
>
1
)
{
result
=
parseInt
(
diffWeek
)
+
"周前"
;
}
else
if
(
diffDay
>
1
)
{
result
=
parseInt
(
diffDay
)
+
"天前"
;
}
else
if
(
diffHour
>
1
)
{
result
=
parseInt
(
diffHour
)
+
"小时前"
;
}
else
if
(
diffMinute
>
1
)
{
result
=
parseInt
(
diffMinute
)
+
"分钟前"
;
}
else
{
result
=
"刚刚"
;
}
return
result
;
}
},
props
:
{
item
:
{
type
:
Object
,
default
:
{}
}
},
watch
:
{
item
(
newVal
,
oldVal
){
this
.
items
=
this
.
item
}
},
data
(){
return
{
items
:
{},
content
:
""
,
msgBox
:
false
,
}
},
mounted
()
{
this
.
items
=
this
.
item
},
methods
:
{
reviewArticle
(
id
,
index
)
{
//从与我相关回复
if
(
this
.
content
===
''
)
return
let
msg
=
{}
msg
.
articleId
=
this
.
items
.
id
;
msg
.
content
=
encodeURIComponent
(
this
.
content
);
//编码
msg
.
commentId
=
this
.
items
.
commentId
;
this
.
apipost
(
"user_dynamic_comment"
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
$message
.
success
(
res
.
data
.
message
);
this
.
MsgBus
.
$emit
(
"friendsRelatedme-get"
)
this
.
msgBox
=
false
this
.
content
=
''
}
},
err
=>
{}
);
},
}
}
</
script
>
<
style
>
.friendsRelatedmeItem
{
padding
:
20px
;
background-color
:
#fff
;
margin-bottom
:
10px
;
}
.fme-item-top
{
display
:
flex
;
height
:
40px
;
}
.fme-item-top
img
{
width
:
38px
;
height
:
38px
;
margin-right
:
10px
;
border-radius
:
50%
}
.fme-item-top
.name
,
.fme-item-top
.time
{
font-size
:
12px
;
font-family
:
"pingfang"
!important
;
color
:
#000
;
}
.fme-item-top
.time
{
color
:
rgba
(
136
,
136
,
136
,
1
);
}
.fme-talk
.icondianzan
{
color
:
rgba
(
244
,
92
,
67
,
1
);
}
.fme-talk
.iconpinglunbiao
{
color
:
#9195A0
;
cursor
:
pointer
;
padding-left
:
10px
;
display
:
none
;
}
.fme-talk
:hover
.iconpinglunbiao
{
display
:
inline-block
;
}
.fme-talk
.iconpinglunbiao
:hover
{
color
:
rgba
(
71
,
121
,
255
,
1
);
}
.fme-content
{
padding-left
:
48px
;
margin-top
:
2px
;
display
:
flex
;
font-size
:
12px
;
font-family
:
"pingfang"
!important
;
}
.fme-item-img
{
display
:
flex
;
flex-wrap
:
wrap
;
}
.fme-item-img
div
{
background-size
:
cover
;
height
:
60px
;
width
:
60px
;
margin-right
:
10px
;
}
.fme-talk
{
margin
:
10px
0
0
48px
;
padding
:
10px
48px
10px
10px
;
font-size
:
12px
;
position
:
relative
;
}
.fme-talk
.msg-p
{
padding-left
:
28px
;
height
:
24px
;
line-height
:
24px
;
display
:
flex
;
align-items
:
center
;
}
.friendsRelatedmeItem
.msgBox
{
position
:
relative
;
margin-top
:
10px
;
margin
:
10px
0
0
48px
;
}
.friendsRelatedmeItem
.msgBox
textarea
{
padding
:
5px
75px
5px
5px
;
border-radius
:
0
;
}
.friendsRelatedmeItem
.msgBox
.send
{
cursor
:
pointer
;
padding
:
3px
16px
;
border
:
1px
solid
#4780FF
;
background
:
#fff
;
color
:
#4780FF
;
font-size
:
12px
;
position
:
absolute
;
right
:
10px
;
bottom
:
5px
;
}
.friendsRelatedmeItem
.msgBox
.send-yes
{
background
:
linear-gradient
(
60deg
,
rgba
(
71
,
121
,
255
,
1
),
rgba
(
71
,
165
,
255
,
1
));
color
:
rgba
(
255
,
254
,
254
,
1
);
}
.fme-talk
p
.reviewIcon
{
width
:
18px
;
height
:
12px
;
background
:
#73BFFF
;
position
:
absolute
;
top
:
12px
;
border-radius
:
4px
;
left
:
10px
;
}
.fme-talk
p
.reviewIcon
.sjx
{
position
:
absolute
;
left
:
5px
;
top
:
11px
;
width
:
0
;
height
:
0
;
border-width
:
4px
;
border-style
:
solid
;
border-color
:
#73BFFF
transparent
transparent
transparent
;
}
.text-row3
{
overflow
:
hidden
;
white-space
:
normal
;
word-break
:
break-all
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-line-clamp
:
1
;
-webkit-box-orient
:
vertical
;
}
</
style
>
\ No newline at end of file
src/renderer/components/friends/friendsReleased.vue
View file @
d0134562
<
template
>
<
template
>
<div
class=
"friends
Released
"
>
<div
class=
"friends
Fynamic
"
>
<friendsEdit/>
<friendsEdit/>
<ul
v-loading=
"loading"
>
<friendsItem
v-for=
"item in list"
:item=
"item"
:mySelf=
"true"
/>
</ul>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
friendsEdit
from
'./friendsEdit'
import
friendsEdit
from
'./friendsEdit'
import
friendsItem
from
'./friendsItem'
export
default
{
export
default
{
components
:
{
components
:
{
friendsEdit
friendsEdit
,
friendsItem
},
},
data
(){
data
(){
return
{
return
{
loading
:
false
,
list
:
[],
dynamicMsg
:
{
pageIndex
:
1
,
pageSize
:
6
},
}
}
},
mounted
()
{
},
mounted
()
{
this
.
getList
()
let
_this
=
this
this
.
MsgBus
.
$on
(
'get-list'
,
function
()
{
_this
.
getList
(
1
)
_this
.
MsgBus
.
$emit
(
"edit-show"
)
})
},
methods
:
{
},
methods
:
{
scrollBottom
(
dom
){
if
(
dom
.
scrollHeight
-
dom
.
scrollTop
===
dom
.
clientHeight
)
{
this
.
getList
();
}
},
getList
:
function
(
params
)
{
this
.
loading
=
true
if
(
params
)
{
this
.
dynamicMsg
.
pageSize
=
this
.
dynamicMsg
.
pageSize
*
this
.
dynamicMsg
.
pageIndex
this
.
dynamicMsg
.
pageIndex
=
1
}
this
.
apipost
(
"user_web_my_dynamic_list"
,
this
.
dynamicMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
params
)
{
this
.
list
=
res
.
data
.
data
.
pageData
}
else
{
this
.
list
=
this
.
list
.
concat
(
res
.
data
.
data
.
pageData
);
}
this
.
loading
=
false
}
},
err
=>
{});
},
}
}
}
}
</
script
>
</
script
>
<
style
>
<
style
>
.friendsFynamic
{
background-color
:
#F1F1F1
;
}
</
style
>
</
style
>
\ No newline at end of file
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