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
4557923c
Commit
4557923c
authored
Aug 30, 2022
by
songbingqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复部分bug
parent
94101c65
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
46 deletions
+58
-46
components/menuAssembly/index.vue
+14
-3
menuSubPackage/pages/goodsDetail/goodsDetail.vue
+44
-43
No files found.
components/menuAssembly/index.vue
View file @
4557923c
...
@@ -253,9 +253,20 @@ export default {
...
@@ -253,9 +253,20 @@ export default {
scroll
(
e
)
{
scroll
(
e
)
{
if
(
!
this
.
scrolled
)
return
;
if
(
!
this
.
scrolled
)
return
;
const
{
categoryPostion
}
=
this
;
const
{
categoryPostion
}
=
this
;
const
[
el
]
=
categoryPostion
.
filter
(
item
=>
(
item
.
top
)
-
(
e
.
target
.
scrollTop
)
>=
20
);
let
otherHeight
=
0
console
.
log
(
el
,
'-------------------'
,
e
.
target
.
scrollTop
)
if
(
this
.
buied
){
if
(
el
)
this
.
categoryId
=
el
.
id
otherHeight
=
320
}
else
{
otherHeight
=
270
}
if
(
this
.
shopCarFlag
){
otherHeight
+=
100
}
else
{
otherHeight
+=
0
}
const
el
=
categoryPostion
.
filter
(
item
=>
{
return
item
.
top
<=
e
.
target
.
scrollTop
+
otherHeight
});
console
.
log
(
el
[
el
.
length
-
1
],
'-------------------'
,
e
.
target
.
scrollTop
+
otherHeight
,
otherHeight
)
if
(
el
[
el
.
length
-
1
])
this
.
categoryId
=
el
[
el
.
length
-
1
].
id
},
},
categoryClickMain
(
id
)
{
categoryClickMain
(
id
)
{
this
.
scrolled
=
false
this
.
scrolled
=
false
...
...
menuSubPackage/pages/goodsDetail/goodsDetail.vue
View file @
4557923c
...
@@ -326,16 +326,7 @@ export default {
...
@@ -326,16 +326,7 @@ export default {
}
}
},
},
async
getallNum
(
e
)
{
async
getallNum
(
e
)
{
const
settleMentFunc
=
async
()
=>
{
const
gosettleFun
=
async
()
=>
{
let
Authorization
=
uni
.
getStorageSync
(
'Authorization'
);
if
(
!
Authorization
)
{
this
.
loginByPhoneNumber
(
e
);
return
}
if
(
!
this
.
shopState
||!
this
.
isInRange
){
return
}
const
{
goods
}
=
this
;
const
{
goods
}
=
this
;
const
{
data
}
=
await
Order
.
checkSku
({
skuId
:
goods
.
skuId
})
const
{
data
}
=
await
Order
.
checkSku
({
skuId
:
goods
.
skuId
})
const
{
state
,
goods
:
newgoods
}
=
data
.
data
const
{
state
,
goods
:
newgoods
}
=
data
.
data
...
@@ -355,40 +346,50 @@ export default {
...
@@ -355,40 +346,50 @@ export default {
uni
.
navigateTo
({
url
:
`/orderSubPackage/pages/settlement/index?buyType=1&goodsList=1`
})
uni
.
navigateTo
({
url
:
`/orderSubPackage/pages/settlement/index?buyType=1&goodsList=1`
})
}
}
}
}
uni
.
authorize
({
let
Authorization
=
uni
.
getStorageSync
(
'Authorization'
);
scope
:
'scope.userLocation'
,
if
(
!
Authorization
)
{
success
:
()
=>
{
//1.1 允许授权
this
.
loginByPhoneNumber
(
e
);
console
.
log
(
"允许授权位置"
);
uni
.
authorize
({
settleMentFunc
()
scope
:
'scope.userLocation'
,
},
success
:
()
=>
{
//1.1 允许授权
fail
:
(
err
)
=>
{
//1.2 拒绝授权
console
.
log
(
"允许授权位置"
);
wx
.
exitMiniProgram
({
success
:
(
res
)
=>
{
}
})
settleMentFunc
()
console
.
log
(
"获取位置失败"
)
},
uni
.
showModal
({
fail
:
(
err
)
=>
{
//1.2 拒绝授权
content
:
'检测到您没打开地理位置权限,是否去设置打开?'
,
wx
.
exitMiniProgram
({
success
:
(
res
)
=>
{
}
})
confirmText
:
"确认"
,
console
.
log
(
"获取位置失败"
)
cancelText
:
'取消'
,
uni
.
showModal
({
success
:
(
res
)
=>
{
content
:
'检测到您没打开地理位置权限,是否去设置打开?'
,
if
(
res
.
confirm
)
{
confirmText
:
"确认"
,
uni
.
openSetting
({
//opensetting是调起设置页面的
cancelText
:
'取消'
,
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
console
.
log
(
res
)
if
(
res
.
confirm
)
{
if
(
res
.
authSetting
[
'scope.userLocation'
]
==
true
){
//判断res.authsetting的值是true还是false
uni
.
openSetting
({
//opensetting是调起设置页面的
settleMentFunc
()
success
:
(
res
)
=>
{
}
else
{
console
.
log
(
res
)
// console.log("什么也不做");
if
(
res
.
authSetting
[
'scope.userLocation'
]
==
true
){
//判断res.authsetting的值是true还是false
}
gosettleFun
()
}
}
else
{
})
// console.log("什么也不做");
}
else
{
}
console
.
log
(
'取消'
);
}
return
false
;
})
}
}
else
{
}
console
.
log
(
'取消'
);
})
return
false
;
}
}
})
}
})
return
}
}
})
if
(
!
this
.
shopState
||!
this
.
isInRange
){
return
return
}
// return
},
},
async
getMenuList
()
{
async
getMenuList
()
{
...
...
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