| | |
| | | <el-option v-for="item in stationOptions" :key="item.value" :label="item.label" :value="item.value" /> |
| | | </el-select> |
| | | </div> |
| | | |
| | | |
| | | <div class="item"> |
| | | <div class="input-icon el-icon-mobile"></div> |
| | | <input v-focus type="text" v-model="userInfo.verificationCode" placeholder="è¾å
¥éªè¯ç " /> |
| | | <div class="code" @click="getVierificationCode"> |
| | | <img v-show="codeImgSrc != ''" :src="codeImgSrc" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="loging-btn"> |
| | | <el-button size="large" :loading="loading" color="#3a6cd1" :dark="true" @click="login" long> |
| | | <span v-if="!loading">ç»å½</span> |
| | | <span v-else>æ£å¨ç»å½...</span> |
| | | </el-button> |
| | | </div> |
| | | <!-- æ°å¢ï¼ä¿®æ¹å¯ç æé®ï¼æ ·å¼ä¸ç»å½é¡µç»ä¸ï¼ --> |
| | | <div class="change-pwd-btn"> |
| | | <el-button size="large" type="text" @click="goChangePassword" long> |
| | | <span style="color: #3a6cd1; font-size: 13px;">ä¿®æ¹å¯ç </span> |
| | | </el-button> |
| | | </div> |
| | | </div> |
| | |
| | | const codeImgSrc = ref(""); |
| | | const value = ref(""); |
| | | const userInfo = reactive({ |
| | | userName: "admin", |
| | | password: "123456", |
| | | userName: "", |
| | | password: "", |
| | | verificationCode: "1234", |
| | | UUID: undefined, |
| | | }); |
| | |
| | | let $message = appContext.config.globalProperties.$message; |
| | | let router = useRouter(); |
| | | |
| | | // æ°å¢ï¼è·³è½¬å°ä¿®æ¹å¯ç é¡µé¢ |
| | | const goChangePassword = () => { |
| | | router.push({ path: "/change-password" }); |
| | | }; |
| | | |
| | | const login = () => { |
| | | if (!userInfo.userName) return $message.error("请è¾å
¥ç¨æ·å"); |
| | | if (!userInfo.password) return $message.error("请è¾å
¥å¯ç "); |
| | | if (!userInfo.verificationCode) { |
| | | return $message.error("请è¾å
¥éªè¯ç "); |
| | | } |
| | | |
| | | |
| | | // ç¡®ä¿ç«å°å¼å·²ä¿å |
| | | if (stationValue.value) { |
| | |
| | | getVierificationCode(); |
| | | return $message.error(result.message); |
| | | } |
| | | $message.success("ç»å½æå,æ£å¨è·³è½¬!"); |
| | | $message.success(result.message); |
| | | store.commit("setUserInfo", result.data); |
| | | |
| | | router.push({ path: "/" }); |
| | |
| | | stationOptions, |
| | | stationValue, |
| | | handleStationChange, |
| | | goChangePassword // æ°å¢ï¼æ´é²è·³è½¬æ¹æ³ |
| | | }; |
| | | }, |
| | | directives: { |
| | |
| | | padding: 21px; |
| | | font-size: 14px !important; |
| | | width: 100%; |
| | | } |
| | | } |
| | | |
| | | // æ°å¢ï¼ä¿®æ¹å¯ç æé®æ ·å¼ï¼ä¸ç»å½é¡µé£æ ¼ç»ä¸ï¼ |
| | | .change-pwd-btn { |
| | | width: 400px; |
| | | margin-top: 15px; |
| | | text-align: center; |
| | | |
| | | button { |
| | | font-size: 13px; |
| | | padding: 0; |
| | | |
| | | &:hover { |
| | | color: #1850c1 !important; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | .form-user, |
| | | .loging-btn { |
| | | .loging-btn, |
| | | .change-pwd-btn { // æ°å¢ï¼ååºå¼éé
ä¿®æ¹å¯ç æé® |
| | | width: 100%; |
| | | } |
| | | } |