Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
user
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
hooloo
mp
user
Commits
9a8becb7
Commit
9a8becb7
authored
May 15, 2022
by
zhangcheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整首页
parent
dd7c5b76
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
pages/menu/menu.vue
+11
-9
No files found.
pages/menu/menu.vue
View file @
9a8becb7
...
@@ -73,7 +73,7 @@
...
@@ -73,7 +73,7 @@
</view>
</view>
</view>
</view>
</scroll-view>
</scroll-view>
<shopCar></shopCar>
<shopCar
ref=
"shopbar"
></shopCar>
<tabBar
:selectedTabbar=
"selectedTabbar"
></tabBar>
<tabBar
:selectedTabbar=
"selectedTabbar"
></tabBar>
</view>
</view>
</view>
</view>
...
@@ -126,7 +126,13 @@ import { $EventBus } from '@/utils/EventBus';
...
@@ -126,7 +126,13 @@ import { $EventBus } from '@/utils/EventBus';
},
},
async
onShow
()
{
async
onShow
()
{
console
.
log
(
1243
)
console
.
log
(
1243
)
// 获取首页菜单数据
let
shopInfo
=
this
.
$store
.
getters
.
shopInfo
;
if
(
shopInfo
&&
shopInfo
[
0
].
id
){
await
this
.
getMenuList
(
shopInfo
[
0
].
id
);
}
else
{
await
this
.
getMenuList
(
6
);
}
let
_this
=
this
;
let
_this
=
this
;
uni
.
createSelectorQuery
()
uni
.
createSelectorQuery
()
.
select
(
".menu-banner"
)
.
select
(
".menu-banner"
)
...
@@ -146,17 +152,13 @@ import { $EventBus } from '@/utils/EventBus';
...
@@ -146,17 +152,13 @@ import { $EventBus } from '@/utils/EventBus';
}
}
this
.
getHeightList
();
this
.
getHeightList
();
},
},
onHide
()
{
this
.
$refs
.
shopbar
.
showShopCar
=
false
;
},
onLoad
:
async
function
(
options
)
{
onLoad
:
async
function
(
options
)
{
if
(
options
.
orderId
){
if
(
options
.
orderId
){
this
.
orderId
=
options
.
orderId
;
this
.
orderId
=
options
.
orderId
;
}
}
// 获取首页菜单数据
let
shopInfo
=
this
.
$store
.
getters
.
shopInfo
;
if
(
shopInfo
&&
shopInfo
[
0
].
id
){
await
this
.
getMenuList
(
shopInfo
[
0
].
id
);
}
else
{
await
this
.
getMenuList
(
6
);
}
$EventBus
.
$off
(
'getMenuList'
)
$EventBus
.
$off
(
'getMenuList'
)
$EventBus
.
$on
(
'getMenuList'
,(
data
)
=>
{
$EventBus
.
$on
(
'getMenuList'
,(
data
)
=>
{
this
.
shopInfo
=
data
;
this
.
shopInfo
=
data
;
...
...
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