| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {uploadImage} from "@/common/upload"; |
| | | |
| | | function groupBy(array, key){ |
| | | return array.reduce((acc, item) => { |
| | | const groupKey = String(item[key]); |
| | |
| | | sizeType: ['original', 'compressed'], |
| | | sourceType: ['album', 'camera'], |
| | | success: (res) => { |
| | | const tempFilePaths = res.tempFilePaths; |
| | | const imgUrl = tempFilePaths[0]; |
| | | uploadImage(imgUrl).then(res2=>{ |
| | | this.uploadAreas[index].imageUrl = res.url; |
| | | // const tempFilePath = res.tempFilePaths[0]; |
| | | // // 上传图片到服务器 |
| | | // this.uploadAreaPic(tempFilePath, index); |
| | | }) |
| | | |
| | | const tempFilePath = res.tempFilePaths[0]; |
| | | // 上传图片到服务器 |
| | | this.uploadAreaPic(tempFilePath, index); |
| | | } |
| | | }); |
| | | }, |