Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
h5
/
glsk-data-view-pd
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 071a3ae0
authored
Jul 31, 2023
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改门店搜索
1 parent
e64744a9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
15 deletions
src/components/DetailTitle.vue
src/views/boutiqueDetail/index.vue
src/views/solarDetail/index.vue
src/components/DetailTitle.vue
View file @
071a3ae
...
@@ -14,12 +14,22 @@
...
@@ -14,12 +14,22 @@
<div
class=
"tab"
>
<div
class=
"tab"
>
<div
class=
"tab-item first-tab active"
@
click
.
stop=
"openSelect"
>
<div
class=
"tab-item first-tab active"
@
click
.
stop=
"openSelect"
>
<div
class=
"merchant-name"
>
{{
firstTab
[
dataListObj
.
labelName
]
}}
</div>
<div
class=
"merchant-name"
>
{{
firstTab
[
dataListObj
.
labelName
]
}}
</div>
<img
class=
"arrow-down"
src=
"@/assets/images/title-arrow.png"
alt=
""
>
<img
class=
"arrow-down"
src=
"@/assets/images/title-arrow.png"
alt=
""
/
>
</div>
</div>
<SelectBox
:isShow=
"isShow"
:defaultValue=
"firstTab[dataListObj.valueName]"
@
clickOutside=
"clickOutside"
:dataList=
"merchantList"
:boxWidth=
"'26.53vw'"
isObject
@
selectVal=
"selectVal"
:labelName=
"dataListObj.labelName"
:valueName=
"dataListObj.valueName"
>
<SelectBox
:isShow=
"isShow"
:defaultValue=
"firstTab[dataListObj.valueName]"
@
clickOutside=
"clickOutside"
:dataList=
"merchantList"
:boxWidth=
"'26.53vw'"
isObject
@
selectVal=
"selectVal"
:labelName=
"dataListObj.labelName"
:valueName=
"dataListObj.valueName"
>
<div
slot=
"search"
class=
"search"
>
<div
slot=
"search"
class=
"search"
>
<input
type=
"text"
class=
"search-input"
v-model=
"search"
@
input=
"handleInput"
>
<input
type=
"text"
class=
"search-input"
v-model=
"search"
@
input=
"handleInput"
/
>
<img
class=
"icon-search"
src=
"@/assets/images/icon-search.png"
@
click=
"searchMerchant"
alt=
""
>
<img
class=
"icon-search"
src=
"@/assets/images/icon-search.png"
@
click=
"searchMerchant"
alt=
""
/
>
</div>
</div>
<div
slot=
"empty"
class=
"search-empty"
>
<div
slot=
"empty"
class=
"search-empty"
>
<div>
相关搜索
</div>
<div>
相关搜索
</div>
...
@@ -53,7 +63,8 @@ export default {
...
@@ -53,7 +63,8 @@ export default {
tabObject
:
{
tabObject
:
{
type
:
Object
,
type
:
Object
,
default
:
()
=>
{}
default
:
()
=>
{}
}
},
searchType
:
String
},
},
watch
:
{
watch
:
{
'dataList'
(
val
)
{
'dataList'
(
val
)
{
...
@@ -96,6 +107,16 @@ export default {
...
@@ -96,6 +107,16 @@ export default {
this
.
search
=
''
this
.
search
=
''
},
},
async
searchMerchant
()
{
async
searchMerchant
()
{
switch
(
this
.
searchType
)
{
case
'boutique'
:
this
.
searchBoutiqueMerchant
()
break
case
'solar'
:
this
.
searchSolarMerchant
()
break
}
},
async
searchSolarMerchant
()
{
const
_searchData
=
await
this
.
api
.
solar
.
getMerchant
({
const
_searchData
=
await
this
.
api
.
solar
.
getMerchant
({
merchantName
:
this
.
search
merchantName
:
this
.
search
})
})
...
@@ -106,6 +127,17 @@ export default {
...
@@ -106,6 +127,17 @@ export default {
})
})
this
.
merchantList
=
_dataList
this
.
merchantList
=
_dataList
},
},
async
searchBoutiqueMerchant
()
{
const
_searchData
=
await
this
.
api
.
boutique
.
getMerchant
({
merchantName
:
this
.
search
})
const
_dataList
=
_searchData
.
data
.
dataList
_dataList
.
forEach
(
item
=>
{
item
.
merchantname
=
item
.
merchantName
item
.
merchantid
=
item
.
merchantid
+
''
})
this
.
merchantList
=
_dataList
},
handleInput
:
utils
.
debounce
(
function
(
e
)
{
handleInput
:
utils
.
debounce
(
function
(
e
)
{
this
.
searchMerchant
()
this
.
searchMerchant
()
},
1000
/
25
),
},
1000
/
25
),
...
@@ -151,7 +183,7 @@ export default {
...
@@ -151,7 +183,7 @@ export default {
position
:
relative
;
position
:
relative
;
display
:
flex
;
display
:
flex
;
//
align-items
:
center
;
//
align-items
:
center
;
color
:
#
FFFFFF
;
color
:
#
ffffff
;
font-size
:
16px
;
font-size
:
16px
;
&-item
{
&-item
{
display
:
flex
;
display
:
flex
;
...
@@ -162,8 +194,8 @@ export default {
...
@@ -162,8 +194,8 @@ export default {
box-sizing
:
border-box
;
box-sizing
:
border-box
;
margin-right
:
0.56vw
;
margin-right
:
0.56vw
;
border
:
2px
solid
;
border
:
2px
solid
;
border-image
:
linear-gradient
(
90deg
,
#074989
,
#30
DCFF
,
#074989
)
1
;
border-image
:
linear-gradient
(
90deg
,
#074989
,
#30
dcff
,
#074989
)
1
;
background-image
:
linear-gradient
(
180deg
,
#001948
0%
,
#00223
C
99%
);
background-image
:
linear-gradient
(
180deg
,
#001948
0%
,
#00223
c
99%
);
cursor
:
pointer
;
cursor
:
pointer
;
}
}
.first-tab
{
.first-tab
{
...
@@ -176,8 +208,8 @@ export default {
...
@@ -176,8 +208,8 @@ export default {
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
white-space
:
nowrap
;
text-align
:
left
;
text-align
:
left
;
color
:
#5894
FF
;
color
:
#5894
ff
;
background-image
:
-webkit-linear-gradient
(
left
,
#24
D8FF
,
#7787FF
);
background-image
:
-webkit-linear-gradient
(
left
,
#24
d8ff
,
#7787ff
);
-webkit-background-clip
:
text
;
-webkit-background-clip
:
text
;
-webkit-text-fill-color
:
transparent
;
-webkit-text-fill-color
:
transparent
;
}
}
...
@@ -207,8 +239,8 @@ export default {
...
@@ -207,8 +239,8 @@ export default {
padding
:
0
1.39vw
;
padding
:
0
1.39vw
;
&-input
{
&-input
{
width
:
100%
;
width
:
100%
;
background-color
:
#001
B
46
;
background-color
:
#001
b
46
;
border
:
1px
solid
#183
D6F
;
border
:
1px
solid
#183
d6f
;
padding
:
0.89vh
2.15vw
0.89vh
0.56vw
;
padding
:
0.89vh
2.15vw
0.89vh
0.56vw
;
color
:
#fff
;
color
:
#fff
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
...
@@ -229,6 +261,6 @@ export default {
...
@@ -229,6 +261,6 @@ export default {
input
:focus-visible
{
input
:focus-visible
{
border
:
1px
solid
;
border
:
1px
solid
;
outline-offset
:
-4vh
;
outline-offset
:
-4vh
;
border-image
:
linear-gradient
(
90deg
,
#074989
,
#30
DCFF
,
#074989
)
1
!important
;
border-image
:
linear-gradient
(
90deg
,
#074989
,
#30
dcff
,
#074989
)
1
!important
;
}
}
</
style
>
</
style
>
src/views/boutiqueDetail/index.vue
View file @
071a3ae
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<div
class=
"layout"
>
<div
class=
"layout"
>
<view-container>
<view-container>
<template
#
title
>
<template
#
title
>
<DetailTitle
:dataList=
"merchantList"
:dataListObj=
"merchantListObj"
:tabObject=
"tabObject"
></DetailTitle>
<DetailTitle
:dataList=
"merchantList"
:
searchType=
"'boutique'"
:
dataListObj=
"merchantListObj"
:tabObject=
"tabObject"
></DetailTitle>
</
template
>
</
template
>
<
template
#
content
>
<
template
#
content
>
<div
class=
"solar-detail-content"
>
<div
class=
"solar-detail-content"
>
...
...
src/views/solarDetail/index.vue
View file @
071a3ae
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<div
class=
"layout"
>
<div
class=
"layout"
>
<view-container>
<view-container>
<template
#
title
>
<template
#
title
>
<DetailTitle
:dataList=
"merchantList"
:dataListObj=
"merchantListObj"
:tabObject=
"tabObject"
></DetailTitle>
<DetailTitle
:
searchType=
"'solar'"
:
dataList=
"merchantList"
:dataListObj=
"merchantListObj"
:tabObject=
"tabObject"
></DetailTitle>
</
template
>
</
template
>
<
template
#
content
>
<
template
#
content
>
<div
class=
"solar-detail-content"
>
<div
class=
"solar-detail-content"
>
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment