Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a144def5
authored
Jul 04, 2024
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit 拦截弹框时滑动切换
1 parent
379346b5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
27 deletions
pages/equity/detail/components/Guarantee.vue
pages/equity/detail/detail.vue
pages/equity/detail/components/Guarantee.vue
View file @
a144def
...
...
@@ -6,20 +6,37 @@
* @LastEditTime: 2024-07-04 16:07:51
-->
<
template
>
<view
class=
"layout"
@
click
.
prevent=
"touch"
>
<wnCanvas
:drawStatus=
"penSwitch"
:canvasId=
"`c-$
{madiaId}`" custom @scale="$emit('scale',$event)">
<view
class=
"layout"
@
click
.
prevent=
"touch"
>
<wnCanvas
:drawStatus=
"penSwitch"
:canvasId=
"`c-$
{madiaId}`"
custom
@scale="$emit('scale',$event)"
>
<template
slot=
"customContent"
>
<view
class=
"title"
>
{{
title
}}
</view>
<view
class=
"container"
>
<view
class=
"container-left"
>
<view
v-for=
"(item, index) in views"
:key=
"item.name"
class=
"item"
@
click
.
stop=
"showSection(index)"
:class=
"item.class"
:style=
"item.style"
>
<view
v-for=
"(item, index) in views"
:key=
"item.name"
class=
"item"
@
click
.
stop=
"showSection(index)"
:class=
"item.class"
:style=
"item.style"
>
<view
class=
"image-container"
>
<image
:src=
"item.detailUrl"
class=
"item-image"
/>
<image
:src=
"item.detailUrl"
class=
"item-image"
/>
<view
class=
"item-text"
>
{{
item
.
name
}}
</view>
</view>
<view
class=
"details-container"
>
<view
:class=
"['details-section', itemClass(index)]"
>
<view
:class=
"['details-section', itemClass(index)]"
>
<view
class=
"section-title"
>
{{
item
.
name
}}
</view>
<view
class=
"section-description"
>
{{
item
.
description
}}
</view>
</view>
...
...
@@ -27,18 +44,29 @@
</view>
</view>
<view
class=
"container-right"
>
<image
src=
"https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/6-15.webp"
mode=
"widthFix"
class=
"serice-image"
/>
<image
src=
"https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/6-15.webp"
mode=
"widthFix"
class=
"serice-image"
/>
<view
class=
"ul"
>
<view
class=
"ul-title"
>
高价值零部件
</view>
<view
class=
"li-item"
v-for=
"i in ulList"
:key=
"i.index"
@
click=
"open(i.flagName)"
>
<view
class=
"li-item"
v-for=
"i in ulList"
:key=
"i.index"
@
click=
"open(i.flagName)"
>
<view
class=
"li-content"
>
<view
class=
"li-item-content"
>
<view
class=
"li-number"
>
{{
i
.
index
}}
</view>
{{
i
.
name
}}
</view>
<image
v-if=
"i.hasArrow"
<image
v-if=
"i.hasArrow"
src=
"https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/icon-arrow.webp"
mode=
"scaleToFill"
class=
"icon-arrow"
/>
mode=
"scaleToFill"
class=
"icon-arrow"
/>
</view>
<view
class=
"li-value"
>
{{
i
.
value
}}
</view>
</view>
...
...
@@ -47,7 +75,11 @@
</view>
</
template
>
</wnCanvas>
<partsPop
ref=
"partsRef"
@
close=
"close"
:screenList=
"screenList"
></partsPop>
<partsPop
ref=
"partsRef"
@
close=
"close"
:screenList=
"screenList"
></partsPop>
</view>
</template>
<
script
>
...
...
@@ -62,8 +94,8 @@ export default {
ulList
:
Array
,
screenList
:
Array
},
components
:
{
partsPop
},
data
()
{
components
:
{
partsPop
},
data
()
{
return
{
showIndex
:
-
1
,
};
...
...
@@ -77,19 +109,19 @@ export default {
watchStatus
()
{
this
.
showIndex
=
-
1
this
.
$refs
.
partsRef
.
close
()
this
.
$emit
(
'
closeProductModel'
)
this
.
$emit
(
'
onProductModel'
,
false
)
}
},
methods
:
{
close
()
{
this
.
$emit
(
'
closeProductModel'
)
close
()
{
this
.
$emit
(
'
onProductModel'
,
false
)
},
open
(
name
)
{
open
(
name
)
{
console
.
log
(
name
);
if
(
name
)
this
.
$refs
.
partsRef
.
show
(
name
)
this
.
$emit
(
'o
penProductModel'
)
this
.
$emit
(
'o
nProductModel'
,
true
)
},
showSection
(
index
)
{
showSection
(
index
)
{
console
.
log
(
index
);
if
(
this
.
showIndex
===
index
)
{
// 如果当前点击的项已经是翻转状态,则关闭它
...
...
@@ -99,10 +131,10 @@ export default {
this
.
showIndex
=
index
;
}
},
touch
()
{
touch
()
{
this
.
showIndex
=
-
1
;
},
itemClass
(
index
)
{
itemClass
(
index
)
{
return
this
.
showIndex
==
index
?
'show'
:
'hide'
}
},
...
...
@@ -114,7 +146,7 @@ export default {
width
:
100vw
;
height
:
100vh
;
position
:
relative
;
background-image
:
url(
"@/assets/images/media/media-bg.webp"
)
;
background-image
:
url(
'@/assets/images/media/media-bg.webp'
)
;
background-size
:
100%
;
.title
{
...
...
@@ -148,7 +180,7 @@ export default {
}
&
::after
{
content
:
""
;
content
:
''
;
display
:
block
;
clear
:
both
;
}
...
...
pages/equity/detail/detail.vue
View file @
a144def
...
...
@@ -41,6 +41,7 @@
@
scale=
"scale"
:ulList=
"item.ulList"
:screenList=
"item.screenList"
@
onProductModel=
"productModelStatus = $event"
/>
</view>
</
template
>
...
...
@@ -115,7 +116,8 @@ export default {
startY
:
null
,
screenWidth
:
null
,
scaleValueObject
:
{},
showPayPage
:
false
showPayPage
:
false
,
productModelStatus
:
false
};
},
computed
:
{
...
...
@@ -180,7 +182,7 @@ export default {
},
touchEnd
(
e
)
{
try
{
let
{
toolList
,
drawStatus
,
startX
,
screenWidth
,
id
,
scaleValueObject
}
=
this
let
{
toolList
,
drawStatus
,
startX
,
screenWidth
,
id
,
scaleValueObject
,
productModelStatus
}
=
this
if
(
!
e
||
!
e
.
changedTouches
||
drawStatus
||
toolList
.
length
==
0
||
e
.
changedTouches
.
length
===
0
)
return
let
halfScreenWidth
=
screenWidth
/
2
,
touch
=
e
.
changedTouches
[
0
],
...
...
@@ -188,7 +190,7 @@ export default {
index
=
toolList
.
findIndex
(
item
=>
item
.
id
==
id
)
if
(
Math
.
abs
(
this
.
startY
-
touch
.
pageY
)
>
100
)
return
if
(
!
scaleValueObject
[
id
])
scaleValueObject
[
id
]
=
1
if
(
isDistanceSignificant
&&
index
!=
-
1
&&
scaleValueObject
[
id
]
==
1
)
{
if
(
isDistanceSignificant
&&
index
!=
-
1
&&
scaleValueObject
[
id
]
==
1
&&
!
productModelStatus
)
{
const
nextId
=
this
.
getNextId
(
index
,
toolList
,
startX
,
halfScreenWidth
)
this
.
$emit
(
'update:id'
,
nextId
)
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment