identification.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <template>
  2. <view>
  3. <uni-popup ref="popupRef" type="dialog" :animation="false" :is-mask-click="false"
  4. mask-background-color="rgba(0, 0, 0, 0.4);">
  5. <uni-popup-dialog mode="input" class="phone-ksxz-dialog" title="身份确认" :duration="2000" :before-close="true"
  6. cancelText="修改" @close="handleClose" @confirm="handleConfirm">
  7. <view class="ksxz-content-box">
  8. <view class="phone-name-box">
  9. <!-- #ifdef H5 -->
  10. <img :src="data.icon" alt="">
  11. <!-- <image :src="data.icon" /> -->
  12. <!-- #endif -->
  13. </view>
  14. <view>姓名:{{data.realName}}</view>
  15. <view>电话:{{data.userName}}</view>
  16. <view>职业:{{data.zyName}}</view>
  17. <view>等级:{{data.zyLevelName}}</view>
  18. <view>身份证号(护照号):{{data.idcard}}</view>
  19. <view>性别:{{data.gender == 0?'未知': data.gender == '2' ? '女': '男'}}</view>
  20. </view>
  21. </uni-popup-dialog>
  22. </uni-popup>
  23. </view>
  24. </template>
  25. <script setup>
  26. import {
  27. ref,
  28. reactive
  29. } from "vue"
  30. const popupRef = ref(null)
  31. const data = reactive({
  32. realName: '',
  33. userName: '',
  34. zyLevelName: '',
  35. zyName: '',
  36. idcard: '',
  37. icon: '',
  38. gender: '',
  39. userId: '',
  40. })
  41. const emits = defineEmits(['confirm', 'changeData'])
  42. function showDialog(options) {
  43. data.realName = options.realName;
  44. data.userName = options.userName;
  45. data.zyLevelName = options.zyLevelName;
  46. data.zyName = options.zyName;
  47. data.idcard = options.idcard;
  48. data.icon = options.icon;
  49. data.userId = options.userId;
  50. data.gender = options.gender; // 1男 2女 0未知
  51. popupRef.value.open()
  52. }
  53. function handleClose() {
  54. emits('changeData');
  55. popupRef.value.close()
  56. }
  57. function handleConfirm() {
  58. emits('confirm', data);
  59. popupRef.value.close()
  60. }
  61. defineExpose({
  62. showDialog
  63. })
  64. </script>
  65. <style lang="scss">
  66. </style>