| | |
| | | data: JSON.stringify(payload), |
| | | headers: { 'Content-Type': 'application/json' } |
| | | }); |
| | | if (res.data && res.data.outMsg) { |
| | | const isRepeat = res.data.outMsg === '重复上下刀'; |
| | | if (res.data && res.data.outMsg !== undefined) { |
| | | uni.showToast({ |
| | | title: res.data.outMsg, |
| | | icon: isRepeat ? 'error' : 'none' |
| | | }); |
| | | if (isRepeat) return; // 报错时不再继续 |
| | | } else if (res.status === 0) { |
| | | uni.showToast({ |
| | | title: '下刀提交成功', |
| | | icon: 'success' |
| | | }); |
| | | } else { |
| | | uni.showToast({ |
| | | title: res.message || '下刀提交失败', |
| | | title: res.data.outMsg || '', |
| | | icon: 'error' |
| | | }); |
| | | return; |
| | | } |
| | | if (res.status === 0) { |
| | | await this.fetchFormData(); |
| | | } |
| | | if (res.status === 0) { |
| | | await this.fetchFormData(); |
| | |
| | | data: JSON.stringify(payload), |
| | | headers: { 'Content-Type': 'application/json' } |
| | | }); |
| | | if (res.data && res.data.outMsg) { |
| | | const isRepeat = res.data.outMsg === '重复上下刀'; |
| | | if (res.data && res.data.outMsg !== undefined) { |
| | | uni.showToast({ |
| | | title: res.data.outMsg, |
| | | icon: isRepeat ? 'error' : 'none' |
| | | }); |
| | | if (isRepeat) return; // 报错时不再继续 |
| | | } else if (res.status === 0) { |
| | | uni.showToast({ |
| | | title: '下刀提交成功', |
| | | icon: 'success' |
| | | }); |
| | | } else { |
| | | uni.showToast({ |
| | | title: res.message || '下刀提交失败', |
| | | title: res.data.outMsg || '', |
| | | icon: 'error' |
| | | }); |
| | | return; |
| | | } |
| | | if (res.status === 0) { |
| | | await this.fetchFormData(); |