bluetoothUnlockAuth.vue 915 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <template>
  2. <view>
  3. <AndroidUnlockAuth v-model="show" v-if="platform === 'android'" />
  4. <IosUnlockAuth v-model="show" v-else-if="platform === 'ios'" />
  5. </view>
  6. </template>
  7. <script>
  8. import AndroidUnlockAuth from './components/AndroidUnlockAuth.vue'
  9. import IosUnlockAuth from './components/IosUnlockAuth.vue'
  10. var bluetooth = require('@/common/bluetooth.js');
  11. export default {
  12. components: {
  13. AndroidUnlockAuth,
  14. IosUnlockAuth
  15. },
  16. data() {
  17. return {
  18. platform: 'android',
  19. show: false
  20. }
  21. },
  22. onLoad() {
  23. this._initPlatform();
  24. },
  25. methods: {
  26. open() {
  27. this.show = true;
  28. console.log(111, this.platform)
  29. },
  30. _initPlatform() {
  31. const systemInfo = uni.getSystemInfoSync();
  32. this.platform = systemInfo.platform;
  33. },
  34. }
  35. }
  36. </script>