healthCardList.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <template>
  2. <view>
  3. <!-- #ifdef MP-WEIXIN -->
  4. <healthCardUsers
  5. @select="select"
  6. @addCard="addCard"
  7. @manageCard="manageCard"
  8. type="auth">
  9. </healthCardUsers>
  10. <!-- #endif -->
  11. <!-- #ifndef MP-WEIXIN -->
  12. <view class="intro">请在微信小程序中使用电子健康卡功能</view>
  13. <!-- #endif -->
  14. </view>
  15. </template>
  16. <script lang="ts" setup>
  17. import { correlationHealthCard_V2 } from '@/pagesPersonal/service/patientManagement';
  18. import { common } from '@/utils';
  19. import { onLoad } from '@dcloudio/uni-app';
  20. const app = getApp();
  21. const select = async (e: any) => {
  22. let data = e.detail;
  23. if (!data.code) {
  24. common.showToast('选卡失败');
  25. return;
  26. }
  27. let { healthCode } = data;
  28. let querData = {
  29. HealthCode: healthCode
  30. };
  31. let { resData } = await correlationHealthCard_V2(querData);
  32. if(resData.RespCode == 10000){
  33. common.goToUrl('/pagesPersonal/st1/business/patientManagement/memberList/memberList');
  34. }
  35. };
  36. const addCard = () => {
  37. common.goToUrl('/pagesPersonal/st1/business/patientManagement/addMember/addMember?pageType=addHealthCard');
  38. };
  39. const manageCard = (e: any) => {
  40. console.log('manageCard', e);
  41. };
  42. </script>
  43. <style lang="scss" scoped>
  44. .intro {
  45. margin: 30px;
  46. text-align: center;
  47. }
  48. </style>