Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
U
uni-pdtravel
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
panyongping
uni-pdtravel
Commits
996811b5
Commit
996811b5
authored
Aug 13, 2024
by
潘永坪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
组合票首页兼容支付宝小程序,订单页面日历报错处理
parent
4b74e396
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
76 additions
and
21 deletions
+76
-21
distributionCombiChoose.vue
...ation/distributionCombiChoose/distributionCombiChoose.vue
+74
-19
scenicCombiOrder.vue
pages/scenic/scenicCombiOrder/scenicCombiOrder.vue
+1
-1
scenicSingleOrder.vue
pages/scenic/scenicSingleOrder/scenicSingleOrder.vue
+1
-1
No files found.
pages/combination/distributionCombiChoose/distributionCombiChoose.vue
View file @
996811b5
...
...
@@ -345,7 +345,6 @@ export default {
let
token
=
uni
.
getStorageSync
(
'token'
)
if
(
token
)
{
uni
.
getLocation
({
type
:
'wgs84'
,
success
:
res
=>
{
let
latitude
=
res
.
latitude
//纬度
let
longitude
=
res
.
longitude
//经度
...
...
@@ -444,12 +443,23 @@ export default {
//清空数组
this
.
heightArr
=
[]
//获取中间盒子需要滚动时的高度
// #ifdef MP-WEIXIN
uni
.
createSelectorQuery
().
in
(
this
).
select
(
'.middle-top'
).
boundingClientRect
(
data
=>
{
if
(
data
){
this
.
middleTopHeight
=
data
.
height
}
}).
exec
()
// #endif
// #ifdef MP-ALIPAY
uni
.
createSelectorQuery
().
select
(
'.middle-top'
).
boundingClientRect
(
data
=>
{
if
(
data
){
this
.
middleTopHeight
=
data
.
height
}
}).
exec
()
// #endif
//获取中间盒子原本高度
// #ifdef MP-WEIXIN
uni
.
createSelectorQuery
().
in
(
this
).
select
(
'.middle-right'
).
boundingClientRect
(
data
=>
{
//获取中间盒子原本高度,默认中间盒子等于原本高度,滚动之后等于滚动高度
if
(
data
){
...
...
@@ -457,9 +467,21 @@ export default {
this
.
middleHeight
=
data
.
height
}
}).
exec
()
// #endif
//不要这样 多个的时候就会循环 varquery = uni.createSelectorQuery()
// #ifdef MP-ALIPAY
uni
.
createSelectorQuery
().
select
(
'.middle-right'
).
boundingClientRect
(
data
=>
{
//获取中间盒子原本高度,默认中间盒子等于原本高度,滚动之后等于滚动高度
if
(
data
){
this
.
originHeight
=
data
.
height
this
.
middleHeight
=
data
.
height
}
}).
exec
()
// #endif
//不要这样 var query = uni.createSelectorQuery() query.in(this)放入循环里面会多次循环
for
(
let
i
=
0
;
i
<
this
.
scenicList
.
length
;
i
++
){
// #ifdef MP-WEIXIN
uni
.
createSelectorQuery
().
in
(
this
).
select
(
`#merchant
${
i
}
`
).
boundingClientRect
(
data
=>
{
//获取商家列表各个元素的高度,并且把他们前后相加添加到一个数组里面
if
(
data
){
...
...
@@ -471,15 +493,38 @@ export default {
}
}
}).
exec
()
// #endif
// #ifdef MP-ALIPAY
uni
.
createSelectorQuery
().
select
(
`#merchant
${
i
}
`
).
boundingClientRect
(
data
=>
{
//获取商家列表各个元素的高度,并且把他们前后相加添加到一个数组里面
if
(
data
){
if
(
i
==
0
){
//取整,由于高度多数为小数,防止点击左边,滚动右边时出现bug
this
.
heightArr
.
push
(
parseInt
(
data
.
height
))
}
else
{
this
.
heightArr
.
push
(
parseInt
(
data
.
height
)
+
this
.
heightArr
[
i
-
1
])
}
}
}).
exec
()
// #endif
}
uni
.
getSystemInfo
({
complete
:(
info
)
=>
{
let
windowHeight
=
info
.
windowHeight
||
844
// #ifdef MP-WEIXIN
uni
.
createSelectorQuery
().
in
(
this
).
select
(
'.bottom'
).
boundingClientRect
(
data
=>
{
if
(
data
){
this
.
scrollHeight
=
windowHeight
-
data
.
height
-
this
.
topHeight
}
}).
exec
()
// #endif
// #ifdef MP-ALIPAY
uni
.
createSelectorQuery
().
select
(
'.bottom'
).
boundingClientRect
(
data
=>
{
if
(
data
){
this
.
scrollHeight
=
windowHeight
-
data
.
height
-
this
.
topHeight
}
}).
exec
()
// #endif
}
})
...
...
@@ -569,7 +614,7 @@ export default {
setTimeout
(()
=>
{
let
height
=
0
let
scrollTop
=
e
.
detail
.
scrollTop
uni
.
createSelectorQuery
().
in
(
this
).
select
(
'.banner'
).
boundingClientRect
(
data
=>
{
let
selectFun
=
(
data
)
=>
{
if
(
data
){
//20为中间盒子的top-20
height
=
data
.
height
+
this
.
middleTopHeight
-
20
-
this
.
topHeight
...
...
@@ -584,7 +629,17 @@ export default {
this
.
middleHeight
=
this
.
originHeight
}
}
}
// #ifdef MP-WEIXIN
uni
.
createSelectorQuery
().
in
(
this
).
select
(
'.banner'
).
boundingClientRect
(
data
=>
{
selectFun
(
data
)
}).
exec
()
// #endif
// #ifdef MP-ALIPAY
uni
.
createSelectorQuery
().
select
(
'.banner'
).
boundingClientRect
(
data
=>
{
selectFun
(
data
)
}).
exec
()
// #endif
},
5
)
},
...
...
pages/scenic/scenicCombiOrder/scenicCombiOrder.vue
View file @
996811b5
...
...
@@ -84,7 +84,7 @@
</view>
</scroll-view>
<text
v-else
class=
"no-date"
>
不可购买
</text>
<view
class=
"dateMore"
@
click=
"showCalendar(index)"
>
<view
class=
"dateMore"
@
click=
"showCalendar(index)"
v-if=
"item.priceStockList&&item.priceStockList.length > 0"
>
<view
class=
"date-more-content"
>
<view>
更多
</view>
<view>
日期
</view>
...
...
pages/scenic/scenicSingleOrder/scenicSingleOrder.vue
View file @
996811b5
...
...
@@ -83,7 +83,7 @@
</view>
</scroll-view>
<text
v-else
class=
"no-date"
>
不可购买
</text>
<view
class=
"dateMore"
@
click=
"showCalendar()"
>
<view
class=
"dateMore"
@
click=
"showCalendar()"
v-if=
"dateList.length > 0"
>
<view
class=
"date-more-content"
>
<view>
更多
</view>
<view>
日期
</view>
...
...
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