Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
sun
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
谢林臻
sun
Commits
89443bb1
Commit
89443bb1
authored
Nov 25, 2018
by
Davve
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成用户创建接口
parent
932a0316
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
286 additions
and
164 deletions
+286
-164
group.py
api/group.py
+51
-12
push.py
api/push.py
+1
-2
star.py
api/star.py
+2
-2
topic.py
api/topic.py
+17
-48
urls.py
api/urls.py
+27
-21
user.py
api/user.py
+52
-14
group.js
vu/src/api/group.js
+27
-2
topic.js
vu/src/api/topic.js
+8
-0
user.js
vu/src/api/user.js
+25
-0
index.js
vu/src/mock/index.js
+1
-1
list.vue
vu/src/views/account/list.vue
+1
-1
GroupDetail.vue
vu/src/views/group/components/GroupDetail.vue
+0
-0
list.vue
vu/src/views/group/list.vue
+29
-9
PickDetail.vue
vu/src/views/pick/components/PickDetail.vue
+3
-3
PushDetail.vue
vu/src/views/push/components/PushDetail.vue
+3
-3
list.vue
vu/src/views/push/list.vue
+1
-1
StarDetail.vue
vu/src/views/star/components/StarDetail.vue
+8
-6
list.vue
vu/src/views/star/list.vue
+2
-2
TopicDetail.vue
vu/src/views/topic/components/TopicDetail.vue
+0
-0
list.vue
vu/src/views/topic/list.vue
+8
-16
UserDetail.vue
vu/src/views/user/components/UserDetail.vue
+0
-0
list.vue
vu/src/views/user/list.vue
+20
-21
No files found.
api/group.py
View file @
89443bb1
...
@@ -3,32 +3,33 @@
...
@@ -3,32 +3,33 @@
# __author__ = "chenwei"
# __author__ = "chenwei"
# Date: 2018/11/15
# Date: 2018/11/15
import
json
from
utils.base
import
APIView
from
utils.base
import
APIView
class
GroupListView
(
APIView
):
class
GroupListView
(
APIView
):
def
get
(
self
,
request
):
def
get
(
self
,
request
):
offset
=
int
(
request
.
GET
.
get
(
'page'
,
0
))
offset
=
int
(
request
.
GET
.
get
(
'page'
,
0
))
coun
t
=
int
(
request
.
GET
.
get
(
'limit'
,
10
))
limi
t
=
int
(
request
.
GET
.
get
(
'limit'
,
10
))
filters
=
self
.
handle_filter
(
request
.
GET
.
get
(
'filter'
,
""
))
filters
=
self
.
handle_filter
(
request
.
GET
.
get
(
'filter'
,
""
))
try
:
try
:
data
=
self
.
rpc
[
'venus/
community/group/list'
](
filters
=
filters
,
offset
=
offset
,
count
=
coun
t
)
.
unwrap
()
data
=
self
.
rpc
[
'venus/
sun/group/list'
](
filters
=
filters
,
offset
=
(
offset
-
1
)
*
limit
,
limit
=
limi
t
)
.
unwrap
()
except
Exception
as
e
:
except
Exception
as
e
:
raise
e
raise
e
return
data
return
data
def
post
(
self
,
request
):
def
post
(
self
,
request
):
group_
ids
=
request
.
POST
.
get
(
'ids'
,
''
)
.
split
()
ids
=
request
.
POST
.
get
(
'ids'
,
''
)
.
split
()
type
=
request
.
POST
.
get
(
'type'
)
type
=
request
.
POST
.
get
(
'type'
)
filter
s
=
{}
update
s
=
{}
if
type
==
'offline'
:
if
type
==
'offline'
:
filter
s
[
'is_online'
]
=
False
update
s
[
'is_online'
]
=
False
elif
type
==
'recommend'
:
elif
type
==
'
is_
recommend'
:
filter
s
[
'is_recommend'
]
=
True
update
s
[
'is_recommend'
]
=
True
else
:
else
:
filter
s
[
'is_online'
]
=
True
update
s
[
'is_online'
]
=
True
try
:
try
:
self
.
rpc
[
'venus/
community/group/batch/update'
](
filters
=
filters
,
group_ids
=
group_
ids
)
.
unwrap
()
self
.
rpc
[
'venus/
sun/group/batch/update'
](
updates
=
updates
,
ids
=
ids
)
.
unwrap
()
except
Exception
as
e
:
except
Exception
as
e
:
raise
e
raise
e
return
{
return
{
...
@@ -43,7 +44,46 @@ class GroupUpdateOrCreate(APIView):
...
@@ -43,7 +44,46 @@ class GroupUpdateOrCreate(APIView):
data
=
self
.
rpc
[
'venus/sun/group/get'
](
id
=
id
)
.
unwrap
()
data
=
self
.
rpc
[
'venus/sun/group/get'
](
id
=
id
)
.
unwrap
()
except
Exception
as
e
:
except
Exception
as
e
:
raise
e
raise
e
return
[
data
]
return
data
def
post
(
self
,
request
):
def
post
(
self
,
request
):
pass
id
=
request
.
POST
.
get
(
'id'
)
\ No newline at end of file
data
=
{
'name'
:
request
.
POST
.
get
(
'name'
,
''
),
'description'
:
request
.
POST
.
get
(
'description'
,
''
),
'creator_id'
:
request
.
POST
.
get
(
'group_leader'
,
''
),
'star_ids'
:
json
.
loads
(
request
.
POST
.
get
(
'star'
,
''
))
.
split
(
','
),
# TODO是否需要加
'is_online'
:
request
.
POST
.
get
(
'is_online'
,
''
),
'is_recommend'
:
request
.
POST
.
get
(
'is_recommend'
,
''
),
'user_ids'
:
json
.
loads
(
request
.
POST
.
get
(
'user_ids'
,
''
))
}
try
:
self
.
rpc
[
'venus/sun/group/edit'
](
id
=
id
,
data
=
data
)
.
unwrap
()
except
Exception
as
e
:
raise
e
return
{
'message'
:
'更新成功'
}
class
GroupRelatedUser
(
APIView
):
def
get
(
self
,
request
):
id
=
request
.
GET
.
get
(
'id'
)
offset
=
int
(
request
.
GET
.
get
(
'page'
,
0
))
count
=
int
(
request
.
GET
.
get
(
'limit'
,
10
))
filters
=
{
'group_id'
:
id
}
try
:
data
=
self
.
rpc
[
'venus/sun/group/user/list'
](
filters
=
filters
,
offset
=
offset
,
limit
=
count
)
.
unwrap
()
except
Exception
as
e
:
raise
e
return
data
class
GroupRelatedUserGET
(
APIView
):
def
get
(
self
,
request
):
id
=
request
.
GET
.
get
(
'id'
)
try
:
data
=
self
.
rpc
[
'venus/sun/group/user/get'
](
id
=
id
)
.
unwrap
()
except
Exception
as
e
:
raise
e
return
[
data
,
]
api/push.py
View file @
89443bb1
...
@@ -2,10 +2,9 @@
...
@@ -2,10 +2,9 @@
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
# __author__ = "chenwei"
# __author__ = "chenwei"
# Date: 2018/11/15
# Date: 2018/11/15
import
datetime
from
utils.base
import
APIView
from
utils.base
import
APIView
from
utils.time_utils
import
utc_to_datetime
,
unix_time_to_datetime
,
analysis_time
from
utils.time_utils
import
analysis_time
class
PushListView
(
APIView
):
class
PushListView
(
APIView
):
...
...
api/star.py
View file @
89443bb1
...
@@ -13,7 +13,7 @@ class StarListView(APIView):
...
@@ -13,7 +13,7 @@ class StarListView(APIView):
limit
=
int
(
request
.
GET
.
get
(
'limit'
,
10
))
limit
=
int
(
request
.
GET
.
get
(
'limit'
,
10
))
filter
=
self
.
handle_filter
(
request
.
GET
.
get
(
'filter'
,
""
))
filter
=
self
.
handle_filter
(
request
.
GET
.
get
(
'filter'
,
""
))
try
:
try
:
data
=
self
.
rpc
[
'venus/sun/star/list'
](
offset
=
page
,
limit
=
limit
,
filters
=
filter
)
.
unwrap
()
data
=
self
.
rpc
[
'venus/sun/star/list'
](
offset
=
(
page
-
1
)
*
limit
,
limit
=
limit
,
filters
=
filter
)
.
unwrap
()
except
Exception
as
e
:
except
Exception
as
e
:
raise
e
raise
e
return
data
return
data
...
@@ -57,7 +57,7 @@ class StarRelatedGroup(APIView):
...
@@ -57,7 +57,7 @@ class StarRelatedGroup(APIView):
count
=
int
(
request
.
GET
.
get
(
'limit'
,
10
))
count
=
int
(
request
.
GET
.
get
(
'limit'
,
10
))
filters
=
{
'star_id'
:
id
}
filters
=
{
'star_id'
:
id
}
try
:
try
:
data
=
self
.
rpc
[
'venus/sun/group/list'
](
filters
=
filters
,
offset
=
offse
t
,
limit
=
count
)
.
unwrap
()
data
=
self
.
rpc
[
'venus/sun/group/list'
](
filters
=
filters
,
offset
=
(
offset
-
1
)
*
coun
t
,
limit
=
count
)
.
unwrap
()
except
Exception
as
e
:
except
Exception
as
e
:
raise
e
raise
e
return
data
return
data
api/topic.py
View file @
89443bb1
...
@@ -10,11 +10,11 @@ from utils.time_utils import analysis_time
...
@@ -10,11 +10,11 @@ from utils.time_utils import analysis_time
class
TopicListView
(
APIView
):
class
TopicListView
(
APIView
):
def
get
(
self
,
request
):
def
get
(
self
,
request
):
page
=
int
(
request
.
GET
.
get
(
'page'
,
0
))
offset
=
int
(
request
.
GET
.
get
(
'page'
,
0
))
limit
=
int
(
request
.
GET
.
get
(
'limit'
,
10
))
limit
=
int
(
request
.
GET
.
get
(
'limit'
,
10
))
filter
=
self
.
handle_filter
(
request
.
GET
.
get
(
'filter'
,
""
))
filter
=
self
.
handle_filter
(
request
.
GET
.
get
(
'filter'
,
""
))
try
:
try
:
data
=
self
.
rpc
[
'venus/sun/topic/list'
](
offset
=
page
,
limit
=
limit
,
filters
=
filter
)
.
unwrap
()
data
=
self
.
rpc
[
'venus/sun/topic/list'
](
offset
=
(
offset
-
1
)
*
limit
,
limit
=
limit
,
filters
=
filter
)
.
unwrap
()
except
Exception
as
e
:
except
Exception
as
e
:
raise
e
raise
e
return
data
return
data
...
@@ -24,7 +24,7 @@ class TopicUpdateOrCreateView(APIView):
...
@@ -24,7 +24,7 @@ class TopicUpdateOrCreateView(APIView):
def
get
(
self
,
request
):
def
get
(
self
,
request
):
id
=
request
.
GET
.
get
(
'id'
)
id
=
request
.
GET
.
get
(
'id'
)
try
:
# TODO 少返回了is_online
try
:
data
=
self
.
rpc
[
'venus/sun/topic/get'
](
id
=
id
)
.
unwrap
()
data
=
self
.
rpc
[
'venus/sun/topic/get'
](
id
=
id
)
.
unwrap
()
except
Exception
as
e
:
except
Exception
as
e
:
raise
e
raise
e
...
@@ -38,14 +38,14 @@ class TopicUpdateOrCreateView(APIView):
...
@@ -38,14 +38,14 @@ class TopicUpdateOrCreateView(APIView):
data
=
{
data
=
{
'topic_images'
:
topic_images
,
'topic_images'
:
topic_images
,
'topic
_ids'
:
json
.
loads
(
request
.
POST
.
get
(
'topic_ids'
,
''
)),
# 'reply
_ids': json.loads(request.POST.get('topic_ids', '')),
'video_url'
:
request
.
POST
.
get
(
'video_url'
,
''
),
'video_url'
:
request
.
POST
.
get
(
'video_url'
,
''
),
'posting_time'
:
posting_time
,
'posting_time'
:
posting_time
,
'content'
:
request
.
POST
.
get
(
'content'
,
''
),
'content'
:
request
.
POST
.
get
(
'content'
,
''
),
'content_level'
:
request
.
POST
.
get
(
'content_level'
,
''
),
'content_level'
:
request
.
POST
.
get
(
'content_level'
,
''
),
'group_
name
'
:
request
.
POST
.
get
(
'group_name'
,
''
),
'group_
id
'
:
request
.
POST
.
get
(
'group_name'
,
''
),
'user_id'
:
request
.
POST
.
get
(
'user_
id
'
,
''
),
'user_id'
:
request
.
POST
.
get
(
'user_
name
'
,
''
),
'star_
name
'
:
request
.
POST
.
get
(
'star_name'
,
''
),
'star_
id
'
:
request
.
POST
.
get
(
'star_name'
,
''
),
'tag_ids'
:
json
.
loads
(
request
.
POST
.
get
(
'tag_ids'
,
[])),
'tag_ids'
:
json
.
loads
(
request
.
POST
.
get
(
'tag_ids'
,
[])),
}
}
try
:
try
:
...
@@ -60,28 +60,15 @@ class TopicUpdateOrCreateView(APIView):
...
@@ -60,28 +60,15 @@ class TopicUpdateOrCreateView(APIView):
class
ReplyUpdateOrCreateView
(
APIView
):
class
ReplyUpdateOrCreateView
(
APIView
):
def
get
(
self
,
request
):
def
get
(
self
,
request
):
id
=
request
.
GET
.
get
(
'id'
)
id
=
request
.
GET
.
get
(
'id'
)
page
=
int
(
request
.
GET
.
get
(
'page'
,
0
))
offset
=
int
(
request
.
GET
.
get
(
'page'
,
0
))
limit
=
int
(
request
.
GET
.
get
(
'limit'
,
10
))
limit
=
int
(
request
.
GET
.
get
(
'limit'
,
10
))
filter
=
self
.
handle_filter
(
request
.
GET
.
get
(
'filter'
,
""
))
filter
=
self
.
handle_filter
(
request
.
GET
.
get
(
'filter'
,
""
))
filter
.
update
({
'id'
:
id
})
filter
.
update
({
'topic_id'
:
id
})
try
:
try
:
data
=
self
.
rpc
[
'venus/sun/topic/reply/list'
](
offset
=
page
,
limit
=
limit
,
filters
=
filter
)
.
unwrap
()
data
=
self
.
rpc
[
'venus/sun/topic/reply/list'
](
offset
=
(
offset
-
1
)
*
limit
,
limit
=
limit
,
filters
=
filter
)
.
unwrap
()
except
Exception
as
e
:
except
Exception
as
e
:
data
=
[
raise
e
{
return
data
'id'
:
1
,
'reply_name'
:
'真好'
,
'be_reply_name'
:
'王二'
,
'create_time'
:
'2018-09-10 23:23:23'
,
'reply_type'
:
'贴主的评论'
,
'content'
:
'内容真好'
,
},
]
return
{
'total'
:
10
,
'data'
:
data
}
def
post
(
self
,
request
):
def
post
(
self
,
request
):
reply_ids
=
json
.
loads
(
request
.
POST
.
get
(
'reply_ids'
,
[]))
reply_ids
=
json
.
loads
(
request
.
POST
.
get
(
'reply_ids'
,
[]))
...
@@ -97,32 +84,14 @@ class ReplyUpdateOrCreateView(APIView):
...
@@ -97,32 +84,14 @@ class ReplyUpdateOrCreateView(APIView):
class
ReplyCreate
(
APIView
):
class
ReplyCreate
(
APIView
):
def
post
(
self
,
request
):
def
post
(
self
,
request
):
data
=
{
data
=
{
'
topic_id'
:
request
.
POST
.
get
(
'topic
_id'
),
'
user_id'
:
request
.
POST
.
get
(
'user
_id'
),
'repl
y_name'
:
request
.
POST
.
get
(
'reply_name'
),
'repl
ied_id'
:
request
.
POST
.
get
(
"replied_id"
,
None
),
'
be_reply_name'
:
request
.
POST
.
get
(
'be_reply_name'
),
'
topic_id'
:
request
.
POST
.
get
(
"topic_id"
,
None
),
'content'
:
request
.
POST
.
get
(
'content'
),
'content'
:
request
.
POST
.
get
(
'content'
),
}
}
try
:
try
:
data
=
self
.
rpc
[
'venus/sun/topic/reply/create'
](
data
=
data
)
.
unwrap
()
data
=
self
.
rpc
[
'venus/sun/topic/reply/edit'
](
id
=
None
,
data
=
data
)
.
unwrap
()
"""
data = {
'id': 1,
'reply_type': 1,
'create_time': '2108-09-92 12:12:12',
'reply_name': 'xxxxx',
'be_reply_name': 'xxxxxx',
'content': '测试测试',
}
"""
except
Exception
as
e
:
except
Exception
as
e
:
# raise e
raise
e
data
=
{
'id'
:
6
,
'reply_type'
:
"贴住的评论"
,
'create_time'
:
'2108-09-92 12:12:12'
,
'reply_name'
:
'xxxxx'
,
'be_reply_name'
:
'xxxxxx'
,
'content'
:
'测试测试'
,
}
return
{
'data'
:
data
}
return
{
'data'
:
data
}
api/urls.py
View file @
89443bb1
...
@@ -20,35 +20,41 @@ from .token import *
...
@@ -20,35 +20,41 @@ from .token import *
urlpatterns
=
[
urlpatterns
=
[
# 登陆,注销相关
# 登陆,注销相关
url
(
r'account/login$'
,
LoginView
.
as_view
()),
url
(
r'
^
account/login$'
,
LoginView
.
as_view
()),
url
(
r'account/logout$'
,
LogoutView
.
as_view
()),
url
(
r'
^
account/logout$'
,
LogoutView
.
as_view
()),
url
(
r'account/get$'
,
LoginView
.
as_view
()),
url
(
r'
^
account/get$'
,
LoginView
.
as_view
()),
url
(
r'account/list$'
,
AccountList
.
as_view
()),
url
(
r'
^
account/list$'
,
AccountList
.
as_view
()),
url
(
r'account/list/update$'
,
AccountList
.
as_view
()),
url
(
r'
^
account/list/update$'
,
AccountList
.
as_view
()),
url
(
r'account/detail$'
,
AccountUpdateOrCreateView
.
as_view
()),
url
(
r'
^
account/detail$'
,
AccountUpdateOrCreateView
.
as_view
()),
url
(
r'account/create$'
,
AccountUpdateOrCreateView
.
as_view
()),
url
(
r'
^
account/create$'
,
AccountUpdateOrCreateView
.
as_view
()),
# user相关
# user相关
url
(
r'user/list$'
,
UserListView
.
as_view
()),
url
(
r'^user/list$'
,
UserListView
.
as_view
()),
url
(
r'^user/get$'
,
UserUpdateOrCreate
.
as_view
()),
url
(
r'^user/create$'
,
UserUpdateOrCreate
.
as_view
()),
url
(
r'^user/group/list$'
,
UserGroupView
.
as_view
()),
# group相关
# group相关
url
(
r'group/list$'
,
GroupListView
.
as_view
()),
url
(
r'^group/list$'
,
GroupListView
.
as_view
()),
url
(
r'group/update$'
,
GroupListView
.
as_view
()),
url
(
r'^group/list/update$'
,
GroupListView
.
as_view
()),
url
(
r'group/detail'
,
GroupUpdateOrCreate
.
as_view
()),
url
(
r'^group/get$'
,
GroupUpdateOrCreate
.
as_view
()),
url
(
r'group/create$'
,
GroupUpdateOrCreate
.
as_view
()),
url
(
r'^group/user/list$'
,
GroupRelatedUser
.
as_view
()),
url
(
r'^group/user/get$'
,
GroupRelatedUserGET
.
as_view
()),
# topic相关
# topic相关
url
(
r'topic/list$'
,
TopicListView
.
as_view
()),
url
(
r'
^
topic/list$'
,
TopicListView
.
as_view
()),
url
(
r'
topic/detail
'
,
TopicUpdateOrCreateView
.
as_view
()),
url
(
r'
^topic/detail$
'
,
TopicUpdateOrCreateView
.
as_view
()),
url
(
r'
topic/creacte
'
,
TopicUpdateOrCreateView
.
as_view
()),
url
(
r'
^topic/create$
'
,
TopicUpdateOrCreateView
.
as_view
()),
url
(
r'
topic/reply/list
'
,
ReplyUpdateOrCreateView
.
as_view
()),
url
(
r'
^topic/reply/list$
'
,
ReplyUpdateOrCreateView
.
as_view
()),
url
(
r'
topic/reply/batch_delete
'
,
ReplyUpdateOrCreateView
.
as_view
()),
url
(
r'
^topic/reply/batch_delete$
'
,
ReplyUpdateOrCreateView
.
as_view
()),
url
(
r'
topic/reply/create
'
,
ReplyCreate
.
as_view
()),
url
(
r'
^topic/reply/create$
'
,
ReplyCreate
.
as_view
()),
# star相关
# star相关
url
(
r'star/list$'
,
StarListView
.
as_view
()),
url
(
r'
^
star/list$'
,
StarListView
.
as_view
()),
url
(
r'
star/create
'
,
StarUpdateOrCreate
.
as_view
()),
url
(
r'
^star/create$
'
,
StarUpdateOrCreate
.
as_view
()),
url
(
r'
star/detail
'
,
StarUpdateOrCreate
.
as_view
()),
url
(
r'
^star/detail$
'
,
StarUpdateOrCreate
.
as_view
()),
url
(
r'star/star_related_group_info'
,
StarRelatedGroup
.
as_view
()),
url
(
r'
^
star/star_related_group_info'
,
StarRelatedGroup
.
as_view
()),
# push相关
# push相关
url
(
r'push/list$'
,
PushListView
.
as_view
()),
url
(
r'push/list$'
,
PushListView
.
as_view
()),
...
...
api/user.py
View file @
89443bb1
...
@@ -3,7 +3,9 @@
...
@@ -3,7 +3,9 @@
# __author__ = "chenwei"
# __author__ = "chenwei"
# Date: 2018/11/15
# Date: 2018/11/15
import
json
from
utils.base
import
APIView
from
utils.base
import
APIView
from
utils.time_utils
import
analysis_time
class
UserListView
(
APIView
):
class
UserListView
(
APIView
):
...
@@ -12,20 +14,56 @@ class UserListView(APIView):
...
@@ -12,20 +14,56 @@ class UserListView(APIView):
limit
=
int
(
request
.
GET
.
get
(
'limit'
,
10
))
limit
=
int
(
request
.
GET
.
get
(
'limit'
,
10
))
filter
=
self
.
handle_filter
(
request
.
GET
.
get
(
'filter'
,
""
))
filter
=
self
.
handle_filter
(
request
.
GET
.
get
(
'filter'
,
""
))
try
:
try
:
data
=
self
.
rpc
[
'venus/
community/user/get'
](
offset
=
page
,
limit
=
limit
,
filters
=
filter
)
.
unwrap
()
data
=
self
.
rpc
[
'venus/
sun/user/list'
](
offset
=
(
page
-
1
)
*
limit
,
limit
=
limit
,
filters
=
filter
)
.
unwrap
()
except
Exception
as
e
:
except
Exception
as
e
:
raise
e
return
data
class
UserUpdateOrCreate
(
APIView
):
def
get
(
self
,
request
):
id
=
request
.
GET
.
get
(
'id'
)
try
:
data
=
self
.
rpc
[
'venus/sun/user/get'
](
id
=
id
)
.
unwrap
()
except
Exception
as
e
:
raise
e
return
data
def
post
(
self
,
request
):
id
=
request
.
POST
.
get
(
'id'
,
''
)
show_time
=
analysis_time
(
request
.
POST
.
get
(
'show_time'
,
0
))
data
=
{
data
=
{
'
total'
:
200
,
'
is_recommend'
:
request
.
POST
.
get
(
'is_recommend'
)
,
'
data'
:
[
'
avatar'
:
request
.
POST
.
get
(
'avatar'
),
{
"id"
:
1
,
'username'
:
'alex'
,
'phone'
:
'12345678912'
,
'email'
:
'http://www.baid.com'
,
'group_nums'
:
23
,
'nick_name'
:
request
.
POST
.
get
(
'nick_name'
)
,
'topic_num'
:
12
,
'group_identify'
:
'组长,长老'
,
'user_identify'
:
'普通用户'
,
'is_recommend'
:
1
}
,
'tag_ids'
:
request
.
POST
.
get
(
'tag_ids'
)
,
{
"id"
:
2
,
'username'
:
'ttt'
,
'phone'
:
'12345678912'
,
'email'
:
'http://www.baid.com'
,
'group_nums'
:
23
,
'is_puppet'
:
request
.
POST
.
get
(
'is_puppet'
)
,
'topic_num'
:
12
,
'group_identify'
:
'长老'
,
'user_identify'
:
'马甲用户'
,
'is_recommend'
:
0
}
,
'city'
:
request
.
POST
.
get
(
'city'
)
,
{
"id"
:
3
,
'username'
:
'xcc'
,
'phone'
:
'12345678912'
,
'email'
:
'http://www.baid.com'
,
'group_nums'
:
23
,
'show_time'
:
show_time
,
'topic_num'
:
12
,
'group_identify'
:
'精英'
,
'user_identify'
:
'普通用户'
,
'is_recommend'
:
1
}
,
'phone'
:
request
.
POST
.
get
(
'phone'
)
,
{
"id"
:
4
,
'username'
:
'aaa'
,
'phone'
:
'12345678912'
,
'email'
:
'http://www.baid.com'
,
'group_nums'
:
23
,
'email'
:
request
.
POST
.
get
(
'email'
)
,
'topic_num'
:
12
,
'group_identify'
:
'高级会有'
,
'user_identify'
:
'马甲用户'
,
'is_recommend'
:
0
}
,
'gender'
:
request
.
POST
.
get
(
'gender'
)
,
]
'group_ids'
:
json
.
loads
(
request
.
POST
.
get
(
'group_ids'
)),
}
}
return
data
try
:
\ No newline at end of file
self
.
rpc
[
'venus/sun/user/edit'
](
id
=
id
,
data
=
data
)
.
unwrap
()
except
Exception
as
e
:
raise
e
return
{
'message'
:
'更新成功'
}
class
UserGroupView
(
APIView
):
def
get
(
self
,
request
):
user_id
=
request
.
GET
.
get
(
'id'
)
try
:
data
=
self
.
rpc
[
'venus/sun/user/group/list'
](
user_id
=
user_id
)
.
unwrap
()
except
Exception
as
e
:
raise
e
return
{
'total'
:
1
,
'data'
:
data
}
\ No newline at end of file
vu/src/api/group.js
View file @
89443bb1
...
@@ -10,7 +10,7 @@ export function fetchList(query) {
...
@@ -10,7 +10,7 @@ export function fetchList(query) {
export
function
OffLineOrOnLine
(
data
)
{
export
function
OffLineOrOnLine
(
data
)
{
return
request
({
return
request
({
url
:
'/api/group/update'
,
url
:
'/api/group/
list/
update'
,
method
:
'post'
,
method
:
'post'
,
data
data
})
})
...
@@ -18,8 +18,33 @@ export function OffLineOrOnLine(data) {
...
@@ -18,8 +18,33 @@ export function OffLineOrOnLine(data) {
export
function
GroupDetail
(
id
)
{
export
function
GroupDetail
(
id
)
{
return
request
({
return
request
({
url
:
'/api/group/
detail
'
,
url
:
'/api/group/
get
'
,
method
:
'get'
,
method
:
'get'
,
params
:
{
id
}
params
:
{
id
}
})
})
}
}
export
function
createGroup
(
data
)
{
return
request
({
url
:
'/api/group/create'
,
method
:
'post'
,
data
})
}
export
function
fetchGroupRelateduser
(
query
)
{
return
request
({
url
:
'/api/group/user/list'
,
method
:
'get'
,
params
:
query
})
}
export
function
GroupUserDetail
(
id
)
{
return
request
({
url
:
'/api/group/user/get'
,
method
:
'get'
,
params
:
{
id
}
})
}
vu/src/api/topic.js
View file @
89443bb1
...
@@ -56,3 +56,11 @@ export function DelReply(data) {
...
@@ -56,3 +56,11 @@ export function DelReply(data) {
data
data
})
})
}
}
export
function
ModifyReply
(
data
)
{
return
request
({
url
:
'/api/topic/reply/create'
,
method
:
'post'
,
data
})
}
vu/src/api/user.js
View file @
89443bb1
...
@@ -16,3 +16,28 @@ export function OffLineOrOnLine(data) {
...
@@ -16,3 +16,28 @@ export function OffLineOrOnLine(data) {
data
data
})
})
}
}
export
function
UserDetail
(
id
)
{
return
request
({
url
:
'/api/user/get'
,
method
:
'get'
,
params
:
{
id
}
})
}
export
function
fetchGroupUser
(
query
)
{
return
request
({
url
:
'/api/user/group/list'
,
method
:
'get'
,
params
:
query
})
}
export
function
userCreate
(
data
)
{
return
request
({
url
:
'/api/user/create'
,
method
:
'post'
,
data
,
})
}
vu/src/mock/index.js
View file @
89443bb1
...
@@ -21,7 +21,7 @@ Mock.XHR.prototype.send = function() {
...
@@ -21,7 +21,7 @@ Mock.XHR.prototype.send = function() {
// 登录相关
// 登录相关
Mock
.
mock
(
/
\/
login
\/
login/
,
'post'
,
loginAPI
.
loginByUsername
)
Mock
.
mock
(
/
\/
login
\/
login/
,
'post'
,
loginAPI
.
loginByUsername
)
Mock
.
mock
(
/
\/
login
\/
logout/
,
'post'
,
loginAPI
.
logout
)
Mock
.
mock
(
/
\/
login
\/
logout/
,
'post'
,
loginAPI
.
logout
)
Mock
.
mock
(
/
\/
user
\/
info
\.
*/
,
'get'
,
loginAPI
.
getUserInfo
)
//
Mock.mock(/\/user\/info\.*/, 'get', loginAPI.getUserInfo)
// 文章相关
// 文章相关
Mock
.
mock
(
/
\/
article
\/
list/
,
'get'
,
articleAPI
.
getList
)
Mock
.
mock
(
/
\/
article
\/
list/
,
'get'
,
articleAPI
.
getList
)
...
...
vu/src/views/account/list.vue
View file @
89443bb1
...
@@ -105,7 +105,7 @@ export default {
...
@@ -105,7 +105,7 @@ export default {
this
.
getList
()
this
.
getList
()
},
},
handleFilter
()
{
handleFilter
()
{
this
.
listQuery
.
page
=
0
this
.
listQuery
.
page
=
1
this
.
getList
()
this
.
getList
()
},
},
handleCreate
()
{
handleCreate
()
{
...
...
vu/src/views/group/components/GroupDetail.vue
View file @
89443bb1
This diff is collapsed.
Click to expand it.
vu/src/views/group/list.vue
View file @
89443bb1
...
@@ -5,10 +5,17 @@
...
@@ -5,10 +5,17 @@
<el-select
v-model=
"listQuery.filter.key"
:placeholder=
"'搜索字段'"
clearable
class=
"filter-item"
style=
"width: 110px"
>
<el-select
v-model=
"listQuery.filter.key"
:placeholder=
"'搜索字段'"
clearable
class=
"filter-item"
style=
"width: 110px"
>
<el-option
v-for=
"item in SearchTypeOptions"
:key=
"item.key"
:label=
"item.display_name"
:value=
"item.key"
/>
<el-option
v-for=
"item in SearchTypeOptions"
:key=
"item.key"
:label=
"item.display_name"
:value=
"item.key"
/>
</el-select>
</el-select>
<el-select
v-model=
"listQuery.filter.is_online"
:placeholder=
"'是否下线'"
clearable
class=
"filter-item"
style=
"width: 110px"
>
<el-option
v-for=
"item in OnlineTypeOptions"
:key=
"item.key"
:label=
"item.display_name"
:value=
"item.key"
/>
</el-select>
<el-select
v-model=
"listQuery.filter.is_recommend"
:placeholder=
"'是否推荐'"
clearable
class=
"filter-item"
style=
"width: 110px"
>
<el-option
v-for=
"item in recommendTypeOptions"
:key=
"item.key"
:label=
"item.display_name"
:value=
"item.key"
/>
</el-select>
<el-button
v-waves
class=
"filter-item"
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleFilter"
>
搜索
</el-button>
<el-button
v-waves
class=
"filter-item"
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleFilter"
>
搜索
</el-button>
<el-button
class=
"filter-item"
style=
"margin-left: 10px;"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"handleCreate"
>
创建
</el-button>
<el-button
class=
"filter-item"
style=
"margin-left: 10px;"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"handleCreate"
>
创建
</el-button>
<el-button
class=
"filter-item"
style=
"margin-left: 10px;"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"handleOfflineOrOnline('offline')"
>
下线
</el-button>
<el-button
class=
"filter-item"
style=
"margin-left: 10px;"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"handleOfflineOrOnline('offline')"
>
下线
</el-button>
<el-button
class=
"filter-item"
style=
"margin-left: 10px;"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"handleOfflineOrOnline('online')"
>
上线
</el-button>
<el-button
class=
"filter-item"
style=
"margin-left: 10px;"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"handleOfflineOrOnline('online')"
>
上线
</el-button>
<el-button
class=
"filter-item"
style=
"margin-left: 10px;"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"handleOfflineOrOnline('is_recommend')"
>
推荐
</el-button>
</div>
</div>
<el-table
v-loading=
"listLoading"
:data=
"list"
border
fit
highlight-current-row
style=
"width: 100%"
ref=
"multipleTable"
@
selection-change=
"handleSelectionChange"
>
<el-table
v-loading=
"listLoading"
:data=
"list"
border
fit
highlight-current-row
style=
"width: 100%"
ref=
"multipleTable"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
align=
"center"
></el-table-column>
<el-table-column
type=
"selection"
align=
"center"
></el-table-column>
...
@@ -28,7 +35,7 @@
...
@@ -28,7 +35,7 @@
<el-table-column
align=
"center"
label=
"小组简介"
>
<el-table-column
align=
"center"
label=
"小组简介"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
desc
}}
</span>
<span>
{{
scope
.
row
.
desc
ription
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
@@ -61,13 +68,13 @@
...
@@ -61,13 +68,13 @@
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
label=
"
下
线"
>
<el-table-column
align=
"center"
label=
"
是否在
线"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-tag
:type=
"scope.row.is_online | isOnlineFilter"
>
{{
scope
.
row
.
is_online
==
1
?
'是'
:
'否'
}}
</el-tag>
<el-tag
:type=
"scope.row.is_online | isOnlineFilter"
>
{{
scope
.
row
.
is_online
==
1
?
'是'
:
'否'
}}
</el-tag>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
label=
"推荐"
>
<el-table-column
align=
"center"
label=
"
是否
推荐"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-tag
:type=
"scope.row.is_recommend | isOnlineFilter"
>
{{
scope
.
row
.
is_recommend
==
1
?
'是'
:
'否'
}}
</el-tag>
<el-tag
:type=
"scope.row.is_recommend | isOnlineFilter"
>
{{
scope
.
row
.
is_recommend
==
1
?
'是'
:
'否'
}}
</el-tag>
</
template
>
</
template
>
...
@@ -120,12 +127,22 @@ export default {
...
@@ -120,12 +127,22 @@ export default {
filter
:
{
filter
:
{
value
:
''
,
value
:
''
,
key
:
''
,
key
:
''
,
is_online
:
''
,
is_recommend
:
''
,
},
},
},
},
SearchTypeOptions
:[
SearchTypeOptions
:[
{
'key'
:
'id'
,
'display_name'
:
'小组ID'
},
{
'key'
:
'id'
,
'display_name'
:
'小组ID'
},
{
'key'
:
'content'
,
'display_name'
:
'小组名称'
},
{
'key'
:
'name'
,
'display_name'
:
'小组名称'
},
]
],
OnlineTypeOptions
:
[
{
'key'
:
0
,
'display_name'
:
'否'
},
{
'key'
:
1
,
'display_name'
:
'是'
},
],
recommendTypeOptions
:
[
{
'key'
:
0
,
'display_name'
:
'否'
},
{
'key'
:
1
,
'display_name'
:
'是'
},
],
}
}
},
},
created
()
{
created
()
{
...
@@ -135,6 +152,7 @@ export default {
...
@@ -135,6 +152,7 @@ export default {
getList
()
{
getList
()
{
this
.
listLoading
=
true
this
.
listLoading
=
true
fetchList
(
this
.
listQuery
).
then
(
response
=>
{
fetchList
(
this
.
listQuery
).
then
(
response
=>
{
console
.
log
(
response
.
data
.
data
.
data
)
this
.
list
=
response
.
data
.
data
.
data
this
.
list
=
response
.
data
.
data
.
data
this
.
total
=
response
.
data
.
data
.
total
this
.
total
=
response
.
data
.
data
.
total
this
.
listLoading
=
false
this
.
listLoading
=
false
...
@@ -152,11 +170,11 @@ export default {
...
@@ -152,11 +170,11 @@ export default {
this
.
getList
()
this
.
getList
()
},
},
handleFilter
()
{
handleFilter
()
{
this
.
listQuery
.
page
=
0
this
.
listQuery
.
page
=
1
this
.
getList
()
this
.
getList
()
},
},
handleCreate
()
{
handleCreate
()
{
this
.
$router
.
push
(
'/
push
/create'
)
this
.
$router
.
push
(
'/
group
/create'
)
},
},
handleOfflineOrOnline
(
val
){
handleOfflineOrOnline
(
val
){
const
length
=
this
.
multipleSelection
.
length
;
const
length
=
this
.
multipleSelection
.
length
;
...
@@ -165,14 +183,16 @@ export default {
...
@@ -165,14 +183,16 @@ export default {
for
(
let
i
=
0
;
i
<
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
length
;
i
++
)
{
if
(
val
===
'offline'
){
if
(
val
===
'offline'
){
this
.
multipleSelection
[
i
].
is_online
=
0
this
.
multipleSelection
[
i
].
is_online
=
0
}
else
{
}
else
if
(
val
==
'is_recommend'
){
this
.
multipleSelection
[
i
].
is_recommend
=
1
}
else
{
this
.
multipleSelection
[
i
].
is_online
=
1
this
.
multipleSelection
[
i
].
is_online
=
1
}
}
str
+=
this
.
multipleSelection
[
i
].
id
+
' '
;
str
+=
this
.
multipleSelection
[
i
].
id
+
' '
;
}
}
OffLineOrOnLine
({
type
:
val
,
ids
:
str
}).
then
(
response
=>
{
OffLineOrOnLine
({
type
:
val
,
ids
:
str
}).
then
(
response
=>
{
this
.
multipleSelection
=
[];
this
.
multipleSelection
=
[];
response
.
data
.
data
.
message
this
.
$message
.
success
(
response
.
data
.
data
.
message
);
this
.
$message
.
success
(
response
.
data
.
data
.
message
);
})
})
},
},
...
...
vu/src/views/pick/components/PickDetail.vue
View file @
89443bb1
...
@@ -53,19 +53,19 @@
...
@@ -53,19 +53,19 @@
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form-item
style=
"margin-bottom: 40px;"
label-width=
"45px"
label=
"pickid:"
prop=
"id"
v-if=
"isEdit"
>
<el-form-item
style=
"margin-bottom: 40px;"
label-width=
"45px"
label=
"pickid:"
prop=
"id"
v-if=
"isEdit"
>
<el-input
:rows=
"1"
v-model=
"postForm.id"
type=
"number"
class=
"article-textarea"
<el-input
:rows=
"1"
v-model=
"postForm.id"
type=
"number"
class=
"article-textarea"
style=
"width: 120px"
readonly
/>
style=
"width: 120px"
disabled
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form-item
style=
"margin-bottom: 40px;"
label-width=
"75px"
label=
"pick用户:"
prop=
"user_nums"
v-if=
"isEdit"
>
<el-form-item
style=
"margin-bottom: 40px;"
label-width=
"75px"
label=
"pick用户:"
prop=
"user_nums"
v-if=
"isEdit"
>
<el-input
:rows=
"1"
v-model=
"postForm.user_nums"
type=
"number"
class=
"article-textarea"
<el-input
:rows=
"1"
v-model=
"postForm.user_nums"
type=
"number"
class=
"article-textarea"
style=
"width: 120px"
readonly
/>
style=
"width: 120px"
disabled
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form-item
style=
"margin-bottom: 40px;"
label-width=
"85px"
label=
"创建时间:"
prop=
"create_time"
v-if=
"isEdit"
>
<el-form-item
style=
"margin-bottom: 40px;"
label-width=
"85px"
label=
"创建时间:"
prop=
"create_time"
v-if=
"isEdit"
>
<el-input
:rows=
"1"
v-model=
"postForm.create_time"
type=
"text"
class=
"article-textarea"
<el-input
:rows=
"1"
v-model=
"postForm.create_time"
type=
"text"
class=
"article-textarea"
style=
"width: 170px"
readonly
/>
style=
"width: 170px"
disabled
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
...
...
vu/src/views/push/components/PushDetail.vue
View file @
89443bb1
...
@@ -22,20 +22,20 @@
...
@@ -22,20 +22,20 @@
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form-item
style=
"margin-bottom: 40px;"
label-width=
"75px"
label=
"推送ID:"
prop=
"id"
v-if=
"isEdit"
>
<el-form-item
style=
"margin-bottom: 40px;"
label-width=
"75px"
label=
"推送ID:"
prop=
"id"
v-if=
"isEdit"
>
<el-input
:rows=
"1"
v-model=
"postForm.id"
type=
"text"
class=
"article-textarea"
<el-input
:rows=
"1"
v-model=
"postForm.id"
type=
"text"
class=
"article-textarea"
style=
"width: 180px"
readonly
v-if=
"isEdit"
/>
style=
"width: 180px"
disabled
v-if=
"isEdit"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form-item
style=
"margin-bottom: 40px;"
label-width=
"75px"
label=
"创建时间:"
prop=
"create_time"
v-if=
"isEdit"
>
<el-form-item
style=
"margin-bottom: 40px;"
label-width=
"75px"
label=
"创建时间:"
prop=
"create_time"
v-if=
"isEdit"
>
<el-input
:rows=
"1"
v-model=
"postForm.create_time"
type=
"text"
class=
"article-textarea"
<el-input
:rows=
"1"
v-model=
"postForm.create_time"
type=
"text"
class=
"article-textarea"
style=
"width: 199px"
readonly
v-if=
"isEdit"
/>
style=
"width: 199px"
disabled
v-if=
"isEdit"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form-item
style=
"margin-bottom: 40px;"
label-width=
"75px"
label=
"创建用户:"
v-if=
"isEdit"
>
<el-form-item
style=
"margin-bottom: 40px;"
label-width=
"75px"
label=
"创建用户:"
v-if=
"isEdit"
>
<el-input
:rows=
"1"
v-model=
"postForm.user.name"
type=
"text"
class=
"article-textarea"
<el-input
:rows=
"1"
v-model=
"postForm.user.name"
type=
"text"
class=
"article-textarea"
style=
"width: 180px"
readonly
v-if=
"isEdit"
/>
style=
"width: 180px"
disabled
v-if=
"isEdit"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
...
...
vu/src/views/push/list.vue
View file @
89443bb1
...
@@ -107,7 +107,7 @@ export default {
...
@@ -107,7 +107,7 @@ export default {
this
.
getList
()
this
.
getList
()
},
},
handleFilter
()
{
handleFilter
()
{
this
.
listQuery
.
page
=
0
this
.
listQuery
.
page
=
1
this
.
getList
()
this
.
getList
()
},
},
handleCreate
()
{
handleCreate
()
{
...
...
vu/src/views/star/components/StarDetail.vue
View file @
89443bb1
...
@@ -24,13 +24,13 @@
...
@@ -24,13 +24,13 @@
<el-row>
<el-row>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
style=
"margin-bottom: 20px;"
label-width=
"75px"
label=
"明星ID:"
v-if=
"isEdit"
>
<el-form-item
style=
"margin-bottom: 20px;"
label-width=
"75px"
label=
"明星ID:"
v-if=
"isEdit"
>
<el-input
v-model=
"postForm.id"
type=
"text"
style=
"width: 230px;"
readonly
/>
<el-input
v-model=
"postForm.id"
type=
"text"
style=
"width: 230px;"
disabled
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
style=
"margin-bottom: 20px;"
label-width=
"75px"
label=
"创建时间:"
v-if=
"isEdit"
>
<el-form-item
style=
"margin-bottom: 20px;"
label-width=
"75px"
label=
"创建时间:"
v-if=
"isEdit"
>
<el-input
v-model=
"postForm.create_time"
type=
"text"
placeholder=
"请输入内容"
style=
"width: 230px;"
<el-input
v-model=
"postForm.create_time"
type=
"text"
placeholder=
"请输入内容"
style=
"width: 230px;"
readonly
/>
disabled
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -39,20 +39,20 @@
...
@@ -39,20 +39,20 @@
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
style=
"margin-bottom: 20px;"
label-width=
"75px"
label=
"用户数:"
<el-form-item
style=
"margin-bottom: 20px;"
label-width=
"75px"
label=
"用户数:"
v-if=
"isEdit"
>
v-if=
"isEdit"
>
<el-input
v-model=
"postForm.user_nums"
type=
"number"
style=
"width: 220px;"
readonly
/>
<el-input
v-model=
"postForm.user_nums"
type=
"number"
style=
"width: 220px;"
disabled
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
style=
"margin-bottom: 20px;"
label-width=
"75px"
label=
"帖子数:"
<el-form-item
style=
"margin-bottom: 20px;"
label-width=
"75px"
label=
"帖子数:"
v-if=
"isEdit"
>
v-if=
"isEdit"
>
<el-input
v-model=
"postForm.topic_nums"
type=
"number"
style=
"width: 220px;"
readonly
/>
<el-input
v-model=
"postForm.topic_nums"
type=
"number"
style=
"width: 220px;"
disabled
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row>
<el-row>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
style=
"margin-bottom: 20px;"
label-width=
"75px"
label=
"小组数:"
v-if=
"isEdit"
>
<el-form-item
style=
"margin-bottom: 20px;"
label-width=
"75px"
label=
"小组数:"
v-if=
"isEdit"
>
<el-input
v-model=
"postForm.group_nums"
type=
"number"
style=
"width: 220px;"
readonly
/>
<el-input
v-model=
"postForm.group_nums"
type=
"number"
style=
"width: 220px;"
disabled
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
...
@@ -288,6 +288,7 @@
...
@@ -288,6 +288,7 @@
if
(
valid
)
{
if
(
valid
)
{
this
.
loading
=
true
this
.
loading
=
true
this
.
postForm
.
group_ids
=
JSON
.
stringify
(
this
.
group_ids
);
this
.
postForm
.
group_ids
=
JSON
.
stringify
(
this
.
group_ids
);
console
.
log
(
this
.
postForm
.
group_ids
)
// 处理未修改标签
// 处理未修改标签
if
(
this
.
temp_city_name
===
this
.
postForm
.
city
){
if
(
this
.
temp_city_name
===
this
.
postForm
.
city
){
this
.
postForm
.
city
=
this
.
temp_city_id
;
this
.
postForm
.
city
=
this
.
temp_city_id
;
...
@@ -350,7 +351,8 @@
...
@@ -350,7 +351,8 @@
this
.
temp_group_ids
=
''
this
.
temp_group_ids
=
''
},
},
delUser
()
{
delUser
()
{
this
.
postForm
.
group_ids
.
push
(...
this
.
multipleSelection
)
this
.
del_list
.
push
(...
this
.
multipleSelection
)
},
},
handleSelectionChange
(
val
)
{
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
;
this
.
multipleSelection
=
val
;
...
...
vu/src/views/star/list.vue
View file @
89443bb1
...
@@ -60,7 +60,7 @@
...
@@ -60,7 +60,7 @@
</el-table>
</el-table>
<pagination
v-show=
"total>0"
:total=
"total"
:page
=
"listQuery.page"
:limit
=
"listQuery.limit"
style=
"margin-left: 150px;"
@
pagination=
"getList"
/>
<pagination
v-show=
"total>0"
:total=
"total"
:page
.
sync=
"listQuery.page"
:limit
.
sync
=
"listQuery.limit"
style=
"margin-left: 150px;"
@
pagination=
"getList"
/>
</div>
</div>
</template>
</template>
...
@@ -162,7 +162,7 @@ export default {
...
@@ -162,7 +162,7 @@ export default {
})
})
},
},
handleFilter
()
{
handleFilter
()
{
this
.
listQuery
.
page
=
0
this
.
listQuery
.
page
=
1
this
.
getList
()
this
.
getList
()
},
},
handleCreate
()
{
handleCreate
()
{
...
...
vu/src/views/topic/components/TopicDetail.vue
View file @
89443bb1
This diff is collapsed.
Click to expand it.
vu/src/views/topic/list.vue
View file @
89443bb1
...
@@ -8,12 +8,12 @@
...
@@ -8,12 +8,12 @@
<el-select
v-model=
"listQuery.filter.is_online"
:placeholder=
"'上线'"
clearable
class=
"filter-item"
style=
"width: 100px"
>
<el-select
v-model=
"listQuery.filter.is_online"
:placeholder=
"'上线'"
clearable
class=
"filter-item"
style=
"width: 100px"
>
<el-option
v-for=
"item in BooleanTypeOptions"
:key=
"item.key"
:label=
"item.display_name"
:value=
"item.key"
/>
<el-option
v-for=
"item in BooleanTypeOptions"
:key=
"item.key"
:label=
"item.display_name"
:value=
"item.key"
/>
</el-select>
</el-select>
<el-select
v-model=
"listQuery.filter.
is_reported
"
:placeholder=
"'举报'"
clearable
class=
"filter-item"
style=
"width: 100px"
>
<el-select
v-model=
"listQuery.filter.
complaints__isnull
"
:placeholder=
"'举报'"
clearable
class=
"filter-item"
style=
"width: 100px"
>
<el-option
v-for=
"item in ReBooleanTypeOptions"
:key=
"item.key"
:label=
"item.display_name"
:value=
"item.key"
/>
<el-option
v-for=
"item in ReBooleanTypeOptions"
:key=
"item.key"
:label=
"item.display_name"
:value=
"item.key"
/>
</el-select>
</el-select>
<el-select
v-model=
"listQuery.filter.is_puppet"
:placeholder=
"'马甲'"
clearable
class=
"filter-item"
style=
"width: 100px"
>
<el-select
v-model=
"listQuery.filter.is_puppet"
:placeholder=
"'马甲'"
clearable
class=
"filter-item"
style=
"width: 100px"
>
<el-option
v-for=
"item in
Re
BooleanTypeOptions"
:key=
"item.key"
:label=
"item.display_name"
:value=
"item.key"
/>
<el-option
v-for=
"item in BooleanTypeOptions"
:key=
"item.key"
:label=
"item.display_name"
:value=
"item.key"
/>
</el-select>
</el-select>
<el-select
v-model=
"listQuery.filter.content_level"
:placeholder=
"'帖子星级'"
clearable
class=
"filter-item"
style=
"width: 100px"
>
<el-select
v-model=
"listQuery.filter.content_level"
:placeholder=
"'帖子星级'"
clearable
class=
"filter-item"
style=
"width: 100px"
>
...
@@ -23,7 +23,6 @@
...
@@ -23,7 +23,6 @@
<el-button
class=
"filter-item"
style=
"margin-left: 10px;"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"handleCreate"
>
创建
</el-button>
<el-button
class=
"filter-item"
style=
"margin-left: 10px;"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"handleCreate"
>
创建
</el-button>
<el-button
class=
"filter-item"
style=
"margin-left: 10px;"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"handleOfflineOrOnline('offline')"
>
下线
</el-button>
<el-button
class=
"filter-item"
style=
"margin-left: 10px;"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"handleOfflineOrOnline('offline')"
>
下线
</el-button>
<el-button
class=
"filter-item"
style=
"margin-left: 10px;"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"handleOfflineOrOnline('online')"
>
上线
</el-button>
<el-button
class=
"filter-item"
style=
"margin-left: 10px;"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"handleOfflineOrOnline('online')"
>
上线
</el-button>
<el-button
class=
"filter-item"
style=
"margin-left: 10px;"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"handleOfflineOrOnline('is_reported')"
>
推荐
</el-button>
</div>
</div>
<el-table
v-loading=
"listLoading"
:data=
"list"
border
fit
highlight-current-row
style=
"width: 100%"
ref=
"multipleTable"
@
selection-change=
"handleSelectionChange"
>
<el-table
v-loading=
"listLoading"
:data=
"list"
border
fit
highlight-current-row
style=
"width: 100%"
ref=
"multipleTable"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
align=
"center"
></el-table-column>
<el-table-column
type=
"selection"
align=
"center"
></el-table-column>
...
@@ -80,18 +79,13 @@
...
@@ -80,18 +79,13 @@
<el-table-column
align=
"center"
label=
"下线"
>
<el-table-column
align=
"center"
label=
"下线"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-tag
:type=
"scope.row.is_online | isOnlineFilter"
>
{{
scope
.
row
.
is_online
==
1
?
'是'
:
'否'
}}
</el-tag>
<el-tag
:type=
"scope.row.is_online | isOnlineFilter"
>
{{
scope
.
row
.
is_online
===
1
?
'是'
:
'否'
}}
</el-tag>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"推荐"
>
<
template
slot-scope=
"scope"
>
<el-tag
:type=
"scope.row.is_reported | isOnlineFilter"
>
{{
scope
.
row
.
is_reported
==
1
?
'是'
:
'否'
}}
</el-tag>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
<pagination
v-show=
"total>0"
:total=
"total"
:page
=
"listQuery.page"
:limit
=
"listQuery.limit"
style=
"margin-left: 150px;"
@
pagination=
"getList"
/>
<pagination
v-show=
"total>0"
:total=
"total"
:page
.
sync=
"listQuery.page"
:limit
.
sync
=
"listQuery.limit"
style=
"margin-left: 150px;"
@
pagination=
"getList"
/>
</div>
</div>
</template>
</template>
...
@@ -146,8 +140,8 @@ export default {
...
@@ -146,8 +140,8 @@ export default {
{
'key'
:
0
,
'display_name'
:
'否'
}
{
'key'
:
0
,
'display_name'
:
'否'
}
],
],
ReBooleanTypeOptions
:
[
ReBooleanTypeOptions
:
[
{
'key'
:
1
,
'display_name'
:
'是'
},
{
'key'
:
0
,
'display_name'
:
'是'
},
{
'key'
:
0
,
'display_name'
:
'否'
}
{
'key'
:
1
,
'display_name'
:
'否'
}
],
],
SearchTypeOptions
:[
SearchTypeOptions
:[
{
'key'
:
'id'
,
'display_name'
:
'帖子ID'
},
{
'key'
:
'id'
,
'display_name'
:
'帖子ID'
},
...
@@ -193,8 +187,6 @@ export default {
...
@@ -193,8 +187,6 @@ export default {
for
(
let
i
=
0
;
i
<
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
length
;
i
++
)
{
if
(
val
===
'offline'
){
if
(
val
===
'offline'
){
this
.
multipleSelection
[
i
].
is_online
=
0
this
.
multipleSelection
[
i
].
is_online
=
0
}
else
if
(
val
===
'is_reported'
){
this
.
multipleSelection
[
i
].
is_reported
=
0
}
else
{
}
else
{
this
.
multipleSelection
[
i
].
is_online
=
1
this
.
multipleSelection
[
i
].
is_online
=
1
}
}
...
@@ -207,11 +199,11 @@ export default {
...
@@ -207,11 +199,11 @@ export default {
})
})
},
},
handleFilter
()
{
handleFilter
()
{
this
.
listQuery
.
page
=
0
this
.
listQuery
.
page
=
1
this
.
getList
()
this
.
getList
()
},
},
handleCreate
()
{
handleCreate
()
{
this
.
$router
.
push
(
'/
pick
/create'
)
this
.
$router
.
push
(
'/
topic
/create'
)
}
}
}
}
}
}
...
...
vu/src/views/user/components/UserDetail.vue
View file @
89443bb1
This diff is collapsed.
Click to expand it.
vu/src/views/user/list.vue
View file @
89443bb1
...
@@ -8,9 +8,9 @@
...
@@ -8,9 +8,9 @@
<el-select
v-model=
"listQuery.filter.user_type"
:placeholder=
"'用户身份'"
clearable
class=
"filter-item"
style=
"width: 110px"
>
<el-select
v-model=
"listQuery.filter.user_type"
:placeholder=
"'用户身份'"
clearable
class=
"filter-item"
style=
"width: 110px"
>
<el-option
v-for=
"item in UserTypeOptions"
:key=
"item.key"
:label=
"item.display_name"
:value=
"item.key"
/>
<el-option
v-for=
"item in UserTypeOptions"
:key=
"item.key"
:label=
"item.display_name"
:value=
"item.key"
/>
</el-select>
</el-select>
<
el-select
v-model=
"listQuery.filter.group_type"
:placeholder=
"'组内身份'"
clearable
class=
"filter-item"
style=
"width: 110px"
>
<
!--
<el-select
v-model=
"listQuery.filter.group_type"
:placeholder=
"'组内身份'"
clearable
class=
"filter-item"
style=
"width: 110px"
>
--
>
<
el-option
v-for=
"item in IdentifyTypeOptions"
:key=
"item.key"
:label=
"item.display_name"
:value=
"item.key"
/
>
<
!--
<el-option
v-for=
"item in IdentifyTypeOptions"
:key=
"item.key"
:label=
"item.display_name"
:value=
"item.key"
/>
--
>
<
/el-select
>
<
!--
</el-select>
--
>
<el-select
v-model=
"listQuery.filter.is_recommend"
:placeholder=
"'推荐'"
clearable
class=
"filter-item"
style=
"width: 100px"
>
<el-select
v-model=
"listQuery.filter.is_recommend"
:placeholder=
"'推荐'"
clearable
class=
"filter-item"
style=
"width: 100px"
>
<el-option
v-for=
"item in ReBooleanTypeOptions"
:key=
"item.key"
:label=
"item.display_name"
:value=
"item.key"
/>
<el-option
v-for=
"item in ReBooleanTypeOptions"
:key=
"item.key"
:label=
"item.display_name"
:value=
"item.key"
/>
</el-select>
</el-select>
...
@@ -19,59 +19,59 @@
...
@@ -19,59 +19,59 @@
<el-button
class=
"filter-item"
style=
"margin-left: 10px;"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"handleOfflineOrOnline('recommend')"
>
推荐
</el-button>
<el-button
class=
"filter-item"
style=
"margin-left: 10px;"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"handleOfflineOrOnline('recommend')"
>
推荐
</el-button>
</div>
</div>
<el-table
v-loading=
"listLoading"
:data=
"list"
border
fit
highlight-current-row
style=
"width: 100%"
ref=
"multipleTable"
@
selection-change=
"handleSelectionChange"
>
<el-table
v-loading=
"listLoading"
:data=
"list"
border
fit
highlight-current-row
style=
"width: 100%"
ref=
"multipleTable"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
></el-table-column>
<el-table-column
type=
"selection"
align=
"center"
></el-table-column>
<el-table-column
align=
"center"
label=
"用户ID "
width=
"80"
>
<el-table-column
align=
"center"
label=
"用户ID "
width=
"80"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<router-link
:to=
"'/
pick/edit/'+scope.row.
id"
class=
"link-type"
>
<router-link
:to=
"'/
user/edit/'+scope.row.user_
id"
class=
"link-type"
>
<span>
{{
scope
.
row
.
id
}}
</span>
<span>
{{
scope
.
row
.
user_
id
}}
</span>
</router-link>
</router-link>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
width=
"140px"
align=
"center"
label=
"用户名"
>
<el-table-column
align=
"center"
label=
"用户名"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
user
name
}}
</span>
<span>
{{
scope
.
row
.
nick_
name
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
width=
"140px"
align=
"center"
label=
"联系电话"
>
<el-table-column
align=
"center"
label=
"联系电话"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
phone
}}
</span>
<span>
{{
scope
.
row
.
phone
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
width=
"180px"
align=
"center"
label=
"邮箱"
>
<el-table-column
align=
"center"
label=
"邮箱"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
email
}}
</span>
<span>
{{
scope
.
row
.
email
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
width=
"70px"
align=
"center"
label=
"关注小组"
>
<el-table-column
align=
"center"
label=
"关注小组"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
group_nums
}}
</span>
<span>
{{
scope
.
row
.
group_nums
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
width=
"70px"
align=
"center"
label=
"帖子数"
>
<el-table-column
align=
"center"
label=
"帖子数"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
topic_num
}}
</span>
<span>
{{
scope
.
row
.
topic_num
s
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<
el-table-column
width=
"150px"
align=
"center"
label=
"组内身份"
>
<
!--<el-table-column width="150px" align="center" label="组内身份">--
>
<
template
slot-scope=
"scope"
>
<
!--<template slot-scope="scope">--
>
<
span>
{{
scope
.
row
.
group_identify
}}
</span
>
<
!--<span>{{ scope.row.group_identify }}</span>--
>
<
/
template
>
<
!--</template>--
>
<
/el-table-column
>
<
!--</el-table-column>--
>
<el-table-column
width=
"100px"
align=
"center"
label=
"用户身份"
>
<el-table-column
align=
"center"
label=
"用户身份"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
user_identify
}}
</span>
<span>
{{
scope
.
row
.
user_identify
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
width=
"80px"
align=
"center"
label=
"推荐"
>
<el-table-column
align=
"center"
label=
"推荐"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-tag
:type=
"scope.row.is_recommend | isOnlineFilter"
>
{{
scope
.
row
.
is_recommend
==
1
?
'是'
:
'否'
}}
</el-tag>
<el-tag
:type=
"scope.row.is_recommend | isOnlineFilter"
>
{{
scope
.
row
.
is_recommend
==
1
?
'是'
:
'否'
}}
</el-tag>
</
template
>
</
template
>
...
@@ -191,7 +191,6 @@ export default {
...
@@ -191,7 +191,6 @@ export default {
}
}
OffLineOrOnLine
({
type
:
val
,
ids
:
str
}).
then
(
response
=>
{
OffLineOrOnLine
({
type
:
val
,
ids
:
str
}).
then
(
response
=>
{
this
.
multipleSelection
=
[];
this
.
multipleSelection
=
[];
response
.
data
.
data
.
message
this
.
$message
.
success
(
response
.
data
.
data
.
message
);
this
.
$message
.
success
(
response
.
data
.
data
.
message
);
})
})
},
},
...
...
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