Commit 28b6c6ba by cen

fix: 新加loading

1 parent 15eb7c28
......@@ -199,10 +199,9 @@ export default {
uni.$track.add({
eventCode: 'app_delivery_management'
})
},
onShow() {
this.search()
},
onShow() {},
methods: {
async checkReportNumCount() {
const { typeList, tabIndex, searchText } = this,
......@@ -539,12 +538,17 @@ export default {
return false
}
}
uni.showLoading({
title: '提交中',
mask: true
})
uni.$api.usedCarApi
.checkReportCreate({
...this.addParams
})
.then(res => {
console.log('res', res)
uni.hideLoading()
if (res.data.code == 0) {
uni.showToast({ title: '提交成功', icon: 'none' })
setTimeout(() => {
......@@ -555,6 +559,10 @@ export default {
uni.showToast({ title: res.data.msg || '请求失败', icon: 'none' })
}
})
.catch(err => {
uni.hideLoading()
uni.showToast({ title: err.message || '请求失败', icon: 'none' })
})
},
toDetail(i) {
if (i.status === 1) {
......@@ -593,9 +601,13 @@ export default {
},
previewMedia(current) {
const { imgList } = this
uni.previewImage({
current,
urls: imgList
// uni.previewImage({
// current,
// urls: imgList
// })
const url = `/pages/boutique/preview?tabName=预览&sourceType=1&detailUrl=${imgList[0]}`
uni.navigateTo({
url: `${url}`
})
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!