Commit b43fa97b by cen

fix: 报错

1 parent 38f5fa34
No preview for this file type
......@@ -21,7 +21,7 @@ const HOST = {
dj: djDomain,
eva: evaluationDomain,
merchant: merchantDomain,
ip: 'http://192.168.1.169:8292'
ip: 'http://192.168.1.221:5003'
}
uni.$api = api
// uni.$lock = false
......@@ -33,7 +33,7 @@ uni.$logger = logger
uni.$dbTempRecord = new DBRecord()
uni.$dbManager = new DBManager()
uni.$track = new Track()
console.log('init.js', HOST['eva'])
uni.signHttpConfig = {
baseURL: `${HOST['eva']}${pathEnum.evaluation}`,
timeout: 300000,
......@@ -68,12 +68,6 @@ uni.signHttpConfig = {
},
error: (error, config) => {
console.log('error事件触发', error, config)
uni.hideLoading()
uni.showToast({
title: error.msg || '请求失败',
icon: 'none'
})
return Promise.reject(error)
},
logout: config => {
console.log('logout事件触发', config)
......
......@@ -87,7 +87,7 @@
<uni-calendar class="calendar" :showMonth="false" @change="calendarChange" />
</template>
</GeneralPopup>
<GeneralPopup ref="tipsPopup" popupClass="tipsPopup" type="center" :showClose="true" :showTitle="false" @confirm="confirmTips">
<GeneralPopup ref="tipsPopup" popupClass="tipsPopup" type="center" :showClose="true" :showTitle="false" @confirm="confirmTips" :noTitle="true">
<template #content>
<view>
<image class="tipsPopupBg" :src="bg" />
......@@ -99,6 +99,17 @@
</template>
</GeneralPopup>
<NoticePopup ref="notice" title="重要提示" text="当前页面暂未保存,是否确认退出" type="warning"></NoticePopup>
<GeneralPopup ref="editTipsPopup" popupClass="tipsPopup" type="center" :showClose="true" :showTitle="false" @confirm="confirmTips" :noTitle="true">
<template #content>
<view>
<image class="tipsPopupBg" :src="bg" />
<view class="title">提示</view>
<view class="tipsConent">
<view>您未对表单内容进行任何修改, 请修改后重新提交。</view>
</view>
</view>
</template>
</GeneralPopup>
</view>
</template>
<script>
......@@ -607,6 +618,16 @@ export default {
}
}
})
const licensePlateField = that.formFields.find(field => field.key === 'licensePlate')
if (licensePlateField) {
that.$set(licensePlateField, 'disabled', true)
}
} else {
uni.hideLoading()
uni.showToast({
title: res.data.msg || '请求失败',
icon: 'none'
})
}
})
},
......@@ -831,6 +852,12 @@ export default {
console.log('用户点击了取消')
})
}
} else {
uni.hideLoading()
uni.showToast({
title: res.data.msg || '请求失败',
icon: 'none'
})
}
})
}
......@@ -973,12 +1000,20 @@ export default {
})
.then(res => {
console.log('res:', res)
if (res.data.data.status == 1) {
this.formData.carBaseReqDTO.vin = res.data.data.vin
uni.hideLoading()
if (res.data.code == 0) {
if (res.data.data.status == 1) {
this.formData.carBaseReqDTO.vin = res.data.data.vin
uni.hideLoading()
} else {
uni.showToast({ title: res.data.data.errorMessage, icon: 'none' })
uni.hideLoading()
}
} else {
uni.showToast({ title: res.data.data.errorMessage, icon: 'none' })
uni.hideLoading()
uni.showToast({
title: res.data.msg || '请求失败',
icon: 'none'
})
}
})
},
......@@ -994,18 +1029,26 @@ export default {
.then(res => {
console.log('res:', res)
uni.hideLoading()
if (res.data.data.status == 1) {
this.formData.carBaseReqDTO.engineNumber = res.data.data.engineNumber
this.formData.carBaseReqDTO.licensePlate = res.data.data.licensePlate
this.formData.carBaseReqDTO.vin = res.data.data.vin
this.formData.carBaseReqDTO.registrationDate = res.data.data.registrationDate
this.formData.carLicenseReqDTO.previousOwnerAddress = res.data.data.previousOwnerAddress
this.formData.carLicenseReqDTO.previousOwnerName = res.data.data.previousOwnerName
this.formData.carLicenseReqDTO.carSeriesName = res.data.data.carSeriesName
this.formData.carLicenseReqDTO.carTypeName = res.data.data.carTypeName
if (res.data.code == 0) {
if (res.data.data.status == 1) {
this.formData.carBaseReqDTO.engineNumber = res.data.data.engineNumber
this.formData.carBaseReqDTO.licensePlate = res.data.data.licensePlate
this.formData.carBaseReqDTO.vin = res.data.data.vin
this.formData.carBaseReqDTO.registrationDate = res.data.data.registrationDate
this.formData.carLicenseReqDTO.previousOwnerAddress = res.data.data.previousOwnerAddress
this.formData.carLicenseReqDTO.previousOwnerName = res.data.data.previousOwnerName
this.formData.carLicenseReqDTO.carSeriesName = res.data.data.carSeriesName
this.formData.carLicenseReqDTO.carTypeName = res.data.data.carTypeName
} else {
uni.hideLoading()
uni.showToast({ title: res.data.data.errorMessage, icon: 'none' })
}
} else {
uni.hideLoading()
uni.showToast({ title: res.data.data.errorMessage, icon: 'none' })
uni.showToast({
title: res.data.msg || '请求失败',
icon: 'none'
})
}
})
},
......@@ -1066,6 +1109,12 @@ export default {
delta: 1
})
}, 300)
} else {
uni.hideLoading()
uni.showToast({
title: res.data.msg || '请求失败',
icon: 'none'
})
}
} else if (this.query.type === 'edit') {
const res = await uni.$api.evaluationApi.evalOrderUpdate(this.formData)
......@@ -1081,6 +1130,16 @@ export default {
delta: 1
})
}, 300)
} else {
if (res.data.code == 3004) {
this.$refs.editTipsPopup.open()
} else {
uni.hideLoading()
uni.showToast({
title: res.data.msg || '请求失败',
icon: 'none'
})
}
}
}
},
......
......@@ -9,10 +9,11 @@
<!-- 显示已上传的媒体列表 -->
<view v-for="(media, index) in getMedia(field)" :key="index" class="uploaded-media-container">
<!-- 图片显示 -->
<image v-if="isImage(media)" :src="media.url || media" mode="aspectFill" class="uploaded-media" @click.stop="previewMedia(media, 1)"></image>
<image v-if="field.accept == 'image'" :src="media.url || media" mode="aspectFill" class="uploaded-media" @click.stop="previewMedia(media, 1)"></image>
<!-- 视频显示 -->
<view v-else class="video-container" @click.stop="previewMedia(media, 2)">
<!-- <video :src="media.url || media" mode="aspectFill" controls class="uploaded-media"></video> -->
<image :src="media.url + videoProcess" mode="aspectFill" @click.stop="previewMedia(media, 1)"></image>
<view class="video-play-icon">
<view class="sprites-icon icon-play"></view>
......@@ -235,6 +236,8 @@ export default {
// 获取指定字段的媒体数组
getMedia(field) {
console.log('this.mediaData', this.mediaData)
console.log('this.mediaData[field.key]', field)
// 确保返回的是数组
return Array.isArray(this.mediaData[field.key]) ? this.mediaData[field.key] : []
},
......
......@@ -262,6 +262,12 @@ export default {
})
this.pdfUrl = res.fileDownloadUrl
console.log('this.pdfUrl', this.pdfUrl)
} else {
uni.hideLoading()
uni.showToast({
title: res.data.msg || '请求失败',
icon: 'none'
})
}
})
})
......@@ -313,6 +319,12 @@ export default {
delta: 1
})
}, 500)
} else {
uni.hideLoading()
uni.showToast({
title: res.data.msg || '请求失败',
icon: 'none'
})
}
},
handleImageUpload(field) {
......
......@@ -548,6 +548,12 @@ export default {
console.log('res:', res)
if (res.data.code == 0) {
that.detailsInfo = res.data.data
} else {
uni.hideLoading()
uni.showToast({
title: res.data.msg || '请求失败',
icon: 'none'
})
}
})
},
......@@ -620,6 +626,12 @@ export default {
uni.navigateTo({
url: `${url}`
})
} else {
uni.hideLoading()
uni.showToast({
title: res.data.msg || '请求失败',
icon: 'none'
})
}
})
}
......
......@@ -270,6 +270,11 @@ export default {
// this.dataList = res.records
this.$refs.paging.complete(res.data.data.records)
} else {
uni.hideLoading()
uni.showToast({
title: res.data.msg || '请求失败',
icon: 'none'
})
this.$refs.paging.complete(false)
console.log(err)
}
......@@ -292,6 +297,12 @@ export default {
})
// this.$set(this.typeList, item.count, res[item.keyNum])
console.log('this.typeList:', this.typeList)
} else {
uni.hideLoading()
uni.showToast({
title: res.data.msg || '请求失败',
icon: 'none'
})
}
})
},
......@@ -338,6 +349,12 @@ export default {
})
this.currentPage = 1
this.search()
} else {
uni.hideLoading()
uni.showToast({
title: res.data.msg || '请求失败',
icon: 'none'
})
}
},
jumpToDetails(e) {
......@@ -402,6 +419,12 @@ export default {
})
}
})
} else {
uni.hideLoading()
uni.showToast({
title: res.data.msg || '请求失败',
icon: 'none'
})
}
},
confirmDelivery(e) {
......@@ -446,6 +469,12 @@ export default {
this.$refs.requotePopup.closePopup()
this.currentPage = 1
this.search()
} else {
uni.hideLoading()
uni.showToast({
title: res.data.msg || '请求失败',
icon: 'none'
})
}
},
cancelSign(e) {
......@@ -469,6 +498,12 @@ export default {
})
this.currentPage = 1
this.search()
} else {
uni.hideLoading()
uni.showToast({
title: res.data.msg || '请求失败',
icon: 'none'
})
}
})
.catch(() => {
......@@ -502,6 +537,12 @@ export default {
console.log('res:', res)
this.currentPage = 1
this.search()
} else {
uni.hideLoading()
uni.showToast({
title: res.data.msg || '请求失败',
icon: 'none'
})
}
})
})
......
......@@ -870,6 +870,12 @@ export default {
setTimeout(() => {
uni.navigateBack()
}, 500)
} else {
uni.hideLoading()
uni.showToast({
title: res.data.msg || '请求失败',
icon: 'none'
})
}
})
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!