ssoLogin.vue 947 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <!--登录页面-->
  2. <template>
  3. <view id="ssoLogin">
  4. <web-view @message="handleMessage"
  5. src="https://labcontrol.nwafu.edu.cn/stream/#/miniProgramAuthentication">
  6. <!-- src="http://192.168.1.10:80/#/miniProgramAuthentication?token=41cd8b02-f612-4dd5-abbd-efb5c45d69ad"> -->
  7. </web-view>
  8. </view>
  9. </template>
  10. <script>
  11. export default {
  12. name: "ssoLogin",
  13. data() {
  14. return {
  15. }
  16. },
  17. onLoad(option) {
  18. },
  19. mounted() {
  20. const pages = getCurrentPages();
  21. const currentPage = pages[pages.length - 1];
  22. const prevPage = pages[pages.length - 2];
  23. if (prevPage && prevPage.route === 'pages/views/login/ssoCertification') {
  24. uni.redirectTo({
  25. url: '/pages/views/login/login',
  26. });
  27. }
  28. },
  29. methods: {
  30. handleMessage(e) {
  31. const receivedData = e.detail.data; // 接收到的数据
  32. }
  33. },
  34. }
  35. </script>
  36. <style lang="stylus" scoped>
  37. #ssoLogin {
  38. width:100%;
  39. height:100%;
  40. overflow:scroll;
  41. }
  42. </style>