feat: 新增全局布局样式并提升组件响应式表现

- 在 global-layout.scss 中引入全局布局样式,统一页面宽度与对齐方式
- 更新多个组件与页面以优化响应式,包括宽度、间距及 flex 布局等调整
- 在 API 请求中增加 loading 状态管理,改善用户体验
- 优化领券中心与商品详情页,提升功能与 UI 一致性
This commit is contained in:
田香琪
2026-06-23 10:17:35 +08:00
parent c1447b4376
commit 8a60e23214
129 changed files with 5236 additions and 2232 deletions

View File

@@ -1,5 +1,5 @@
<template>
<div class="sign-up" @click='$refs.verify.show = false'>
<div class="sign-up" @click="hideVerify">
<div style="height:50px;"></div>
<div class="logo-box">
<img
@@ -75,7 +75,7 @@
:verifyType="verifyType"
@change="verifyChange"
></Verify>
<div class="login-btn">已有账号<a @click="$router.push('login')">立即登录</a></div>
<div class="login-btn">已有账号<a @click.stop="$router.push('login')">立即登录</a></div>
</div>
<div class="foot">
<div type="flex" justify="space-around" class="help">
@@ -139,22 +139,26 @@ export default {
};
},
methods: {
hideVerify() {
this.$refs.verify?.close?.();
},
// 注册
handleRegist () {
this.$refs.formRegist.validate((valid) => {
if (valid) {
let data = JSON.parse(JSON.stringify(this.formRegist));
data.password = md5(data.password);
apiLogin.regist(data).then((res) => {
if (res.success) {
this.$Message.success('注册成功!');
this.$router.push('login');
} else {
this.$Message.warning(res.message);
}
});
} else {}
});
if (!valid) {
return;
}
const data = JSON.parse(JSON.stringify(this.formRegist));
data.password = md5(data.password);
apiLogin.regist(data).then((res) => {
if (res.success) {
this.$Message.success('注册成功!');
this.$router.push('login');
} else {
this.$Message.warning(res.message || '注册失败');
}
}).catch(() => {});
}).catch(() => {});
},
// 发送短信验证码
sendCode () {
@@ -187,21 +191,21 @@ export default {
}
}, 1000);
} else {
this.$Message.warning(res.message);
this.$Message.warning(res.message || '验证码发送失败');
}
});
}).catch(() => {});
}
},
// 图片验证码成功回调
verifyChange (con) {
if (!con.status) return;
this.$refs.verify.show = false;
this.hideVerify();
this.verifyStatus = true;
},
// 打开图片验证码
verifyBtnClick () {
if (!this.verifyStatus) {
this.$refs.verify.init();
this.$refs.verify?.init();
}
}
},