Commit 28b6c6ba by cen

fix: 新加loading

1 parent 15eb7c28
...@@ -199,10 +199,9 @@ export default { ...@@ -199,10 +199,9 @@ export default {
uni.$track.add({ uni.$track.add({
eventCode: 'app_delivery_management' eventCode: 'app_delivery_management'
}) })
},
onShow() {
this.search() this.search()
}, },
onShow() {},
methods: { methods: {
async checkReportNumCount() { async checkReportNumCount() {
const { typeList, tabIndex, searchText } = this, const { typeList, tabIndex, searchText } = this,
...@@ -539,12 +538,17 @@ export default { ...@@ -539,12 +538,17 @@ export default {
return false return false
} }
} }
uni.showLoading({
title: '提交中',
mask: true
})
uni.$api.usedCarApi uni.$api.usedCarApi
.checkReportCreate({ .checkReportCreate({
...this.addParams ...this.addParams
}) })
.then(res => { .then(res => {
console.log('res', res) console.log('res', res)
uni.hideLoading()
if (res.data.code == 0) { if (res.data.code == 0) {
uni.showToast({ title: '提交成功', icon: 'none' }) uni.showToast({ title: '提交成功', icon: 'none' })
setTimeout(() => { setTimeout(() => {
...@@ -555,6 +559,10 @@ export default { ...@@ -555,6 +559,10 @@ export default {
uni.showToast({ title: res.data.msg || '请求失败', icon: 'none' }) uni.showToast({ title: res.data.msg || '请求失败', icon: 'none' })
} }
}) })
.catch(err => {
uni.hideLoading()
uni.showToast({ title: err.message || '请求失败', icon: 'none' })
})
}, },
toDetail(i) { toDetail(i) {
if (i.status === 1) { if (i.status === 1) {
...@@ -593,9 +601,13 @@ export default { ...@@ -593,9 +601,13 @@ export default {
}, },
previewMedia(current) { previewMedia(current) {
const { imgList } = this const { imgList } = this
uni.previewImage({ // uni.previewImage({
current, // current,
urls: imgList // 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!