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
92e7a0d3
Commit
92e7a0d3
authored
Jun 24, 2022
by
宋冰琦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复首页登录成功后订单获取问题
parent
01b800ad
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
11 deletions
+30
-11
components/tabBar/tabBarCopy.vue
+15
-8
pages/home/home.vue
+13
-1
pages/menu/menu.vue
+2
-2
No files found.
components/tabBar/tabBar
c
opy.vue
→
components/tabBar/tabBar
C
opy.vue
View file @
92e7a0d3
<
template
>
<view
class=
"tabbar"
>
<view
class=
"navigator"
>
<view
class=
"tabbar"
:style=
"
{'padding-bottom':BottomSafeHeight+'px'}"
>
<view
class=
"navigator"
>
<view
class=
"navigator-item"
v-for=
"(item,index) in tabBar.list"
:key=
"item.pagePath"
@
click=
"switchTab(index)"
>
<img
:src=
"item.iconPath"
class=
"icon"
v-if=
"selectedIndex !== index"
>
...
...
@@ -22,6 +22,11 @@
}
},
mounted
(){
this
.
BottomSafeHeight
=
uni
.
getStorageSync
(
'BottomSafeHeight'
)
||
10
uni
.
setStorageSync
(
"taBarHeight"
,(
this
.
BottomSafeHeight
+
376
))
uni
.
setStorageSync
(
"shopCar"
,
this
.
BottomSafeHeight
==
10
?
120
:(
this
.
BottomSafeHeight
+
288
)
/
2
)
uni
.
setStorageSync
(
"orderBottom"
,(
this
.
BottomSafeHeight
+
150
))
this
.
selectedIndex
=
Number
(
this
.
select
)
// console.log(this.select)
// this.selectedIndex = Number(this.select)
// this.selectedIndex = 0
...
...
@@ -34,6 +39,7 @@
return
{
selectedIndex
:
0
,
showselected
:
false
,
BottomSafeHeight
:
0
,
tabBar
:
{
list
:
[
{
...
...
@@ -77,13 +83,13 @@
width
:
100%
;
height
:
100
rpx
;
z-index
:
999
;
background
:
#F
5F5F5
;
border-top
:
2
rpx
solid
#
eee
;
background
:
#F
FFFFF
;
border-top
:
2
rpx
solid
#
FFFFFF
;
}
.navigator
{
display
:
flex
;
justify-content
:
space-
between
;
justify-content
:
space-
around
;
width
:
85%
;
margin
:
0
auto
;
padding
:
20
rpx
;
...
...
@@ -98,7 +104,7 @@
}
.item-text
{
margin-top
:
6
rpx
;
margin-top
:
12
rpx
;
color
:
#777E86
;
font-size
:
24
rpx
;
}
...
...
@@ -108,7 +114,7 @@
}
.icon
{
width
:
20
px
;
height
:
20
px
;
width
:
40
r
px
;
height
:
40
r
px
;
}
</
style
>
\ No newline at end of file
pages/
app/app
.vue
→
pages/
home/home
.vue
View file @
92e7a0d3
...
...
@@ -22,9 +22,21 @@ export default {
selectIndex
:
0
}
},
computed
:{
a
(){
console
.
log
(
uni
.
getStorage
(
'tabIndex'
),
'ccccccccc'
)
return
uni
.
getStorageSync
(
'tabIndex'
)
}
},
mounted
(){
this
.
$nextTick
(()
=>
{
console
.
log
(
uni
.
getStorageSync
(
'tabIndex'
))
})
this
.
selectIndex
=
uni
.
getStorageSync
(
'tabIndex'
)
},
methods
:{
acceptIndex
(
e
){
console
.
log
(
e
)
console
.
log
(
e
,
'hhhhhhhhhhhhhhh'
)
this
.
selectIndex
=
e
}
}
...
...
pages/menu/menu.vue
View file @
92e7a0d3
...
...
@@ -137,7 +137,7 @@ export default {
});
User
.
getShopInfo
(
params
);
},
async
getHomeOrder
(
id
){
async
getHomeOrder
(
id
=
this
.
shopInfo
.
id
){
if
(
!
this
.
userms
)
return
;
const
res
=
await
Order
.
getHomeOrder
({
shopId
:
id
})
const
data
=
res
?.
data
...
...
@@ -212,7 +212,7 @@ export default {
getPhoneNumber
(
e
)
{
if
(
e
.
detail
.
errMsg
==
'getPhoneNumber:ok'
)
{
e
.
loginInfo
=
this
.
loginInfo
User
.
getPhoneNumber
(
e
);
User
.
getPhoneNumber
(
e
,
this
.
getHomeOrder
);
}
else
if
(
e
.
detail
.
errMsg
==
"getPhoneNumber:fail user deny"
)
{
this
.
showToast
({
title
:
'已拒绝手机号授权'
,
icon
:
'error'
})
}
...
...
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