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 9eb69e37
authored
Jun 04, 2024
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
案例
1 parent
5bbe555c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
236 additions
and
3 deletions
pages.json
pages/boutique/case.vue
pages/boutique/invitation.vue
pages/boutique/preview.vue
pages.json
View file @
9eb69e3
...
@@ -86,6 +86,13 @@
...
@@ -86,6 +86,13 @@
}
}
},
},
{
{
"path"
:
"pages/boutique/preview"
,
"style"
:
{
"navigationStyle"
:
"custom"
,
"disableSwipeBack"
:
true
}
},
{
"path"
:
"uni_modules/uni-upgrade-center-app/pages/upgrade-popup"
,
"path"
:
"uni_modules/uni-upgrade-center-app/pages/upgrade-popup"
,
"style"
:
{
"style"
:
{
"disableScroll"
:
true
,
"disableScroll"
:
true
,
...
...
pages/boutique/case.vue
View file @
9eb69e3
...
@@ -6,10 +6,18 @@
...
@@ -6,10 +6,18 @@
type=
"text"
type=
"text"
class=
"input"
class=
"input"
:value=
"name"
:value=
"name"
placeholder=
"搜索图片/视频名称"
maxlength=
"50"
maxlength=
"50"
@
blur=
"input($event)"
@
blur=
"input($event)"
@
focus=
"focus"
/>
/>
<view
class=
"input-tips"
v-if=
"!isSearch"
>
搜索图片/视频名称
<uni-icons
type=
"search"
class=
"icon"
color=
"#999"
size=
"20"
></uni-icons
></view>
</view>
</view>
<scroll-view
<scroll-view
...
@@ -22,9 +30,10 @@
...
@@ -22,9 +30,10 @@
<template
v-if=
"list.length"
>
<template
v-if=
"list.length"
>
<template
v-for=
"item in list"
>
<template
v-for=
"item in list"
>
<view
class=
"item"
:key=
"item.id"
>
<view
class=
"item"
:key=
"item.id"
>
<view
class=
"item-autio"
>
<view
class=
"item-autio"
@
click=
"playVideo(item)"
>
<image
:src=
"item.detailUrl"
class=
"cover-box"
></image>
<image
:src=
"item.detailUrl"
class=
"cover-box"
></image>
<image
<image
v-if=
"item.sourceType == 2"
src=
"../../assets/images/boutique/play.png"
src=
"../../assets/images/boutique/play.png"
class=
"play-box"
class=
"play-box"
></image>
></image>
...
@@ -42,6 +51,17 @@
...
@@ -42,6 +51,17 @@
</view>
</view>
</scroll-view>
</scroll-view>
</view>
</view>
<view
class=
"popup-box"
v-if=
"popupShow"
>
<view
class=
"nav-bar"
>
<view
class=
"back"
@
click=
"back"
>
<uni-icons
type=
"left"
:size=
"24"
color=
"#fff"
></uni-icons>
</view>
<view
class=
"title"
>
{{ title }}
</view>
</view>
<view
class=
"popup-body"
>
<video
ref=
"videoPlayer"
:src=
"videoSrc"
controls
></video>
</view>
</view>
</view>
</view>
</template>
</template>
<
script
type=
"text/ecmascript-6"
>
<
script
type=
"text/ecmascript-6"
>
...
@@ -52,6 +72,9 @@ export default {
...
@@ -52,6 +72,9 @@ export default {
return
{
return
{
name
:
''
,
name
:
''
,
list
:
[],
list
:
[],
popupShow
:
false
,
isSearch
:
false
,
videoSrc
:
'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/2minute-demo.mp4'
,
}
}
},
},
props
:
{
props
:
{
...
@@ -60,14 +83,29 @@ export default {
...
@@ -60,14 +83,29 @@ export default {
default
:
()
=>
[]
default
:
()
=>
[]
}
}
},
},
beforeDestroy
()
{
this
.
popupShow
=
false
},
mounted
()
{
mounted
()
{
// this.list = utils.deepClone(this.views)
// this.list = utils.deepClone(this.views)
console
.
log
(
this
.
views
)
console
.
log
(
this
.
views
)
this
.
list
=
this
.
views
this
.
list
=
this
.
views
},
},
methods
:
{
methods
:
{
playVideo
(
item
)
{
const
{
tabName
,
sourceType
,
detailUrl
}
=
item
uni
.
navigateTo
({
url
:
`/pages/boutique/preview?tabName=
${
tabName
}
&sourceType=
${
sourceType
}
&detailUrl=
${
detailUrl
}
`
})
},
focus
()
{
this
.
isSearch
=
true
},
input
(
e
)
{
input
(
e
)
{
this
.
name
=
e
.
detail
.
value
this
.
name
=
e
.
detail
.
value
if
(
this
.
name
==
''
)
this
.
isSearch
=
false
this
.
list
=
this
.
views
.
filter
(
i
=>
i
.
tabName
.
includes
(
this
.
name
))
this
.
list
=
this
.
views
.
filter
(
i
=>
i
.
tabName
.
includes
(
this
.
name
))
},
},
},
},
...
@@ -86,14 +124,33 @@ export default {
...
@@ -86,14 +124,33 @@ export default {
padding
:
64
rpx
;
padding
:
64
rpx
;
margin-top
:
120
rpx
;
margin-top
:
120
rpx
;
.input-box
{
.input-box
{
position
:
relative
;
.input
{
.input
{
padding-left
:
30
rpx
;
padding-left
:
30
rpx
;
text-align
:
center
;
height
:
80
rpx
;
height
:
80
rpx
;
background
:
#ffffff
;
background
:
#ffffff
;
border
:
3
rpx
solid
#a8c1ff
;
border
:
3
rpx
solid
#a8c1ff
;
border-radius
:
16
rpx
;
border-radius
:
16
rpx
;
width
:
100%
;
width
:
100%
;
line-height
:
80
rpx
;
line-height
:
80
rpx
;
z-index
:
1
;
}
.input-tips
{
color
:
#999999
;
position
:
absolute
;
left
:
0
;
top
:
0
;
height
:
80
rpx
;
width
:
100%
;
text-align
:
center
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
pointer-events
:
none
;
.icon
{
margin-left
:
12
rpx
;
}
}
}
}
}
.list
{
.list
{
...
@@ -132,6 +189,44 @@ export default {
...
@@ -132,6 +189,44 @@ export default {
}
}
}
}
}
}
.popup-box
{
position
:
fixed
;
top
:
0
;
left
:
0
;
width
:
100vw
;
height
:
100vh
;
background
:
#000
;
padding
:
100
rpx
0
rpx
;
z-index
:
100
;
.nav-bar
{
width
:
100%
;
height
:
96
rpx
;
.back
{
height
:
100%
;
aspect-ratio
:
1
/
1
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.title
{
position
:
absolute
;
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
font-weight
:
500
;
font-size
:
32
rpx
;
color
:
#ffffff
;
}
}
.popup-body
{
width
:
100%
;
height
:
100%
;
video
{
width
:
100%
;
height
:
100%
;
}
}
}
.nothing
{
.nothing
{
width
:
100vw
;
width
:
100vw
;
flex-direction
:
column
;
flex-direction
:
column
;
...
...
pages/boutique/invitation.vue
View file @
9eb69e3
...
@@ -6,10 +6,18 @@
...
@@ -6,10 +6,18 @@
type=
"text"
type=
"text"
class=
"input"
class=
"input"
:value=
"customerNameOrPhone"
:value=
"customerNameOrPhone"
placeholder=
"搜索客户姓名/电话"
maxlength=
"11"
maxlength=
"11"
@
blur=
"input($event)"
@
blur=
"input($event)"
@
focus=
"focus"
/>
/>
<view
class=
"input-tips"
v-if=
"!isSearch"
>
搜索客户姓名/电话
<uni-icons
type=
"search"
class=
"icon"
color=
"#999"
size=
"20"
></uni-icons
></view>
</view>
</view>
<scroll-view
<scroll-view
...
@@ -64,6 +72,7 @@ export default {
...
@@ -64,6 +72,7 @@ export default {
data
()
{
data
()
{
return
{
return
{
customerNameOrPhone
:
''
,
customerNameOrPhone
:
''
,
isSearch
:
false
,
list
:
[{
list
:
[{
id
:
1
,
id
:
1
,
carModel
:
1
,
carModel
:
1
,
...
@@ -96,9 +105,15 @@ export default {
...
@@ -96,9 +105,15 @@ export default {
},
},
input
(
e
)
{
input
(
e
)
{
this
.
customerNameOrPhone
=
e
.
detail
.
value
this
.
customerNameOrPhone
=
e
.
detail
.
value
if
(
this
.
customerNameOrPhone
==
''
)
this
.
isSearch
=
false
this
.
pageNum
=
1
this
.
pageNum
=
1
this
.
getRecordList
()
this
.
getRecordList
()
},
},
focus
()
{
this
.
isSearch
=
true
},
getRecordList
()
{
getRecordList
()
{
const
{
pageNum
,
pageSize
,
customerNameOrPhone
}
=
this
,
const
{
pageNum
,
pageSize
,
customerNameOrPhone
}
=
this
,
userInfo
=
uni
.
$storage
.
get
(
"userInfo"
),
userInfo
=
uni
.
$storage
.
get
(
"userInfo"
),
...
@@ -154,6 +169,7 @@ export default {
...
@@ -154,6 +169,7 @@ export default {
padding
:
64
rpx
;
padding
:
64
rpx
;
margin-top
:
120
rpx
;
margin-top
:
120
rpx
;
.input-box
{
.input-box
{
position
:
relative
;
.input
{
.input
{
padding-left
:
30
rpx
;
padding-left
:
30
rpx
;
height
:
80
rpx
;
height
:
80
rpx
;
...
@@ -164,6 +180,22 @@ export default {
...
@@ -164,6 +180,22 @@ export default {
line-height
:
80
rpx
;
line-height
:
80
rpx
;
text-align
:
center
;
text-align
:
center
;
}
}
.input-tips
{
color
:
#999999
;
position
:
absolute
;
left
:
0
;
top
:
0
;
height
:
80
rpx
;
width
:
100%
;
text-align
:
center
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
pointer-events
:
none
;
.icon
{
margin-left
:
12
rpx
;
}
}
}
}
.record-box
{
.record-box
{
height
:
calc
(
100vh
-
300
rpx
);
height
:
calc
(
100vh
-
300
rpx
);
...
...
pages/boutique/preview.vue
0 → 100644
View file @
9eb69e3
<
template
>
<view
class=
"popup-box"
>
<view
class=
"nav-bar"
>
<view
class=
"back"
@
click=
"back"
>
<uni-icons
type=
"left"
:size=
"24"
color=
"#fff"
></uni-icons>
</view>
<view
class=
"title"
>
{{
title
}}
</view>
</view>
<view
class=
"popup-body"
>
<video
ref=
"videoPlayer"
:src=
"videoSrc"
controls
v-if=
"sourceType == 2"
></video>
<view
class=
"img-detail"
v-else
><image
:src=
"detailUrl"
:style=
"
{ width: width + 'px' }"
/>
</view>
</view>
</view>
</
template
>
<
script
type=
"text/ecmascript-6"
>
export
default
{
data
()
{
return
{
width
:
0
,
videoSrc
:
'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/2minute-demo.mp4'
,
title
:
'11'
,
sourceType
:
''
,
detailUrl
:
''
}
},
onLoad
(
options
)
{
const
{
tabName
,
sourceType
,
detailUrl
}
=
options
this
.
title
=
tabName
this
.
sourceType
=
sourceType
this
.
detailUrl
=
detailUrl
const
img
=
new
Image
()
img
.
onload
=
()
=>
{
this
.
width
=
document
.
querySelector
(
'.img-detail'
).
offsetHeight
*
img
.
height
/
img
.
width
console
.
log
(
this
.
width
)
}
img
.
src
=
detailUrl
},
methods
:
{
back
()
{
uni
.
navigateBack
()
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.popup-box
{
position
:
fixed
;
top
:
0
;
left
:
0
;
width
:
100vw
;
height
:
100vh
;
background
:
#000
;
padding
:
100
rpx
0
rpx
;
z-index
:
100
;
.nav-bar
{
width
:
100%
;
height
:
96
rpx
;
margin-bottom
:
50
rpx
;
display
:
flex
;
align-items
:
center
;
.back
{
height
:
100%
;
aspect-ratio
:
1
/
1
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.title
{
color
:
#fff
;
flex
:
1
;
font-size
:
32
rpx
;
text-align
:
center
;
}
}
.popup-body
{
width
:
100%
;
height
:
calc
(
100%
-
200
rpx
);
video
{
width
:
100%
;
height
:
100%
;
}
.img-detail
{
height
:
100%
;
text-align
:
center
;
image
{
height
:
100%
;
width
:
auto
;
}
}
}
}
</
style
>
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