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
5cf94d98
Commit
5cf94d98
authored
Feb 13, 2020
by
xuebiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
seesee
parent
22807fc7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
37 deletions
+28
-37
pages/answer/release/index.vue
+13
-10
pages/project/release/index.vue
+15
-27
No files found.
pages/answer/release/index.vue
View file @
5cf94d98
...
...
@@ -66,13 +66,23 @@
import
config
from
"../../../action/config"
;
export
default
{
async
asyncData
({
$axios
,
query
})
{
const
questionClass
=
await
$axios
.
$get
(
config
.
api
.
get
.
QuestionCategory
.
list
);
let
classList
=
[];
questionClass
.
data
.
forEach
(
item
=>
{
classList
.
push
({
tag
:
item
.
category
,
tagId
:
item
.
categoryId
})
});
if
(
query
.
hasOwnProperty
(
'id'
))
{
const
response
=
await
$axios
.
$get
(
config
.
api
.
get
.
Question
.
detail
+
query
.
id
);
console
.
log
(
response
);
return
{
response
:
response
,
classList
}
}
}
else
{
return
classList
}
},
mounted
(){
if
(
this
.
$route
.
query
.
id
)
{
...
...
@@ -136,20 +146,13 @@
questionDetail
:
''
,
questionTitle
:
''
,
lastSaveTime
:
new
Date
(),
classList
:
[{
tagId
:
1
,
tag
:
"web"
},
{
tagId
:
2
,
tag
:
"java"
},{
tagId
:
3
,
tag
:
"javascript"
}],
//
classList: [{tagId:1,tag:"web"}, {tagId:2,tag:"java"},{tagId:3,tag:"javascript"}],
contentHtml
:
''
,
}
},
methods
:
{
handleClass
(
value
)
{
this
.
blogClass
=
value
.
tag
;
if
(
value
.
tag
===
"web"
)
{
this
.
blogClass
=
1
;
}
else
if
(
value
.
tag
===
"java"
)
{
this
.
blogClass
=
2
}
else
if
(
value
.
tag
===
"javascript"
)
{
this
.
blogClass
=
3
}
this
.
blogClass
=
value
.
tagId
;
},
// 获得得标签数组
handleTagList
(
tagList
)
{
...
...
pages/project/release/index.vue
View file @
5cf94d98
...
...
@@ -40,7 +40,7 @@
<select-card
ref=
"language"
selectType=
"2"
:class-list=
"
class
List"
:class-list=
"List"
@
handleClass=
"(val) => this.language = val.tag"
placeholder=
"请选择开发语言"
></select-card>
</div>
...
...
@@ -88,7 +88,7 @@
ref=
"projectClass"
selectType=
"2"
:class-list=
"classList"
@
handleClass=
"(val) => this.projectClass = val.tag"
@
handleClass=
"(val) => this.projectClass = val.tag
Id
"
placeholder=
"请选择项目类型"
></select-card>
</div>
</div>
...
...
@@ -157,12 +157,24 @@ import config from '../../../action/config';
export
default
{
async
asyncData
({
$axios
,
query
})
{
const
projectCategory
=
await
$axios
.
$get
(
config
.
api
.
get
.
ProjectCategory
.
list
);
let
classList
=
[];
projectCategory
.
data
.
forEach
(
item
=>
{
classList
.
push
({
tag
:
item
.
category
,
tagId
:
item
.
categoryId
})
});
console
.
log
(
classList
);
if
(
query
.
hasOwnProperty
(
'id'
))
{
const
response
=
await
$axios
.
$get
(
config
.
api
.
get
.
Project
.
detail
+
query
.
id
);
console
.
log
(
response
);
return
{
response
:
response
,
classList
}
}
else
{
return
classList
}
},
mounted
()
{
...
...
@@ -219,7 +231,7 @@ export default {
zIndex
:
100
,
imgSrc
:
''
,
lastSaveTime
:
new
Date
(),
class
List
:
[{
tagId
:
1
,
tag
:
"web"
},
{
tagId
:
2
,
tag
:
"java"
},{
tagId
:
3
,
tag
:
"javascript"
}],
List
:
[{
tagId
:
1
,
tag
:
"web"
},
{
tagId
:
2
,
tag
:
"java"
},{
tagId
:
3
,
tag
:
"javascript"
}],
license
:
''
,
// 项目协议
language
:
''
,
// 项目语言
system
:
''
,
// 项目系统
...
...
@@ -385,30 +397,6 @@ export default {
}
}
},
// get修改信息
/* dataGetProject() {
this.$axios.$get(config.api.get.Project.detail+136,).then((response)=>{
//this.projectList=response.data.dataList;
//console.log(response);
this.imgSrc=response.data.cover,
this.language=response.data.devLang,
this.$refs.language.$refs.select.value=response.data.devLang,
this.docLink=response.data.docLink,
this.homeLink=response.data.homeLink,
this.content=response.data.devLang,//内容
this.license=response.data.license,
this.$refs.license.$refs.select.value=response.data.license,
this.projectDescription=response.data.projectDescription,
//this.projectDetail=response.data.content,
this.name=response.data.projectName;
// console.log(this.name)
this.projectClass=response.data.projectClass,
this.$refs.projectClass.$refs.select.value=response.data.projectClass,
this.system=response.data.runtimePlatform,
this.$refs.system.$refs.select.value=response.data.runtimePlatform,
this.addressLink=response.data.sourceLink
})
},*/
// 发布项目
async
postProject
()
{
let
projectRes
;
...
...
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