testPage.vue 755 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <template>
  2. <div class="test-page">
  3. <button @click="testWebrtc">退出</button>
  4. </div>
  5. </template>
  6. <script>
  7. import wfc from "../../wfc/client/wfc";
  8. import {clear} from "../util/storageHelper";
  9. export default {
  10. name: "testPage",
  11. methods: {
  12. testWebrtc() {
  13. wfc.disconnect();
  14. clear();
  15. uni.navigateTo({
  16. url: '../login/LoginPage',
  17. success: () => {
  18. console.log('nav to test-webrtc success');
  19. },
  20. fail: (err) => {
  21. console.log('nav to test-webrtc err', err);
  22. }
  23. })
  24. }
  25. }
  26. }
  27. </script>
  28. <style lang="css" scoped>
  29. .test-page {
  30. display: flex;
  31. }
  32. </style>