Commit bc930476 authored by 李俊赕's avatar 李俊赕

iphone6 适配

parent 0a2d0fb9
...@@ -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 {
......
<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%;
......
...@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment