Ver código fonte

跳转健康卡前显示Loading

lighter 11 meses atrás
pai
commit
dff602aac9

+ 4 - 0
src/views/hospital-service/electronic-health-card/AddElectronicHealthCard.vue

@@ -39,13 +39,17 @@
 </template>
 
 <script setup>
+import store from "@/store";
+
 const newUserRegister = () => {
+  store.commit('SET_LOADING', true)
   const isvAppId = '4c84fdd3b55e43c780f407a49d4d0cd4';
   const redirectUri = encodeURI('https://staticweb.hnthyy.cn/newUserRegForElectronicHealthCard')
   window.location.href = `https://health.tengmed.com/open/getUserCode?apiVersion=3&type=register&isvAppId=${isvAppId}&redirect_uri=${redirectUri}`
 }
 
 const linkHealthCard = () => {
+  store.commit('SET_LOADING', true)
   const hospitalId = '37156';
   const redirectUri = encodeURI('https://staticweb.hnthyy.cn/linkHealthCardResult')
   window.location.href = `https://health.tengmed.com/open/getHealthCardList?redirect_uri=${redirectUri}&hospitalId=${hospitalId}`;