index.vue 680 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <template>
  2. <mobile-frame>
  3. <view class="main">
  4. 系统首页
  5. </view>
  6. </mobile-frame>
  7. </template>
  8. <script>
  9. export default {
  10. components: {},
  11. data() {
  12. return {};
  13. },
  14. onLoad: function() {},
  15. onShow: function() {
  16. const that = this;
  17. that.search();
  18. },
  19. methods: {
  20. search() {
  21. // 查询当前所在平台
  22. uni.getSystemInfo({
  23. success: async function(res) {
  24. uni.setStorage({
  25. key: 'system',
  26. data: res,
  27. success: function() {
  28. uni.redirectTo({
  29. url: `/pages/home/index`
  30. // url: `/pagesMy/order/info`
  31. })
  32. }
  33. });
  34. }
  35. });
  36. },
  37. }
  38. }
  39. </script>
  40. <style lang="scss">
  41. </style>