| | |
| | | <el-input |
| | | :placeholder="$t('hj9')" |
| | | :size="medium" |
| | | maxlength="11" |
| | | v-model="userName" |
| | | clearable |
| | | > |
| | |
| | | }}<span |
| | | @click="$router.push('/register')" |
| | | data-v-8cc76a7b="" |
| | | style="color: rgb(5, 106, 239)" |
| | | style="color:#c4d600" |
| | | >{{ $t("免費註冊") }}</span |
| | | > |
| | | </div> |
| | |
| | | import headers from "./components/header.vue"; |
| | | import * as api from "@/axios/api"; |
| | | import { Notify } from "vant"; |
| | | import { mapMutations } from "vuex"; |
| | | import { mapActions, mapMutations } from "vuex"; |
| | | |
| | | export default { |
| | | name: "newLogin", |
| | |
| | | userPassword: "", |
| | | userName: "", |
| | | btnClass: false, |
| | | medium: "medium", |
| | | medium: "medium" |
| | | }; |
| | | }, |
| | | components: { |
| | | headers, |
| | | headers |
| | | }, |
| | | mounted() { |
| | | const ret = window.localStorage.getItem("login_admin"); |
| | |
| | | }, |
| | | |
| | | methods: { |
| | | ...mapActions(["setUseInfo"]), |
| | | ...mapMutations(["undataToken"]), |
| | | checkboxChange(e) { |
| | | window.localStorage.setItem("login_checked", e); |
| | |
| | | async loginIN() { |
| | | let opts = { |
| | | phone: this.userName, |
| | | userPwd: this.userPassword, |
| | | userPwd: this.userPassword |
| | | }; |
| | | let data = await api.login(opts); |
| | | |
| | | if (data.status === 0) { |
| | | this.setUseInfo(); |
| | | if (this.checked) { |
| | | window.localStorage.setItem( |
| | | "login_admin", |
| | | JSON.stringify({ |
| | | phone: this.userName, |
| | | userPassword: this.userPassword, |
| | | userPassword: this.userPassword |
| | | }) |
| | | ); |
| | | } else { |
| | |
| | | Notify({ type: "success", message: this.$t("hj36") }); |
| | | |
| | | setTimeout(() => { |
| | | this.$router.push("/home"); |
| | | // this.$router.push("/home"); |
| | | this.$router.push("/home_index"); |
| | | }, 1000); |
| | | } else { |
| | | Notify({ type: "warning", message: data.msg }); |
| | |
| | | // 支持 |
| | | navigator.vibrate([55]); |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | beforeDestroy() {}, |
| | | created() {}, |
| | | created() {} |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped lang="less"> |
| | | @green: #c4d600; |
| | | .password-operate { |
| | | display: flex; |
| | | justify-content: space-between; |
| | |
| | | } |
| | | } |
| | | |
| | | /deep/ .van-checkbox__icon--checked .van-icon { |
| | | background: @green; |
| | | border-color: @green; |
| | | } |
| | | |
| | | .register { |
| | | font-style: normal; |
| | | font-weight: 400; |
| | | font-size: 0.37333rem; |
| | | color: #8c9fad; |
| | | margin: 0 auto; |
| | | margin: 0.4rem auto; |
| | | padding: 0.34667rem 0.4rem; |
| | | width: 100%; |
| | | height: 6rem; |
| | | text-align: center; |
| | | span { |
| | | color: rgb(5, 106, 239); |
| | | } |
| | |
| | | .password { |
| | | width: 100%; |
| | | height: 50px; |
| | | background: rgb(246, 246, 247); |
| | | background: #fff; |
| | | // background: #1e1e1e; |
| | | border-radius: 0.3564rem; |
| | | |
| | |
| | | /deep/.el-input__inner { |
| | | width: 100%; |
| | | height: 70px; |
| | | background-color: rgb(246, 246, 247) !important; |
| | | background-color: #fff !important; |
| | | // background: #1e1e1e; |
| | | border-radius: 8px; |
| | | font-size: 0.45rem !important; |
| | | border: none; |
| | | border: #ddd solid 1px; |
| | | } |
| | | |
| | | .bottom_btns { |
| | |
| | | margin-top: 40px; |
| | | height: 60px; |
| | | border-radius: 8px; |
| | | background: @green; |
| | | border: none; |
| | | } |
| | | .top_btn { |
| | | border: none; |
| | | width: 100%; |
| | | height: 1.25rem; |
| | | border-radius: 8px; |
| | | background: #0066ed; |
| | | background: @green; |
| | | color: #fff; |
| | | display: flex; |
| | | align-items: center; |
| | |
| | | } |
| | | |
| | | .on .top_btn { |
| | | background: #2d8cf0 !important; |
| | | background: @green !important; |
| | | } |
| | | |
| | | /deep/.el-icon-circle-close::before { |