shexiangDialog.vue 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <template>
  2. <view>
  3. <uni-popup ref="commonPopup" :animation="false" :is-mask-click="false"
  4. mask-background-color="rgba(0, 0, 0, 0.4)">
  5. <view class="phone-common-dialog">
  6. <view class="common-body-box">
  7. <view class="common-title">{{title}}</view>
  8. <view class="common-content" :class="dialogContentClass">
  9. <view>
  10. <!-- IOS-->
  11. <view v-if="platformType === 'ios'" class="content-margin-bottom">推荐使用微信或safari浏览器,使用其他浏览器可能会在考试过程中出现摄像头问题,影响考试结果,导致重考,不建议使用其他浏览器。
  12. </view>
  13. <!-- 安卓-->
  14. <view v-if="platformType === 'Android'" class="content-margin-bottom">
  15. 推荐使用微信或火狐浏览器、谷歌浏览器,使用其他浏览器可能会在考试过程中出现摄像头问题,影响考试结果,导致重考,不建议使用其他浏览器。
  16. </view>
  17. <view class="content-margin-bottom">请在考试前使用摄像头测试功能,测试摄像头是否可以正常工作,在测试前请先确保摄像头设备可以正常使用,并且使用推荐浏览器并赋予了浏览器摄像头权限。</view>
  18. <view>若摄像头测试中图像显示异常,请及时更换浏览器或手机,以免影响考试结果。</view>
  19. </view>
  20. </view>
  21. <view class="common-btn-box">
  22. <view class="confirm-btn" @click="confirmBtn">{{okBtn}}</view>
  23. </view>
  24. </view>
  25. </view>
  26. </uni-popup>
  27. </view>
  28. </template>
  29. <script setup>
  30. import { ref } from 'vue';
  31. const props = defineProps({
  32. title: {
  33. type: String,
  34. default: ''
  35. },
  36. content: {
  37. type: String,
  38. require: true,
  39. default: ''
  40. },
  41. dialogContentClass: {
  42. type: String,
  43. require: true,
  44. default: ''
  45. },
  46. notBtn: {
  47. type: String,
  48. require: true,
  49. default: '取消'
  50. },
  51. okBtn: {
  52. type: String,
  53. require: true,
  54. default: '确认'
  55. },
  56. });
  57. const commonPopup = ref(null); // 索引
  58. const $emit = defineEmits(['confirm-btn'])
  59. const platformType = uni.getSystemInfoSync().platform;
  60. // 打开弹窗
  61. function handleShow() {
  62. commonPopup.value.open();
  63. }
  64. // 取消
  65. function handleClose() {
  66. commonPopup.value.close();
  67. }
  68. // 确认
  69. function confirmBtn(){
  70. $emit('confirm-btn');
  71. commonPopup.value.close();
  72. }
  73. defineExpose({
  74. handleShow,
  75. handleClose
  76. })
  77. </script>
  78. <style>
  79. </style>