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
4df2577e
Commit
4df2577e
authored
Nov 07, 2023
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
细节优化
parent
415937b5
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
25 deletions
+20
-25
storeList.vue
components/storeList/storeList.vue
+3
-3
manifest.json
manifest.json
+1
-1
index.vue
pages/index/index.vue
+16
-21
No files found.
components/storeList/storeList.vue
View file @
4df2577e
<
template
>
<
template
>
<view
class=
"store-list"
>
<view
class=
"store-list"
>
<view
class=
"flex-col"
v-for=
"(val,i) in list"
:key=
"i"
>
<view
class=
"flex-col"
v-for=
"(val,i) in list"
:key=
"i"
@
tap
.
stop=
"onNavToHome(val)"
>
<view
class=
"flex-row"
>
<view
class=
"flex-row"
>
<view
class=
"room-img-box"
>
<view
class=
"room-img-box"
>
<image
:src=
"val.images[0]"
mode=
"scaleToFill"
@
tap=
"onPreview(val)"
></image>
<image
:src=
"val.images[0]"
mode=
"scaleToFill"
@
tap
.
stop
=
"onPreview(val)"
></image>
</view>
</view>
<view
class=
"flex-1 part-right"
>
<view
class=
"flex-1 part-right"
>
<view
class=
"part-title"
>
<view
class=
"part-title"
>
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
<view
class=
"flex-between part-title"
>
<view
class=
"flex-between part-title"
>
<view
class=
'cu-tag radius line-pink'
>
距离
{{
Number
(
val
.
distance
).
toFixed
(
2
)
}}
km
</view>
<view
class=
'cu-tag radius line-pink'
>
距离
{{
Number
(
val
.
distance
).
toFixed
(
2
)
}}
km
</view>
<view
class=
"location"
>
<view
class=
"location"
>
<button
class=
"cu-btn bg-blue"
@
tap
.
stop=
"onNavToHome(val)"
>
去预定
</button>
<button
class=
"cu-btn bg-blue"
>
去预定
</button>
</view>
</view>
</view>
</view>
</view>
</view>
...
...
manifest.json
View file @
4df2577e
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
"quickapp"
:
{},
"quickapp"
:
{},
/*
小程序特有相关
*/
/*
小程序特有相关
*/
"mp-weixin"
:
{
"mp-weixin"
:
{
"appid"
:
"wx
0802dd3453f72cc9
"
,
"appid"
:
"wx
dd170b8783edf7a0
"
,
"setting"
:
{
"setting"
:
{
"urlCheck"
:
false
,
"urlCheck"
:
false
,
"es6"
:
true
,
"es6"
:
true
,
...
...
pages/index/index.vue
View file @
4df2577e
<
template
>
<
template
>
<view
class=
"home"
@
touchstart=
"onTouchStart"
@
touchmove=
"onTouchMove"
@
touchend=
"onTouchEnd"
>
<view
class=
"home"
@
touchstart=
"onTouchStart"
@
touchmove=
"onTouchMove"
@
touchend=
"onTouchEnd"
>
<f-navbar
title=
"凑角"
:isShowTransparentTitle=
"false"
:isShowLeft=
"false"
fontColor=
"#ffffff"
:fontSize=
"46"
bgColor=
"#e40583"
<f-navbar
title=
"凑角"
:isShowTransparentTitle=
"false"
:isShowLeft=
"false"
fontColor=
"#ffffff"
:fontSize=
"46"
:scrollTop=
"scrollTop"
navbarType=
'5'
></f-navbar>
bgColor=
"#e40583"
:scrollTop=
"scrollTop"
navbarType=
'5'
></f-navbar>
<scroll-view
class=
"scroll-view"
scroll-y=
"true"
@
scroll=
"onScroll"
>
<scroll-view
class=
"scroll-view"
scroll-y=
"true"
@
scroll=
"onScroll"
>
<view
class=
"content-box"
>
<view
class=
"content-box"
>
<view
class=
"header-content"
<view
class=
"header-content"
...
@@ -123,7 +123,7 @@
...
@@ -123,7 +123,7 @@
return
{
return
{
scrollTop
:
0
,
scrollTop
:
0
,
storeId
:
''
,
storeId
:
''
,
storeList
:[],
storeList
:
[],
storeInfo
:
{},
storeInfo
:
{},
statusBarHeight
:
this
.
statusBarHeight
,
statusBarHeight
:
this
.
statusBarHeight
,
hostUrl
:
config
.
hostUrl
,
hostUrl
:
config
.
hostUrl
,
...
@@ -174,23 +174,19 @@
...
@@ -174,23 +174,19 @@
if
(
uni
.
getStorageSync
(
"storeId"
)
&&
this
.
storeList
.
length
)
{
if
(
uni
.
getStorageSync
(
"storeId"
)
&&
this
.
storeList
.
length
)
{
this
.
storeId
=
uni
.
getStorageSync
(
"storeId"
)
this
.
storeId
=
uni
.
getStorageSync
(
"storeId"
)
let
obj
=
this
.
storeList
.
filter
(
item
=>
item
.
id
===
this
.
storeId
)[
0
]
let
obj
=
this
.
storeList
.
filter
(
item
=>
item
.
id
===
this
.
storeId
)[
0
]
console
.
log
(
obj
,
909090
)
console
.
log
(
obj
,
909090
)
if
(
obj
.
roomVoList
.
length
)
{
this
.
storeInfo
=
{
this
.
storeInfo
=
{
...
obj
,
...
obj
,
roomVoList
:
obj
.
roomVoList
.
map
(
item
=>
{
roomVoList
:
obj
.
roomVoList
.
length
?
obj
.
roomVoList
.
map
(
item
=>
{
return
{
return
{
...
item
,
...
item
,
images
:
item
.
images
?
item
.
images
images
:
item
.
images
?
item
.
images
.
split
(
","
).
map
(
val
=>
this
.
hostUrl
+
val
)
:
[]
.
split
(
","
).
map
(
val
=>
this
.
hostUrl
+
val
)
:
[]
}
}
})
})
:
[]
}
}
this
.
$forceUpdate
();
}
else
{
}
console
.
log
(
this
.
storeInfo
,
9999
)
}
else
{
uni
.
showLoading
({
uni
.
showLoading
({
title
:
"加载中"
title
:
"加载中"
})
})
...
@@ -210,7 +206,7 @@
...
@@ -210,7 +206,7 @@
console
.
log
(
option
,
909090
)
console
.
log
(
option
,
909090
)
},
},
methods
:
{
methods
:
{
onScroll
(
e
){
onScroll
(
e
)
{
this
.
scrollTop
=
e
.
target
.
scrollTop
;
this
.
scrollTop
=
e
.
target
.
scrollTop
;
},
},
onLoading
()
{
onLoading
()
{
...
@@ -226,12 +222,7 @@
...
@@ -226,12 +222,7 @@
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
.
length
)
{
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
.
length
)
{
this
.
storeList
=
res
.
data
.
data
;
this
.
storeList
=
res
.
data
.
data
;
let
obj
=
{}
let
obj
=
{}
if
(
this
.
storeId
)
{
obj
=
res
.
data
.
data
.
filter
(
item
=>
item
.
id
===
this
.
storeId
)[
0
]
}
else
{
obj
=
res
.
data
.
data
[
0
];
obj
=
res
.
data
.
data
[
0
];
}
if
(
obj
.
roomVoList
.
length
)
{
this
.
storeInfo
=
{
this
.
storeInfo
=
{
...
obj
,
...
obj
,
roomVoList
:
obj
.
roomVoList
.
map
(
item
=>
{
roomVoList
:
obj
.
roomVoList
.
map
(
item
=>
{
...
@@ -243,7 +234,7 @@
...
@@ -243,7 +234,7 @@
})
})
}
}
}
}
}
})
})
},
},
...
@@ -321,17 +312,20 @@
...
@@ -321,17 +312,20 @@
height
:
100vh
;
height
:
100vh
;
overflow-x
:
hidden
;
overflow-x
:
hidden
;
}
}
.scroll-view
{
.scroll-view
{
position
:
relative
;
position
:
relative
;
width
:
100vw
;
width
:
100vw
;
height
:
100%
;
height
:
100%
;
.content-box{
.content-box
{
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
align-items
:
center
;
align-items
:
center
;
width
:
100%
;
width
:
100%
;
}
}
}
}
.header-content
{
.header-content
{
display
:
flex
;
display
:
flex
;
justify-content
:
center
;
justify-content
:
center
;
...
@@ -345,6 +339,7 @@
...
@@ -345,6 +339,7 @@
margin-top
:
-16
upx
;
margin-top
:
-16
upx
;
}
}
}
}
.store-nav
{
.store-nav
{
position
:
relative
;
position
:
relative
;
display
:
flex
;
display
:
flex
;
...
...
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