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
fd48b2da
Commit
fd48b2da
authored
Feb 24, 2023
by
songbingqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成部分开发
parent
46804ace
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
+14
-10
pages/menu/menu.vue
+14
-10
No files found.
pages/menu/menu.vue
View file @
fd48b2da
...
...
@@ -159,12 +159,7 @@ export default {
loginInfo
:
""
,
img
:
""
,
isInRange
:
true
,
dayTitle
:
""
,
list1
:
[
'https://cdn.uviewui.com/uview/swiper/swiper1.png'
,
'https://cdn.uviewui.com/uview/swiper/swiper2.png'
,
'https://cdn.uviewui.com/uview/swiper/swiper3.png'
,
]
dayTitle
:
""
};
},
computed
:
{
...
...
@@ -357,7 +352,6 @@ export default {
console
.
log
(
data
)
},
async
getHomeOrder
(
id
=
this
.
shopInfo
.
id
)
{
console
.
log
(
123
)
if
(
!
this
.
userms
)
return
;
const
res
=
await
Order
.
getHomeOrder
({
shopId
:
id
});
const
data
=
res
?.
data
;
...
...
@@ -398,10 +392,20 @@ export default {
this
.
$refs
.
AreaPicker
.
showArea
();
},
// 手机号授权登录
getPhoneNumber
(
e
)
{
async
getPhoneNumber
(
e
)
{
if
(
e
.
detail
.
errMsg
==
"getPhoneNumber:ok"
)
{
e
.
loginInfo
=
this
.
loginInfo
;
User
.
getPhoneNumber
(
e
,
this
.
getHomeOrder
);
await
User
.
getPhoneNumber
(
e
,()
=>
{
this
.
getHomeOrder
()
uni
.
getSetting
({
success
:
(
res
)
=>
{
// 已经授权位置不获取默认店铺
if
(
!
res
.
authSetting
[
"scope.userLocation"
])
{
this
.
getShopMenus
()
}
},
});
});
}
else
if
(
e
.
detail
.
errMsg
==
"getPhoneNumber:fail user deny"
)
{
this
.
showToast
({
title
:
"已拒绝手机号授权,请同意授权"
,
...
...
@@ -427,7 +431,7 @@ export default {
},
fail
:
(
err
)
=>
{
//1.2 拒绝授权
this
.
getShopMenus
();
//
this.getShopMenus();
wx
.
exitMiniProgram
({
success
:
(
res
)
=>
{}
});
console
.
log
(
"获取位置失败"
)
this
.
showToast
({
...
...
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