| | |
| | | placeholder="请è¾å
¥å¯ç " |
| | | /> |
| | | </div> |
| | | |
| | | <div class="item station-select-item"> |
| | | <div class="input-icon el-icon-lock"></div> |
| | | <el-select |
| | | v-model="stationValue" |
| | | placeholder="éæ©ç«å°" |
| | | class="station-select" |
| | | @change="handleStationChange" |
| | | > |
| | | <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" |
| | |
| | | <span v-else>æ£å¨ç»å½...</span> |
| | | </el-button> |
| | | </div> |
| | | |
| | | <!-- è´¦å·ä¿¡æ¯ --> |
| | | <!-- <div class="account-info"> |
| | | <p>æ¼ç¤ºè´¦å·ï¼admin666 å¯ç :123456</p> |
| | | <p>æ¬å°è´¦å·ï¼admin å¯ç :123456</p> |
| | | <p><a href="https://jq.qq.com/?_wv=1027&k=Sqstuy0M" style="text-decoration: none" |
| | | target="_blank">QQ3群:743852316</a> |
| | | |
| | | <a href="http://v2.volcore.xyz/document/guide" style="text-decoration: none" target="_blank">æ¡æ¶ææ¡£</a> |
| | | </p> |
| | | </div> --> |
| | | <!-- 龿¥ä½ç½® --> |
| | | <!-- <div class="app-link" > |
| | | <a href="#" style="text-decoration: none">ç§»å¨ç«¯æ«ç </a> |
| | | <a> |
| | | <i class="el-icon-chat-dot-round"></i> å°ç¨åº |
| | | <img src="https://app-1256993465.cos.ap-nanjing.myqcloud.com/wechat.jpg" /></a> |
| | | <a> |
| | | <i class="el-icon-apple"></i> |
| | | Android |
| | | <img src="https://app-1256993465.cos.ap-nanjing.myqcloud.com/Android.png" /></a> |
| | | <a> |
| | | <i class="el-icon-document"></i> |
| | | H5 |
| | | <img src="https://app-1256993465.cos.ap-nanjing.myqcloud.com/H5.png" /></a> |
| | | </div> --> |
| | | </div> |
| | | |
| | | <!-- 页é¢åºé¨ --> |
| | | <!-- <div class="login-footer"> |
| | | <a style="text-decoration: none" href="https://beian.miit.gov.cn/" target="_blank">京ICPå¤19056538å·-1</a> |
| | | |
| | | |
| | | <a href="https://dotnet9.com/" style="text-decoration: none" target="blank">Dotnet9</a> |
| | | <a href="https://space.bilibili.com/525836469" style="text-decoration: none" target="blank">NETè§é¢æç¨(微软MVP-ACEå½å¶)</a> |
| | | <a href="https://www.cctalk.com/m/group/90268531" style="text-decoration: none" target="blank">VOLæ¡æ¶è§é¢</a> |
| | | <a href="http://120.48.115.252:9990" style="text-decoration: none" target="blank">è§é¢æ¼ç¤ºå°å</a> |
| | | </div> --> |
| | | |
| | | <img class="login-bg" src="/static/login_bg.png" /> |
| | | </div> |
| | | </template> |
| | | |
| | | |
| | | <script > |
| | | <script> |
| | | import { |
| | | defineComponent, |
| | | ref, |
| | | reactive, |
| | | toRefs, |
| | | getCurrentInstance, |
| | | onMounted, |
| | | } from "vue"; |
| | | import { useRouter, useRoute } from "vue-router"; |
| | | import store from "../store/index"; |
| | | import http from "@/../src/api/http.js"; |
| | | import { stationManager, STATION_STORAGE_KEY } from "@/../src/uitils/stationManager"; |
| | | export default defineComponent({ |
| | | setup(props, context) { |
| | | store.commit("clearUserInfo", ""); |
| | | const loading = ref(false); |
| | | const codeImgSrc = ref(""); |
| | | const value = ref(""); |
| | | const userInfo = reactive({ |
| | | userName: "", |
| | | password: "", |
| | | verificationCode: "", |
| | | UUID: undefined, |
| | | }); |
| | | const stationValue = ref(""); |
| | | const stationOptions = reactive([ |
| | | { label: "ç«å°2", value: "2-1" }, |
| | | { label: "ç«å°3", value: "3-1" }, |
| | | ]); |
| | | // åå§åç«å°å¼ |
| | | onMounted(() => { |
| | | // 仿¬å°åå¨å è½½ä¿åçç«å°å¼ |
| | | const savedStation = stationManager.getStation(); |
| | | if (savedStation) { |
| | | stationValue.value = savedStation; |
| | | } else if (stationOptions.length > 0) { |
| | | // å¦ææ²¡æä¿åçå¼ï¼ä½¿ç¨ç¬¬ä¸ä¸ªé项 |
| | | stationValue.value = stationOptions[0].value; |
| | | } |
| | | }); |
| | | const handleStationChange = (value) => { |
| | | // ä¿åç«å°éæ©å°æ¬å°åå¨ |
| | | if (value) { |
| | | stationManager.saveStation(value); |
| | | // ä¹ä¿åå°Vuex/storeä¸ï¼æ¹ä¾¿å
¨å±è®¿é® |
| | | store.commit("setStation", value); |
| | | } |
| | | }; |
| | | |
| | | const getVierificationCode = () => { |
| | | http.get("/api/User/getVierificationCode").then((x) => { |
| | |
| | | }); |
| | | }; |
| | | getVierificationCode(); |
| | | |
| | | |
| | | let appContext = getCurrentInstance().appContext; |
| | | let $message = appContext.config.globalProperties.$message; |
| | | let router = useRouter(); |
| | |
| | | if (!userInfo.verificationCode) { |
| | | return $message.error("请è¾å
¥éªè¯ç "); |
| | | } |
| | | |
| | | // ç¡®ä¿ç«å°å¼å·²ä¿å |
| | | if (stationValue.value) { |
| | | stationManager.saveStation(stationValue.value); |
| | | store.commit("setStation", stationValue.value); |
| | | } |
| | | |
| | | loading.value = true; |
| | | http.post("/api/User/login", userInfo, "æ£å¨ç»å½....").then((result) => { |
| | | if (!result.status) { |
| | |
| | | } |
| | | $message.success("ç»å½æå,æ£å¨è·³è½¬!"); |
| | | store.commit("setUserInfo", result.data); |
| | | |
| | | |
| | | router.push({ path: "/" }); |
| | | }); |
| | | }; |
| | |
| | | userInfo, |
| | | loginPress, |
| | | openUrl, |
| | | stationOptions, |
| | | stationValue, |
| | | handleStationChange, |
| | | }; |
| | | }, |
| | | directives: { |
| | |
| | | width: 50%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | // margin-right: 150px; |
| | | z-index: 999; |
| | | |
| | | .form-user { |
| | | // margin: 25px 0; |
| | | |
| | | .item { |
| | | border-radius: 5px; |
| | | border: 1px solid #ececec; |
| | |
| | | background: #ffff; |
| | | height: 45px; |
| | | padding-left: 20px; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | &.station-select-item { |
| | | padding-left: 0; |
| | | |
| | | .input-icon { |
| | | margin-left: 20px; |
| | | min-width: 20px; |
| | | } |
| | | } |
| | | |
| | | .code { |
| | | position: relative; |
| | | cursor: pointer; |
| | | width: 74px; |
| | | padding: 5px 10px 0 0; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .input-icon { |
| | | line-height: 45px; |
| | | color: #7a7a7a; |
| | | padding-right: 20px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | } |
| | | } |
| | |
| | | margin: 0; |
| | | padding: 0; |
| | | color: #323233; |
| | | line-height: inherit; |
| | | text-align: left; |
| | | border: 0; |
| | | outline: none; |
| | | font-size: 16px; |
| | | line-height: 20px; |
| | | height: 100%; |
| | | line-height: normal; |
| | | } |
| | | |
| | | select { |
| | | background: white; |
| | | display: block; |
| | | box-sizing: border-box; |
| | | width: 100%; |
| | | min-width: 0; |
| | | margin: 0; |
| | | padding: 0; |
| | | color: #323233; |
| | | text-align: left; |
| | | border: 0; |
| | | outline: none; |
| | | font-size: 16px; |
| | | } |
| | | } |
| | | |
| | |
| | | font-weight: bolder; |
| | | font-size: 20px; |
| | | letter-spacing: 2px; |
| | | |
| | | position: relative; |
| | | display: flex; |
| | | |
| | |
| | | color: transparent; |
| | | font-size: 25px; |
| | | } |
| | | |
| | | // 䏿æ¡èªå®ä¹æ ·å¼ - ç§»é¤ææäº¤äºææ |
| | | .station-select { |
| | | width: 100%; |
| | | height: 100%; |
| | | flex: 1; |
| | | |
| | | :deep(.el-input) { |
| | | height: 100%; |
| | | cursor: pointer; // æ·»å æéæ¾ç¤ºä¸ºå¯ç¹å» |
| | | } |
| | | |
| | | :deep(.el-input__wrapper) { |
| | | height: 100%; |
| | | box-shadow: none; |
| | | border: none; |
| | | padding: 0; |
| | | background: transparent; |
| | | |
| | | // ç§»é¤ææhoverãfocusææ |
| | | &:hover, &:focus, &.is-focus { |
| | | box-shadow: none !important; |
| | | outline: none !important; |
| | | border: none !important; |
| | | } |
| | | } |
| | | |
| | | :deep(.el-input__inner) { |
| | | height: 100%; |
| | | padding-left: 10px; |
| | | padding-top: 10px; |
| | | font-size: 16px; |
| | | color: #323233; |
| | | cursor: pointer; // æ·»å æéæ¾ç¤ºä¸ºå¯ç¹å» |
| | | |
| | | &::placeholder { |
| | | color: #c0c4cc; |
| | | } |
| | | } |
| | | |
| | | :deep(.el-input__suffix) { |
| | | display: flex; |
| | | align-items: center; |
| | | height: 100%; |
| | | } |
| | | |
| | | :deep(.el-select__caret) { |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | margin-right: 10px; |
| | | } |
| | | |
| | | // ç§»é¤æ´ä¸ªç»ä»¶ä¸çä»»ä½hoveråfocusæ ·å¼ |
| | | &:hover, &:focus, &.is-focus { |
| | | :deep(.el-input__wrapper) { |
| | | box-shadow: none !important; |
| | | outline: none !important; |
| | | border: none !important; |
| | | } |
| | | } |
| | | } |
| | | |
| | | // ä¿®æ¹å
¨å±çä¸ææ¡æ ·å¼ |
| | | :deep(.el-select-dropdown) { |
| | | border: 1px solid #ececec; |
| | | border-radius: 5px; |
| | | box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); |
| | | |
| | | .el-select-dropdown__item { |
| | | height: 45px; |
| | | line-height: 45px; |
| | | font-size: 16px; |
| | | color: #323233; |
| | | padding: 0 20px; |
| | | |
| | | &:hover { |
| | | background-color: #f5f7fa; |
| | | } |
| | | |
| | | &.selected { |
| | | color: #3a6cd1; |
| | | font-weight: normal; |
| | | background-color: #f0f7ff; |
| | | } |
| | | } |
| | | |
| | | // éèæ»å¨æ¡æè°æ´æ»å¨æ¡æ ·å¼ |
| | | &::-webkit-scrollbar { |
| | | width: 6px; |
| | | } |
| | | |
| | | &::-webkit-scrollbar-track { |
| | | background: #f1f1f1; |
| | | border-radius: 3px; |
| | | } |
| | | |
| | | &::-webkit-scrollbar-thumb { |
| | | background: #c1c1c1; |
| | | border-radius: 3px; |
| | | } |
| | | } |
| | | |
| | | // ç§»é¤ææinputçfocusåhoveræ ·å¼ |
| | | input { |
| | | &:hover, &:focus { |
| | | border: none !important; |
| | | outline: none !important; |
| | | box-shadow: none !important; |
| | | } |
| | | } |
| | | </style> |
| | | <style lang="less" scoped> |
| | | .app-link { |
| | | // font-weight: bolder; |
| | | text-align: center; |
| | | padding-top: 5px; |
| | | font-size: 12px; |
| | |
| | | top: -130px; |
| | | width: 120px; |
| | | left: -22px; |
| | | |
| | | border: 1px solid #b1b1b1; |
| | | } |
| | | } |