Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
take_order
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
和慭琛
take_order
Commits
e68b8f16
Commit
e68b8f16
authored
Jan 04, 2021
by
李俊赕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
photo-detail
parent
f928f1a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
10 deletions
+63
-10
detail.vue
take-order/pages/photo/detail.vue
+63
-10
No files found.
take-order/pages/photo/detail.vue
View file @
e68b8f16
...
@@ -3,8 +3,17 @@
...
@@ -3,8 +3,17 @@
<view
class=
"topView"
>
<view
class=
"topView"
>
<!--text class="topTitle">示范照片 (
{{
currentNumber
}}
/
{{
totalNumber
}}
)
</text-->
<!--text class="topTitle">示范照片 (
{{
currentNumber
}}
/
{{
totalNumber
}}
)
</text-->
</view>
</view>
<view
class=
"centerBackView"
>
<view
class=
"wrap"
>
<image
class=
"photoImage"
@
click=
"imageClick(current_image)"
:src=
"current_image"
mode=
"aspectFill"
></image>
<u-swiper
@
click=
"imageClick"
@
change=
"changeSwipter"
img-mode=
"scaleToFill"
bg-color=
"#333333"
:height=
"600"
:list=
"swiperList"
:autoplay=
"false"
:circular=
'false'
mode=
"dot"
></u-swiper>
</view>
</view>
<view
class=
"bottomView"
>
<view
class=
"bottomView"
>
<image
class=
"takeView"
:src=
"icon_gotake"
mode=
""
@
click=
"takeClick"
></image>
<image
class=
"takeView"
:src=
"icon_gotake"
mode=
""
@
click=
"takeClick"
></image>
...
@@ -14,9 +23,20 @@
...
@@ -14,9 +23,20 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
uSwiper
from
'@/uview-ui/components/u-swiper/u-swiper'
export
default
{
export
default
{
components
:{
uSwiper
},
data
()
{
data
()
{
return
{
return
{
// background: ['color1', 'color2', 'color3'],
// indicatorDots: true,
// autoplay: true,
// interval: 2000,
// duration: 500,
image_count
:
1
,
image_count
:
1
,
current_count
:
1
,
current_count
:
1
,
current_image
:
''
,
current_image
:
''
,
...
@@ -26,8 +46,32 @@
...
@@ -26,8 +46,32 @@
icon_arrow_down
:
'https://qn-static.banshouhui.com/arrow_down.png'
,
icon_arrow_down
:
'https://qn-static.banshouhui.com/arrow_down.png'
,
ifFirst
:
true
,
ifFirst
:
true
,
last_done_count
:
0
,
last_done_count
:
0
,
swiperList
:[],
windowHeight
:
0
,
}
},
watch
:{
images
(
val
){
let
list
=
val
.
map
(
img
=>
{
return
{
image
:
img
}
})
this
.
swiperList
=
list
// console.log(this.swiperList,'this.swiperList')
}
}
},
},
computed
:{
// swiperList(){
// console.log(this.images,'this.images')
// let list = this.images.map(img=>{
// return {
// image:img
// }
// })
// return list
// }
},
onLoad
(
e
)
{
onLoad
(
e
)
{
this
.
initData
(
e
)
this
.
initData
(
e
)
},
},
...
@@ -57,9 +101,7 @@
...
@@ -57,9 +101,7 @@
}
}
if
(
e
&&
e
.
images
){
if
(
e
&&
e
.
images
){
this
.
images
=
JSON
.
parse
(
e
.
images
)
this
.
images
=
[].
concat
(
JSON
.
parse
(
e
.
images
))
console
.
log
(
'images:'
)
console
.
log
(
this
.
images
)
}
}
uni
.
setNavigationBarTitle
({
uni
.
setNavigationBarTitle
({
...
@@ -75,8 +117,6 @@
...
@@ -75,8 +117,6 @@
//检查已拍照数量
//检查已拍照数量
checkDoneCount
:
function
(){
checkDoneCount
:
function
(){
let
pages
=
getCurrentPages
();
let
pages
=
getCurrentPages
();
let
currPage
=
pages
[
pages
.
length
-
1
];
let
currPage
=
pages
[
pages
.
length
-
1
];
this
.
done_count
=
currPage
.
data
.
done_count
this
.
done_count
=
currPage
.
data
.
done_count
...
@@ -115,12 +155,19 @@
...
@@ -115,12 +155,19 @@
},
},
//照片预览
//照片预览
imageClick
:
function
(
image
)
{
imageClick
:
function
(
index
)
{
let
currentImg
=
this
.
images
[
index
]
uni
.
previewImage
({
uni
.
previewImage
({
urls
:
[
image
]
urls
:
[
currentImg
],
current
:
index
})
},
changeSwipter
(
index
){
let
txt
=
'走线照片 ('
+
(
index
+
1
)
+
'/'
+
this
.
image_count
+
')'
uni
.
setNavigationBarTitle
({
title
:
txt
})
})
},
},
//拍照 点击
//拍照 点击
takeClick
:
function
()
{
takeClick
:
function
()
{
this
.
isFirst
=
false
this
.
isFirst
=
false
...
@@ -142,6 +189,12 @@
...
@@ -142,6 +189,12 @@
</
script
>
</
script
>
<
style
>
<
style
>
.wrap
{
width
:
100%
;
height
:
calc
(
100vh
-
600
rpx
);
background-color
:
#333
;
/* padding:0 40rpx; */
}
.backView
{
.backView
{
background-color
:
#FAFAFA
;
background-color
:
#FAFAFA
;
position
:
absolute
;
position
:
absolute
;
...
...
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