Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
beyond-clouds-front
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
beyond-clouds-front
Commits
e80cc168
Commit
e80cc168
authored
Feb 14, 2020
by
yanju
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'xue' into 'master'
项目问答已发布列表 See merge request pigbigbig/beyond-clouds-front!66
parents
a073d636
87b638e7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
85 additions
and
5 deletions
+85
-5
pages/answer/release/index.vue
+43
-3
pages/project/release/index.vue
+42
-2
No files found.
pages/answer/release/index.vue
View file @
e80cc168
...
...
@@ -5,7 +5,14 @@
title=
"以发布的问题"
width=
"302px"
height=
"270px"
></card-container>
>
<div
class=
"answer-release_List"
v-for=
"val in questionList"
:key=
"val.questionId"
:info=
"val"
>
<div
class=
"answer-box"
@
click=
"toDetail(val.questionId)"
>
<p>
{{
val
.
questionTitle
}}
</p>
<p
style=
"color: #999"
>
{{
val
.
category
}}
</p>
</div>
</div>
</card-container>
<card-container
title=
"问题草稿箱"
width=
"302px"
...
...
@@ -66,6 +73,12 @@
import
config
from
"../../../action/config"
;
export
default
{
async
asyncData
({
$axios
,
query
})
{
const
questionListRes
=
await
$axios
.
$get
(
config
.
api
.
get
.
Question
.
myCreated
,
{
params
:
{
page
:
1
,
size
:
12
,
}
});
const
questionClass
=
await
$axios
.
$get
(
config
.
api
.
get
.
QuestionCategory
.
list
);
let
classList
=
[];
questionClass
.
data
.
forEach
(
item
=>
{
...
...
@@ -74,16 +87,21 @@
tagId
:
item
.
categoryId
})
});
console
.
log
(
classList
)
//console.log(classList);
if
(
query
.
hasOwnProperty
(
'id'
))
{
const
response
=
await
$axios
.
$get
(
config
.
api
.
get
.
Question
.
detail
+
query
.
id
);
console
.
log
(
response
);
return
{
questionList
:
questionListRes
.
data
.
dataList
,
response
:
response
,
classList
}
}
else
{
return
{
classList
}}
}
else
{
return
{
classList
,
questionList
:
questionListRes
.
data
.
dataList
,}
}
},
mounted
(){
...
...
@@ -153,6 +171,9 @@
}
},
methods
:
{
toDetail
(
path
)
{
this
.
$router
.
push
(
`/answer/detail/
${
path
}
`
);
},
handleClass
(
value
)
{
this
.
blogClass
=
value
.
tagId
;
},
...
...
@@ -340,6 +361,25 @@
align-items
:
start
;
.answer-release-container__l
{
.answer-release_List
{
width
:
266
*$
length
;
padding
:
0
18
*$
length
;
.answer-box
{
margin
:
15
*$
length
0
;
@extend
%cursorPointer;
@include
fontStyle(13,17,500,#333,left);
@extend
%flex-row-spb;
@extend
%cursorPointer;
.answer-box__title
{
width
:
60%
;
@extend
%nowrap;
}
&
:hover
{
color
:
#00AAE6
;
}
}
}
}
.answer-release-container__r
{
...
...
pages/project/release/index.vue
View file @
e80cc168
...
...
@@ -5,7 +5,14 @@
title=
"已发布项目"
width=
"302px"
height=
"400px"
></card-container>
>
<div
class=
"project-release_List"
v-for=
"val in projectList"
:key=
"val.projectId"
:info=
"val"
>
<div
class=
"project-box"
@
click=
"toDetail(val.projectId)"
>
<p>
{{
val
.
projectName
}}
</p>
<p
style=
"color: #999"
>
{{
val
.
category
}}
</p>
</div>
</div>
</card-container>
<card-container
title=
"项目草稿箱"
width=
"302px"
...
...
@@ -157,6 +164,12 @@ import config from '../../../action/config';
export
default
{
async
asyncData
({
$axios
,
query
})
{
const
projectListRes
=
await
$axios
.
$get
(
config
.
api
.
get
.
Project
.
myList
,
{
params
:
{
page
:
1
,
size
:
12
,
}
});
const
projectCategory
=
await
$axios
.
$get
(
config
.
api
.
get
.
ProjectCategory
.
list
);
let
classList
=
[];
projectCategory
.
data
.
forEach
(
item
=>
{
...
...
@@ -170,11 +183,15 @@ export default {
const
response
=
await
$axios
.
$get
(
config
.
api
.
get
.
Project
.
detail
+
query
.
id
);
console
.
log
(
response
);
return
{
projectList
:
projectListRes
.
data
.
dataList
,
response
:
response
,
classList
}
}
else
{
return
{
classList
}
return
{
classList
,
projectList
:
projectListRes
.
data
.
dataList
,
}
}
},
mounted
()
{
...
...
@@ -250,6 +267,9 @@ export default {
}
},
methods
:
{
toDetail
(
path
)
{
this
.
$router
.
push
(
`/project/detail/
${
path
}
`
);
},
imgAdd
(
pos
,
file
)
{
// filename: 写在md中的文件名, File: File Object
// 第一步.将图片上传到服务器.
...
...
@@ -481,6 +501,26 @@ export default {
align-items
:
start
;
.project-release-container__l
{
.project-release_List
{
width
:
266
*$
length
;
padding
:
0
18
*$
length
;
.project-box
{
margin
:
15
*$
length
0
;
@extend
%cursorPointer;
@include
fontStyle(13,17,500,#333,left);
@extend
%flex-row-spb;
@extend
%cursorPointer;
.project-box__title
{
width
:
60%
;
@extend
%nowrap;
}
&
:hover
{
color
:
#00AAE6
;
}
}
}
}
.project-release-container__r
{
...
...
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