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
f385eeb7
Commit
f385eeb7
authored
6 years ago
by
Davve
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改问题
parent
d386e23d
master
deploy/like-prod
deploy/like-stage
deploy/like-test
dev
like-pre/r01
test
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
14 deletions
+17
-14
group.py
api/group.py
+1
-4
star.py
api/star.py
+2
-1
settings.py
sun/settings.py
+1
-0
user_util.py
utils/user_util.py
+1
-1
GroupDetail.vue
vu/src/views/group/components/GroupDetail.vue
+10
-6
StarDetail.vue
vu/src/views/star/components/StarDetail.vue
+2
-2
No files found.
api/group.py
View file @
f385eeb7
...
...
@@ -59,10 +59,7 @@ class GroupUpdateOrCreate(APIView):
def
post
(
self
,
request
):
id
=
request
.
POST
.
get
(
'id'
)
star_ids
=
list
(
map
(
lambda
x
:
x
.
split
(
":"
)[
0
],
json
.
loads
(
request
.
POST
.
get
(
'star'
,
'[]'
))))
try
:
group_user_ids
=
list
(
map
(
lambda
x
:
x
.
split
(
":"
)[
0
],
json
.
loads
(
request
.
POST
.
get
(
'group_users'
,
'[]'
))))
except
:
group_user_ids
=
json
.
loads
(
request
.
POST
.
get
(
'group_users'
,
'[]'
))
group_user_ids
=
list
(
map
(
lambda
x
:
x
.
split
(
":"
)[
0
],
json
.
loads
(
request
.
POST
.
get
(
'group_users'
,
'[]'
))))
data
=
{
'name'
:
request
.
POST
.
get
(
'name'
,
''
),
'description'
:
request
.
POST
.
get
(
'description'
,
''
),
...
...
This diff is collapsed.
Click to expand it.
api/star.py
View file @
f385eeb7
...
...
@@ -51,6 +51,7 @@ class CelebrityUpdateOrCreate(APIView):
return
{
'data'
:
data
}
def
post
(
self
,
request
):
print
(
request
.
POST
,
'------------'
)
id
=
request
.
POST
.
get
(
'id'
,
''
)
gender
=
request
.
POST
.
get
(
'gender'
)
group_ids
=
list
(
set
(
map
(
lambda
x
:
x
.
split
(
":"
)[
0
],
json
.
loads
(
request
.
POST
.
get
(
'groups'
,
'[]'
)))))
...
...
@@ -90,7 +91,7 @@ class CelebrityRelatedGroup(APIView):
id
=
request
.
GET
.
get
(
'id'
)
offset
=
int
(
request
.
GET
.
get
(
'page'
,
0
))
count
=
int
(
request
.
GET
.
get
(
'limit'
,
10
))
filters
=
{
'star_id'
:
id
}
filters
=
{
'star_id'
:
id
,
'is_online'
:
True
}
try
:
data
=
self
.
rpc
[
'venus/sun/group/list'
](
filters
=
filters
,
offset
=
(
offset
-
1
)
*
count
,
limit
=
count
)
.
unwrap
()
except
Exception
as
e
:
...
...
This diff is collapsed.
Click to expand it.
sun/settings.py
View file @
f385eeb7
...
...
@@ -53,6 +53,7 @@ MIDDLEWARE = [
]
ROOT_URLCONF
=
'sun.urls'
SENTRY_CELERY_ENDPOINT
=
'http://45b0ef6a79204d6988b59c32c9dd4bef:fa018677fb4f49be88d2ba61cdc7ee32@sentry.igengmei.com/135'
TEMPLATES
=
[
{
...
...
This diff is collapsed.
Click to expand it.
utils/user_util.py
View file @
f385eeb7
...
...
@@ -41,7 +41,7 @@ def require_login(request, origin=''):
return
login_require
def
py
(
password
):
def
make_password
(
password
):
"""生成密码hash
"""
return
make_password
(
password
,
None
,
'pbkdf2_sha256'
)
This diff is collapsed.
Click to expand it.
vu/src/views/group/components/GroupDetail.vue
View file @
f385eeb7
...
...
@@ -271,7 +271,6 @@
star
:
[],
temp_user_ids
:
''
,
group_users
:
[],
judge_user_ids
:
[],
group_identify
:
''
,
tempRoute
:
{},
...
...
@@ -397,7 +396,7 @@
},
appendUser
()
{
if
(
this
.
temp_user_ids
==
""
)
{
this
.
$message
.
error
(
'还没输入
小组
呢~~'
)
this
.
$message
.
error
(
'还没输入
用户
呢~~'
)
this
.
temp_user_ids
=
''
return
false
}
...
...
@@ -415,8 +414,8 @@
this
.
$message
.
error
(
'这条数据错误, 请换条数据'
)
return
}
this
.
judge_user_ids
.
push
(
response
.
data
.
data
[
0
].
user_id
)
this
.
tableData
.
push
(...
response
.
data
.
data
)
this
.
total
=
this
.
tableData
.
length
this
.
group_users
.
push
(
this
.
temp_user_ids
)
this
.
temp_user_ids
=
''
...
...
@@ -427,14 +426,19 @@
let
origin_user_ids
=
[];
var
left_user_ids
=
[];
let
select_user_ids
=
[]
for
(
let
i
=
0
;
i
<
this
.
multipleSelection
.
length
;
i
++
){
if
(
this
.
multipleSelection
[
i
].
group_identify
===
'管理员'
){
this
.
$message
.
error
(
'请先更换管理员,在进行移除操作~'
)
return
false
}
}
this
.
del_list
.
push
(...
this
.
multipleSelection
)
for
(
let
i
=
0
;
i
<
this
.
tableData
.
length
;
i
++
)
{
origin_user_ids
.
push
(
this
.
tableData
[
i
].
user_id
)
origin_user_ids
.
push
(
this
.
tableData
[
i
].
user_id
+
':'
+
this
.
tableData
[
i
].
nick_name
)
}
for
(
let
i
=
0
;
i
<
this
.
multipleSelection
.
length
;
i
++
)
{
select_user_ids
.
push
(
this
.
multipleSelection
[
i
].
user_id
)
select_user_ids
.
push
(
this
.
multipleSelection
[
i
].
user_id
+
':'
+
this
.
multipleSelection
[
i
].
nick_name
)
}
for
(
let
i
=
0
;
i
<
origin_user_ids
.
length
;
i
++
)
{
if
(
!
isInArray
(
select_user_ids
,
origin_user_ids
[
i
]))
{
...
...
This diff is collapsed.
Click to expand it.
vu/src/views/star/components/StarDetail.vue
View file @
f385eeb7
...
...
@@ -363,10 +363,10 @@
this
.
del_list
.
push
(...
this
.
multipleSelection
)
for
(
let
i
=
0
;
i
<
this
.
tableData
.
length
;
i
++
){
origin_group_ids
.
push
(
this
.
tableData
[
i
].
id
)
origin_group_ids
.
push
(
this
.
tableData
[
i
].
id
+
':'
+
this
.
tableData
[
i
].
name
)
}
for
(
let
i
=
0
;
i
<
this
.
multipleSelection
.
length
;
i
++
){
select_group_ids
.
push
(
this
.
multipleSelection
[
i
].
id
)
select_group_ids
.
push
(
this
.
multipleSelection
[
i
].
id
+
':'
+
this
.
multipleSelection
[
i
].
name
)
}
for
(
let
i
=
0
;
i
<
origin_group_ids
.
length
;
i
++
){
if
(
!
isInArray
(
select_group_ids
,
origin_group_ids
[
i
])){
...
...
This diff is collapsed.
Click to expand it.
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