bluetoothUnlockAuth.vue 871 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. },
  29. _initPlatform() {
  30. const systemInfo = uni.getSystemInfoSync();
  31. this.platform = systemInfo.platform;
  32. },
  33. }
  34. }
  35. </script>