<template>
  <view>
    <u-button @click="doRouter('/pages/login/login')"> 去登录页</u-button>
  </view>
</template>

<script>
  export default {
    name: 'IndexPage',

    data() {
      return {}
    },
    created() {},
    onShow() {},
    methods: {
      /**
       * 做路由跳转
       * @param url
       * @param params
       */
      doRouter(url) {
        // 路由跳转
        this.$Router.push({ path: url, query: { name: 'sop' } })
        // 在onLoad中使用this.$Route.query获取参数
      },
      jumpToSwitchTab(url) {
        this.$Router.pushTab({ path: url, query: { name: 'sop' } })
      }
    }
  }
</script>

<style></style>
