zouyu
8 天以前 648003a577ef7a03046269c77fc5cc64199945e7
src/views/tideLogin.vue
@@ -1,15 +1,23 @@
<template>
  <div></div>
</template>
<script setup>
<script>
import useUserStore from '@/store/modules/user'
const userStore = useUserStore()
let { proxy } = getCurrentInstance()
function goLogin() {
  userStore.TideLogin({code : proxy.$route.query.code}).then(() => {
    proxy.$router.push({ path: redirect || "/" }).catch(() => { });
  })
export default {
  data() {
    return {}
  },
  created() {
    this.goLogin()
  },
  computed: {},
  methods: {
     goLogin() {
       useUserStore().TideLogin({code : this.$route.query.code}).then(() => {
        this.$router.push({ path: this.redirect || "/" }).catch(() => { });
      })
    }
  }
}
goLogin()
</script>
<style scoped></style>