redirectToCETApp.vue 496 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <template>
  2. <view>
  3. </view>
  4. </template>
  5. <script>
  6. export default {
  7. data() {
  8. return {
  9. }
  10. },
  11. onLoad() {
  12. // #ifdef H5
  13. try {
  14. window.location.href = 'weixin://';
  15. alert('已尝试唤起微信');
  16. } catch (e) {
  17. alert('唤起微信失败,错误信息:' + e);
  18. } finally {
  19. alert('唤起流程已结束');
  20. }
  21. // #endif
  22. // #ifdef APP-PLUS
  23. plus.runtime.openURL('weixin://');
  24. // #endif
  25. },
  26. methods: {
  27. }
  28. }
  29. </script>
  30. <style>
  31. </style>