Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_wechat
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pseer
gxpt_wechat
Commits
14b31562
Commit
14b31562
authored
Apr 25, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
细节优化
parent
19ea526a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
26 deletions
+39
-26
index.vue
pages/index/index.vue
+39
-26
No files found.
pages/index/index.vue
View file @
14b31562
<
template
>
<
template
>
<view
class=
"home"
@
touchstart=
"onTouchStart"
@
touchend=
"onTouchEnd"
>
<view
class=
"home"
@
touchstart=
"onTouchStart"
@
touchend=
"onTouchEnd"
>
<f-navbar
:title=
"storeInfo.name"
:isShowTransparentTitle=
"false"
:isShowLeft=
"false"
fontColor=
"#ffffff"
<f-navbar
:title=
"'凑角-'+storeInfo.name"
:isShowTransparentTitle=
"false"
:isShowLeft=
"false"
fontColor=
"#ffffff"
:fontSize=
"38"
bgColor=
"#e40583"
:scrollTop=
"scrollTop"
navbarType=
'5'
></f-navbar>
:fontSize=
"38"
bgColor=
"#E40583"
:scrollTop=
"scrollTop"
navbarType=
'5'
></f-navbar>
<view
class=
"header-content"
:style=
"
{paddingTop:statusBarHeight+'px' }">
<image
class=
"logo-bg"
:src=
"assetsPath +'/logo.png'"
mode=
"widthFix"
></image>
</view>
<scroll-view
:enable-flex=
"true"
class=
"scroll-view"
scroll-y=
"true"
@
scroll=
"onScroll"
>
<scroll-view
:enable-flex=
"true"
class=
"scroll-view"
scroll-y=
"true"
@
scroll=
"onScroll"
>
<view
class=
"content-box"
>
<view
class=
"content-box"
>
<view
class=
"
header-content"
:style=
"
{paddingTop:statusBarHeight+'px' }
">
<view
class=
"
black-header
"
>
<image
:src=
"assetsPath + '/banner.png'"
mode=
"widthFix"
></image>
</view>
</view>
<view
class=
"store-nav"
>
<view
class=
"store-nav"
:style=
"
{background: storeNavBg}"
>
<view
class=
"icon-box"
>
<view
class=
"icon-box"
>
<image
:src=
"assetsPath +'/logo_icon.png'"
mode=
"widthFix"
></image>
<image
:src=
"assetsPath +'/logo_icon.png'"
mode=
"widthFix"
></image>
</view>
</view>
...
@@ -20,7 +25,7 @@
...
@@ -20,7 +25,7 @@
<image
class=
"bg-img"
:src=
"assetsPath+ '/44@2x.png'"
mode=
"scaleToFill"
></image>
<image
class=
"bg-img"
:src=
"assetsPath+ '/44@2x.png'"
mode=
"scaleToFill"
></image>
<view
class=
"flex-between tips-box"
>
<view
class=
"flex-between tips-box"
>
<view
class=
"flex-col part-left"
>
<view
class=
"flex-col part-left"
>
<view
v-if=
"storeInfo && storeInfo.distance"
class=
" flex-row"
>
<view
v-if=
"storeInfo && storeInfo.distance"
class=
" flex-row"
>
<text
class=
"cuIcon-locationfill text-red text-dw"
></text>
<text
class=
"cuIcon-locationfill text-red text-dw"
></text>
<text>
距您
{{
storeInfo
.
distance
}}
公里
</text>
<text>
距您
{{
storeInfo
.
distance
}}
公里
</text>
...
@@ -295,7 +300,8 @@
...
@@ -295,7 +300,8 @@
list
:
[
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
,
16
,
17
,
18
,
19
,
20
,
21
,
22
,
23
],
list
:
[
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
,
16
,
17
,
18
,
19
,
20
,
21
,
22
,
23
],
objListDate
:
[],
objListDate
:
[],
timer2
:
null
,
timer2
:
null
,
timerLocation
:
null
timerLocation
:
null
,
storeNavBg
:
'rgba(255, 255, 255, 1)'
}
}
},
},
onShow
()
{
onShow
()
{
...
@@ -399,7 +405,6 @@
...
@@ -399,7 +405,6 @@
setTimeout
(()
=>
{
setTimeout
(()
=>
{
uni
.
removeStorageSync
(
'storeId'
);
uni
.
removeStorageSync
(
'storeId'
);
let
aaa
=
uni
.
getStorageSync
(
'storeId'
)
?
true
:
false
;
let
aaa
=
uni
.
getStorageSync
(
'storeId'
)
?
true
:
false
;
console
.
log
(
aaa
,
"是否删除数据"
)
this
.
onGetListStore
()
this
.
onGetListStore
()
},
10
)
},
10
)
...
@@ -420,11 +425,8 @@
...
@@ -420,11 +425,8 @@
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
.
length
)
{
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
.
length
)
{
let
obj
=
{}
let
obj
=
{}
if
(
uni
.
getStorageSync
(
"storeId"
))
{
if
(
uni
.
getStorageSync
(
"storeId"
))
{
console
.
log
(
1
)
obj
=
res
.
data
.
data
.
find
(
item
=>
item
.
id
===
uni
.
getStorageSync
(
"storeId"
));
obj
=
res
.
data
.
data
.
find
(
item
=>
item
.
id
===
uni
.
getStorageSync
(
"storeId"
));
// uni.removeStorageSync('storeId')
}
else
{
}
else
{
console
.
log
(
2
)
obj
=
res
.
data
.
data
[
0
];
obj
=
res
.
data
.
data
[
0
];
uni
.
setStorageSync
(
"storeId"
,
obj
.
id
);
uni
.
setStorageSync
(
"storeId"
,
obj
.
id
);
}
}
...
@@ -580,12 +582,20 @@
...
@@ -580,12 +582,20 @@
})
})
},
},
onTouchStart
()
{
onTouchStart
()
{
this
.
timer
=
null
;
this
.
timer
=
null
;
this
.
show
=
true
;
this
.
show
=
true
;
},
},
onScroll
(
e
)
{
onScroll
(
e
)
{
this
.
scrollTop
=
e
.
target
.
scrollTop
;
this
.
scrollTop
=
e
.
target
.
scrollTop
;
let
n
=
0
;
if
(
this
.
scrollTop
<=
10
){
n
=
0
}
else
if
(
this
.
scrollTop
>=
50
){
n
=
0.1
}
else
{
n
=
Number
(
this
.
scrollTop
/
500
).
toFixed
(
4
)
}
this
.
storeNavBg
=
`rgba(255, 255, 255,
${
1
-
n
}
)`
if
(
!
this
.
timer
)
{
if
(
!
this
.
timer
)
{
this
.
timer
=
setTimeout
(()
=>
{
this
.
timer
=
setTimeout
(()
=>
{
this
.
show
=
false
;
this
.
show
=
false
;
...
@@ -658,7 +668,10 @@
...
@@ -658,7 +668,10 @@
display
:
flex
;
display
:
flex
;
flex
:
1
;
flex
:
1
;
width
:
100vw
;
width
:
100vw
;
.black-header{
width
:
100%
;
height
:
340
upx
;
}
.content-box
{
.content-box
{
position
:
absolute
;
position
:
absolute
;
...
@@ -673,31 +686,31 @@
...
@@ -673,31 +686,31 @@
}
}
.header-content
{
.header-content
{
position
:
fixed
;
top
:
0
;
left
:
0
;
display
:
flex
;
display
:
flex
;
justify-content
:
center
;
justify-content
:
center
;
align-items
:
center
;
width
:
100%
;
width
:
100%
;
min-height
:
280
upx
;
min-height
:
392
upx
;
backdrop-filter
:
blur
(
5px
);
background
:
linear-gradient
(
to
right
,
#FB406F
,
#E40583
);
background-color
:
#E40583
;
.logo-bg{
width
:
380
upx
;
image
{
max-height
:
280
upx
;
display
:
block
;
width
:
100%
;
height
:
auto
;
backdrop-filter
:
blur
(
5px
);
}
}
}
}
.store-nav
{
.store-nav
{
position
:
relative
;
position
:
relative
;
display
:
flex
;
display
:
flex
;
width
:
94%
;
align-self
:
flex-end
;
width
:
698
upx
;
height
:
220
upx
;
height
:
220
upx
;
background
:
#FFFFFF
;
box-shadow
:
0
rpx
7
rpx
18
rpx
0
rpx
rgba
(
0
,
0
,
0
,
0.302
);
box-shadow
:
0
rpx
7
rpx
18
rpx
0
rpx
rgba
(
0
,
0
,
0
,
0.302
);
border-radius
:
29
rpx
29
rpx
29
rpx
29
rpx
;
border-radius
:
29
rpx
29
rpx
29
rpx
29
rpx
;
margin-top
:
-60
upx
;
z-index
:
10
;
z-index
:
10
;
margin
:
0
auto
24
upx
;
.icon-box
{
.icon-box
{
position
:
absolute
;
position
:
absolute
;
...
@@ -851,7 +864,7 @@
...
@@ -851,7 +864,7 @@
width
:
100%
;
width
:
100%
;
margin
:
0
0
24
upx
;
margin
:
0
0
24
upx
;
padding-bottom
:
24
upx
;
padding-bottom
:
24
upx
;
background-color
:
#ffffff
;
.title
{
.title
{
width
:
94%
;
width
:
94%
;
margin
:
12
upx
0
;
margin
:
12
upx
0
;
...
...
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