|
@@ -115,16 +115,20 @@
|
|
|
// 拍照或从相册选图片
|
|
|
goPhotograph() {
|
|
|
uni.chooseImage({
|
|
|
- count: 3, //默认9
|
|
|
+ count: 1, //默认9
|
|
|
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
|
|
sourceType: ['album','camera'], //从相册选择
|
|
|
success: (res) =>{
|
|
|
console.log(JSON.stringify(res.tempFilePaths));
|
|
|
- this.photograph = this.photograph.concat(res.tempFilePaths)
|
|
|
console.log(this.photograph.length,'this.photograph')
|
|
|
- saveImgToAliOss(res.tempFilePaths,function(ret){
|
|
|
- console.log(ret,'----------ret')
|
|
|
- _this.photograph = ret.data
|
|
|
+ uni.showLoading({
|
|
|
+ title:'正在保存图片...',
|
|
|
+ mask: true
|
|
|
+ })
|
|
|
+ saveImgToAliOss(res.tempFilePaths[0],(ret)=>{
|
|
|
+ // console.log(ret,'----------ret')
|
|
|
+ this.photograph.push(ret.data)
|
|
|
+ // _this.photograph = ret.data
|
|
|
uni.hideLoading()
|
|
|
})
|
|
|
}
|