Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
eMall_miniapp
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
高宇
eMall_miniapp
Commits
c608835a
Commit
c608835a
authored
Jul 25, 2023
by
wdy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
栏目
parent
9ed13435
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
103 additions
and
31 deletions
+103
-31
pages.json
pages.json
+2
-2
index.vue
pages/menu/index.vue
+101
-29
No files found.
pages.json
View file @
c608835a
...
...
@@ -172,7 +172,7 @@
"path"
:
"pages/menu/index"
,
"style"
:
{
"navigationBarTitleText"
:
"
分类
"
,
"navigationBarTitleText"
:
"
栏目
"
,
"enablePullDownRefresh"
:
false
}
...
...
@@ -400,7 +400,7 @@
"pagePath"
:
"pages/menu/index"
,
"iconPath"
:
"static/img/nav/category.png"
,
"selectedIconPath"
:
"static/img/nav/category_sel.png"
,
"text"
:
"
分类
"
"text"
:
"
栏目
"
},
//
{
//
"pagePath"
:
"pages/shop/cart"
,
...
...
pages/menu/index.vue
View file @
c608835a
...
...
@@ -6,6 +6,7 @@
<u-input
class=
"u-search-text"
type=
"text"
height=
"50"
@
click=
"toSearch"
placeholder=
"搜商品名称"
/>
</view>
</view>
<!-- 主体区域 -->
<view
class=
"u-menu-wrap"
>
<scroll-view
scroll-y
scroll-with-animation
class=
"u-tab-view menu-scroll-view"
:scroll-top=
"scrollTop"
:scroll-into-view=
"itemId"
>
...
...
@@ -21,10 +22,11 @@
<text>
{{
item
.
name
}}
</text>
</view>
<view
class=
"item-container"
>
<view
class=
"thumb-box"
v-for=
"(item1, index1) in item.children"
:key=
"index1"
@
click=
"toCategory(item1)"
>
<u-tabs
:list=
"item.children"
:is-scroll=
"false"
:current=
"currentList[index].current"
@
change=
"change(index)"
></u-tabs>
<!--
<view
class=
"thumb-box"
v-for=
"(item1, index1) in item.children"
:key=
"index1"
@
click=
"toCategory(item1)"
>
<image
class=
"item-menu-image"
:src=
"baseApi+'/file/getImgStream?idFile='+item1.icon"
mode=
""
></image>
<view
class=
"item-menu-name"
>
{{
item1
.
name
}}
</view>
</view>
</view>
-->
</view>
</view>
</view>
...
...
@@ -48,8 +50,17 @@
scrollRightTop
:
0
,
// 右边栏目scroll-view的滚动条高度
timer
:
null
,
// 定时器
baseApi
:
this
.
baseApi
,
businessMessage
:{}
// 商圈数据
businessMessage
:{}
,
// 商圈数据
list
:
[],
current
:
0
,
currentList
:
[
{
current
:
0
},
{
current
:
0
}
]
}
},
onLoad
()
{
...
...
@@ -57,23 +68,27 @@
// this.init()
},
methods
:
{
getMessage
(){
const
that
=
this
uni
.
getStorage
({
key
:
'business'
,
success
:
function
(
res
){
// that.ishaveBusiness = true
that
.
businessMessage
=
res
.
data
console
.
log
(
"商圈数据"
,
that
.
businessMessage
)
}
})
this
.
$nextTick
(()
=>
{
this
.
init
()
},
1000
)
},
change
(
index
,
item
)
{
console
.
log
(
"index"
,
index
,
"item"
,
item
)
this
.
current
=
index
;
},
getMessage
(){
const
that
=
this
uni
.
getStorage
({
key
:
'business'
,
success
:
function
(
res
){
// that.ishaveBusiness = true
that
.
businessMessage
=
res
.
data
console
.
log
(
"商圈数据"
,
that
.
businessMessage
)
}
})
this
.
$nextTick
(()
=>
{
this
.
init
()
},
1000
)
},
init
()
{
this
.
$u
.
get
(
'c
ategory
/list?tenantId='
+
this
.
businessMessage
.
id
).
then
(
res
=>
{
this
.
$u
.
get
(
'c
olumns/mobile
/list?tenantId='
+
this
.
businessMessage
.
id
).
then
(
res
=>
{
this
.
tabbar
=
res
this
.
getMenuItemTop
()
})
...
...
@@ -208,18 +223,69 @@
/* #endif */
display
:
flex
;
flex-direction
:
column
;
.content
{
display
:
flex
;
.left
{
width
:
20%
;
height
:
91vh
;
overflow
:
scroll
;
background-color
:
#eeeeee
;
.list
{
width
:
100%
;
.list-item
{
background-color
:
#eeeeee
;
color
:
#333
;
width
:
100%
;
height
:
80rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.checkListItem
{
background-color
:
#fff
;
color
:
red
;
width
:
100%
;
height
:
80rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
}
}
.right
{
width
:
80%
;
min-height
:
91vh
;
background-color
:
#fff
;
.shop
{
width
:
100%
;
height
:
80rpx
;
.shop-item
{
display
:
flex
;
height
:
80rpx
;
align-items
:
center
;
.text
{
margin-left
:
30rpx
;
display
:
flex
;
height
:
80rpx
;
align-items
:
center
;
}
.right
{
position
:
absolute
;
right
:
18rpx
;
}
}
}
}
}
}
.u-search-box
{
padding
:
10rpx
30rpx
;
margin-bottom
:
30rpx
;
}
.u-menu-wrap
{
flex
:
1
;
display
:
flex
;
overflow
:
hidden
;
}
.u-search-inner
{
background-color
:
rgb
(
234
,
234
,
234
);
border-radius
:
100rpx
;
...
...
@@ -227,13 +293,18 @@
align-items
:
center
;
padding
:
10rpx
16rpx
;
}
.u-search-text
{
font-size
:
24rpx
;
color
:
$u-tips-color
;
margin-left
:
10rpx
;
}
.u-menu-wrap
{
flex
:
1
;
display
:
flex
;
overflow
:
hidden
;
}
.u-tab-view
{
width
:
200rpx
;
height
:
100%
;
...
...
@@ -305,6 +376,7 @@
}
.item-container
{
width
:
80%
;
display
:
flex
;
flex-wrap
:
wrap
;
}
...
...
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