修改bug

wechat
ihzero 2023-10-31 17:16:44 +08:00
parent c96c7befcc
commit 9b921645a1
6 changed files with 34 additions and 16 deletions

View File

@ -510,8 +510,9 @@ export default {
} }
uni.showToast({ title: data.message, icon: 'none' }) uni.showToast({ title: data.message, icon: 'none' })
}) })
.catch(() => { .catch(({data}) => {
hideLoading() hideLoading()
this.$u.toast(data.message)
}) })
} else { } else {
delete params['id'] delete params['id']
@ -527,8 +528,9 @@ export default {
uni.showToast({ title: data.message, icon: 'none' }) uni.showToast({ title: data.message, icon: 'none' })
} }
}) })
.catch(() => { .catch(({data}) => {
hideLoading() hideLoading()
this.$u.toast(data.message)
}) })
} }
}, },

View File

@ -454,9 +454,11 @@
} }
uni.showToast({ title: data.message, icon: 'none' }); uni.showToast({ title: data.message, icon: 'none' });
}).catch(()=>{
hideLoading();
}) })
.catch(({data}) => {
hideLoading()
this.$u.toast(data.message)
})
}else{ }else{
delete params['id']; delete params['id'];
this.$http.post(`/api/rice-shrimp-industries`,params).then(({data})=>{ this.$http.post(`/api/rice-shrimp-industries`,params).then(({data})=>{
@ -468,9 +470,11 @@
}else{ }else{
uni.showToast({ title: data.message, icon: 'none' }); uni.showToast({ title: data.message, icon: 'none' });
} }
}).catch(()=>{
hideLoading();
}) })
.catch(({data}) => {
hideLoading()
this.$u.toast(data.message)
})
} }
}, },

View File

@ -524,9 +524,11 @@
} }
uni.showToast({ title: data.message, icon: 'none' }); uni.showToast({ title: data.message, icon: 'none' });
}).catch(()=>{
hideLoading()
}) })
.catch(({data}) => {
hideLoading()
this.$u.toast(data.message)
})
}else{ }else{
delete params['id']; delete params['id'];
this.$http.post(`/api/materiels`,params).then(({data})=>{ this.$http.post(`/api/materiels`,params).then(({data})=>{
@ -538,9 +540,11 @@
}else{ }else{
uni.showToast({ title: data.message, icon: 'none' }); uni.showToast({ title: data.message, icon: 'none' });
} }
}).catch(()=>{
hideLoading()
}) })
.catch(({data}) => {
hideLoading()
this.$u.toast(data.message)
})
} }
}, },

View File

@ -440,6 +440,7 @@ export default {
this.$http this.$http
.get('/api/rice-shrimp-prices', { params: params }) .get('/api/rice-shrimp-prices', { params: params })
.then(({ data }) => { .then(({ data }) => {
console.log("===~~===");
console.log(data) console.log(data)
this.screenShow = false this.screenShow = false
if (refresh) { if (refresh) {
@ -456,11 +457,14 @@ export default {
if (this.list.length >= data.meta.total) { if (this.list.length >= data.meta.total) {
this.loading = 'nomore' this.loading = 'nomore'
} }
}else{
console.log(data);
} }
}) })
.catch(() => { .catch((e) => {
this.loading = 'loadmore' this.loading = 'loadmore'
this.screenShow = false this.screenShow = false
console.log(e);
}) })
}, },
// //
@ -482,8 +486,9 @@ export default {
} }
uni.showToast({ title: data.message, icon: 'none' }) uni.showToast({ title: data.message, icon: 'none' })
}) })
.catch(() => { .catch(({data}) => {
hideLoading() hideLoading()
this.$u.toast(data.message)
}) })
} else { } else {
delete params['id'] delete params['id']
@ -499,8 +504,9 @@ export default {
uni.showToast({ title: data.message, icon: 'none' }) uni.showToast({ title: data.message, icon: 'none' })
} }
}) })
.catch(() => { .catch(({data}) => {
hideLoading() hideLoading()
this.$u.toast(data.message)
}) })
} }
}, },

View File

@ -459,8 +459,9 @@ export default {
} }
uni.showToast({ title: data.message, icon: 'none' }) uni.showToast({ title: data.message, icon: 'none' })
}) })
.catch(() => { .catch(({data}) => {
hideLoading() hideLoading()
this.$u.toast(data.message)
}) })
} else { } else {
delete params['id'] delete params['id']
@ -476,8 +477,9 @@ export default {
uni.showToast({ title: data.message, icon: 'none' }) uni.showToast({ title: data.message, icon: 'none' })
} }
}) })
.catch(() => { .catch(({data}) => {
hideLoading() hideLoading()
this.$u.toast(data.message)
}) })
} }
}, },

View File

@ -25,7 +25,7 @@
</view> </view>
<view class="p-list clamp"> <view class="p-list clamp">
<view class="txt">{{userInfo.department?userInfo.department:'——'}}</view> <view class="txt">{{userInfo.department?userInfo.department:'——'}}</view>
<view class="tit">角色</view> <view class="tit">部门</view>
</view> </view>
</view> </view>
</view> </view>