Преглед изворни кода

fix(health): 修复report-survey微信小程序finally不兼容问题

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
User пре 2 месеци
родитељ
комит
0d06b42b2a
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      cfc-frontend/pages/health/report-survey.vue

+ 2 - 2
cfc-frontend/pages/health/report-survey.vue

@@ -237,7 +237,6 @@ export default {
         console.log('初始化问卷失败', e)
         console.log('初始化问卷失败', e)
       })
       })
     },
     },
-  methods: {
     toggleAllergy: function(val) {
     toggleAllergy: function(val) {
       var idx = this.survey.allergies.indexOf(val)
       var idx = this.survey.allergies.indexOf(val)
       if (val === 'none') {
       if (val === 'none') {
@@ -287,12 +286,12 @@ export default {
             }, 500)
             }, 500)
           } else {
           } else {
             uni.showToast({ title: res.message || '提交失败', icon: 'none' })
             uni.showToast({ title: res.message || '提交失败', icon: 'none' })
+            self.submitting = false
           }
           }
         }).catch(function(e) {
         }).catch(function(e) {
           uni.hideLoading()
           uni.hideLoading()
           uni.showToast({ title: '提交失败,请重试', icon: 'none' })
           uni.showToast({ title: '提交失败,请重试', icon: 'none' })
           console.log('提交问卷失败', e)
           console.log('提交问卷失败', e)
-        }).finally(function() {
           self.submitting = false
           self.submitting = false
         })
         })
       }
       }
@@ -319,6 +318,7 @@ export default {
       }
       }
     }
     }
   }
   }
+  }
 }
 }
 </script>
 </script>