| | |
| | | <el-input v-model="form.mobile" placeholder="请输入绑定手机号" style="width: 100%" size="large" /> |
| | | </el-form-item> |
| | | <el-form-item prop="code" :rules="[$rules.required('请输入验证码'), $rules.code()]"> |
| | | <el-input |
| | | v-model="form.code" |
| | | placeholder="请输入验证码" |
| | | style="width: 100%" size="large" |
| | | <el-input |
| | | v-model="form.code" |
| | | placeholder="请输入验证码" |
| | | style="width: 100%" size="large" |
| | | > |
| | | <template #append> |
| | | <el-row style="width: 70px;justify-content: center;"> |
| | | <el-button |
| | | v-if="countdown == 180" |
| | | <el-button |
| | | v-if="countdown == 180" |
| | | style="color: var(--el-color-primary);" |
| | | class="cursor-p" |
| | | :loading="sendCodeLoading" |
| | | class="cursor-p" |
| | | :loading="sendCodeLoading" |
| | | @click="sendCode()" |
| | | > |
| | | 获取验证码 |
| | |
| | | import { tokenUtils } from '@/utils/axios.js'; |
| | | import { useLoginStore } from '@/stores/login.js' |
| | | import { storeToRefs } from 'pinia'; |
| | | import cityItems from '@/assets/json/cityItems.json' |
| | | export default { |
| | | setup() { |
| | | const { lastRouteInfo } = storeToRefs(useLoginStore()) |
| | |
| | | } |
| | | }, |
| | | login() { |
| | | const data = { |
| | | let data = { |
| | | mobile: this.form.mobile, |
| | | code: this.form.code, |
| | | state: this.state, |
| | | openid: this.openid, |
| | | wxCode: this.wxCode |
| | | wxCode: this.wxCode, |
| | | } |
| | | this.loginLoading = true |
| | | this.$axios.post('/system/auth/staff/checkin/bind', data).then(async res => { |
| | |
| | | const resData = res.data.data |
| | | tokenUtils.setTokens(resData.accessToken, resData.refreshToken) |
| | | this.$message.success('绑定成功') |
| | | const path = localStorage.getItem('verify_url') |
| | | const path = localStorage.getItem('_enterUrl') |
| | | if (path) { |
| | | this.$router.replace(path) |
| | | } |
| | |
| | | .login { |
| | | padding: 40px 20px 20px; |
| | | } |
| | | </style> |
| | | </style> |