Commit 40dcf1e5 authored by Damon's avatar Damon

保存原图设置

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