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
bc930476
Commit
bc930476
authored
Apr 06, 2021
by
李俊赕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iphone6 适配
parent
0a2d0fb9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
23 deletions
+44
-23
standard.vue
take-order/components/photo/standard.vue
+3
-0
preview.vue
take-order/pages/photo/preview.vue
+35
-18
take.vue
take-order/pages/photo/take.vue
+6
-5
No files found.
take-order/components/photo/standard.vue
View file @
bc930476
...
@@ -124,6 +124,9 @@
...
@@ -124,6 +124,9 @@
height
:
calc
(
100vh
-
var
(
--
window-top
)
-
200rpx
);
height
:
calc
(
100vh
-
var
(
--
window-top
)
-
200rpx
);
padding-top
:
100rpx
;
padding-top
:
100rpx
;
width
:
100%
;
width
:
100%
;
padding-bottom
:
0
;
padding-bottom
:
constant
(
safe-area-inset-bottom
);
padding-bottom
:
env
(
safe-area-inset-bottom
);;
}
}
.swiper-box
{
.swiper-box
{
...
...
take-order/pages/photo/preview.vue
View file @
bc930476
<
template
>
<
template
>
<view>
<view>
<view
class=
"contentView"
>
<view
class=
"contentView"
>
<image
class=
"pic"
:src=
"files[0]"
mode=
"aspectFit"
@
click=
"showPreviewFn"
></image>
<u-image
class=
"pic"
:src=
"files[0]"
bg-color=
"transparent"
></u-image>
<!--
<image
class=
"pic"
:src=
"files[0]"
v-lazy
mode=
"aspectFit"
@
click=
"showPreviewFn"
></image>
-->
</view>
</view>
<view
class=
"bottomView"
>
<view
class=
"bottomView"
>
<image
class=
"btn"
:src=
"btn_remake"
@
click=
"$u.debounce(remakePhoto, 500)"
></image>
<image
class=
"btn"
:src=
"btn_remake"
@
click=
"$u.debounce(remakePhoto, 500)"
></image>
...
@@ -92,7 +93,6 @@
...
@@ -92,7 +93,6 @@
})
})
}
}
}
}
uni
.
hideLoading
()
},
},
saveLocal
(
path
){
saveLocal
(
path
){
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
...
@@ -133,7 +133,7 @@
...
@@ -133,7 +133,7 @@
continuePhoto
()
{
continuePhoto
()
{
let
self
=
this
let
self
=
this
uni
.
showLoading
({
uni
.
showLoading
({
title
:
'图片保存中…
…
'
title
:
'图片保存中…'
})
})
self
.
confirmUpload
(
true
)
self
.
confirmUpload
(
true
)
},
},
...
@@ -146,27 +146,36 @@
...
@@ -146,27 +146,36 @@
"token"
:
self
.
token
,
"token"
:
self
.
token
,
"standardId"
:
self
.
standardId
,
"standardId"
:
self
.
standardId
,
"url"
:
s
,
"url"
:
s
,
}).
then
(
res
=>
{
}).
then
(
async
res
=>
{
console
.
log
(
res
,
"云服务保存图片"
);
console
.
log
(
res
,
"云服务保存图片"
);
if
(
res
.
result
)
{
if
(
res
.
result
)
{
// TODO 参数是否要来回传递
// TODO 参数是否要来回传递
self
.
saveTempToLocal
()
await
self
.
saveTempToLocal
()
const
photo
=
getApp
().
globalData
.
photo
const
photo
=
getApp
().
globalData
.
photo
photo
.
currentItemLength
=
photo
.
currentItemLength
+
1
photo
.
currentItemLength
=
photo
.
currentItemLength
+
1
// photo.currentItem.
uni
.
hideLoading
()
// 当前项的图片显示
// 当前项的图片显示
// 拍照项张数目增加 等于10张
// 拍照项张数目增加 等于10张
let
timer
=
setTimeout
(()
=>
{
if
(
photo
.
currentItemLength
<
10
){
if
(
photo
.
currentItemLength
<
10
){
uni
.
navigateBack
({
uni
.
navigateBack
({
delta
:
1
delta
:
1
})
})
}
else
{
}
else
{
uni
.
navigateBack
({
uni
.
navigateBack
({
delta
:
2
delta
:
2
})
})
}
}
// let timer = setTimeout(()=>{
},
2000
)
// if(photo.currentItemLength
<
10
){
// uni.navigateBack({
// delta:1
// })
// }else{
// uni.navigateBack({
// delta:2
// })
// }
// },2000)
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
title
:
'图片上传失败'
title
:
'图片上传失败'
...
@@ -207,7 +216,15 @@
...
@@ -207,7 +216,15 @@
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
}
}
/
deep
/
.u-image
{
height
:
100%
!
important
;
}
/
deep
/
.u-image__loading
{
background-color
:
transparent
!
important
;
}
/
deep
/
.u-image__error
{
background-color
:
transparent
!
important
;
}
.pic
{
.pic
{
flex
:
1
;
flex
:
1
;
width
:
100%
;
width
:
100%
;
...
...
take-order/pages/photo/take.vue
View file @
bc930476
...
@@ -31,9 +31,9 @@
...
@@ -31,9 +31,9 @@
:style=
"
{'width':750 + 'rpx','height': cameraHeight + 'rpx'}">
</canvas>
:style=
"
{'width':750 + 'rpx','height': cameraHeight + 'rpx'}">
</canvas>
<view
v-show=
"standardShow"
class=
"page-mask"
:z-index=
"10000"
>
<view
v-show=
"standardShow"
class=
"page-mask"
:z-index=
"10000"
>
<photo-standard
:currentItem=
"currentItem"
/>
<photo-standard
:currentItem=
"currentItem"
/>
<view
class=
"btn-close"
@
click=
"closeShadow"
>
<view
class=
"btn-close"
>
<image
class=
"icon icon-close"
mode=
"aspectFit"
src=
"/static/photo/icon-close.png"
>
<image
@
click=
"closeShadow"
class=
"icon icon-close"
mode=
"aspectFit"
src=
"/static/photo/icon-close.png"
>
</
cover-
image>
</image>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -536,8 +536,9 @@
...
@@ -536,8 +536,9 @@
position
:
absolute
;
position
:
absolute
;
left
:
0
;
left
:
0
;
right
:
0
;
right
:
0
;
bottom
:
constant
(
safe-area-inset-bottom
);
bottom
:
0
;
bottom
:
env
(
safe-area-inset-bottom
);
// bottom: constant(safe-area-inset-bottom);
// bottom: env(safe-area-inset-bottom);
z-index
:
5
;
z-index
:
5
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
height
:
200rpx
;
height
:
200rpx
;
...
...
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