保誠-保戶業務員媒合平台
Tomas
2022-01-24 b569c2254c1f870e174581c0825436a99c528097
update: [滿意度通知] route query parameter - 清除方式調整
修改1個檔案
11 ■■■■ 已變更過的檔案
PAMapp/pages/index.vue 11 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/pages/index.vue
@@ -268,8 +268,15 @@
    }
    clearSatisfactionId() {
        console.log('close');
        this.$router.push({query: {}});
      // NOTE: 刪除特定的 query parameter [Tomas, 2022/1/24 11:36]
      // [REF] How to remove a parameter from this.$router.query Nuxt.js? https://reurl.cc/X45aMD
        let newRouteQuery = {};
        Object.keys(this.$route.query).forEach((key) => {
          if (key !== 'appointmentId') {
            newRouteQuery[key] = this.$route.query[key]
          }
        })
        this.$router.push(newRouteQuery);
        this.storageClearSatisfactionIdFromMsg();
    }