Merge branch 'lx-dev' of 47.94.45.65:angelo/web-base-h5 into lx-test

This commit is contained in:
woody 2025-09-30 09:28:45 +08:00
commit 222874bca0
1 changed files with 179 additions and 64 deletions

View File

@ -1,26 +1,26 @@
<template> <template>
<view class="main"> <view class="main">
<view class="title"> <view class="title">
{{ '会员登录' }} {{ '会员登录' }}
</view> </view>
<u-form :model="loginForm" <u-form :model="loginForm" labelWidth="auto" ref="uForm">
labelWidth="auto"
ref="uForm">
<view class="view-class pa"> <view class="view-class pa">
<!-- <view class="account-s"> <!-- <view class="account-s">
</view> --> </view> -->
<u-form-item label="" <u-form-item label="" prop="username">
prop="username"> <u-input
<u-input v-model="loginForm.username" v-model="loginForm.username"
clearable clearable
placeholder-class="place-class" placeholder-class="place-class"
class="border-color " class="border-color"
:placeholder="'会员账号'"> :placeholder="'会员账号'"
<image class="tou" >
slot="prefix" <image
src="../../static/images/login/index-icon4.png"></image> class="tou"
slot="prefix"
src="../../static/images/login/index-icon4.png"
></image>
</u-input> </u-input>
</u-form-item> </u-form-item>
<!-- <view class="close-s" <!-- <view class="close-s"
@ -33,62 +33,98 @@
<!-- <view class="account-s widths"> <!-- <view class="account-s widths">
<image src="../../static/images/login/index-icon2.png"></image> <image src="../../static/images/login/index-icon2.png"></image>
</view> --> </view> -->
<u-form-item label="" <u-form-item label="" prop="password">
prop="password"> <u-input
<u-input placeholder-style="color:#333" placeholder-style="color:#333"
:type="password" :type="password"
class="border-color" class="border-color"
v-model="loginForm.password" v-model="loginForm.password"
:placeholder="'登录密码'"> :placeholder="'登录密码'"
<image class="mm" >
slot="prefix" <image
src="../../static/images/login/index-icon2.png"></image> class="mm"
slot="prefix"
src="../../static/images/login/index-icon2.png"
></image>
<view slot="suffix"> <view slot="suffix">
<view v-if="password=='text'" <view
@click="changeFlagTap('password')"> v-if="password == 'text'"
<image class="eye" @click="changeFlagTap('password')"
src="../../static/images/login/icon1.png"></image> >
<image
class="eye"
src="../../static/images/login/icon1.png"
></image>
</view> </view>
<view v-else <view v-else @click="changeFlagTap('text')">
@click="changeFlagTap('text')"> <image
<image class="eye" class="eye"
src="../../static/images/login/icon2.png"></image> src="../../static/images/login/icon2.png"
></image>
</view> </view>
</view> </view>
</u-input> </u-input>
</u-form-item> </u-form-item>
</view> </view>
<view class="view-class"> <view class="view-class">
<!-- <view class="account-s yzm"> <!-- <view class="account-s yzm">
<image src="../../static/images/login/index-icon1.png"></image> <image src="../../static/images/login/index-icon1.png"></image>
</view> --> </view> -->
<u-form-item label="" <u-form-item label="" prop="code">
prop="code"> <u-input
<u-input v-model="loginForm.code" v-model="loginForm.code"
placeholder-class="place-class" placeholder-class="place-class"
class="border-color" class="border-color"
:placeholder="'验证码'"> :placeholder="'验证码'"
<image class="mm" >
slot="prefix" <image
src="../../static/images/login/index-icon1.png"></image> class="mm"
<img :src="codeUrl" slot="prefix"
slot="suffix" src="../../static/images/login/index-icon1.png"
style="height: 38px;" ></image>
@click="getVerifyCode" /> <img
:src="codeUrl"
slot="suffix"
style="height: 38px"
@click="getVerifyCode"
/>
</u-input> </u-input>
</u-form-item> </u-form-item>
</view> </view>
</u-form> </u-form>
<u-button type="success" <u-button
shape="circle" type="success"
class="btn" shape="circle"
:loading="isLoading" class="btn"
:loadingText="'登录中'" :loading="isLoading"
@click="toLogin">{{'登录'}}</u-button> :loadingText="'登录中'"
<view class="paswwrod_btn" @click="toLogin"
@click="submit">{{'忘记密码'}}</view> >{{ '登录' }}</u-button
>
<view class="paswwrod_btn" @click="submit">{{ '忘记密码' }}</view>
<view class="beian-container">
<div style="height: 25px"></div>
<div class="beian-content">
<a
class="beian-link jicpb"
href="https://beian.miit.gov.cn/#/Integrated/index"
target="_blank"
title="工信部备案查询"
>
京ICP备17001692号-7
</a>
<span class="beian-separator">|</span>
<a
class="beian-link jgawb"
href="https://beian.mps.gov.cn/#/query/webSearch?code=11022902000492"
target="_blank"
title="公安部备案查询"
>
京公网安备11022902000492号
</a>
</div>
</view>
</view> </view>
</template> </template>
@ -116,7 +152,7 @@ export default {
}, },
onLoad() { onLoad() {
this.getVerifyCode() this.getVerifyCode()
this.loginForm.username = uni.getStorageSync('username')||'' this.loginForm.username = uni.getStorageSync('username') || ''
// this.getLanguage() // this.getLanguage()
}, },
methods: { methods: {
@ -135,13 +171,13 @@ export default {
this.loginForm.username = '' this.loginForm.username = ''
}, },
getVerifyCode() { getVerifyCode() {
api.captchaImage().then((res) => { api.captchaImage().then(res => {
this.codeUrl = 'data:image/gif;base64,' + res.img this.codeUrl = 'data:image/gif;base64,' + res.img
this.loginForm.uuid = res.uuid this.loginForm.uuid = res.uuid
}) })
}, },
toLogin() { toLogin() {
api.login(this.loginForm).then((res) => { api.login(this.loginForm).then(res => {
this.isLoading = false this.isLoading = false
if (!res) { if (!res) {
// uni.showToast({ // uni.showToast({
@ -165,15 +201,15 @@ export default {
url: url, url: url,
method: 'GET', method: 'GET',
responseType: 'arraybuffer', responseType: 'arraybuffer',
success: (res) => {}, success: res => {},
fail: (err) => { fail: err => {
reject(err) reject(err)
}, },
}) })
}) })
}, },
getUseInfo() { getUseInfo() {
store.dispatch('GetInfo').then((res) => { store.dispatch('GetInfo').then(res => {
uni.switchTab({ url: '/pages/index/index' }) uni.switchTab({ url: '/pages/index/index' })
// //
// if (res.data.loginType == 1) { // if (res.data.loginType == 1) {
@ -239,7 +275,7 @@ body {
text-align: center; text-align: center;
} }
.btn { .btn {
background-color: #005BAC; background-color: #005bac;
border: none; border: none;
height: 92rpx; height: 92rpx;
line-height: 92rpx; line-height: 92rpx;
@ -329,4 +365,83 @@ body {
.pa { .pa {
padding: 7px 20rpx; padding: 7px 20rpx;
} }
</style>
/* 备案容器 */
.beian-container {
background-color: #ffffff; /* 深色背景 */
padding: 16px 0;
text-align: center;
font-size: 12px;
line-height: 1.5;
margin-top: 20px;
border-radius: 8px 8px 0 0;
}
/* 备案内容 */
.beian-content {
display: flex;
justify-content: center;
align-items: center;
flex-wrap: wrap;
gap: 12px;
max-width: 1200px;
margin: 0 auto;
padding: 0 16px;
}
/* 备案链接 */
.beian-link {
color: #749ae3;
text-decoration: none;
padding: 4px 8px;
border-radius: 4px;
transition: all 0.3s ease;
display: inline-block;
}
/* 悬停效果 */
.beian-link:hover {
color: #fff;
background-color: rgba(116, 154, 227, 0.2);
transform: translateY(-1px);
box-shadow: 0 2px 8px rgba(116, 154, 227, 0.3);
}
/* 分隔符 */
.beian-separator {
color: #749ae3;
opacity: 0.6;
}
/* 响应式设计 */
@media screen and (max-width: 480px) {
.beian-content {
flex-direction: column;
gap: 8px;
}
.beian-separator {
display: none;
}
.beian-link {
font-size: 11px;
}
}
/* 动画效果 */
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.beian-container {
animation: fadeIn 0.5s ease-out;
}
</style>