<template>
  <section class="AppJinMinLogin">
    <AiResult v-else :tips="errTip" :status="err" class="t-center"/>
  </section>
</template>

<script>
import {mapActions} from "vuex";

export default {
  name: "AppJinMinLogin",
  appName: "金民工程登录",
  data() {
    return {err: "loading"}
  },
  computed: {
    errTip: v => ({
      loading: "正在登录中...",
      error: "登录失败!"
    }[v.err]),
  },
  methods: {
    ...mapActions(['getCode']),
    handleLogin() {
      const {code} = this.$route.query
      if (code) {
        this.$http.post("/app/wxcp/portal/hljJmgcLogin", null, {
          params: {code}
        }).then(res => {
          console.log(res)
        }).catch(() => this.err = "error")
      } else this.getCode();

    }
  },
  created() {
  }
}
</script>

<style lang="scss" scoped>
.AppJinMinLogin {
}
</style>