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
0a983cc2
Commit
0a983cc2
authored
Feb 13, 2020
by
高浩杰
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of coding.yundingshuyuan.com:pigbigbig/beyond-clouds-front into yoona
parents
29cefba4
3efcd4bd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
67 deletions
+41
-67
pages/answer/release/index.vue
+5
-13
pages/project/release/index.vue
+36
-54
No files found.
pages/answer/release/index.vue
View file @
0a983cc2
...
...
@@ -74,7 +74,8 @@
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
);
...
...
@@ -82,9 +83,7 @@
response
:
response
,
classList
}
}
else
{
return
{
classList
}
}
}
else
{
return
{
classList
}}
},
mounted
(){
...
...
@@ -149,20 +148,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 @
0a983cc2
...
...
@@ -31,7 +31,7 @@
<select-card
ref=
"license"
selectType=
"2"
:class-list=
"
classList
"
:class-list=
"
List1
"
@
handleClass=
"(val) => this.license = val.tag"
placeholder=
"请选择授权协议"
></select-card>
</div>
...
...
@@ -40,18 +40,18 @@
<select-card
ref=
"language"
selectType=
"2"
:class-list=
"
classList
"
:class-list=
"
List2
"
@
handleClass=
"(val) => this.language = val.tag"
placeholder=
"请选择开发语言"
></select-card>
</div>
<div
class=
"select__wrap"
>
<span>
*
</span>
<select-card
ref=
"
system
"
ref=
"
projectClass
"
selectType=
"2"
:class-list=
"classList"
@
handleClass=
"(val) => this.
system = val.tag
"
placeholder=
"请选择
操作系统
"
></select-card>
@
handleClass=
"(val) => this.
projectClass = val.tagId
"
placeholder=
"请选择
项目类型
"
></select-card>
</div>
</div>
<div
class=
"header-content"
>
...
...
@@ -82,14 +82,14 @@
@
focus=
"() => this.$refs.docLink.style.border = '1px solid transparent'"
@
blur=
"checkAddress(docLink, 'docLink')"
>
<div
class=
"select__wrap"
>
<div
class=
"select__wrap"
v-if=
"false"
>
<span>
*
</span>
<select-card
ref=
"
projectClass
"
ref=
"
system
"
selectType=
"2"
:class-list=
"classList"
@
handleClass=
"(val) => this.
projectClass
= val.tag"
placeholder=
"请选择
项目类型
"
></select-card>
@
handleClass=
"(val) => this.
system
= val.tag"
placeholder=
"请选择
操作系统
"
></select-card>
</div>
</div>
<div
class=
"header-content"
>
...
...
@@ -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
()
{
...
...
@@ -177,11 +189,12 @@ export default {
this
.
$refs
.
license
.
$refs
.
select
.
value
=
this
.
response
.
data
.
license
;
this
.
projectDescription
=
this
.
response
.
data
.
projectDescription
;
this
.
name
=
this
.
response
.
data
.
projectName
;
this
.
projectClass
=
this
.
response
.
data
.
projectType
;
this
.
$refs
.
projectClass
.
$refs
.
select
.
value
=
this
.
response
.
data
.
projectType
;
this
.
system
=
this
.
response
.
data
.
runtimePlatform
;
this
.
$refs
.
system
.
$refs
.
select
.
value
=
this
.
response
.
data
.
runtimePlatform
;
this
.
projectClass
=
this
.
response
.
data
.
categoryId
;
this
.
$refs
.
projectClass
.
$refs
.
select
.
value
=
this
.
response
.
data
.
category
;
//
this.system = this.response.data.runtimePlatform;
//
this.$refs.system.$refs.select.value = this.response.data.runtimePlatform;
this
.
addressLink
=
this
.
response
.
data
.
sourceLink
}
},
components
:
{
SelectCard
,
CardContainer
},
...
...
@@ -219,7 +232,8 @@ export default {
zIndex
:
100
,
imgSrc
:
''
,
lastSaveTime
:
new
Date
(),
classList
:
[{
tagId
:
1
,
tag
:
"web"
},
{
tagId
:
2
,
tag
:
"java"
},{
tagId
:
3
,
tag
:
"javascript"
}],
List1
:
[{
tagId
:
1
,
tag
:
"MPL"
},{
tagId
:
2
,
tag
:
"BSD"
},{
tagId
:
3
,
tag
:
"Com"
},{
tagId
:
4
,
tag
:
"QPL"
},{
tagId
:
5
,
tag
:
"QNCL"
},{
tagId
:
6
,
tag
:
"Jab"
},{
tagId
:
7
,
tag
:
"IBM"
}],
List2
:
[{
tagId
:
1
,
tag
:
"C"
},
{
tagId
:
2
,
tag
:
"Java"
},{
tagId
:
3
,
tag
:
"Javascript"
},{
tagId
:
4
,
tag
:
"python"
},{
tagId
:
5
,
tag
:
"C++"
}],
license
:
''
,
// 项目协议
language
:
''
,
// 项目语言
system
:
''
,
// 项目系统
...
...
@@ -316,7 +330,7 @@ export default {
message
:
'请输入项目名称'
})
}
else
if
(
this
.
license
===
''
)
{
console
.
log
(
this
.
$refs
.
license
);
//
console.log(this.$refs.license);
this
.
$refs
.
license
.
handleShow
();
this
.
$refs
.
license
.
$refs
.
select
.
focus
();
this
.
$message
({
...
...
@@ -330,13 +344,6 @@ export default {
type
:
'warning'
,
message
:
'请选择开发语言'
})
}
else
if
(
this
.
system
===
''
)
{
this
.
$refs
.
system
.
handleShow
();
this
.
$refs
.
system
.
$refs
.
select
.
focus
();
this
.
$message
({
type
:
'warning'
,
message
:
'请选择操作系统'
})
}
else
if
(
this
.
addressLink
===
''
)
{
this
.
$refs
.
addressLink
.
focus
();
this
.
$message
({
...
...
@@ -371,7 +378,7 @@ export default {
return
true
}
}
else
{
if
(
this
.
name
!==
''
&&
this
.
license
!==
''
&&
this
.
language
!==
''
&&
this
.
system
!==
''
if
(
this
.
name
!==
''
&&
this
.
license
!==
''
&&
this
.
language
!==
''
&&
this
.
addressLink
!==
''
&&
this
.
projectClass
!==
''
&&
this
.
projectDescription
!==
''
&&
this
.
value
!==
''
&&
this
.
imgSrc
!==
''
)
{
...
...
@@ -385,30 +392,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
;
...
...
@@ -417,7 +400,7 @@ export default {
// 修改执行这个接口
projectRes
=
await
this
.
$axios
.
$put
(
config
.
api
.
put
.
Project
.
revise
+
this
.
$route
.
query
.
id
,
{
author
:
this
.
author
,
categoryId
:
1
,
categoryId
:
this
.
projectClass
,
cover
:
this
.
imgSrc
,
devLang
:
this
.
language
,
docLink
:
this
.
docLink
,
...
...
@@ -428,8 +411,8 @@ export default {
projectDescription
:
this
.
projectDescription
,
contentHtml
:
this
.
projectDetail
,
projectName
:
this
.
name
,
projectType
:
this
.
projectClass
,
runtimePlatform
:
this
.
system
,
//
projectType: this.projectClass,
//
runtimePlatform: this.system,
sourceLink
:
this
.
addressLink
})
.
then
((
response
)
=>
{
...
...
@@ -449,19 +432,18 @@ export default {
}
else
{
projectRes
=
await
this
.
$axios
.
$post
(
config
.
api
.
post
.
Project
.
release
,
{
author
:
this
.
author
,
categoryId
:
1
,
categoryId
:
this
.
projectClass
,
cover
:
this
.
imgSrc
,
devLang
:
this
.
language
,
docLink
:
this
.
docLink
,
homeLink
:
this
.
homeLink
,
content
:
this
.
content
,
//内容
//contentHtml: this.blogDetail,// 内容的html
license
:
this
.
license
,
projectDescription
:
this
.
projectDescription
,
contentHtml
:
this
.
projectDetail
,
projectName
:
this
.
name
,
projectType
:
this
.
projectClass
,
runtimePlatform
:
this
.
system
,
//
projectType: this.projectClass,
//
runtimePlatform: this.system,
sourceLink
:
this
.
addressLink
})
}
...
...
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