| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085 |
- <!DOCTYPE html>
- <html lang="zh-CN">
- <head>
- <meta charset="UTF-8" />
- <meta
- name="viewport"
- content="width=device-width, initial-scale=1.0, user-scalable=no"
- />
- <title>登录</title>
- <!-- 引入基础依赖 -->
- <script src="/js/mp_base/base.js"></script>
- </head>
- <body>
- <!-- 页面加载状态 -->
- <div id="page-loading" class="page-loading">
- <div class="loading-content">
- <div class="loading-spinner"></div>
- <div class="loading-text">加载中...</div>
- </div>
- </div>
- <div id="app" v-cloak>
- <div class="login-popup show">
- <div class="mask"></div>
- <div class="popup-content">
- <!-- <div class="popup-header">
- <span class="title">登录</span>
- </div> -->
- <!-- 用户协议 -->
- <div class="agreement">
- <input
- type="checkbox"
- v-model="agreed"
- id="agreement-checkbox"
- class="agreement-checkbox"
- />
- <label for="agreement-checkbox" class="agreement-text">
- 我已阅读并同意
- <span class="link" @click="openAgreement('user')"
- >《用户协议》</span
- >与<span class="link" @click="openAgreement('privacy')"
- >《隐私协议》</span
- >
- </label>
- </div>
- <!-- 账号密码登录 -->
- <div class="account-login">
- <div class="input-item">
- <Icon
- name="icon-renyuan"
- size="32"
- color="#575d6d"
- class="input-icon"
- ></Icon>
- <input
- type="text"
- v-model="form.username"
- placeholder="请输入您的账号"
- class="login-input"
- />
- </div>
- <div class="input-item">
- <Icon
- name="icon-kaisuo"
- size="32"
- color="#575d6d"
- class="input-icon"
- ></Icon>
- <input
- :type="showPassword ? 'text' : 'password'"
- v-model="form.password"
- placeholder="请输入您的密码"
- class="login-input"
- />
- <div class="eye-icon" @click="showPassword = !showPassword">
- <Icon
- :name="showPassword ? 'icon-yanjing-kai' : 'icon-yanjing-bi'"
- size="32"
- color="#575d6d"
- ></Icon>
- </div>
- </div>
- <button
- class="account-btn"
- :class="{ 'disabled': isLogging }"
- :disabled="isLogging"
- @click="handleAccountLogin"
- >
- <Icon
- name="icon-tuichu"
- size="32"
- color="#fff"
- class="btn-icon"
- ></Icon>
- <span>{{ isLogging ? '登录中...' : '登录' }}</span>
- </button>
- </div>
- </div>
- </div>
- <!-- Loading 遮罩 -->
- <div v-if="showLoading" class="loading-mask">
- <div class="loading-content">
- <div class="loading-spinner"></div>
- <div class="loading-text">{{ loadingText }}</div>
- </div>
- </div>
- <!-- Toast 提示 -->
- <div v-if="toast.show" class="toast" :class="toast.type">
- {{ toast.message }}
- </div>
- <!-- warnMsg 使用 ss-confirm -->
- <ss-confirm
- v-model="warnConfirm.show"
- title="提示"
- :mask-closable="false"
- @confirm="handleWarnConfirmOk"
- @cancel="handleWarnConfirmCancel"
- >
- <div class="warn-confirm-text">{{ warnConfirm.message }}</div>
- </ss-confirm>
- <!-- 自定义确认弹窗 -->
- <div v-if="confirmDialog.show" class="confirm-dialog-mask">
- <div class="confirm-dialog">
- <div class="confirm-content">
- <div class="confirm-title">{{ confirmDialog.title }}</div>
- <div class="confirm-message">{{ confirmDialog.message }}</div>
- <div class="confirm-buttons">
- <button
- v-if="confirmDialog.showCancel"
- class="confirm-btn cancel-btn"
- @click="handleConfirmCancel"
- >
- 取消
- </button>
- <button
- class="confirm-btn confirm-btn-primary"
- :class="{ 'full-width': !confirmDialog.showCancel }"
- @click="handleConfirmOk"
- >
- 确认
- </button>
- </div>
- </div>
- </div>
- </div>
- <!-- 底部抽屉:显示协议内容 -->
- <div
- v-if="agreementDrawer.show"
- class="drawer-mask"
- @click="closeAgreementDrawer"
- >
- <div class="drawer-content" @click.stop>
- <div class="drawer-header">
- <div class="drawer-title">{{ agreementDrawer.title }}</div>
- <div class="drawer-close" @click="closeAgreementDrawer">
- <Icon name="icon-X-xi" size="32" color="#666"></Icon>
- </div>
- </div>
- <div class="drawer-body">
- <div v-html="agreementDrawer.content"></div>
- </div>
- </div>
- </div>
- </div>
- <script>
- // 等待SS框架加载完成
- window.SS.ready(function () {
- // 使用SS框架的方式创建Vue实例
- window.SS.dom.initializeFormApp({
- el: "#app",
- data() {
- return {
- form: {
- username: "",
- password: "",
- },
- showPassword: false,
- agreed: false,
- isLogging: false,
- showLoading: false,
- loadingText: "",
- toast: {
- show: false,
- message: "",
- type: "info",
- },
- warnConfirm: {
- show: false,
- message: "",
- resolve: null,
- },
- confirmDialog: {
- show: false,
- title: "提示",
- message: "",
- showCancel: true,
- resolve: null,
- },
- agreementDrawer: {
- show: false,
- title: "",
- content: "",
- },
- };
- },
- mounted() {
- // 隐藏页面加载状态
- const pageLoading = document.getElementById("page-loading");
- if (pageLoading) {
- pageLoading.style.display = "none";
- }
- // 初始化页面,使用自定义结果处理
- if (typeof initPage === "function") {
- initPage("login", this.handleResult);
- }
- // 获取URL参数,用于调试
- const urlParams = this.getUrlParams();
- console.log("🔗 H5登录页面参数:", urlParams);
- },
- methods: {
- // 获取URL参数
- getUrlParams() {
- const params = {};
- const urlSearchParams = new URLSearchParams(
- window.location.search
- );
- for (const [key, value] of urlSearchParams) {
- params[key] = decodeURIComponent(value);
- }
- return params;
- },
- // 处理操作结果(来自小程序的回调)
- handleResult(data) {
- console.log("🎯 收到小程序回调:", data);
- // 这里可以处理来自小程序的各种回调
- },
- // 显示Loading
- showLoadingMask(text = "加载中...") {
- this.showLoading = true;
- this.loadingText = text;
- },
- // 隐藏Loading
- hideLoadingMask() {
- this.showLoading = false;
- this.loadingText = "";
- },
- // 显示Toast
- showToast(message, type = "info", duration = 3000) {
- this.toast = {
- show: true,
- message,
- type,
- };
- setTimeout(() => {
- this.toast.show = false;
- }, duration);
- },
- // 自定义确认对话框
- showConfirm(message, options = {}) {
- const { title = "提示", showCancel = true } = options;
- return new Promise((resolve) => {
- this.confirmDialog = {
- show: true,
- title,
- message,
- showCancel,
- resolve,
- };
- });
- },
- // 处理确认对话框 - 取消
- handleConfirmCancel() {
- this.confirmDialog.show = false;
- if (this.confirmDialog.resolve) {
- this.confirmDialog.resolve(false);
- }
- this.confirmDialog.resolve = null;
- },
- // 处理确认对话框 - 确认
- handleConfirmOk() {
- this.confirmDialog.show = false;
- if (this.confirmDialog.resolve) {
- this.confirmDialog.resolve(true);
- }
- this.confirmDialog.resolve = null;
- },
- // warnMsg 确认弹窗 - 确认
- handleWarnConfirmOk() {
- this.warnConfirm.show = false;
- if (this.warnConfirm.resolve) {
- this.warnConfirm.resolve(true);
- }
- this.warnConfirm.resolve = null;
- },
- // warnMsg 确认弹窗 - 取消(maskClosable=false 正常不会触发)
- handleWarnConfirmCancel() {
- this.warnConfirm.show = false;
- if (this.warnConfirm.resolve) {
- this.warnConfirm.resolve(false);
- }
- this.warnConfirm.resolve = null;
- },
- showWarnConfirm(message) {
- return new Promise((resolve) => {
- this.warnConfirm = {
- show: true,
- message,
- resolve,
- };
- });
- },
- // 账号密码登录
- async handleAccountLogin() {
- if (this.isLogging) {
- console.log("正在登录中,请勿重复点击");
- return;
- }
- if (!this.agreed) {
- // 使用自定义确认对话框替换原生confirm
- const userConfirmed = await this.showConfirm(
- "是否同意用户协议和隐私协议?"
- );
- if (userConfirmed) {
- this.agreed = true; // 用户点击了“确定”,视为同意
- // 继续执行后续逻辑
- } else {
- return; // 用户点击了“取消”,中断操作
- }
- }
- // 提交前清理账号中的空格
- const normalizedUsername = (this.form.username || "").replace(
- /\s+/g,
- ""
- );
- this.form.username = normalizedUsername;
- if (!this.form.username || !this.form.password) {
- this.showToast("请输入用户名和密码", "warning");
- return;
- }
- try {
- this.isLogging = true;
- this.showLoadingMask("登录中...");
- // 获取URL参数中的wechatCode
- const urlParams = this.getUrlParams();
- const wechatCode = urlParams.wechatCode || "";
- console.log("🔗 使用wechatCode:", wechatCode);
- // 使用真实的API进行登录
- const response = await h5UserApi.accountLogin({
- yhm: this.form.username,
- mm: this.form.password,
- wdConfirmationCaptchaService: "0",
- wechatCode: wechatCode, // 传递wechatCode
- });
- // 检查是否有错误信息
- if (response && response.data && response.data.msg) {
- // 登录失败,显示错误信息
- console.error("❌ 登录失败:", response.data.msg);
- this.showToast(response.data.msg, "error");
- return;
- }
- // 检查是否有告警信息(先关闭 loading,再用 ss-confirm 确认后继续)
- if (response && response.data && response.data.warnMsg) {
- this.hideLoadingMask();
- const confirmed = await this.showWarnConfirm(
- response.data.warnMsg
- );
- if (!confirmed) {
- return;
- }
- }
- console.log("response:", response);
- // 检查登录是否成功
- if (response && response.data) {
- if (
- typeof response.data === "string" &&
- response.data.includes("页面执行时错误")
- ) {
- throw new Error("服务器处理错误");
- }
- const userData = {
- devId: response.data.devId,
- sbmc: response.data.sbmc,
- sessId: response.data.sessId,
- xm: response.data.xm,
- yhsbToken: response.data.yhsbToken,
- onlineToken: response.data.onlineToken,
- syList: response.data.sylist,
- yhid: response.data.yhid,
- yhm: response.data.yhm,
- };
- // 保存用户信息到H5本地存储
- h5UserApi.saveUserInfo(userData);
- // 准备返回数据给小程序
- const loginResult = {
- success: true,
- userInfo: userData,
- };
- console.log("✅ 登录成功,准备返回数据:", loginResult);
- // this.showToast('登录成功!', 'success')
- // 延迟一下让用户看到成功提示
- setTimeout(() => {
- // 通过h5-bridge返回登录结果给小程序
- this.returnLoginResult(loginResult);
- }, 1000);
- } else {
- throw new Error("登录响应数据无效");
- }
- } catch (error) {
- console.error("❌ 登录失败:", error);
- this.showToast("登录失败: " + error.message, "error");
- } finally {
- this.isLogging = false;
- this.hideLoadingMask();
- }
- },
- // 返回登录结果给小程序
- returnLoginResult(result) {
- // console.log('🔄 返回登录结果给小程序:', result)
- // 使用h5-bridge的数据传递功能
- // 这里需要跳转到h5-controller中转页来传递数据
- callNative("loginSuccess", "登录成功", result);
- },
- // 打开协议页面
- openAgreement(type) {
- const agreementData = {
- user: {
- title: "用户协议",
- content: `
- <h3>用户协议</h3>
- <p>欢迎使用本平台服务。在使用本平台服务前,请您仔细阅读并充分理解本协议内容。</p>
- <h4>1. 服务条款的接受</h4>
- <p>您使用本平台服务即视为您已阅读并同意接受本协议的全部条款。</p>
- <h4>2. 账号注册和使用</h4>
- <p>用户在注册账号时,应提供真实、准确、完整的个人信息。</p>
- <h4>3. 用户权利和义务</h4>
- <p>用户有权使用本平台提供的各项服务,但应遵守相关法律法规。</p>
- <h4>4. 隐私保护</h4>
- <p>我们承诺保护用户的个人信息安全,不会泄露用户隐私。</p>
- <p style="margin-top: 20px; color: #999;">本协议最终解释权归本平台所有。</p>
- `,
- },
- privacy: {
- title: "隐私协议",
- content: `
- <h3>隐私协议</h3>
- <p>本指引是海丰县德成中英文学校小程序开发者 海丰县德成中英文学校(以下简称"开发者")为处理你的个人信息而制定。</p>
- <h4>开发者处理的信息</h4>
- <p>根据法律规定,开发者仅处理实现小程序功能所必要的信息。</p>
- <p>开发者收集你的设备信息,用于识别你的账号登录设备。</p>
- <p>开发者将在获取你的明示同意后,收集你的微信昵称、头像,用途是【更新OA系统中你的头像信息】</p>
- <h4>你的权益</h4>
- <p>关于你的个人信息,你可以通过以下方式与开发者联系,行使查阅、复制、更正、删除等法定权利。</p>
- <p>若你在小程序中注,不会对外公开披露你的信息,如必须公开披露时,开发者应当向你告知公开披露的目的、披露信息的类型及可能涉及的信息,并征得你的单独同意。</p>
- <p>你认为开发者未遵守上述约定,或有其他的投诉建议、或未成年人个人信息保护相关问题,可通过以下方式与开发者联系;或者向微信进行投诉。</p>
- <p><strong>邮箱:</strong> DC1612356478@163.com</p>
- <p style="margin-top: 20px; color: #999;">更新日期:2025-10-11</p>
- `,
- },
- };
- const agreement = agreementData[type];
- if (agreement) {
- this.agreementDrawer = {
- show: true,
- title: agreement.title,
- content: agreement.content,
- };
- }
- },
- // 关闭协议抽屉
- closeAgreementDrawer() {
- this.agreementDrawer.show = false;
- },
- },
- });
- console.log("✅ 登录页面初始化完成");
- });
- </script>
- <style>
- /* 防止Vue模板闪烁 */
- [v-cloak] {
- display: none !important;
- }
- /* 页面加载状态 */
- .page-loading {
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background: #f5f5f5;
- display: flex;
- align-items: center;
- justify-content: center;
- z-index: 9999;
- }
- .page-loading .loading-content {
- text-align: center;
- }
- .page-loading .loading-spinner {
- width: 40px;
- height: 40px;
- border: 4px solid #f3f3f3;
- border-top: 4px solid #40ac6d;
- border-radius: 50%;
- animation: page-spin 1s linear infinite;
- margin: 0 auto 15px;
- }
- @keyframes page-spin {
- 0% {
- transform: rotate(0deg);
- }
- 100% {
- transform: rotate(360deg);
- }
- }
- .page-loading .loading-text {
- color: #666;
- font-size: 14px;
- }
- * {
- margin: 0;
- padding: 0;
- box-sizing: border-box;
- }
- body {
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
- sans-serif;
- background: #f5f5f5;
- overflow: hidden;
- }
- .login-popup {
- position: fixed;
- left: 0;
- right: 0;
- top: 0;
- bottom: 0;
- z-index: 9999;
- visibility: hidden;
- }
- .login-popup.show {
- visibility: visible;
- }
- .mask {
- position: absolute;
- left: 0;
- right: 0;
- top: 0;
- bottom: 0;
- background: rgba(0, 0, 0, 0.6);
- }
- .popup-content {
- width: calc(100% - 20px);
- position: absolute;
- left: 50%;
- top: 50%;
- background: #fff;
- border-radius: 4px;
- padding: 30px 20px;
- transform: translate(-50%, -50%);
- transition: transform 0.3s ease-out;
- border: 1px solid #d3d4d5;
- max-height: 80vh;
- overflow-y: auto;
- }
- .popup-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 20px;
- }
- .title {
- font-size: 18px;
- font-weight: bold;
- color: #333;
- }
- .close-btn {
- font-size: 24px;
- color: #999;
- padding: 10px;
- margin: -10px;
- cursor: pointer;
- user-select: none;
- }
- .close-btn:hover {
- color: #666;
- }
- .input-item {
- position: relative;
- margin-bottom: 15px;
- display: flex;
- }
- .input-icon {
- position: absolute;
- left: 18px;
- top: 50%;
- transform: translateY(-50%);
- z-index: 1;
- }
- .login-input {
- width: 100%;
- height: 44px;
- /* background: #f5f5f5; */
- border-radius: 4px;
- padding: 0 40px 0 50px;
- font-size: 16px;
- border: none;
- outline: none;
- border: 1px solid #d5d8dc;
- }
- .login-input:focus {
- /* background: #f0f0f0; */
- border: 1px solid #d0d2d6;
- }
- .eye-icon {
- position: absolute;
- right: 10px;
- top: 50%;
- transform: translateY(-50%);
- padding: 10px;
- display: flex;
- align-items: center;
- justify-content: center;
- cursor: pointer;
- z-index: 1000;
- }
- .account-btn {
- width: 100%;
- height: 44px;
- line-height: 44px;
- background: #575d6d;
- color: #fff;
- border-radius: 4px;
- font-size: 16px;
- border: none;
- margin-top: 35px;
- transition: all 0.3s ease;
- cursor: pointer;
- display: flex;
- align-items: center;
- justify-content: center;
- gap: 8px;
- }
- .btn-icon {
- display: inline-block;
- }
- .account-btn span {
- line-height: 1;
- }
- .account-btn:hover {
- background: #555;
- }
- .account-btn.disabled {
- background: #cccccc !important;
- color: #999999 !important;
- opacity: 0.6;
- cursor: not-allowed;
- }
- /* 用户协议 */
- .agreement {
- display: flex;
- align-items: center;
- justify-content: center;
- margin-bottom: 25px;
- }
- /* 自定义checkbox样式 */
- .agreement-checkbox {
- position: relative;
- margin-right: 8px;
- width: 20px;
- height: 20px;
- appearance: none;
- -webkit-appearance: none;
- border: 2px solid #d5d8dc;
- border-radius: 4px;
- outline: none;
- cursor: pointer;
- transition: all 0.2s;
- }
- .agreement-checkbox:hover {
- border-color: #575d6d;
- }
- .agreement-checkbox:checked {
- background-color: #575d6d;
- border-color: #575d6d;
- }
- .agreement-checkbox:checked::after {
- content: "";
- position: absolute;
- left: 5px;
- top: 0;
- width: 5px;
- height: 10px;
- border: solid white;
- border-width: 0 2px 2px 0;
- transform: rotate(45deg);
- }
- .agreement-text {
- font-size: 0.372rem;
- font-weight: 500;
- color: #999;
- cursor: pointer;
- }
- .link {
- /* color: #40ac6d; */
- cursor: pointer;
- }
- .link:hover {
- text-decoration: underline;
- }
- /* Loading 遮罩 */
- .loading-mask {
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background: rgba(0, 0, 0, 0.5);
- display: flex;
- align-items: center;
- justify-content: center;
- z-index: 10000;
- }
- .loading-content {
- background: white;
- padding: 20px;
- border-radius: 4px;
- text-align: center;
- min-width: 120px;
- }
- .loading-spinner {
- width: 30px;
- height: 30px;
- border: 3px solid #f3f3f3;
- border-top: 3px solid #40ac6d;
- border-radius: 50%;
- animation: spin 1s linear infinite;
- margin: 0 auto 10px;
- }
- @keyframes spin {
- 0% {
- transform: rotate(0deg);
- }
- 100% {
- transform: rotate(360deg);
- }
- }
- .loading-text {
- color: #333;
- font-size: 14px;
- }
- /* Toast 提示 */
- .toast {
- position: fixed;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- background: rgba(0, 0, 0, 0.8);
- color: white;
- padding: 12px 20px;
- border-radius: 4px;
- font-size: 14px;
- z-index: 10001;
- max-width: 80%;
- text-align: center;
- }
- .toast.success {
- background: rgba(40, 167, 69, 0.9);
- }
- .toast.warning {
- background: rgba(255, 193, 7, 0.9);
- color: #212529;
- }
- .toast.error {
- background: rgba(220, 53, 69, 0.9);
- }
- /* ss-confirm 内容样式(标题沿用组件默认,文本做适配) */
- .warn-confirm-text {
- text-align: center;
- padding: 12px 4px;
- font-size: 14px;
- line-height: 1.6;
- color: #333;
- }
- /* warnMsg 的 ss-confirm 仅保留确认按钮 */
- .ss-confirm .confirm-btn-cancel {
- display: none;
- }
- .ss-confirm .confirm-btn-confirm {
- width: 100%;
- }
- /* 自定义确认对话框 - 优化样式 */
- .confirm-dialog-mask {
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background: rgba(0, 0, 0, 0.6);
- display: flex;
- align-items: center;
- justify-content: center;
- z-index: 10002;
- }
- .confirm-dialog {
- background: white;
- border-radius: 4px;
- min-width: 280px;
- max-width: 90%;
- box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
- overflow: hidden;
- animation: confirmFadeIn 0.3s ease-out;
- }
- @keyframes confirmFadeIn {
- from {
- opacity: 0;
- transform: scale(0.95) translateY(-20px);
- }
- to {
- opacity: 1;
- transform: scale(1) translateY(0);
- }
- }
- .confirm-message {
- font-size: 16px;
- color: #333;
- text-align: center;
- margin-bottom: 24px;
- line-height: 1.6;
- }
- .confirm-buttons {
- display: flex;
- gap: 10px;
- }
- .confirm-btn {
- flex: 1;
- height: 40px;
- border: none;
- border-radius: 4px;
- font-size: 15px;
- cursor: pointer;
- transition: all 0.2s ease;
- font-weight: 500;
- }
- .cancel-btn {
- background: #f5f5f5;
- color: #666;
- border: 1px solid #e5e5e5;
- }
- .cancel-btn:hover {
- background: #eeeeee;
- border-color: #d5d5d5;
- }
- .confirm-btn-primary {
- background: #575d6d;
- color: white;
- }
- .confirm-btn-primary:hover {
- background: #494e5b;
- }
- .confirm-btn:active {
- transform: scale(0.98);
- }
- /* 底部抽屉样式 */
- .drawer-mask {
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background: rgba(0, 0, 0, 0.6);
- z-index: 10003;
- animation: drawerMaskFadeIn 0.3s ease-out;
- }
- @keyframes drawerMaskFadeIn {
- from {
- opacity: 0;
- }
- to {
- opacity: 1;
- }
- }
- .drawer-content {
- position: absolute;
- left: 0;
- right: 0;
- bottom: 0;
- max-height: 80vh;
- background: white;
- border-radius: 4px 4px 0 0;
- animation: drawerSlideUp 0.3s ease-out;
- display: flex;
- flex-direction: column;
- }
- @keyframes drawerSlideUp {
- from {
- transform: translateY(100%);
- }
- to {
- transform: translateY(0);
- }
- }
- .drawer-header {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 16px 20px;
- border-bottom: 1px solid #f0f0f0;
- flex-shrink: 0;
- }
- .drawer-title {
- font-size: 18px;
- font-weight: 600;
- color: #333;
- }
- .drawer-close {
- width: 32px;
- height: 32px;
- display: flex;
- align-items: center;
- justify-content: center;
- cursor: pointer;
- border-radius: 4px;
- transition: background 0.2s;
- }
- .drawer-close:hover {
- background: #f5f5f5;
- }
- .drawer-body {
- flex: 1;
- overflow-y: auto;
- padding: 20px;
- -webkit-overflow-scrolling: touch;
- }
- .drawer-body h3 {
- font-size: 18px;
- color: #333;
- margin-bottom: 16px;
- }
- .drawer-body h4 {
- font-size: 16px;
- color: #555;
- margin-top: 20px;
- margin-bottom: 12px;
- }
- .drawer-body p {
- font-size: 14px;
- color: #666;
- line-height: 1.8;
- margin-bottom: 12px;
- }
- /* 响应式设计 */
- /* @media (max-width: 480px) {
- .popup-content {
- padding: 15px 10px;
- }
- .login-input {
- height: 40px;
- font-size: 13px;
- }
- .account-btn {
- height: 40px;
- line-height: 40px;
- font-size: 14px;
- }
- } */
- </style>
- </body>
- </html>
|