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
d3822bc9
Commit
d3822bc9
authored
Nov 30, 2018
by
Davve
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改样式
parent
84afe8a7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
95 additions
and
19 deletions
+95
-19
group.py
api/group.py
+2
-2
pick.py
api/pick.py
+22
-2
search.py
api/search.py
+11
-1
star.py
api/star.py
+1
-1
urls.py
api/urls.py
+4
-1
pick.js
vu/src/api/pick.js
+16
-0
remoteSearch.js
vu/src/api/remoteSearch.js
+17
-1
GroupDetail.vue
vu/src/views/group/components/GroupDetail.vue
+4
-4
PickDetail.vue
vu/src/views/pick/components/PickDetail.vue
+0
-0
StarDetail.vue
vu/src/views/star/components/StarDetail.vue
+1
-1
TagDetail.vue
vu/src/views/tag/components/TagDetail.vue
+16
-6
list.vue
vu/src/views/topic/list.vue
+1
-0
No files found.
api/group.py
View file @
d3822bc9
...
...
@@ -59,8 +59,8 @@ class GroupUpdateOrCreate(APIView):
'description'
:
request
.
POST
.
get
(
'description'
,
''
),
'creator_id'
:
request
.
POST
.
get
(
'user_id'
,
''
),
'celebrity_ids'
:
json
.
loads
(
request
.
POST
.
get
(
'star'
,
''
)),
'is_online'
:
request
.
POST
.
get
(
'is_online'
,
''
),
'is_recommend'
:
request
.
POST
.
get
(
'is_recommend'
,
''
),
'is_online'
:
int
(
request
.
POST
.
get
(
'is_online'
,
0
)
),
'is_recommend'
:
int
(
request
.
POST
.
get
(
'is_recommend'
,
0
)
),
'group_user_ids'
:
json
.
loads
(
request
.
POST
.
get
(
'user_ids'
,
''
)),
'icon'
:
request
.
POST
.
get
(
'icon'
,
''
)[:
-
2
]
}
...
...
api/pick.py
View file @
d3822bc9
...
...
@@ -97,4 +97,24 @@ class PickUserListView(APIView):
raise
e
return
{
'message'
:
'操作失败'
}
\ No newline at end of file
}
class
PickTopicView
(
APIView
):
def
get
(
self
,
request
):
topic_id
=
request
.
GET
.
get
(
'id'
)
try
:
data
=
self
.
rpc
[
'venus/sun/topic/pick_topic'
](
id
=
topic_id
)
.
unwrap
()
except
Exception
as
e
:
raise
e
return
[
data
,
]
class
PickCelebrityListView
(
APIView
):
def
get
(
self
,
request
):
celebrity_id
=
request
.
GET
.
get
(
'id'
)
try
:
data
=
self
.
rpc
[
'venus/sun/pick/pick_celebrity'
](
id
=
celebrity_id
)
.
unwrap
()
except
Exception
as
e
:
raise
e
return
[
data
,
]
\ No newline at end of file
api/search.py
View file @
d3822bc9
...
...
@@ -47,7 +47,7 @@ class TagSearchView(APIView):
return
{
'data'
:
data
}
class
Star
SearchView
(
APIView
):
class
Celebrity
SearchView
(
APIView
):
def
get
(
self
,
request
):
name
=
request
.
GET
.
get
(
'name'
)
try
:
...
...
@@ -65,3 +65,13 @@ class CitySearchView(APIView):
except
Exception
as
e
:
raise
e
return
{
'data'
:
data
}
class
TopicSearchView
(
APIView
):
def
get
(
self
,
request
):
name
=
request
.
GET
.
get
(
'name'
)
try
:
data
=
self
.
rpc
[
'venus/sun/topic/search'
](
name
=
name
)
.
unwrap
()
except
Exception
as
e
:
raise
e
return
{
'data'
:
data
}
api/star.py
View file @
d3822bc9
...
...
@@ -50,7 +50,7 @@ class CelebrityUpdateOrCreate(APIView):
id
=
request
.
POST
.
get
(
'id'
,
''
)
data
=
{
'name'
:
request
.
POST
.
get
(
'name'
),
'gender'
:
request
.
POST
.
get
(
'gender'
),
'gender'
:
int
(
request
.
POST
.
get
(
'gender'
)
),
'city_id'
:
request
.
POST
.
get
(
'city'
),
'is_online'
:
int
(
request
.
POST
.
get
(
'is_online'
)),
'desc'
:
request
.
POST
.
get
(
'description'
),
...
...
api/urls.py
View file @
d3822bc9
...
...
@@ -70,6 +70,8 @@ urlpatterns = [
url
(
r'^pick/detail/'
,
UpdateOrCreateView
.
as_view
()),
url
(
r'^pick/user/list$'
,
PickUserListView
.
as_view
()),
url
(
r'^pick/add_fake_pick_nums$'
,
PickUserListView
.
as_view
()),
url
(
r'^pick/topic'
,
PickTopicView
.
as_view
()),
url
(
r'^pick/celebrity'
,
PickCelebrityListView
.
as_view
()),
# 标签相关
url
(
r'^tag/list$'
,
TagListView
.
as_view
()),
...
...
@@ -83,8 +85,9 @@ search_urlpatterns = [
url
(
r'search/country'
,
CountrySearchView
.
as_view
()),
url
(
r'search/user'
,
UserSearchView
.
as_view
()),
url
(
r'search/tag'
,
TagSearchView
.
as_view
()),
url
(
r'search/
star'
,
Star
SearchView
.
as_view
()),
url
(
r'search/
celebrity'
,
Celebrity
SearchView
.
as_view
()),
url
(
r'search/city'
,
CitySearchView
.
as_view
()),
url
(
r'search/topic'
,
TopicSearchView
.
as_view
()),
]
common_urlpatterns
=
[
...
...
vu/src/api/pick.js
View file @
d3822bc9
...
...
@@ -48,3 +48,19 @@ export function AddFakePickNums(data) {
data
})
}
export
function
PickTopicDetail
(
id
)
{
return
request
({
url
:
'/api/pick/topic'
,
method
:
'get'
,
params
:
{
id
}
})
}
export
function
PickCelebrityDetail
(
id
)
{
return
request
({
url
:
'/api/pick/celebrity'
,
method
:
'get'
,
params
:
{
id
}
})
}
vu/src/api/remoteSearch.js
View file @
d3822bc9
...
...
@@ -34,7 +34,7 @@ export function tagSearch(name) {
export
function
starSearch
(
name
)
{
return
request
({
url
:
'/api/search/
star
'
,
url
:
'/api/search/
celebrity
'
,
method
:
'get'
,
params
:
{
name
}
})
...
...
@@ -47,3 +47,19 @@ export function citySearch(name) {
params
:
{
name
}
})
}
export
function
celebritySearch
(
name
)
{
return
request
({
url
:
'/api/search/celebrity'
,
method
:
'get'
,
params
:
{
name
}
})
}
export
function
topicSearch
(
name
)
{
return
request
({
url
:
'/api/search/topic'
,
method
:
'get'
,
params
:
{
name
}
})
}
vu/src/views/group/components/GroupDetail.vue
View file @
d3822bc9
...
...
@@ -202,7 +202,7 @@
user_id
:
''
,
star
:
[],
icon
:
''
,
is_online
:
1
,
is_online
:
0
,
is_recommend
:
1
,
user_ids
:
[],
}
...
...
@@ -338,7 +338,8 @@
duration
:
2000
})
setTimeout
(()
=>
{
this
.
$router
.
push
(
'/group/list'
)
// this.$router.push('/group/list')
this
.
$router
.
go
(
0
)
},
1000
)
}).
catch
(
err
=>
{
...
...
@@ -372,7 +373,7 @@
this
.
getList
()
},
appendUser
()
{
if
(
this
.
temp_user_ids
){
if
(
this
.
temp_user_ids
==
""
){
this
.
$message
.
error
(
'还没输入小组呢~~'
)
this
.
temp_user_ids
=
''
return
false
...
...
@@ -431,7 +432,6 @@
starSearch
(
query
).
then
(
response
=>
{
if
(
!
response
.
data
.
data
.
data
)
return
this
.
starListOptions
=
response
.
data
.
data
.
data
console
.
log
(
response
.
data
.
data
.
data
)
})
},
}
...
...
vu/src/views/pick/components/PickDetail.vue
View file @
d3822bc9
This diff is collapsed.
Click to expand it.
vu/src/views/star/components/StarDetail.vue
View file @
d3822bc9
...
...
@@ -298,7 +298,7 @@
this
.
postForm
.
city
=
this
.
temp_city_id
;
}
console
.
log
(
this
.
postForm
,
'====================='
)
starCreate
(
this
.
postForm
).
then
(
response
=>
{
this
.
$notify
({
title
:
'成功'
,
...
...
vu/src/views/tag/components/TagDetail.vue
View file @
d3822bc9
...
...
@@ -101,6 +101,17 @@
return
region_data
.
join
(
','
)
}
function
removeNull
(
parkingList
)
{
for
(
let
i
=
0
;
i
<
parkingList
.
length
;
i
++
)
{
if
(
parkingList
[
i
]
==
''
||
parkingList
[
i
]
==
null
||
typeof
(
parkingList
[
i
])
==
undefined
)
{
parkingList
.
splice
(
i
,
1
);
i
=
i
-
1
;
}
}
return
parkingList
}
const
defaultForm
=
{
status
:
'draft'
,
name
:
''
,
...
...
@@ -196,11 +207,10 @@
}
let
flag
=
false
;
let
up_tag_arrays
=
this
.
postForm
.
up_tags
.
split
(
','
)
let
down_tags_arrays
=
this
.
postForm
.
down_tags
.
split
(
','
)
for
(
let
i
=
0
;
i
<
up_tag_arrays
.
length
;
i
++
){
if
(
isInArray
(
down_tags_arrays
,
up_tag_arrays
[
i
])){
let
up_tag_arrays
=
removeNull
(
this
.
postForm
.
up_tags
.
split
(
','
))
let
down_tags_arrays
=
removeNull
(
this
.
postForm
.
down_tags
.
split
(
','
))
for
(
let
i
=
0
;
i
<
up_tag_arrays
.
length
;
i
++
)
{
if
(
isInArray
(
down_tags_arrays
,
up_tag_arrays
[
i
]))
{
this
.
$message
.
error
(
'上下级标签不能存相同标签'
)
this
.
postForm
.
up_tags
=
[];
this
.
postForm
.
down_tags
=
[];
...
...
@@ -208,7 +218,7 @@
break
}
}
if
(
flag
){
if
(
flag
)
{
return
false
;
}
...
...
vu/src/views/topic/list.vue
View file @
d3822bc9
...
...
@@ -146,6 +146,7 @@ export default {
SearchTypeOptions
:[
{
'key'
:
'id'
,
'display_name'
:
'帖子ID'
},
{
'key'
:
'content'
,
'display_name'
:
'帖子内容'
},
{
'key'
:
'group__name'
,
'display_name'
:
'小组'
},
],
ContentLevelTypeOptions
:[
{
'key'
:
0
,
'display_name'
:
'未审核'
},
...
...
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