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
729663df
Commit
729663df
authored
Nov 27, 2018
by
Davve
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复异常
parent
d6793025
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
26 additions
and
16 deletions
+26
-16
group.py
api/group.py
+2
-2
push.py
api/push.py
+2
-1
index.js
vu/src/lang/index.js
+1
-1
app.js
vu/src/store/modules/app.js
+2
-2
list.vue
vu/src/views/account/list.vue
+1
-2
GroupDetail.vue
vu/src/views/group/components/GroupDetail.vue
+1
-0
PushDetail.vue
vu/src/views/push/components/PushDetail.vue
+7
-6
TopicDetail.vue
vu/src/views/topic/components/TopicDetail.vue
+1
-1
list.vue
vu/src/views/user/list.vue
+9
-1
No files found.
api/group.py
View file @
729663df
...
@@ -57,8 +57,8 @@ class GroupUpdateOrCreate(APIView):
...
@@ -57,8 +57,8 @@ class GroupUpdateOrCreate(APIView):
data
=
{
data
=
{
'name'
:
request
.
POST
.
get
(
'name'
,
''
),
'name'
:
request
.
POST
.
get
(
'name'
,
''
),
'description'
:
request
.
POST
.
get
(
'description'
,
''
),
'description'
:
request
.
POST
.
get
(
'description'
,
''
),
'creator_id'
:
request
.
POST
.
get
(
'
group_leader
'
,
''
),
'creator_id'
:
request
.
POST
.
get
(
'
user_id
'
,
''
),
'star_ids'
:
json
.
loads
(
request
.
POST
.
get
(
'star'
,
''
))
.
split
(
','
),
# TODO是否需要加
'star_ids'
:
json
.
loads
(
request
.
POST
.
get
(
'star'
,
''
))
,
'is_online'
:
request
.
POST
.
get
(
'is_online'
,
''
),
'is_online'
:
request
.
POST
.
get
(
'is_online'
,
''
),
'is_recommend'
:
request
.
POST
.
get
(
'is_recommend'
,
''
),
'is_recommend'
:
request
.
POST
.
get
(
'is_recommend'
,
''
),
'user_ids'
:
json
.
loads
(
request
.
POST
.
get
(
'user_ids'
,
''
))
'user_ids'
:
json
.
loads
(
request
.
POST
.
get
(
'user_ids'
,
''
))
...
...
api/push.py
View file @
729663df
...
@@ -30,6 +30,7 @@ class PushUpdateOrCreateView(APIView):
...
@@ -30,6 +30,7 @@ class PushUpdateOrCreateView(APIView):
def
post
(
self
,
request
):
def
post
(
self
,
request
):
id
=
request
.
POST
.
get
(
'id'
,
''
)
id
=
request
.
POST
.
get
(
'id'
,
''
)
creator_id
=
request
.
POST
.
get
(
'creator_id'
)
push_time
=
analysis_time
(
request
.
POST
.
get
(
'push_time'
,
0
))
push_time
=
analysis_time
(
request
.
POST
.
get
(
'push_time'
,
0
))
data
=
{
data
=
{
...
@@ -38,7 +39,7 @@ class PushUpdateOrCreateView(APIView):
...
@@ -38,7 +39,7 @@ class PushUpdateOrCreateView(APIView):
'icon'
:
request
.
POST
.
get
(
'icon'
,
''
)[:
-
2
],
'icon'
:
request
.
POST
.
get
(
'icon'
,
''
)[:
-
2
],
'content'
:
request
.
POST
.
get
(
'content'
,
''
),
'content'
:
request
.
POST
.
get
(
'content'
,
''
),
'title'
:
request
.
POST
.
get
(
'title'
,
''
),
'title'
:
request
.
POST
.
get
(
'title'
,
''
),
'creator_id'
:
''
# TODO 运营ID
'creator_id'
:
creator_id
}
}
try
:
try
:
self
.
rpc
[
'venus/sun/push/edit'
](
id
=
id
,
data
=
data
)
.
unwrap
()
self
.
rpc
[
'venus/sun/push/edit'
](
id
=
id
,
data
=
data
)
.
unwrap
()
...
...
vu/src/lang/index.js
View file @
729663df
...
@@ -28,7 +28,7 @@ const messages = {
...
@@ -28,7 +28,7 @@ const messages = {
const
i18n
=
new
VueI18n
({
const
i18n
=
new
VueI18n
({
// set locale
// set locale
// options: en | zh | es
// options: en | zh | es
locale
:
Cookies
.
get
(
'language'
)
||
'
en
'
,
locale
:
Cookies
.
get
(
'language'
)
||
'
zh
'
,
// set locale messages
// set locale messages
messages
messages
})
})
...
...
vu/src/store/modules/app.js
View file @
729663df
...
@@ -7,7 +7,7 @@ const app = {
...
@@ -7,7 +7,7 @@ const app = {
withoutAnimation
:
false
withoutAnimation
:
false
},
},
device
:
'desktop'
,
device
:
'desktop'
,
language
:
Cookies
.
get
(
'language'
)
||
'en
'
,
language
:
'zh
'
,
size
:
Cookies
.
get
(
'size'
)
||
'medium'
size
:
Cookies
.
get
(
'size'
)
||
'medium'
},
},
mutations
:
{
mutations
:
{
...
@@ -30,7 +30,7 @@ const app = {
...
@@ -30,7 +30,7 @@ const app = {
},
},
SET_LANGUAGE
:
(
state
,
language
)
=>
{
SET_LANGUAGE
:
(
state
,
language
)
=>
{
state
.
language
=
language
state
.
language
=
language
Cookies
.
set
(
'language'
,
language
)
Cookies
.
set
(
'language'
,
'zh'
)
},
},
SET_SIZE
:
(
state
,
size
)
=>
{
SET_SIZE
:
(
state
,
size
)
=>
{
state
.
size
=
size
state
.
size
=
size
...
...
vu/src/views/account/list.vue
View file @
729663df
...
@@ -79,7 +79,6 @@ export default {
...
@@ -79,7 +79,6 @@ export default {
value
:
''
,
value
:
''
,
key
:
''
,
key
:
''
,
is_online
:
''
,
is_online
:
''
,
is_recommend
:
''
,
},
},
},
},
BooleanTypeOptions
:
[
BooleanTypeOptions
:
[
...
@@ -87,7 +86,7 @@ export default {
...
@@ -87,7 +86,7 @@ export default {
{
'key'
:
0
,
'display_name'
:
'否'
}
{
'key'
:
0
,
'display_name'
:
'否'
}
],
],
SearchTypeOptions
:[
SearchTypeOptions
:[
{
'key'
:
'username'
,
'display_name'
:
'用户名'
},
{
'key'
:
'user
__user
name'
,
'display_name'
:
'用户名'
},
]
]
}
}
},
},
...
...
vu/src/views/group/components/GroupDetail.vue
View file @
729663df
...
@@ -320,6 +320,7 @@
...
@@ -320,6 +320,7 @@
if
(
this
.
isEdit
){
if
(
this
.
isEdit
){
this
.
postForm
.
star
=
Assembledata
(
this
.
temp
.
star_ids
,
this
.
postForm
.
star
)
this
.
postForm
.
star
=
Assembledata
(
this
.
temp
.
star_ids
,
this
.
postForm
.
star
)
}
}
this
.
postForm
.
star
=
JSON
.
stringify
(
this
.
postForm
.
star
)
this
.
postForm
.
user_ids
=
JSON
.
stringify
(
user_ids
);
this
.
postForm
.
user_ids
=
JSON
.
stringify
(
user_ids
);
createGroup
(
this
.
postForm
).
then
(
response
=>
{
createGroup
(
this
.
postForm
).
then
(
response
=>
{
this
.
$notify
({
this
.
$notify
({
...
...
vu/src/views/push/components/PushDetail.vue
View file @
729663df
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
<el-col
:span=
"24"
>
<el-col
:span=
"24"
>
<el-form-item
style=
"margin-bottom: 40px;"
prop=
"title"
>
<el-form-item
style=
"margin-bottom: 40px;"
prop=
"title"
>
<MDinput
v-model=
"postForm.title"
:maxlength=
"100"
name=
"
nam
e"
required
>
<MDinput
v-model=
"postForm.title"
:maxlength=
"100"
name=
"
titl
e"
required
>
推送标题
推送标题
</MDinput>
</MDinput>
</el-form-item>
</el-form-item>
...
@@ -20,9 +20,9 @@
...
@@ -20,9 +20,9 @@
<div
class=
"postInfo-container"
>
<div
class=
"postInfo-container"
>
<el-row>
<el-row>
<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:"
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"
disabled
v-if=
"isEdit"
/>
style=
"width: 180px"
disabled
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
...
@@ -34,8 +34,8 @@
...
@@ -34,8 +34,8 @@
</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.
creator_
name"
type=
"text"
class=
"article-textarea"
style=
"width: 180px"
disabled
v-if=
"isEdit"
/>
style=
"width: 180px"
disabled
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -97,7 +97,7 @@ const defaultForm = {
...
@@ -97,7 +97,7 @@ const defaultForm = {
icon
:
''
,
icon
:
''
,
push_time
:
''
,
push_time
:
''
,
url
:
''
,
url
:
''
,
name
:
''
,
creator_name
:
''
}
}
export
default
{
export
default
{
...
@@ -168,6 +168,7 @@ export default {
...
@@ -168,6 +168,7 @@ export default {
this
.
$refs
.
postForm
.
validate
(
valid
=>
{
this
.
$refs
.
postForm
.
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
this
.
loading
=
true
this
.
loading
=
true
this
.
postForm
.
creator_id
=
this
.
$store
.
getters
.
id
// 创建用户ID
CreatePush
(
this
.
postForm
).
then
(
response
=>
{
CreatePush
(
this
.
postForm
).
then
(
response
=>
{
this
.
$notify
({
this
.
$notify
({
title
:
'成功'
,
title
:
'成功'
,
...
...
vu/src/views/topic/components/TopicDetail.vue
View file @
729663df
...
@@ -233,7 +233,7 @@
...
@@ -233,7 +233,7 @@
</el-table>
</el-table>
<pagination
v-show=
"total>0"
:total=
"total"
:page
.
sync=
"listQuery.page"
:limit
.
sync=
"listQuery.limit"
<pagination
v-show=
"total>0"
:total=
"total"
:page
.
sync=
"listQuery.page"
:limit
.
sync=
"listQuery.limit"
style=
"margin-left:
2
50px;"
@
pagination=
"getList"
/>
style=
"margin-left:
1
50px;"
@
pagination=
"getList"
/>
</div>
</div>
</el-card>
</el-card>
</el-row>
</el-row>
...
...
vu/src/views/user/list.vue
View file @
729663df
...
@@ -29,6 +29,13 @@
...
@@ -29,6 +29,13 @@
<el-table
v-loading=
"listLoading"
:data=
"list"
border
fit
highlight-current-row
style=
"width: 100%"
<el-table
v-loading=
"listLoading"
:data=
"list"
border
fit
highlight-current-row
style=
"width: 100%"
ref=
"multipleTable"
@
selection-change=
"handleSelectionChange"
>
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>
<el-table-column
align=
"center"
label=
"ID"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
id
}}
</span>
</
template
>
</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=
"'/user/edit/'+scope.row.user_id"
class=
"link-type"
>
<router-link
:to=
"'/user/edit/'+scope.row.user_id"
class=
"link-type"
>
...
@@ -161,7 +168,8 @@
...
@@ -161,7 +168,8 @@
{
'key'
:
1
,
'display_name'
:
'马甲用户'
}
{
'key'
:
1
,
'display_name'
:
'马甲用户'
}
],
],
SearchTypeOptions
:
[
SearchTypeOptions
:
[
{
'key'
:
'id'
,
'display_name'
:
'用户ID'
},
{
'key'
:
'id'
,
'display_name'
:
'ID'
},
{
'key'
:
'user_id'
,
'display_name'
:
'用户ID'
},
{
'key'
:
'name'
,
'display_name'
:
'用户名'
},
{
'key'
:
'name'
,
'display_name'
:
'用户名'
},
{
'key'
:
'phone'
,
'display_name'
:
'联系电话'
},
{
'key'
:
'phone'
,
'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