Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
shop_mobile_uni
Project
Project
Details
Activity
Releases
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
郑秀明
shop_mobile_uni
Commits
b5282844
Commit
b5282844
authored
Mar 25, 2020
by
王建威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
吸顶
parent
adc2b319
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
7 deletions
+34
-7
manifest.json
manifest.json
+1
-1
hotrecommd.vue
pages/home/components/hotrecommd.vue
+19
-4
searchbar.vue
pages/home/components/searchbar.vue
+1
-0
home.vue
pages/home/home.vue
+13
-2
No files found.
manifest.json
View file @
b5282844
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
"mode"
:
"history"
,
"mode"
:
"history"
,
"base"
:
"/uni"
"base"
:
"/uni"
},
},
"publicPath"
:
"https://dbc-static.oss-cn-beijing.aliyuncs.com/dbc-shop/uni/
prod
/1.0.5/"
,
"publicPath"
:
"https://dbc-static.oss-cn-beijing.aliyuncs.com/dbc-shop/uni/
test
/1.0.5/"
,
"optimization"
:
{
"optimization"
:
{
"treeShaking"
:
{
"treeShaking"
:
{
"enable"
:
true
"enable"
:
true
...
...
pages/home/components/hotrecommd.vue
View file @
b5282844
<
template
>
<
template
>
<view
class=
"hot_main_content"
>
<view
class=
"hot_main_content"
:style=
"[fixFlag ?
{'padding-top': '100rpx'} : null]" ref="fix"
>
<view
class=
"clearfix
"
style=
"padding: 28rpx 0 20rpx
"
>
<view
class=
"clearfix
scrollbar"
:class=
"
{'fixed': fixFlag}
">
<view
class=
"hot_head_left"
>
<view
class=
"hot_head_left"
>
<view>
<view>
<text
class=
"hot_title"
>
<text
class=
"hot_title"
>
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<text
class=
"hot_sub_title"
>
{{
style_setting
.
sub_title
}}
</text>
<text
class=
"hot_sub_title"
>
{{
style_setting
.
sub_title
}}
</text>
</view>
</view>
</view>
</view>
<view
class=
"hot_cate_list"
>
<view
class=
"hot_cate_list"
:style=
"[fixFlag ?
{'padding-right': '60rpx'} : null]"
>
<text
class=
"hot_cate_item"
v-for=
"(item, key) in cate_list"
:key=
"key"
@
click=
"changeCate(key)"
:class=
"key === hotIndex ? 'act' : ''"
v-if=
"item.goods_list.length"
>
<text
class=
"hot_cate_item"
v-for=
"(item, key) in cate_list"
:key=
"key"
@
click=
"changeCate(key)"
:class=
"key === hotIndex ? 'act' : ''"
v-if=
"item.goods_list.length"
>
<text>
{{
item
.
cate_name
}}
</text>
<text>
{{
item
.
cate_name
}}
</text>
<text>
{{
item
.
sub_title
}}
</text>
<text>
{{
item
.
sub_title
}}
</text>
...
@@ -54,7 +54,8 @@
...
@@ -54,7 +54,8 @@
return
{
return
{
style_setting
:
this
.
wrapper_props
.
style_setting
,
style_setting
:
this
.
wrapper_props
.
style_setting
,
cate_list
:
this
.
wrapper_props
.
cate_list
,
cate_list
:
this
.
wrapper_props
.
cate_list
,
hotIndex
:
0
hotIndex
:
0
,
fixFlag
:
false
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -85,6 +86,19 @@
...
@@ -85,6 +86,19 @@
.hot_main_content {
.hot_main_content {
width: 702rpx;
width: 702rpx;
margin: 0 auto;
margin: 0 auto;
.scrollbar {
padding: 28rpx 0 20rpx;
}
.fixed {
position: fixed;
left: 0;
top: 100rpx;
background-color: #f8f8f8;
z-index: 10;
width: 100%;
padding: 28rpx 24rpx 20rpx;
box-shadow:0px 4px 16px 0px rgba(0,0,0,0.3);
}
}
}
.hot_head_left {
.hot_head_left {
display: inline-block;
display: inline-block;
...
@@ -118,6 +132,7 @@
...
@@ -118,6 +132,7 @@
position: relative;
position: relative;
left: 20rpx;
left: 20rpx;
height: 88rpx;
height: 88rpx;
padding-right: 18rpx;
}
}
.hot_cate_list::-webkit-scrollbar {
.hot_cate_list::-webkit-scrollbar {
display: none;
display: none;
...
...
pages/home/components/searchbar.vue
View file @
b5282844
...
@@ -59,6 +59,7 @@
...
@@ -59,6 +59,7 @@
width: 100%;
width: 100%;
top: 0;
top: 0;
left: 0;
left: 0;
height: 100rpx;
box-sizing: border-box;
box-sizing: border-box;
z-index: 100;
z-index: 100;
.flex {
.flex {
...
...
pages/home/home.vue
View file @
b5282844
<
template
>
<
template
>
<view
class=
"homeContent"
>
<view
class=
"homeContent"
>
<component
v-for=
"(item, index) in data"
:key=
"index"
:is=
"item.name"
:wrapper_props=
"item.wrapper_props"
:isLogin=
"isLogin"
></component>
<component
v-for=
"(item, index) in data"
:key=
"index"
:is=
"item.name"
:wrapper_props=
"item.wrapper_props"
:isLogin=
"isLogin"
:ref=
"item.name"
></component>
<BottomBar
/>
<BottomBar
/>
</view>
</view>
</
template
>
</
template
>
...
@@ -21,7 +21,8 @@
...
@@ -21,7 +21,8 @@
data
()
{
data
()
{
return
{
return
{
data
:
[],
data
:
[],
isLogin
:
0
isLogin
:
0
,
fixFlag
:
false
}
}
},
},
onLoad
()
{
onLoad
()
{
...
@@ -36,6 +37,16 @@
...
@@ -36,6 +37,16 @@
}
}
// #endif
// #endif
},
},
onPageScroll
()
{
const
top
=
this
.
$refs
.
HotRecommd
[
0
].
$refs
.
fix
.
$el
.
getBoundingClientRect
().
top
;
if
(
top
<=
50
&&
!
this
.
fixFlag
)
{
this
.
fixFlag
=
true
;
this
.
$refs
.
HotRecommd
[
0
].
fixFlag
=
true
;
}
else
if
(
top
>
50
&&
this
.
fixFlag
)
{
this
.
fixFlag
=
false
;
this
.
$refs
.
HotRecommd
[
0
].
fixFlag
=
false
;
}
},
methods
:
{
methods
:
{
getData
()
{
getData
()
{
uni
.
request
({
uni
.
request
({
...
...
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