Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
apaas-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gzga-jzapi
apaas-ui
Commits
f5fe4902
Commit
f5fe4902
authored
Jun 17, 2020
by
徐一鸣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
应用详情接口调试
parent
82ff1988
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
95 additions
and
45 deletions
+95
-45
src/App.vue
src/App.vue
+1
-1
src/components/service-info/app-info.vue
src/components/service-info/app-info.vue
+20
-10
src/components/service-list/commodity-card.vue
src/components/service-list/commodity-card.vue
+2
-2
src/components/service-tabs/service-tab-detail.vue
src/components/service-tabs/service-tab-detail.vue
+14
-1
src/components/service-tabs/service-tabs.vue
src/components/service-tabs/service-tabs.vue
+5
-5
src/pages/service_shop/yysdDetail.vue
src/pages/service_shop/yysdDetail.vue
+53
-26
No files found.
src/App.vue
View file @
f5fe4902
...
@@ -38,7 +38,7 @@ export default {
...
@@ -38,7 +38,7 @@ export default {
position
:
fixed
;
position
:
fixed
;
top
:
0
;
top
:
0
;
left
:
0
;
left
:
0
;
z-index
:
99
;
z-index
:
2000
;
}
}
#app
{
#app
{
background-color
:
#f6f7fb
;
background-color
:
#f6f7fb
;
...
...
src/components/service-info/app-info.vue
View file @
f5fe4902
<
template
>
<
template
>
<div
class=
"application_info"
v-if=
"data"
>
<div
class=
"application_info"
v-if=
"data"
>
<div
class=
"main_container"
>
<div
class=
"main_container"
>
<div
class=
"main_container-left"
v-if=
"data.
img
"
>
<div
class=
"main_container-left"
v-if=
"data.
logo
"
>
<el-avatar
shape=
"square"
:size=
"144"
fit=
"cover"
:src=
"data.
img
"
/>
<el-avatar
shape=
"square"
:size=
"144"
fit=
"cover"
:src=
"data.
logo
"
/>
</div>
</div>
<div
class=
"main_container-right"
>
<div
class=
"main_container-right"
>
<div
class=
"application_title"
>
<div
class=
"application_title"
>
<span
class=
"application_name"
v-text=
"data.name"
></span>
<span
class=
"application_name"
v-text=
"data.
app_
name"
></span>
</div>
</div>
<div
class=
"application_base_container"
>
<div
class=
"application_base_container"
>
<ul
class=
"application_base_info"
>
<ul
class=
"application_base_info"
>
<li>
<li>
<span>
应用开发者:
</span>
<span>
应用开发者:
</span>
<span
v-text=
"data.
providedBy
"
>
</span>
<span
v-text=
"data.
username
"
>
</span>
</li>
</li>
<li>
<li>
<span>
应用类型:
</span>
<span>
应用类型:
</span>
<span
v-html=
"data.
serviceTyp
e"
></span>
<span
v-html=
"data.
type_nam
e"
></span>
</li>
</li>
</ul>
</ul>
<ul
class=
"application_base_info"
>
<ul
class=
"application_base_info"
>
<li>
<li>
<span>
部署次数:
</span>
<span>
部署次数:
</span>
<span
v-text=
"data.
acquireCount
"
></span>
<span
v-text=
"data.
deploy_times
"
></span>
</li>
</li>
<li>
<li>
<span>
业务领域:
</span>
<span>
业务领域:
</span>
<span
v-text=
"data.
dataField
"
></span>
<span
v-text=
"data.
ywly_name
"
></span>
</li>
</li>
</ul>
</ul>
<ul
class=
"application_base_info"
>
<ul
class=
"application_base_info"
>
<li>
<li>
<span>
上线时间:
</span>
<span>
上线时间:
</span>
<span
v-text=
"data.
publishTim
e"
></span>
<span
v-text=
"data.
create_dat
e"
></span>
</li>
</li>
</ul>
</ul>
</div>
</div>
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
<span>
规
  
格:
</span>
<span>
规
  
格:
</span>
<div
class=
"btn_container"
>
<div
class=
"btn_container"
>
<el-button
<el-button
v-for=
"(item, index) in
data.
specifications"
v-for=
"(item, index) in specifications"
:key=
"'specifications_' + index"
:key=
"'specifications_' + index"
:type=
"
:type=
"
item.value === commodityData.specification ? 'primary' : 'default'
item.value === commodityData.specification ? 'primary' : 'default'
...
@@ -73,8 +73,18 @@ export default {
...
@@ -73,8 +73,18 @@ export default {
},
},
},
},
data
:
()
=>
({
data
:
()
=>
({
specifications
:
[
{
name
:
"
1.申请获取应用镜像部署权限
"
,
value
:
1
,
},
{
name
:
"
2.申请获取应用二次开发权限(需要先行升级为开发者用户)
"
,
value
:
2
,
},
],
commodityData
:
{
commodityData
:
{
specification
:
0
,
specification
:
1
,
},
},
}),
}),
methods
:
{
methods
:
{
...
...
src/components/service-list/commodity-card.vue
View file @
f5fe4902
...
@@ -23,8 +23,8 @@
...
@@ -23,8 +23,8 @@
<div
class=
"com_card_msg_num1"
>
{{
cellData
.
deploy_times
}}
</div>
<div
class=
"com_card_msg_num1"
>
{{
cellData
.
deploy_times
}}
</div>
</div>
</div>
<div
class=
"com_card_btn"
>
<div
class=
"com_card_btn"
>
<el-button
size=
"medium"
class=
"btn_1"
@
click=
"addShop(cellData.id)"
>
加入购物车
</el-button>
<el-button
size=
"medium"
class=
"btn_1"
@
click=
"addShop(cellData.
app_
id)"
>
加入购物车
</el-button>
<el-button
size=
"medium"
class=
"btn_2"
@
click=
"goUrl(cellData.id)"
>
查看详情
</el-button>
<el-button
size=
"medium"
class=
"btn_2"
@
click=
"goUrl(cellData.
app_
id)"
>
查看详情
</el-button>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
...
src/components/service-tabs/service-tab-detail.vue
View file @
f5fe4902
...
@@ -5,7 +5,11 @@
...
@@ -5,7 +5,11 @@
v-for=
"(item, index) in data"
v-for=
"(item, index) in data"
:key=
"'detail_' + index"
:key=
"'detail_' + index"
>
>
<h3
class=
"detail-title"
v-text=
"item.name + ':'"
></h3>
<h3
class=
"detail-title"
v-text=
"item.name + ':'"
v-if=
"item.type != 'rich-text'"
></h3>
<service-steps
<service-steps
v-if=
"item.type == 'step'"
v-if=
"item.type == 'step'"
...
@@ -48,6 +52,15 @@
...
@@ -48,6 +52,15 @@
<el-table-column
prop=
"name"
label=
"name"
width=
"120"
></el-table-column>
<el-table-column
prop=
"name"
label=
"name"
width=
"120"
></el-table-column>
<el-table-column
prop=
"value"
label=
"value"
></el-table-column>
<el-table-column
prop=
"value"
label=
"value"
></el-table-column>
</el-table>
</el-table>
<mavon-editor
v-else-if=
"item.type == 'rich-text'"
v-model=
"item.value"
:boxShadow=
"false"
:toolbarsFlag=
"false"
:subfield=
"false"
defaultOpen=
"preview"
:editable=
"false"
/>
</li>
</li>
</ul>
</ul>
</
template
>
</
template
>
...
...
src/components/service-tabs/service-tabs.vue
View file @
f5fe4902
...
@@ -39,6 +39,7 @@
...
@@ -39,6 +39,7 @@
class=
"service_info"
class=
"service_info"
:data=
"commentsData"
:data=
"commentsData"
:url=
"commentsUrl"
:url=
"commentsUrl"
:is_app_detail=
"is_app_detail"
></service-tab-comments>
></service-tab-comments>
</el-tab-pane>
</el-tab-pane>
</el-tabs>
</el-tabs>
...
@@ -76,23 +77,22 @@ export default {
...
@@ -76,23 +77,22 @@ export default {
},
},
detailData
:
{
detailData
:
{
type
:
Array
,
type
:
Array
,
default
:
()
=>
[],
},
},
specificationData
:
{
specificationData
:
{
type
:
Array
,
type
:
Array
,
default
:
()
=>
[],
},
},
providerData
:
{
providerData
:
{
type
:
Object
,
type
:
Object
,
default
:
()
=>
{},
},
},
commentsData
:
{
commentsData
:
{
type
:
Object
,
type
:
Object
,
default
:
()
=>
{},
},
},
commentsUrl
:
{
commentsUrl
:
{
type
:
String
,
type
:
String
,
default
:
()
=>
[],
},
is_app_detail
:
{
type
:
Boolean
,
default
:
false
,
},
},
},
},
data
:
()
=>
({
data
:
()
=>
({
...
...
src/pages/service_shop/yysdDetail.vue
View file @
f5fe4902
...
@@ -13,11 +13,10 @@
...
@@ -13,11 +13,10 @@
<app-info
:data=
"baseInfo"
></app-info>
<app-info
:data=
"baseInfo"
></app-info>
<service-tabs
<service-tabs
detail-url=
"yysd"
:detail-data=
"detailData"
provider-url=
"yysd"
:provider-data=
"providerData"
comments-url=
"yysd"
:comments-url=
"commentsUrl"
detail-title=
"应用详情信息"
:is_app_detail=
"true"
comments-title=
"应用评价信息"
></service-tabs>
></service-tabs>
</div>
</div>
</
template
>
</
template
>
...
@@ -34,36 +33,64 @@ export default {
...
@@ -34,36 +33,64 @@ export default {
data
:
()
=>
({
data
:
()
=>
({
baseInfo
:
null
,
baseInfo
:
null
,
detailData
:
null
,
detailData
:
null
,
specification
:
null
,
providerData
:
null
,
provider
:
null
,
}),
}),
computed
:
{
computed
:
{
id
()
{
id
()
{
return
this
.
$route
.
params
.
id
;
return
this
.
$route
.
params
.
id
;
},
},
commentsUrl
()
{
return
`/apaas/hubApi/market/comments/
${
this
.
id
}
`
;
},
},
},
methods
:
{
methods
:
{
getDataFromApi
(
_url
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
$http
.
get
(
_url
)
.
then
((
response
)
=>
{
resolve
(
response
.
body
);
})
.
catch
(
function
(
error
)
{
reject
(
error
);
});
});
},
init
()
{
init
()
{
this
.
getDataFromApi
(
`/static/serviceBaseInfo.json`
).
then
(
this
.
$http
({
yysd
})
=>
{
.
get
(
"
/apaas/hubApi/market/baseInfo
"
,
{
this
.
baseInfo
=
yysd
;
params
:
{
},
id
:
this
.
id
,
(
error
)
=>
{
},
})
.
then
(({
data
})
=>
{
this
.
baseInfo
=
data
.
data
;
})
.
catch
(
function
(
error
)
{
console
.
log
(
error
);
});
this
.
$http
.
get
(
`/apaas/hubApi/market/readme/
${
this
.
id
}
`
)
.
then
(({
data
})
=>
{
this
.
detailData
=
[
{
name
:
"
获取流程
"
,
type
:
"
step
"
,
value
:
[
"
服务申请
"
,
"
信息填写
"
,
"
审核确认
"
,
"
服务获取
"
],
},
{
name
:
"
富文本
"
,
type
:
"
rich-text
"
,
value
:
data
.
data
,
},
];
})
.
catch
(
function
(
error
)
{
console
.
log
(
error
);
});
this
.
$http
.
get
(
`/apaas/hubApi/appShop/orgInfo/
${
this
.
id
}
`
)
.
then
(({
data
})
=>
{
this
.
providerData
=
{
organization_name
:
data
.
department_name
,
picture_path
:
data
.
picture_path
,
user_name
:
data
.
user_name
,
phone
:
data
.
phone
,
};
})
.
catch
(
function
(
error
)
{
console
.
log
(
error
);
console
.
log
(
error
);
}
});
);
},
},
},
},
mounted
()
{
mounted
()
{
...
...
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