index.vue 641 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. })
  31. }
  32. });
  33. }
  34. });
  35. },
  36. }
  37. }
  38. </script>
  39. <style lang="scss">
  40. </style>