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
1
Merge Requests
1
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
alpha
sun
Commits
0f5e287b
Commit
0f5e287b
authored
Dec 25, 2018
by
Davve
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加标签等级
parent
d444cb22
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
46 additions
and
18 deletions
+46
-18
search.py
api/search.py
+2
-1
tag.py
api/tag.py
+2
-1
proxy.js
vu/mock/proxy.js
+2
-2
remoteSearch.js
vu/src/api/remoteSearch.js
+2
-2
FaceStarDetail.vue
vu/src/views/face/components/FaceStarDetail.vue
+4
-2
TagDetail.vue
vu/src/views/tag/components/TagDetail.vue
+27
-7
TopicDetail.vue
vu/src/views/topic/components/TopicDetail.vue
+3
-1
UserDetail.vue
vu/src/views/user/components/UserDetail.vue
+4
-2
No files found.
api/search.py
View file @
0f5e287b
...
...
@@ -46,8 +46,9 @@ class UserSearchView(APIView):
class
TagSearchView
(
APIView
):
def
get
(
self
,
request
):
name
=
request
.
GET
.
get
(
'name'
)
platform
=
request
.
GET
.
get
(
'platform'
)
try
:
data
=
self
.
rpc
[
'venus/sun/tag/search'
](
name
=
name
)
.
unwrap
()
data
=
self
.
rpc
[
'venus/sun/tag/search'
](
name
=
name
,
platform
=
platform
)
.
unwrap
()
except
Exception
as
e
:
raise
e
return
{
...
...
api/tag.py
View file @
0f5e287b
...
...
@@ -63,7 +63,8 @@ class TagUpdateOrCreateView(APIView):
'down_tags'
:
down_tags
,
'up_tags'
:
up_tags
,
'tagtypes'
:
tagtypes
,
'icon_url'
:
request
.
POST
.
get
(
'icon_url'
,
''
)[:
-
2
]
'icon_url'
:
request
.
POST
.
get
(
'icon_url'
,
''
)[:
-
2
],
'platform'
:
request
.
POST
.
get
(
'platform'
)
}
try
:
data
=
self
.
rpc
[
'venus/sun/tag/edit'
](
id
=
id
,
data
=
data
)
.
unwrap
()
...
...
vu/mock/proxy.js
View file @
0f5e287b
var
api
=
require
(
'./api'
)
//
// const target = 'http://doctor.test.env'
// const target = 'http://172.30.8.2
31:8000'
const
target
=
'http://172.30.8.156:10000'
const
target
=
'http://172.30.8.1
31:8000'
//
const target = 'http://172.30.8.156:10000'
// const target = 'http://192.168.1.9:8000'
...
...
vu/src/api/remoteSearch.js
View file @
0f5e287b
...
...
@@ -24,11 +24,11 @@ export function countrySearch(name) {
})
}
export
function
tagSearch
(
name
)
{
export
function
tagSearch
(
query
)
{
return
request
({
url
:
'/api/search/tag'
,
method
:
'get'
,
params
:
{
name
}
params
:
query
})
}
...
...
vu/src/views/face/components/FaceStarDetail.vue
View file @
0f5e287b
...
...
@@ -150,7 +150,8 @@ export default {
{
'key'
:
2
,
'display_name'
:
'女'
}
],
uploadType
:
-
99
,
isdisabledFn
:
false
isdisabledFn
:
false
,
query
:
{}
}
},
computed
:
{
...
...
@@ -227,7 +228,8 @@ export default {
})
},
getRemoteTagList
(
query
)
{
tagSearch
(
query
).
then
(
response
=>
{
this
.
query
[
'name'
]
=
query
tagSearch
(
this
.
query
).
then
(
response
=>
{
if
(
!
response
.
data
.
data
.
data
)
return
this
.
tagListOptions
=
response
.
data
.
data
.
data
})
...
...
vu/src/views/tag/components/TagDetail.vue
View file @
0f5e287b
...
...
@@ -82,6 +82,18 @@
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label-width=
"75px"
label=
"标签等级:"
class=
"postInfo-container-item"
>
<el-select
v-model=
"postForm.platform"
:placeholder=
"'标签等级:'"
clearable
class=
"postInfo-container-item"
style=
"width: 70%"
:disabled=
"this.isEdit"
>
<el-option
v-for=
"item in TagLevelOptions"
:key=
"item.key"
:label=
"item.display_name"
:value=
"item.key"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-form-item
style=
"margin-bottom: 40px;"
label-width=
"75px"
label=
"标签简介:"
prop=
"desc"
>
<el-input
:rows=
"1"
v-model=
"postForm.description"
type=
"textarea"
class=
"article-textarea"
autosize
...
...
@@ -90,11 +102,11 @@
</el-form-item>
<div
style=
"margin-bottom: 20px"
>
<el-form-item
style=
"margin-bottom: 40px;"
label-width=
"75px"
label=
"帖子图片:"
prop=
"icon_url"
>
<span
v-model=
"uploadType"
></span>
<Upload
v-model=
"postForm.icon_url"
:uploadType=
"uploadType"
/>
</el-form-item>
</div>
<el-form-item
style=
"margin-bottom: 40px;"
label-width=
"75px"
label=
"帖子图片:"
prop=
"icon_url"
>
<span
v-model=
"uploadType"
></span>
<Upload
v-model=
"postForm.icon_url"
:uploadType=
"uploadType"
/>
</el-form-item>
</div>
</div>
</el-form>
...
...
@@ -118,6 +130,7 @@
down_tags
:
[],
tagtypes
:
[],
icon_url
:
''
,
platform
:
0
}
export
default
{
...
...
@@ -155,6 +168,11 @@
name
:
[{
validator
:
validateRequire
,
trigger
:
'blur'
}],
},
tempRoute
:
{},
TagLevelOptions
:
[
{
'key'
:
0
,
'display_name'
:
'系统级'
},
{
'key'
:
1
,
'display_name'
:
'用户级'
},
],
query
:
{}
}
},
computed
:
{
...
...
@@ -183,7 +201,7 @@
for
(
let
i
=
0
;
i
<
rep
.
down_tags
.
length
;
i
++
)
{
this
.
down_tags
.
push
(
rep
.
down_tags
[
i
][
'id'
]
+
':'
+
rep
.
down_tags
[
i
][
'name'
])
}
for
(
let
i
=
0
;
i
<
rep
.
tagtypes
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
rep
.
tagtypes
.
length
;
i
++
)
{
this
.
tagtypes
.
push
(
rep
.
tagtypes
[
i
][
'id'
]
+
':'
+
rep
.
tagtypes
[
i
][
'name'
])
}
this
.
postForm
=
rep
...
...
@@ -252,7 +270,9 @@
})
},
getRemoteTagList
(
query
)
{
tagSearch
(
query
).
then
(
response
=>
{
this
.
query
[
'name'
]
=
query
this
.
query
[
'platform'
]
=
this
.
postForm
.
platform
tagSearch
(
this
.
query
).
then
(
response
=>
{
if
(
!
response
.
data
.
data
.
data
)
return
this
.
TagListOptions
=
response
.
data
.
data
.
data
})
...
...
vu/src/views/topic/components/TopicDetail.vue
View file @
0f5e287b
...
...
@@ -434,6 +434,7 @@
},
dialogFormVisible
:
false
,
dialogStatus
:
''
,
query
:
{}
}
},
computed
:
{
...
...
@@ -570,7 +571,8 @@
})
},
getRemoteTagList
(
query
)
{
tagSearch
(
query
).
then
(
response
=>
{
this
.
query
[
'name'
]
=
query
tagSearch
(
this
.
query
).
then
(
response
=>
{
if
(
!
response
.
data
.
data
.
data
)
return
this
.
tagListOptions
=
response
.
data
.
data
.
data
})
...
...
vu/src/views/user/components/UserDetail.vue
View file @
0f5e287b
...
...
@@ -209,7 +209,8 @@
regionListOptions
:
[],
tagListOptions
:
[],
uploadType
:
99
,
isdisabledFn
:
false
isdisabledFn
:
false
,
query
:
{}
}
},
computed
:
{
...
...
@@ -300,7 +301,8 @@
})
},
getRemoteTagList
(
query
)
{
tagSearch
(
query
).
then
(
response
=>
{
this
.
query
[
'name'
]
=
query
tagSearch
(
this
.
query
).
then
(
response
=>
{
if
(
!
response
.
data
.
data
.
data
)
return
this
.
tagListOptions
=
response
.
data
.
data
.
data
})
...
...
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