Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
party-build-cloud
Project
Project
Details
Activity
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
wangqinghua
party-build-cloud
Commits
fd53cf76
Commit
fd53cf76
authored
May 21, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
回复评论
parent
bddc0797
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
244 additions
and
0 deletions
+244
-0
comment.html
src/components/comment/comment.html
+16
-0
comment.scss
src/components/comment/comment.scss
+25
-0
comment.ts
src/components/comment/comment.ts
+39
-0
reply.html
src/components/reply/reply.html
+46
-0
reply.scss
src/components/reply/reply.scss
+53
-0
reply.ts
src/components/reply/reply.ts
+65
-0
No files found.
src/components/comment/comment.html
0 → 100644
View file @
fd53cf76
<div
class=
"main"
>
<div
class=
"content"
(
click
)="
close
()"
>
<div
class=
"comment"
(
click
)="
stop
($
event
)"
>
<ion-row>
<ion-col
col-2
>
<ion-icon
class=
"close"
(
click
)="
close
()"
name=
"close"
></ion-icon>
</ion-col>
<ion-col
col-8
text-center
>
回复评论
</ion-col>
<ion-col
col-2
text-center
(
click
)="
submit
()"
>
提交
</ion-col>
</ion-row>
<div
class=
"padding-10"
>
<textarea
#
textAreaElement
[(
ngModel
)]="
replyContent
"
class=
"content-textarea"
placeholder=
"{{placeholder}}"
></textarea>
</div>
</div>
</div>
</div>
src/components/comment/comment.scss
0 → 100644
View file @
fd53cf76
comment
{
.main
{
background-color
:
rgba
(
0
,
0
,
0
,.
4
);
height
:
100%
;
}
.content
{
position
:
relative
;
height
:
100%
;
width
:
100%
;
}
.comment
{
position
:
absolute
;
width
:
100%
;
bottom
:
0
;
height
:
80%
;
background
:
#fff
;
border-top-right-radius
:
8px
;
border-top-left-radius
:
8px
;
padding
:
5px
15px
;
ion-icon
{
font-size
:
3rem
;
font-weight
:
bold
;
}
}
}
src/components/comment/comment.ts
0 → 100644
View file @
fd53cf76
import
{
Component
,
ElementRef
,
ViewChild
}
from
'@angular/core'
;
import
{
NavController
,
NavParams
,
ViewController
}
from
"ionic-angular"
;
import
{
TabsService
}
from
"../../pages/tabs/tabs.service"
;
import
{
AppService
}
from
"../../service/http.service"
;
import
{
Keyboard
}
from
"@ionic-native/keyboard"
;
@
Component
({
selector
:
'comment'
,
templateUrl
:
'comment.html'
})
export
class
CommentComponent
{
@
ViewChild
(
'textAreaElement'
)
textAreaElement
:
ElementRef
;
replyContent
:
string
;
placeholder
:
string
;
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
private
tabSer
:
TabsService
,
private
keyboard
:
Keyboard
,
public
viewCtrl
:
ViewController
,
public
appService
:
AppService
)
{
this
.
placeholder
=
this
.
navParams
.
get
(
'placeholder'
);
setTimeout
(()
=>
{
this
.
textAreaElement
.
nativeElement
.
focus
();
this
.
keyboard
.
show
();
},
500
)
}
close
()
{
this
.
viewCtrl
.
dismiss
();
}
stop
(
e
)
{
e
.
stopPropagation
();
}
submit
(){
this
.
viewCtrl
.
dismiss
(
this
.
replyContent
);
}
}
src/components/reply/reply.html
0 → 100644
View file @
fd53cf76
<div
class=
"main"
>
<div
class=
"content"
(
click
)="
close
()"
>
<div
class=
"comment"
(
click
)="
stop
($
event
)"
>
<ion-row
class=
"comment-item"
>
<ion-col
col-2
>
<img
src=
"./assets/imgs/man.png"
class=
"contact-img"
>
</ion-col>
<ion-col
col-10
style=
"padding-bottom: 5px;border-bottom: 1px solid #eeeeee"
>
<p
class=
"comment-info"
>
{{comment?.username}}
</p>
<p
class=
"commnet-content"
>
{{comment?.content}}
</p>
<p
class=
"comment-time"
>
{{comment?.createTime | date:'yyyy-MM-dd'}}
<span>
·
</span>
</p>
</ion-col>
</ion-row>
<div
class=
"reply-content"
>
<ion-row
*
ngFor=
"let reply of relpyList"
>
<ion-col
offset-2
col-10
>
<ion-row
class=
"comment-item"
>
<ion-col
col-2
>
<img
src=
"./assets/imgs/man.png"
class=
"contact-img"
>
</ion-col>
<ion-col
col-10
>
<p
class=
"comment-info"
>
{{reply?.username}}
</p>
<p
class=
"commnet-content"
>
{{reply?.content}}
</p>
<p
class=
"comment-time"
>
{{reply?.createTime | date:'yyyy-MM-dd'}}
<span>
·
</span>
</p>
</ion-col>
</ion-row>
</ion-col>
</ion-row>
</div>
</div>
<div
class=
"reply"
>
</div>
</div>
</div>
src/components/reply/reply.scss
0 → 100644
View file @
fd53cf76
reply
{
.main
{
background-color
:
rgba
(
0
,
0
,
0
,.
4
);
height
:
100%
;
}
.content
{
position
:
relative
;
height
:
100%
;
width
:
100%
;
}
.comment
{
position
:
absolute
;
width
:
100%
;
bottom
:
0
;
height
:
80%
;
background
:
#fff
;
border-top-right-radius
:
8px
;
border-top-left-radius
:
8px
;
padding
:
0
15px
;
}
.comment-item
{
.contact-img
{
border-radius
:
100px
;
width
:
75%
;
text-align
:
center
;
margin-top
:
8px
;
}
.comment-info
{
color
:
#d88f27
;
font-size
:
1
.4rem
;
line-height
:
1
.8rem
;
font-weight
:
500
;
margin-bottom
:
5px
;
}
.commnet-content
{
padding
:
.1rem
0
;
font-size
:
1
.4rem
;
color
:
#333333
;
line-height
:
1
.4rem
;
margin-bottom
:
6px
;
}
.comment-time
{
font-size
:
1
.4rem
;
color
:
#888888
;
.repear
{
color
:
#333
;
font-size
:
1
.2rem
;
cursor
:
pointer
;
}
}
}
}
src/components/reply/reply.ts
0 → 100644
View file @
fd53cf76
import
{
Component
}
from
'@angular/core'
;
import
{
NavController
,
NavParams
,
ViewController
}
from
"ionic-angular"
;
import
{
AppService
}
from
"../../service/http.service"
;
import
{
TabsService
}
from
"../../pages/tabs/tabs.service"
;
@
Component
({
selector
:
'reply'
,
templateUrl
:
'reply.html'
})
export
class
ReplyComponent
{
comment
;
relpyList
;
replyContent
;
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
private
tabSer
:
TabsService
,
public
viewCtrl
:
ViewController
,
public
appService
:
AppService
)
{
}
ionViewDidLoad
()
{
this
.
comment
=
this
.
navParams
.
get
(
'comment'
);
console
.
log
(
this
.
comment
);
this
.
getReply
();
}
getReply
()
{
const
data
=
{
commentId
:
this
.
comment
.
id
,
pageNum
:
1
,
pageSize
:
100
};
this
.
tabSer
.
commentReplySearch
(
data
).
subscribe
(
(
res
)
=>
{
this
.
relpyList
=
res
.
data
.
list
;
}
)
}
replyHandle
()
{
const
data
=
{
commentId
:
this
.
comment
.
id
,
content
:
this
.
replyContent
,
parentId
:
''
,
};
this
.
tabSer
.
commentReply
(
data
).
subscribe
(
(
res
)
=>
{
this
.
getReply
();
}
)
}
cancel
()
{
}
close
()
{
this
.
viewCtrl
.
dismiss
();
}
stop
(
e
)
{
e
.
stopPropagation
();
}
}
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