首页
Showing
5 changed files
with
72 additions
and
47 deletions
| ... | @@ -487,6 +487,13 @@ function getCode() { | ... | @@ -487,6 +487,13 @@ function getCode() { |
| 487 | } | 487 | } |
| 488 | } | 488 | } |
| 489 | 489 | ||
| 490 | @media (max-width: 750px) { | ||
| 491 | .topNav .logo { | ||
| 492 | margin-left: 0; | ||
| 493 | height: 40px; | ||
| 494 | } | ||
| 495 | } | ||
| 496 | |||
| 490 | .active { | 497 | .active { |
| 491 | color: #fff; | 498 | color: #fff; |
| 492 | border-bottom: 2px solid #fff; | 499 | border-bottom: 2px solid #fff; | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <el-dialog close-icon="CircleClose" center | 2 | <el-dialog v-model="show" :append-to-body="true" |
| 3 | v-model="show" class="pcloginpop" width="450px" :append-to-body="true" :title="title" | 3 | :close-on-click-modal="false" :show-close="showClose" :title="title" center class="pcloginpop" |
| 4 | destroy-on-close :show-close="showClose" :close-on-click-modal="false" @close="close" | 4 | close-icon="CircleClose" destroy-on-close style="min-width: 350px;max-width: 450px;" |
| 5 | @close="close" | ||
| 5 | > | 6 | > |
| 6 | <div class="pd10"></div> | 7 | <div class="pd10"></div> |
| 7 | <el-form v-if="loginStatus==0" ref="loginRef" :model="loginForm" | 8 | <el-form v-if="loginStatus==0" ref="loginRef" :model="loginForm" |
| ... | @@ -10,9 +11,9 @@ | ... | @@ -10,9 +11,9 @@ |
| 10 | 11 | ||
| 11 | <el-input | 12 | <el-input |
| 12 | v-model.trim="loginForm.username" | 13 | v-model.trim="loginForm.username" |
| 13 | size="large" | ||
| 14 | auto-complete="off" | ||
| 15 | :placeholder="language==0?'账号(注册时使用的邮箱)':'Account (e-mail)'" | 14 | :placeholder="language==0?'账号(注册时使用的邮箱)':'Account (e-mail)'" |
| 15 | auto-complete="off" | ||
| 16 | size="large" | ||
| 16 | > | 17 | > |
| 17 | 18 | ||
| 18 | </el-input> | 19 | </el-input> |
| ... | @@ -20,10 +21,10 @@ | ... | @@ -20,10 +21,10 @@ |
| 20 | <el-form-item prop="password"> | 21 | <el-form-item prop="password"> |
| 21 | <el-input | 22 | <el-input |
| 22 | v-model.trim="loginForm.password" | 23 | v-model.trim="loginForm.password" |
| 23 | type="password" | ||
| 24 | size="large" show-password | ||
| 25 | auto-complete="off" | ||
| 26 | :placeholder="language==0?'密码':'Password'" | 24 | :placeholder="language==0?'密码':'Password'" |
| 25 | auto-complete="off" show-password | ||
| 26 | size="large" | ||
| 27 | type="password" | ||
| 27 | @keyup.enter="handleLogin" | 28 | @keyup.enter="handleLogin" |
| 28 | > | 29 | > |
| 29 | </el-input> | 30 | </el-input> |
| ... | @@ -31,9 +32,9 @@ | ... | @@ -31,9 +32,9 @@ |
| 31 | <el-form-item v-if="captchaEnabled" prop="code"> | 32 | <el-form-item v-if="captchaEnabled" prop="code"> |
| 32 | <el-input | 33 | <el-input |
| 33 | v-model.trim="loginForm.code" | 34 | v-model.trim="loginForm.code" |
| 34 | size="large" | ||
| 35 | auto-complete="off" | ||
| 36 | :placeholder="language==0?'验证码':'Code'" | 35 | :placeholder="language==0?'验证码':'Code'" |
| 36 | auto-complete="off" | ||
| 37 | size="large" | ||
| 37 | @keyup.enter="handleLogin" | 38 | @keyup.enter="handleLogin" |
| 38 | > | 39 | > |
| 39 | <template #append> | 40 | <template #append> |
| ... | @@ -47,11 +48,11 @@ | ... | @@ -47,11 +48,11 @@ |
| 47 | 48 | ||
| 48 | <el-form-item style="width:100%;"> | 49 | <el-form-item style="width:100%;"> |
| 49 | <el-button | 50 | <el-button |
| 50 | class="loginBtn" | ||
| 51 | :loading="loading" | 51 | :loading="loading" |
| 52 | class="loginBtn" | ||
| 52 | size="large" | 53 | size="large" |
| 53 | type="primary" | ||
| 54 | style="width:100%;" | 54 | style="width:100%;" |
| 55 | type="primary" | ||
| 55 | @click.prevent="handleLogin" | 56 | @click.prevent="handleLogin" |
| 56 | > | 57 | > |
| 57 | <span v-if="!loading">{{ language == 0 ? '登 录' : 'Login' }}</span> | 58 | <span v-if="!loading">{{ language == 0 ? '登 录' : 'Login' }}</span> |
| ... | @@ -63,25 +64,29 @@ | ... | @@ -63,25 +64,29 @@ |
| 63 | <div style="display: flex;justify-content: space-between;width: 100%;"> | 64 | <div style="display: flex;justify-content: space-between;width: 100%;"> |
| 64 | <a class="text-primary" | 65 | <a class="text-primary" |
| 65 | @click="showChangePassword">{{ language == 0 ? '忘记密码' : 'Forgot password' }}?</a> | 66 | @click="showChangePassword">{{ language == 0 ? '忘记密码' : 'Forgot password' }}?</a> |
| 66 | <a @click="showRegister" class="text-primary">{{ language == 0 ? '账号注册' : 'Register' }}></a> | 67 | <a class="text-primary" @click="showRegister">{{ language == 0 ? '账号注册' : 'Register' }}></a> |
| 67 | </div> | 68 | </div> |
| 68 | </el-form-item> | 69 | </el-form-item> |
| 69 | <el-form-item> | 70 | <el-form-item> |
| 70 | <div class="agreeLine" v-if="language==0"> | 71 | <div v-if="language==0" class="agreeLine"> |
| 71 | 登录或注册即代表同意 | 72 | 登录或注册即代表同意 |
| 72 | <a @click="goAgreement" target="_blank">《用户协议》</a>和 | 73 | <a target="_blank" @click="goAgreement">《用户协议》</a>和 |
| 73 | <a @click="goPolicy" target="_blank">《隐私政策》</a> | 74 | <a target="_blank" @click="goPolicy">《隐私政策》</a> |
| 74 | </div> | 75 | </div> |
| 75 | <div class="agreeLine" v-else> | 76 | <div v-else class="agreeLine"> |
| 76 | Registering and logging in means agreeing to the User | 77 | Registering and logging in means agreeing to the User |
| 77 | <a @click="goAgreement" target="_blank">Agreement</a> and | 78 | <a target="_blank" @click="goAgreement">Agreement</a> and |
| 78 | <a @click="goPolicy">Privacy Policy</a> | 79 | <a @click="goPolicy">Privacy Policy</a> |
| 79 | </div> | 80 | </div> |
| 80 | </el-form-item> | 81 | </el-form-item> |
| 81 | </el-form> | 82 | </el-form> |
| 82 | 83 | ||
| 83 | <div v-if="loginStatus==1"> | 84 | <div v-if="loginStatus==1"> |
| 84 | <a class="poLeft" @click="close()"><el-icon><ArrowLeftBold /></el-icon></a> | 85 | <a class="poLeft" @click="close()"> |
| 86 | <el-icon> | ||
| 87 | <ArrowLeftBold/> | ||
| 88 | </el-icon> | ||
| 89 | </a> | ||
| 85 | <div class="rItem r1" @click="goRegister(1)"> | 90 | <div class="rItem r1" @click="goRegister(1)"> |
| 86 | <h3>{{ language == 0 ? '机构用户' : 'Organization' }}</h3> | 91 | <h3>{{ language == 0 ? '机构用户' : 'Organization' }}</h3> |
| 87 | </div> | 92 | </div> |
| ... | @@ -90,16 +95,20 @@ | ... | @@ -90,16 +95,20 @@ |
| 90 | </div> | 95 | </div> |
| 91 | </div> | 96 | </div> |
| 92 | <div v-if="loginStatus==2"> | 97 | <div v-if="loginStatus==2"> |
| 93 | <a class="poLeft" @click="close()"><el-icon><ArrowLeftBold /></el-icon></a> | 98 | <a class="poLeft" @click="close()"> |
| 99 | <el-icon> | ||
| 100 | <ArrowLeftBold/> | ||
| 101 | </el-icon> | ||
| 102 | </a> | ||
| 94 | <el-form ref="changePasswordRef" :model="changePasswordForm" | 103 | <el-form ref="changePasswordRef" :model="changePasswordForm" |
| 95 | :rules="language==0?changePasswordRules:changePasswordRules_en" class="login-form"> | 104 | :rules="language==0?changePasswordRules:changePasswordRules_en" class="login-form"> |
| 96 | <el-form-item prop="username"> | 105 | <el-form-item prop="username"> |
| 97 | 106 | ||
| 98 | <el-input | 107 | <el-input |
| 99 | v-model.trim="changePasswordForm.username" | 108 | v-model.trim="changePasswordForm.username" |
| 100 | size="large" | ||
| 101 | auto-complete="off" @change="changePasswordFormUsername" | ||
| 102 | :placeholder="language==0?'注册时使用的邮箱':'E-mail'" | 109 | :placeholder="language==0?'注册时使用的邮箱':'E-mail'" |
| 110 | auto-complete="off" size="large" | ||
| 111 | @change="changePasswordFormUsername" | ||
| 103 | > | 112 | > |
| 104 | 113 | ||
| 105 | </el-input> | 114 | </el-input> |
| ... | @@ -107,21 +116,21 @@ | ... | @@ -107,21 +116,21 @@ |
| 107 | <el-form-item> | 116 | <el-form-item> |
| 108 | <el-input | 117 | <el-input |
| 109 | v-model.trim="changePasswordForm.code" | 118 | v-model.trim="changePasswordForm.code" |
| 110 | size="large" | ||
| 111 | auto-complete="off" | ||
| 112 | :placeholder="language==0?'验证码':'Code'" | 119 | :placeholder="language==0?'验证码':'Code'" |
| 120 | auto-complete="off" | ||
| 121 | size="large" | ||
| 113 | @keyup.enter="handleLogin" | 122 | @keyup.enter="handleLogin" |
| 114 | > | 123 | > |
| 115 | <template #append> | 124 | <template #append> |
| 116 | <el-button type="primary" plain style="width: 110px;" @click="sendsmsMsg"> | 125 | <el-button plain style="width: 110px;" type="primary" @click="sendsmsMsg"> |
| 117 | <van-count-down v-if="counting" :time="60000" format="ss" @finish="counting=false"> | 126 | <van-count-down v-if="counting" :time="60000" format="ss" @finish="counting=false"> |
| 118 | <template #default="timeData"> | 127 | <template #default="timeData"> |
| 119 | <span class="text-primary">{{ timeData.seconds }}{{ language == 0 ? '秒' : 's' }}</span> | 128 | <span class="text-primary">{{ timeData.seconds }}{{ language == 0 ? '秒' : 's' }}</span> |
| 120 | </template> | 129 | </template> |
| 121 | </van-count-down> | 130 | </van-count-down> |
| 122 | <!-- <count-down v-slot="{ totalSeconds }" :time="60000" @end="counting=false">--> | 131 | <!-- <count-down v-slot="{ totalSeconds }" :time="60000" @end="counting=false">--> |
| 123 | <!-- {{ totalSeconds }} {{ language == 0 ? '秒' : 's' }}--> | 132 | <!-- {{ totalSeconds }} {{ language == 0 ? '秒' : 's' }}--> |
| 124 | <!-- </count-down>--> | 133 | <!-- </count-down>--> |
| 125 | <span v-else> | 134 | <span v-else> |
| 126 | {{ language == 0 ? '发送验证码' : 'Send' }} | 135 | {{ language == 0 ? '发送验证码' : 'Send' }} |
| 127 | </span> | 136 | </span> |
| ... | @@ -129,17 +138,18 @@ | ... | @@ -129,17 +138,18 @@ |
| 129 | </template> | 138 | </template> |
| 130 | </el-input> | 139 | </el-input> |
| 131 | <!-- <div class="vcodeBox" :style="isShow?'height:240px':'height:0'">--> | 140 | <!-- <div class="vcodeBox" :style="isShow?'height:240px':'height:0'">--> |
| 132 | <Vcode :successText="successVcode" :failText="failVcode" :slider-text="sliderText" :zIndex="9999" :show="isShow" @success="codeSuccess"></Vcode> | 141 | <Vcode :failText="failVcode" :show="isShow" :slider-text="sliderText" :successText="successVcode" |
| 142 | :zIndex="9999" @success="codeSuccess"></Vcode> | ||
| 133 | <!-- </div>--> | 143 | <!-- </div>--> |
| 134 | </el-form-item> | 144 | </el-form-item> |
| 135 | 145 | ||
| 136 | <el-form-item prop="password"> | 146 | <el-form-item prop="password"> |
| 137 | <el-input | 147 | <el-input |
| 138 | v-model.trim="changePasswordForm.password" | 148 | v-model.trim="changePasswordForm.password" |
| 139 | type="password" | ||
| 140 | size="large" show-password | ||
| 141 | auto-complete="off" | ||
| 142 | :placeholder="language==0?'新密码':'New password'" | 149 | :placeholder="language==0?'新密码':'New password'" |
| 150 | auto-complete="off" show-password | ||
| 151 | size="large" | ||
| 152 | type="password" | ||
| 143 | @keyup.enter="handleLogin" | 153 | @keyup.enter="handleLogin" |
| 144 | > | 154 | > |
| 145 | </el-input> | 155 | </el-input> |
| ... | @@ -147,20 +157,20 @@ | ... | @@ -147,20 +157,20 @@ |
| 147 | <el-form-item prop="confirmPassword"> | 157 | <el-form-item prop="confirmPassword"> |
| 148 | <el-input | 158 | <el-input |
| 149 | v-model.trim="changePasswordForm.confirmPassword" | 159 | v-model.trim="changePasswordForm.confirmPassword" |
| 150 | type="password" | ||
| 151 | size="large" show-password | ||
| 152 | auto-complete="off" | ||
| 153 | :placeholder="language==0?'确认密码':'Confirm password'" | 160 | :placeholder="language==0?'确认密码':'Confirm password'" |
| 161 | auto-complete="off" show-password | ||
| 162 | size="large" | ||
| 163 | type="password" | ||
| 154 | > | 164 | > |
| 155 | </el-input> | 165 | </el-input> |
| 156 | </el-form-item> | 166 | </el-form-item> |
| 157 | <el-form-item style="width:100%;"> | 167 | <el-form-item style="width:100%;"> |
| 158 | <el-button | 168 | <el-button |
| 159 | class="loginBtn" | ||
| 160 | :loading="loading" | 169 | :loading="loading" |
| 170 | class="loginBtn" | ||
| 161 | size="large" | 171 | size="large" |
| 162 | type="primary" | ||
| 163 | style="width:100%;" | 172 | style="width:100%;" |
| 173 | type="primary" | ||
| 164 | @click.prevent="handleChangePassword" | 174 | @click.prevent="handleChangePassword" |
| 165 | > | 175 | > |
| 166 | <span v-if="language==0">确定</span> | 176 | <span v-if="language==0">确定</span> |
| ... | @@ -189,6 +199,7 @@ import {ElMessage, ElMessageBox} from 'element-plus' | ... | @@ -189,6 +199,7 @@ import {ElMessage, ElMessageBox} from 'element-plus' |
| 189 | import cache from "@/plugins/cache"; | 199 | import cache from "@/plugins/cache"; |
| 190 | import {useStorage} from "@vueuse/core/index"; | 200 | import {useStorage} from "@vueuse/core/index"; |
| 191 | import {getCaptchaSms, getCaptchaSms2} from "@/apiPc/match"; | 201 | import {getCaptchaSms, getCaptchaSms2} from "@/apiPc/match"; |
| 202 | |||
| 192 | const user = useUserStore().user | 203 | const user = useUserStore().user |
| 193 | const useStore = useUserStore | 204 | const useStore = useUserStore |
| 194 | const emit = defineEmits(['submitForm']) | 205 | const emit = defineEmits(['submitForm']) |
| ... | @@ -300,19 +311,19 @@ function handleLogin() { | ... | @@ -300,19 +311,19 @@ function handleLogin() { |
| 300 | 311 | ||
| 301 | function close() { | 312 | function close() { |
| 302 | loginStatus.value = 0 | 313 | loginStatus.value = 0 |
| 303 | title.value = language.value == 0?'用户登录':'LOGIN' | 314 | title.value = language.value == 0 ? '用户登录' : 'LOGIN' |
| 304 | } | 315 | } |
| 305 | 316 | ||
| 306 | function showChangePassword() { | 317 | function showChangePassword() { |
| 307 | loginStatus.value = 2 | 318 | loginStatus.value = 2 |
| 308 | title.value = language.value == 0?'忘记密码/密码重置':'FORGET PASSWORD' | 319 | title.value = language.value == 0 ? '忘记密码/密码重置' : 'FORGET PASSWORD' |
| 309 | 320 | ||
| 310 | } | 321 | } |
| 311 | 322 | ||
| 312 | function showRegister() { | 323 | function showRegister() { |
| 313 | if(!user){ | 324 | if (!user) { |
| 314 | useStore().setVisitor() | 325 | useStore().setVisitor() |
| 315 | return | 326 | |
| 316 | } | 327 | } |
| 317 | } | 328 | } |
| 318 | 329 | ||
| ... | @@ -385,11 +396,11 @@ function handleChangePassword() { | ... | @@ -385,11 +396,11 @@ function handleChangePassword() { |
| 385 | if (isCodeTrue.value) { | 396 | if (isCodeTrue.value) { |
| 386 | delete changePasswordForm.value.confirmPassword | 397 | delete changePasswordForm.value.confirmPassword |
| 387 | forgetPassword(changePasswordForm.value).then(res => { | 398 | forgetPassword(changePasswordForm.value).then(res => { |
| 388 | ElMessage.success(language.value == 0 ? '操作成功,请登录' :'Operation successful, please log in') | 399 | ElMessage.success(language.value == 0 ? '操作成功,请登录' : 'Operation successful, please log in') |
| 389 | close() | 400 | close() |
| 390 | }) | 401 | }) |
| 391 | } else { | 402 | } else { |
| 392 | ElMessage.warning(language.value == 0 ? '请发送验证码' :'Please send the verification code') | 403 | ElMessage.warning(language.value == 0 ? '请发送验证码' : 'Please send the verification code') |
| 393 | } | 404 | } |
| 394 | } | 405 | } |
| 395 | }) | 406 | }) |
| ... | @@ -586,5 +597,11 @@ const goPolicy = () => { | ... | @@ -586,5 +597,11 @@ const goPolicy = () => { |
| 586 | border: var(--el-color-primary) solid 1px; | 597 | border: var(--el-color-primary) solid 1px; |
| 587 | border-radius: 0; | 598 | border-radius: 0; |
| 588 | } | 599 | } |
| 589 | .poLeft{position: absolute;top:24px;font-size: 20px;left:20px} | 600 | |
| 601 | .poLeft { | ||
| 602 | position: absolute; | ||
| 603 | top: 24px; | ||
| 604 | font-size: 20px; | ||
| 605 | left: 20px | ||
| 606 | } | ||
| 590 | </style> | 607 | </style> | ... | ... |
| ... | @@ -3,6 +3,7 @@ | ... | @@ -3,6 +3,7 @@ |
| 3 | v-model="show" :close-on-click-modal="false" :title="title" append-to-body center | 3 | v-model="show" :close-on-click-modal="false" :title="title" append-to-body center |
| 4 | class="pcloginpop" close-icon="CircleClose" | 4 | class="pcloginpop" close-icon="CircleClose" |
| 5 | destroy-on-close | 5 | destroy-on-close |
| 6 | style="min-width: 350px;" | ||
| 6 | > | 7 | > |
| 7 | <div class="boxInvitation"> | 8 | <div class="boxInvitation"> |
| 8 | 9 | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <el-dialog v-model="show" :append-to-body="true" :title="language==0?'注册':'Login'" | 2 | <el-dialog v-model="show" :append-to-body="true" :title="language==0?'注册':'Login'" |
| 3 | center close-icon="CircleClose" destroy-on-close width="480" @close="close"> | 3 | center close-icon="CircleClose" destroy-on-close style="min-width: 350px;max-width: 480px" @close="close"> |
| 4 | <div> | 4 | <div> |
| 5 | <el-form :label-position="language==0?'right':'top'" :label-width="language==0?80:150" class="d-form" size="large" | 5 | <el-form :label-position="language==0?'right':'top'" :label-width="language==0?80:150" class="d-form" size="large" |
| 6 | style="max-width: 500px;margin: auto"> | 6 | style="max-width: 500px;margin: auto"> | ... | ... |
| ... | @@ -83,9 +83,9 @@ export default defineConfig(({mode, command}) => { | ... | @@ -83,9 +83,9 @@ export default defineConfig(({mode, command}) => { |
| 83 | rewrite: (p) => p.replace(/^\/dev-api\/ztx-webSite/, '') | 83 | rewrite: (p) => p.replace(/^\/dev-api\/ztx-webSite/, '') |
| 84 | }, | 84 | }, |
| 85 | '/dev-api': { | 85 | '/dev-api': { |
| 86 | // target: 'http://192.168.1.118:8082/', | 86 | target: 'http://192.168.1.118:8082/', |
| 87 | // target: 'http://192.168.1.131:8081/', | 87 | // target: 'http://192.168.1.131:8081/', |
| 88 | target: 'https://tk005.wxjylt.com/stage-api', | 88 | // target: 'https://tk005.wxjylt.com/stage-api', |
| 89 | // target: 'http://124.70.181.90:1880/stage-api', | 89 | // target: 'http://124.70.181.90:1880/stage-api', |
| 90 | // target: 'https://sys.2025wtcwuxi.com/stage-api/', | 90 | // target: 'https://sys.2025wtcwuxi.com/stage-api/', |
| 91 | changeOrigin: true, | 91 | changeOrigin: true, | ... | ... |
-
Please register or sign in to post a comment