Commit c098ad03 authored by Morson's avatar Morson
parents 44319549 decf9de4
......@@ -15,7 +15,7 @@
<script>
import qiniup from '@/components/upload/qiniup';
const app = getApp()
export default {
export default {
props: {},
mixins: [qiniup],
data() {
......@@ -28,12 +28,12 @@
files: [],
keys: [],
token: '',
product: '',
product: '',
allImages: []
}
},
created(e) {
// 获取照片选项对象
// 获取照片选项对象
console.log(getApp().globalData.photo.currentItem)
const product = app.globalData.photo.product
this.product = `?brandId=${product.brandId}&brand=${product.brandName}&classifyId=${product.classifyId}&systemId=${product.systemId}`
......@@ -61,8 +61,8 @@
if(!photo.tempPath){
return
}
let path = ''
if(photo.tempPath.origin){
let path = ''
if(photo.tempPath.origin){
// 保存原图到本地
path = photo.tempPath.origin
let result = await this.saveLocal(path)
......@@ -72,10 +72,10 @@
title: '已将照片原图保存到本地相册'
})
}
}
}
// if(photo.currentItem){
// photo.currentItem.imageList.unshift(photo.tempPath.mixWater)
// }
// }
// if(photo.productList && photo.productList[photo.topIndex]){
// const topArr = photo.productList[photo.topIndex]
......@@ -83,8 +83,8 @@
// topArr[photo.itemIndex].imageList.push(photo.tempPath.mixWater)
// }
// }
// photo.
if(photo.tempPath.mixWater){
// photo.
if(photo.tempPath.mixWater){
// 保存水印处理图片到本地
path = photo.tempPath.mixWater
let result1 = await this.saveLocal(path)
......@@ -117,37 +117,37 @@
},
// 重拍图片
remakePhoto() {
remakePhoto() {
this.$emit('changeType', 1)
},
finishPhoto(){
const photo = getApp().globalData.photo
photo.currentItemLength = 10
this.continuePhoto()
// 完成本项
this.continuePhoto()
// 完成本项
//this.$emit('finish')
},
// 确认图片
continuePhoto() {
continuePhoto() {
const photo = getApp().globalData.photo
let self = this
uni.showLoading({
title:'图片保存中…'
})
self.saveTempToLocal()
self.saveTempToLocal()
self.confirmUpload(true)
},
submitFile() {
const photo = getApp().globalData.photo
if (photo.currentItemLength < 10) photo.currentItemLength = photo.currentItemLength + 1
uni.hideLoading()
// 当前项的图片显示
// 拍照项张数目增加 等于10张
photo.allImages.unshift(this.fileMaps[0])
if(photo.currentItemLength<10){
this.$emit('changeType', 1)
}else{
this.$emit('finish')
submitFile() {
const photo = getApp().globalData.photo
if (photo.currentItemLength < 10) photo.currentItemLength = photo.currentItemLength + 1
uni.hideLoading()
// 当前项的图片显示
// 拍照项张数目增加 等于10张
photo.allImages.unshift(this.fileMaps[0])
if(photo.currentItemLength<10){
this.$emit('changeType', 1)
}else{
this.$emit('finish')
}
},
downloadImages() {
......@@ -198,7 +198,7 @@
}
.bottomView {
box-shadow: 0 0 1rpx 6rpx rgba(255,255,255,0.05);
//box-shadow: 0 0 1rpx 6rpx rgba(255,255,255,0.05);
background-color: #333333;
width: 100%;
padding:70rpx 0;
......
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