| | |
| | | <template> |
| | | <div class="login_page"> |
| | | <headers /> |
| | | <tab-head :leftShow="false" :rightShow="false"> |
| | | <van-popover |
| | | v-model="languageShow" |
| | | trigger="click" |
| | | :actions="actions" |
| | | @select="onSelect" |
| | | placement="bottom-end" |
| | | > |
| | | <template #reference> |
| | | <div class="multilingual"> |
| | | <img src="../../assets/img/language_b.png" alt="" /> |
| | | </div> |
| | | </template> |
| | | </van-popover> |
| | | |
| | | <template #left> |
| | | <img src="@/assets/img/logo_1.png" class="left_icon" /> |
| | | </template> |
| | | </tab-head> |
| | | |
| | | <div class="login_title animated slideInDown"> |
| | | <span>{{ $t("登錄賬號") }}</span> |
| | | <span>{{ $t("dlan") }}</span> |
| | | </div> |
| | | <div class="logins_content"> |
| | | <div class="login_forms"> |
| | | <div class="top_forms"> |
| | | <div class="forms_title">{{ $t("hj27") }}</div> |
| | | <el-input |
| | | :placeholder="$t('hj9')" |
| | | :size="medium" |
| | |
| | | clearable |
| | | > |
| | | </el-input> |
| | | <div class="forms_title">{{ $t("Password") }}</div> |
| | | <el-input |
| | | style="margin-top: 0.46rem" |
| | | show-password |
| | | :placeholder="$t('hj10')" |
| | | :size="medium" |
| | |
| | | :disabled="!btnClass" |
| | | class="butn" |
| | | @click="loginIN" |
| | | >{{ $t("立即登录") }}</van-button |
| | | > |
| | | <div class="password-operate" data-v-8cc76a7b=""> |
| | | <div class="forget" data-v-8cc76a7b="" @click="getApp()"> |
| | | {{ $t("hj12") }} |
| | | </div> |
| | | <div class="remember" data-v-8cc76a7b=""> |
| | | <van-checkbox @change="checkboxChange" v-model="checked">{{ |
| | | $t("記住帳戶密碼") |
| | | }}</van-checkbox> |
| | | {{ $t("立即登录") }} |
| | | </van-button> |
| | | <!-- <van-button |
| | | type="info" |
| | | plain |
| | | class="butn_2" |
| | | @click="$router.push('/register')" |
| | | > |
| | | {{ $t("免費註冊") }} |
| | | </van-button> --> |
| | | </div> |
| | | |
| | | <div class="login_footer"> |
| | | <div class="tui-first"> |
| | | <div @click="$router.push('/register')">{{ $t("立即注册") }}</div> |
| | | <div class="symbol"></div> |
| | | <div @click="$store.dispatch('CustomerService')"> |
| | | {{ $t("kf") }} |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="register" data-v-8cc76a7b=""> |
| | | {{ $t("還沒賬號?") |
| | | }}<span |
| | | @click="$router.push('/register')" |
| | | data-v-8cc76a7b="" |
| | | style="color: rgb(5, 106, 239)" |
| | | >{{ $t("免費註冊") }}</span |
| | | > |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import headers from "./components/header.vue"; |
| | | import tabHead from "../../components/tabHead.vue"; |
| | | import * as api from "@/axios/api"; |
| | | import { Notify } from "vant"; |
| | | import { mapActions, mapMutations } from "vuex"; |
| | |
| | | userName: "", |
| | | btnClass: false, |
| | | medium: "medium", |
| | | languageShow: false, // 语言选择 |
| | | // 多语言配置 |
| | | actions: [ |
| | | { |
| | | text: "English", |
| | | lang: "en" |
| | | }, |
| | | { |
| | | text: "中文(繁体)", |
| | | lang: "zh-Hant" |
| | | }, |
| | | { |
| | | text: "हिंदी", |
| | | lang: "hi" |
| | | } |
| | | ] |
| | | }; |
| | | }, |
| | | components: { |
| | | headers, |
| | | // headers, |
| | | tabHead |
| | | }, |
| | | mounted() { |
| | | const ret = window.localStorage.getItem("login_admin"); |
| | |
| | | async loginIN() { |
| | | let opts = { |
| | | phone: this.userName, |
| | | userPwd: this.userPassword, |
| | | userPwd: this.userPassword |
| | | }; |
| | | let data = await api.login(opts); |
| | | |
| | |
| | | "login_admin", |
| | | JSON.stringify({ |
| | | phone: this.userName, |
| | | userPassword: this.userPassword, |
| | | userPassword: this.userPassword |
| | | }) |
| | | ); |
| | | } else { |
| | |
| | | this.$store.state.userInfo.token = data.data.token; |
| | | this.undataToken(data.data.token); |
| | | window.localStorage.setItem("USERTOKEN", data.data.token); |
| | | Notify({ type: "success", message: this.$t("hj36") }); |
| | | // Notify({ type: "success", message: this.$t("hj36") }); |
| | | |
| | | setTimeout(() => { |
| | | this.$router.push("/home"); |
| | | // this.$router.push("/home"); |
| | | this.$router.push("/"); |
| | | }, 1000); |
| | | } else { |
| | | Notify({ type: "warning", message: data.msg }); |
| | |
| | | navigator.vibrate([55]); |
| | | } |
| | | }, |
| | | // 选择语言 |
| | | onSelect(e) { |
| | | window.localStorage.setItem("language", e.lang); |
| | | this.$i18n.locale = e.lang; |
| | | } |
| | | }, |
| | | beforeDestroy() {}, |
| | | created() {}, |
| | | created() {} |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped lang="less"> |
| | | @green: #c4d600; |
| | | @Black1: #13161e; |
| | | |
| | | .login_footer { |
| | | margin-top: 3rem; |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | flex-direction: column; |
| | | |
| | | .tui-first { |
| | | display: flex; |
| | | align-items: center; |
| | | color: #0e7ddd; |
| | | font-size: 0.4rem; |
| | | } |
| | | .symbol { |
| | | background-color: #ccc; |
| | | width: 1px; |
| | | height: 0.275rem; |
| | | margin: 0 0.225rem; |
| | | } |
| | | } |
| | | |
| | | .password-operate { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | margin-top: 0.53333rem; |
| | | |
| | | .forget { |
| | | font-style: normal; |
| | | font-weight: 400; |
| | |
| | | } |
| | | } |
| | | |
| | | /deep/ .van-checkbox__icon--checked .van-icon { |
| | | background: @green; |
| | | border-color: @green; |
| | | } |
| | | |
| | | .register { |
| | | font-style: normal; |
| | | font-weight: 400; |
| | | font-weight: 500; |
| | | font-size: 0.37333rem; |
| | | color: #8c9fad; |
| | | margin: 0.4rem auto; |
| | |
| | | width: 100%; |
| | | height: 6rem; |
| | | text-align: center; |
| | | |
| | | span { |
| | | color: rgb(5, 106, 239); |
| | | } |
| | | } |
| | | |
| | | .login_title { |
| | | font-family: "DINPro", serif; |
| | | font-style: normal; |
| | | font-weight: 500; |
| | | font-size: 0.48rem; |
| | | font-weight: 700; |
| | | font-size: 0.7rem; |
| | | line-height: 0.66667rem; |
| | | color: #14181f; |
| | | margin-left: 0.53333rem; |
| | | padding: 0.6rem 0.6rem 0; |
| | | } |
| | | |
| | | /deep/ .van-checkbox__label { |
| | | font-style: normal; |
| | | font-weight: 400; |
| | | font-weight: 500; |
| | | font-size: 0.37333rem; |
| | | line-height: 0.53333rem; |
| | | color: #8c9fad; |
| | | } |
| | | |
| | | /deep/ .van-button__text { |
| | | font-size: 24px; |
| | | font-family: "DINPro"; |
| | | } |
| | | |
| | | .login_page { |
| | | display: flex; |
| | | flex-direction: column; |
| | | height: 100vh; |
| | | |
| | | .left_icon { |
| | | width: 112px; |
| | | height: 32px; |
| | | } |
| | | |
| | | .multilingual { |
| | | width: 0.8em; |
| | | height: 0.8em; |
| | | margin-left: 0.25em; |
| | | |
| | | img { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .logo { |
| | | width: 50vw; |
| | | margin: 10vw auto 15vw; |
| | | } |
| | | |
| | | .logins_content { |
| | |
| | | width: 100%; |
| | | height: 9.7436rem; |
| | | margin-top: 0.4359rem; |
| | | background: #fff; |
| | | // padding: 0 0.4564rem; |
| | | |
| | | .login_forms { |
| | | width: 100%; |
| | | |
| | | border-top-left-radius: 0.26667rem; |
| | | border-top-right-radius: 0.26667rem; |
| | | padding: 0.34667rem 0.4rem; |
| | | padding: 0.2rem 0.6rem; |
| | | flex: 1; |
| | | display: flex; |
| | | flex-direction: column; |
| | |
| | | align-items: center; |
| | | flex-wrap: wrap; |
| | | |
| | | .forms_title { |
| | | font-size: 0.3rem; |
| | | margin-top: 0.5rem; |
| | | margin-bottom: 0.2rem; |
| | | font-weight: 300; |
| | | opacity: 0.7; |
| | | } |
| | | |
| | | .user_name, |
| | | .password { |
| | | width: 100%; |
| | | height: 50px; |
| | | background: rgb(246, 246, 247); |
| | | // background: #1e1e1e; |
| | | background: #fff; |
| | | border-radius: 0.3564rem; |
| | | |
| | | > input { |
| | |
| | | /deep/.el-input__inner { |
| | | width: 100%; |
| | | height: 70px; |
| | | background-color: rgb(246, 246, 247) !important; |
| | | // background: #1e1e1e; |
| | | border-radius: 8px; |
| | | font-size: 0.45rem !important; |
| | | border: none; |
| | | background-color: @Black1 !important; |
| | | font-size: 0.3rem !important; |
| | | border: @Black1 solid 1px; |
| | | color: #fff; |
| | | border-bottom: rgba(#fff, 0.7) solid 1px; |
| | | } |
| | | |
| | | .bottom_btns { |
| | | width: 100%; |
| | | height: 3.3333rem; |
| | | |
| | | // margin-top: 0.8528rem; |
| | | .butn { |
| | | width: 100%; |
| | | margin-top: 40px; |
| | | height: 60px; |
| | | border-radius: 8px; |
| | | background: #1f4583; |
| | | border: none; |
| | | } |
| | | |
| | | .butn_2 { |
| | | width: 100%; |
| | | margin-top: 40px; |
| | | height: 60px; |
| | | border-radius: 8px; |
| | | color: @green; |
| | | border-color: @green; |
| | | margin-top: 0.4rem; |
| | | } |
| | | |
| | | .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 { |