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
ed0d66d5
Commit
ed0d66d5
authored
Jun 10, 2020
by
刘殿昕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
应用商店的列表不是一个人写的,数据结构可能会遇见不可知问题,over
parent
26abfa03
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
77 additions
and
35 deletions
+77
-35
src/components/service-list/commodity-cell.vue
src/components/service-list/commodity-cell.vue
+4
-2
src/components/service-list/service_list.vue
src/components/service-list/service_list.vue
+40
-31
src/pages/service_shop/shop_list.vue
src/pages/service_shop/shop_list.vue
+1
-1
src/request/api/service_shop.js
src/request/api/service_shop.js
+17
-1
src/services/helper.js
src/services/helper.js
+15
-0
No files found.
src/components/service-list/commodity-cell.vue
View file @
ed0d66d5
...
...
@@ -34,12 +34,12 @@
</div>
<div
class=
"com_cell_item"
>
<span
class=
"com_cell_item_title"
>
更新时间:
</span>
<span
class=
"com_cell_data"
>
{{
cellData
.
update_date
}}
</span>
<span
class=
"com_cell_data"
>
{{
helper
.
dateStringTransform
(
cellData
.
update_date
)
}}
</span>
</div>
</div>
<div
class=
"com_cell_right"
>
<el-rate
v-model=
"cellData.
rat
e"
v-model=
"cellData.
scor
e"
disabled
show-score
text-color=
"#58617a"
...
...
@@ -55,6 +55,8 @@
</
template
>
<
script
>
import
helper
from
"
@/services/helper.js
"
;
// if you meet date which like 2020-06-05T00:00:00+08:00, use helper.dateStringTransform()
export
default
{
components
:
{},
props
:
{
...
...
src/components/service-list/service_list.vue
View file @
ed0d66d5
...
...
@@ -25,7 +25,10 @@
<!-- filter -->
<div
v-if=
"urlFilter"
class=
"classification"
>
<div
v-for=
"(item, index) in filterLists"
:key=
"'cd' + index"
class=
"classification_line"
>
<div
class=
"classification_line_if"
v-if=
"item.childDomains"
>
<div
class=
"classification_line_if"
v-if=
"item.childDomains && item.childDomains.length != 0"
>
<div
class=
"classification_line_title"
>
{{
item
.
name
}}
:
</div>
<div
:class=
"index == filterLists.length - 1 ? 'classification_line_items':'classification_line_items classification_line_items_border'"
...
...
@@ -106,7 +109,10 @@
</div>
</div>
</div>
<div
class=
"gray_line"
></div>
<div
class=
"gray_line"
v-if=
"filterLists[0].childDomains.length != 0 || filterLists[1].childDomains.length != 0 || filterLists[2].childDomains.length != 0"
></div>
<!-- filter button -->
<div
class=
"btn_group"
>
<el-button
...
...
@@ -147,6 +153,7 @@ export default {
name
:
{
type
:
String
,
default
:
""
}
},
data
:
()
=>
({
helper
:
helper
,
search
:
""
,
openList
:
[
0
,
0
,
0
,
0
],
openChildren
:
[
...
...
@@ -223,35 +230,38 @@ export default {
if
(
response
.
data
.
success
==
"
1
"
)
{
this
.
lists
=
response
.
data
.
data
;
}
else
{
console
.
log
(
response
.
data
.
message
);
console
.
log
(
response
.
data
.
errMsg
);
}
});
},
getShopFilter
()
{
let
query
=
{
type
:
this
.
urlFilter
};
this
.
$api
.
serviceShop
.
getServiceShopFilter
(
query
).
then
(
response
=>
{
if
(
response
.
data
.
success
==
1
)
{
let
data
=
response
.
data
.
data
;
this
.
filterLists
[
0
].
childDomains
=
data
.
serviceTypeInfo
?
data
.
serviceTypeInfo
:
[];
this
.
filterLists
[
1
].
childDomains
=
data
.
serviceDomain
?
data
.
serviceDomain
:
[];
this
.
filterLists
[
2
].
childDomains
=
data
.
organizations
?
data
.
organizations
:
[];
console
.
log
(
this
.
filterLists
);
setTimeout
(()
=>
{
this
.
judgeHeight
();
},
0
);
this
.
getShopList
();
}
else
{
console
.
log
(
response
.
data
.
errMsg
);
}
});
if
(
this
.
urlFilter
==
"
app
"
)
{
}
else
{
let
query
=
{
type
:
this
.
urlFilter
};
this
.
$api
.
serviceShop
.
getServiceShopFilter
(
query
).
then
(
response
=>
{
if
(
response
.
data
.
success
==
1
)
{
let
data
=
response
.
data
.
data
;
this
.
filterLists
[
0
].
childDomains
=
data
.
serviceTypeInfo
?
data
.
serviceTypeInfo
:
[];
this
.
filterLists
[
1
].
childDomains
=
data
.
serviceDomain
?
data
.
serviceDomain
:
[];
this
.
filterLists
[
2
].
childDomains
=
data
.
organizations
?
data
.
organizations
:
[];
setTimeout
(()
=>
{
this
.
judgeHeight
();
},
0
);
this
.
getShopList
();
}
else
{
console
.
log
(
response
.
data
.
errMsg
);
}
});
}
},
judgeHeight
()
{
let
list
=
this
.
filterLists
;
...
...
@@ -290,7 +300,6 @@ export default {
});
}
}
console
.
log
(
this
.
activeOptions
);
this
.
getFilterValue
();
},
clickItemChild
(
index
,
indexs
,
items
)
{
...
...
@@ -331,7 +340,6 @@ export default {
}
else
{
this
.
activeChildOptions
[
index
].
splice
(
i
,
1
);
}
console
.
log
(
this
.
activeChildOptions
,
i
,
fatherId
);
this
.
getFilterValue
();
},
getFilterValue
()
{
...
...
@@ -350,8 +358,9 @@ export default {
this
.
getShopList
();
},
clickAll
(
item
)
{
this
.
activeOptions
[
item
]
=
[];
this
.
activeChildOptions
[
item
]
=
[];
this
.
$set
(
this
.
activeOptions
,
item
,
[]);
this
.
$set
(
this
.
activeChildOptions
,
item
,
[]);
this
.
getShopList
();
}
}
};
...
...
src/pages/service_shop/shop_list.vue
View file @
ed0d66d5
...
...
@@ -60,7 +60,7 @@ export default {
break
;
case
"
app_store_list
"
:
this
.
name
=
"
应用商店
"
;
this
.
urlFilter
=
""
;
this
.
urlFilter
=
"
app
"
;
this
.
url
=
"
/shop/yysdDetail
"
;
break
;
default
:
...
...
src/request/api/service_shop.js
View file @
ed0d66d5
...
...
@@ -21,7 +21,23 @@ Page=${params.Page}&Size=${params.Size}`);
getServiceShopDetail
(
params
)
{
return
axios
.
get
(
`/apaas/serviceapp/v3/servicemarket/detail?serviceId=`
)
},
// service list application
getApparea
()
{
return
axios
.
get
(
`/apaas/hubApi/market/businessAreas`
)
},
getAppArea
()
{
return
axios
.
get
(
`/apaas/hubApi/market/businessAreas`
)
},
getAppType
()
{
return
axios
.
get
(
`/apaas/hubApi/market/appTypes`
)
},
getAppOrg
()
{
return
axios
.
get
(
`/apaas/hubApi/market/departments`
)
},
getAppList
(
params
)
{
return
axios
.
get
(
`/apaas/hubApi/market/list?online_state=
${
params
.
online_state
}
&appTypes=
${
params
.
appTypes
}
&
businessArea=
${
params
.
businessArea
}
&developable=
${
params
.
developable
}
&page=
${
params
.
page
}
&limit=
${
params
.
limit
}
&search=
${
params
.
search
}
`
);
},
// shopping cart
addShoppingCart
(
params
)
{
return
axios
.
post
(
`/apaas/serviceapp/v3/shopcart/add`
,
params
);
...
...
src/services/helper.js
View file @
ed0d66d5
...
...
@@ -34,3 +34,18 @@ module.exports.dateFormat = function (fmt, timestamp) {
};
return
fmt
;
}
module
.
exports
.
dateStringTransform
=
function
(
date
)
{
let
arr
=
date
.
split
(
"
T
"
);
let
d
=
arr
[
0
];
let
darr
=
d
.
split
(
'
-
'
);
let
t
=
arr
[
1
];
let
tarr
=
t
.
split
(
'
.000
'
);
let
marr
=
tarr
[
0
].
split
(
'
:
'
);
let
h
=
parseInt
(
marr
[
0
])
>=
10
?
parseInt
(
marr
[
0
])
:
"
0
"
+
parseInt
(
marr
[
0
]);
let
m
=
parseInt
(
marr
[
1
])
>=
10
?
parseInt
(
marr
[
1
])
:
"
0
"
+
parseInt
(
marr
[
1
]);
let
s
=
parseInt
(
marr
[
2
])
>=
10
?
parseInt
(
marr
[
2
])
:
"
0
"
+
parseInt
(
marr
[
2
]);
let
dd
=
arr
[
0
]
+
"
"
+
h
+
"
:
"
+
m
+
"
:
"
+
s
;
return
dd
;
}
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