46 lines
923 B
Vue
46 lines
923 B
Vue
|
|
<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(review) {
|
||
|
|
const {code} = this.$route.query
|
||
|
|
if (!this.user.token) {
|
||
|
|
} else if (code) {
|
||
|
|
this.$http.post("/app/wxcp/portal/hljJmgcLogin", null, {
|
||
|
|
params: {code}
|
||
|
|
}).then(res => {
|
||
|
|
console.log(res)
|
||
|
|
})
|
||
|
|
} else if (!review) {
|
||
|
|
this.getCode();
|
||
|
|
} else this.err = "error"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
created() {
|
||
|
|
}
|
||
|
|
}
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<style lang="scss" scoped>
|
||
|
|
.AppJinMinLogin {
|
||
|
|
}
|
||
|
|
</style>
|