|
@@ -269,12 +269,17 @@ export default {
|
|
|
|
|
|
// 上传采集图片
|
|
|
async chooseCollectImg(index) {
|
|
|
+ uni.showLoading()
|
|
|
+
|
|
|
if (!this.address) {
|
|
|
- // uni.showLoading()
|
|
|
- const lo = await this.$getAddress()
|
|
|
- this.address = lo.address || ''
|
|
|
- if (!this.address) {
|
|
|
- this.address = `${this.orderDetail.province}${this.orderDetail.city}${this.orderDetail.area}${this.orderDetail.street}`
|
|
|
+ try {
|
|
|
+ const lo = await this.$getAddress()
|
|
|
+ this.address = lo.address || ''
|
|
|
+ if (!this.address) {
|
|
|
+ this.address = `${this.orderDetail.province}${this.orderDetail.city}${this.orderDetail.area}${this.orderDetail.street}`
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ uni.hideLoading()
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -296,6 +301,9 @@ export default {
|
|
|
this.collectImgList.splice(index, 1, obj)
|
|
|
uni.hideLoading()
|
|
|
})
|
|
|
+ .catch(() => {
|
|
|
+ uni.hideLoading()
|
|
|
+ })
|
|
|
},
|
|
|
fail: err => {
|
|
|
uni.hideLoading()
|
|
@@ -306,12 +314,17 @@ export default {
|
|
|
|
|
|
// 选择故障图片
|
|
|
async chooseFaultImg(index) {
|
|
|
+ uni.showLoading()
|
|
|
+
|
|
|
if (!this.address) {
|
|
|
- uni.showLoading()
|
|
|
- const lo = await this.$getAddress()
|
|
|
- this.address = lo.address || ''
|
|
|
- if (!this.address) {
|
|
|
- this.address = `${this.orderDetail.province}${this.orderDetail.city}${this.orderDetail.area}${this.orderDetail.street}`
|
|
|
+ try {
|
|
|
+ const lo = await this.$getAddress()
|
|
|
+ this.address = lo.address || ''
|
|
|
+ if (!this.address) {
|
|
|
+ this.address = `${this.orderDetail.province}${this.orderDetail.city}${this.orderDetail.area}${this.orderDetail.street}`
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ uni.hideLoading()
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -333,6 +346,9 @@ export default {
|
|
|
this.faultImgList.splice(index, 1, obj)
|
|
|
uni.hideLoading()
|
|
|
})
|
|
|
+ .catch(() => {
|
|
|
+ uni.hideLoading()
|
|
|
+ })
|
|
|
},
|
|
|
fail: err => {
|
|
|
uni.hideLoading()
|