kaiTongFongShi.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <template>
  2. <uni-popup ref="kaitongRef" :animation="false" :is-mask-click="false" mask-background-color="rgba(0,0,0, 0.76);">
  3. <view class="ezy-tip-dialog tip-small-dialog sjh-kjdl-dialog">
  4. <view class="close-btn" @click="handleClose"></view>
  5. <view class="tip-content-box sjh-kjdl-content-box">
  6. <view class="tip-title">开通方式</view>
  7. <view class="kjdl-btn" @click="handleKaitong">使用手机号快速登录</view>
  8. <view class="ykkt-text" @click="youkeKaitongIos" v-if="currentPlatform== 'ios'">游客身份开通(限当前设备使用)</view>
  9. </view>
  10. </view>
  11. </uni-popup>
  12. <goLoginVue ref="LoginRef" @success="onLoginSuccess"></goLoginVue>
  13. </template>
  14. <script setup>
  15. import {
  16. nextTick,
  17. ref
  18. } from 'vue';
  19. import goLoginVue from "@/components/goLogin/goLogin.vue"
  20. const kaitongRef = ref(null); // 索引
  21. const LoginRef = ref(null);
  22. const currentPlatform = ref(null);
  23. const emits = defineEmits(['success','ykIoszhifu']);
  24. function isIOSorAndroid() {
  25. const systemInfo = uni.getSystemInfoSync();
  26. if (systemInfo.platform == 'ios') {
  27. currentPlatform.value = 'ios'
  28. } else {
  29. currentPlatform.value = 'android'
  30. }
  31. }
  32. // 打开弹窗
  33. function handleShow() {
  34. isIOSorAndroid();
  35. kaitongRef.value.open();
  36. }
  37. function handleClose() {
  38. kaitongRef.value.close();
  39. }
  40. function handleKaitong() {
  41. LoginRef.value.showDl();
  42. nextTick(() => {
  43. kaitongRef.value.close();
  44. })
  45. }
  46. function youkeKaitongIos(){
  47. emits('ykIoszhifu')
  48. }
  49. function onLoginSuccess() {
  50. emits('success')
  51. }
  52. defineExpose({
  53. handleShow
  54. })
  55. </script>
  56. <style>
  57. </style>