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

fix(frontend): fix syntax error in parent-index.vue - loadAlerts + handleDismissAlert

loadAlerts 方法被截断(}, 后紧接 var self = this 造成语法错误),
导致 webpack-uni-mp-loader/script.js 编译失败。

- 正确闭合 loadAlerts 的 .then() 链
- 将 dismissAlert 调用抽出为独立的 handleDismissAlert(alertId) 方法
liaoxg пре 1 месец
родитељ
комит
18e5628d5c
1 измењених фајлова са 2 додато и 0 уклоњено
  1. 2 0
      cfc-frontend/pages/index/parent-index.vue

+ 2 - 0
cfc-frontend/pages/index/parent-index.vue

@@ -841,7 +841,9 @@ export default {
         if (res.code === 200) {
           self.healthAlerts = res.data || []
         }
+      }).catch(function() {})
     },
+    handleDismissAlert: function(alertId) {
       var self = this
       dismissAlert({ id: alertId }).then(function(res) {
         if (res.code === 200) {