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
>
<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=
"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
class=
"flex-1 part-right"
>
<view
class=
"part-title"
>
...
...
@@ -23,7 +23,7 @@
<view
class=
"flex-between part-title"
>
<view
class=
'cu-tag radius line-pink'
>
距离
{{
Number
(
val
.
distance
).
toFixed
(
2
)
}}
km
</view>
<view
class=
"location"
>
<button
class=
"cu-btn bg-blue"
@
tap
.
stop=
"onNavToHome(val)"
>
去预定
</button>
<button
class=
"cu-btn bg-blue"
>
去预定
</button>
</view>
</view>
</view>
...
...
manifest.json
View file @
4df2577e
...
...
@@ -57,7 +57,7 @@
"quickapp"
:
{},
/*
小程序特有相关
*/
"mp-weixin"
:
{
"appid"
:
"wx
0802dd3453f72cc9
"
,
"appid"
:
"wx
dd170b8783edf7a0
"
,
"setting"
:
{
"urlCheck"
:
false
,
"es6"
:
true
,
...
...
pages/index/index.vue
View file @
4df2577e
<
template
>
<view
class=
"home"
@
touchstart=
"onTouchStart"
@
touchmove=
"onTouchMove"
@
touchend=
"onTouchEnd"
>
<f-navbar
title=
"凑角"
:isShowTransparentTitle=
"false"
:isShowLeft=
"false"
fontColor=
"#ffffff"
:fontSize=
"46"
bgColor=
"#e40583"
:scrollTop=
"scrollTop"
navbarType=
'5'
></f-navbar>
<f-navbar
title=
"凑角"
:isShowTransparentTitle=
"false"
:isShowLeft=
"false"
fontColor=
"#ffffff"
:fontSize=
"46"
bgColor=
"#e40583"
:scrollTop=
"scrollTop"
navbarType=
'5'
></f-navbar>
<scroll-view
class=
"scroll-view"
scroll-y=
"true"
@
scroll=
"onScroll"
>
<view
class=
"content-box"
>
<view
class=
"header-content"
...
...
@@ -123,7 +123,7 @@
return
{
scrollTop
:
0
,
storeId
:
''
,
storeList
:[],
storeList
:
[],
storeInfo
:
{},
statusBarHeight
:
this
.
statusBarHeight
,
hostUrl
:
config
.
hostUrl
,
...
...
@@ -174,23 +174,19 @@
if
(
uni
.
getStorageSync
(
"storeId"
)
&&
this
.
storeList
.
length
)
{
this
.
storeId
=
uni
.
getStorageSync
(
"storeId"
)
let
obj
=
this
.
storeList
.
filter
(
item
=>
item
.
id
===
this
.
storeId
)[
0
]
console
.
log
(
obj
,
909090
)
if
(
obj
.
roomVoList
.
length
)
{
console
.
log
(
obj
,
909090
)
this
.
storeInfo
=
{
...
obj
,
roomVoList
:
obj
.
roomVoList
.
map
(
item
=>
{
roomVoList
:
obj
.
roomVoList
.
length
?
obj
.
roomVoList
.
map
(
item
=>
{
return
{
...
item
,
images
:
item
.
images
?
item
.
images
.
split
(
","
).
map
(
val
=>
this
.
hostUrl
+
val
)
:
[]
}
})
})
:
[]
}
this
.
$forceUpdate
();
}
console
.
log
(
this
.
storeInfo
,
9999
)
}
else
{
}
else
{
uni
.
showLoading
({
title
:
"加载中"
})
...
...
@@ -210,7 +206,7 @@
console
.
log
(
option
,
909090
)
},
methods
:
{
onScroll
(
e
){
onScroll
(
e
)
{
this
.
scrollTop
=
e
.
target
.
scrollTop
;
},
onLoading
()
{
...
...
@@ -226,12 +222,7 @@
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
.
length
)
{
this
.
storeList
=
res
.
data
.
data
;
let
obj
=
{}
if
(
this
.
storeId
)
{
obj
=
res
.
data
.
data
.
filter
(
item
=>
item
.
id
===
this
.
storeId
)[
0
]
}
else
{
obj
=
res
.
data
.
data
[
0
];
}
if
(
obj
.
roomVoList
.
length
)
{
this
.
storeInfo
=
{
...
obj
,
roomVoList
:
obj
.
roomVoList
.
map
(
item
=>
{
...
...
@@ -243,7 +234,7 @@
})
}
}
}
})
},
...
...
@@ -321,17 +312,20 @@
height
:
100vh
;
overflow-x
:
hidden
;
}
.scroll-view
{
.scroll-view
{
position
:
relative
;
width
:
100vw
;
height
:
100%
;
.content-box{
.content-box
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
width
:
100%
;
}
}
}
.header-content
{
display
:
flex
;
justify-content
:
center
;
...
...
@@ -345,6 +339,7 @@
margin-top
:
-16
upx
;
}
}
.store-nav
{
position
:
relative
;
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