Commit 40dcf1e5 authored by Damon's avatar Damon

保存原图设置

parent 82dcab17
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
</view> --> </view> -->
<view class="pics u-flex u-flex-wrap"> <view class="pics u-flex u-flex-wrap">
<view class="img-list" v-for="(item,index) in imgList" :key="index"> <view class="img-list" v-for="(item,index) in imgList" :key="index">
<u-image class="pic" width="160" height="160" :src="item.path ? item.path : item.src + '?imageView2/1/w/100/h/100/q/75'" :border-radius="10" @click.stop="prviewImage(item.path,index)"></u-image> <u-image class="pic" width="160" height="160" :src="item.path ? item.path : item.src + '?imageView2/1/w/100/h/100/q/75'" :border-radius="10" @click.stop="prviewImage(item,index)"></u-image>
<view class="icon-del-box" @click.stop="delFile(index)"> <view class="icon-del-box" @click.stop="delFile(index)">
<view class="icon-del"></view> <view class="icon-del"></view>
<view class="icon-del rotate"></view> <view class="icon-del rotate"></view>
...@@ -129,18 +129,16 @@ ...@@ -129,18 +129,16 @@
}, },
closeTake(val) { closeTake(val) {
if(val && val.length > 0){ if(val && val.length > 0){
val.forEach((item,index,array)=>{ val.forEach(item=>{
item.path = item.key
item.src = item.key
this.imgList.push(item) this.imgList.push(item)
}) })
this.setValue() this.setValue()
} }
this.takeStatus = false this.takeStatus = false
}, },
prviewImage(url, index) { prviewImage(item, index) {
uni.previewImage({ uni.previewImage({
urls: [url], urls: [item.path ? item.path : item.src],
current: index current: index
}); });
}, },
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
return return
} }
let path = '' let path = ''
if(photo.tempPath.origin){ if(photo.tempPath.origin && photo.waterSetting.hasOrigin){
// 保存原图到本地 // 保存原图到本地
path = photo.tempPath.origin path = photo.tempPath.origin
let result = await this.saveLocal(path) let result = await this.saveLocal(path)
...@@ -136,7 +136,12 @@ ...@@ -136,7 +136,12 @@
uni.hideLoading() uni.hideLoading()
// 当前项的图片显示 // 当前项的图片显示
// 拍照项张数目增加 等于10张 // 拍照项张数目增加 等于10张
photo.allImages.unshift(this.fileMaps[0]) photo.allImages.unshift(
{
key: photo.tempPath.mixWater,
src: this.fileMaps[0].key
}
)
if(photo.currentItemLength<10){ if(photo.currentItemLength<10){
this.$emit('changeType', 1) this.$emit('changeType', 1)
}else{ }else{
......
...@@ -11,7 +11,7 @@ export default { ...@@ -11,7 +11,7 @@ export default {
}; };
}, },
created() { created() {
console.log(uploader,'uploader') // console.log(uploader,'uploader')
// this.initQiniu() // this.initQiniu()
}, },
methods: { methods: {
......
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