- 登录:微信一键登录(code2Session)+ 账号登录双 tab;个人中心为整页登录,其它页走抽屉 - 协议:登录前必须阅读并同意,版本号随登录上报落库 - 不强制登录:启动不弹窗,点功能或遇到 401 才提示(符合小程序审核) - 页面:首页统计 / 扫码记录 / 个人中心;H5 预览端口 7304 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
128 lines
2.2 KiB
Vue
128 lines
2.2 KiB
Vue
<script setup lang="ts">
|
||
/**
|
||
* 应用入口
|
||
*
|
||
* ⚠️ 启动时**不做任何登录拦截 / 弹窗**:微信审核要求用户能先浏览小程序,
|
||
* 登录只在「点了需要登录的功能」或「接口返回 401」时才唤起(见 `config/auth.ts`)。
|
||
*/
|
||
</script>
|
||
|
||
<style>
|
||
page {
|
||
--brand: #2563eb;
|
||
--brand-dark: #1d4ed8;
|
||
--text: #1f2430;
|
||
--text-muted: #6b7280;
|
||
--border: #e5e7eb;
|
||
--bg: #f6f7fb;
|
||
--card: #ffffff;
|
||
--danger: #dc2626;
|
||
--ok: #16a34a;
|
||
|
||
background: var(--bg);
|
||
color: var(--text);
|
||
font-size: 28rpx;
|
||
line-height: 1.6;
|
||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
|
||
}
|
||
|
||
.page {
|
||
padding: 24rpx;
|
||
/* navigationStyle=custom:没有内置标题栏,自己让出状态栏高度(H5 下为 0,小程序里是真实高度) */
|
||
padding-top: calc(24rpx + var(--status-bar-height, 0px));
|
||
padding-bottom: calc(24rpx + env(safe-area-inset-bottom));
|
||
}
|
||
|
||
.card {
|
||
background: var(--card);
|
||
border-radius: 16rpx;
|
||
padding: 28rpx;
|
||
margin-bottom: 24rpx;
|
||
box-shadow: 0 2rpx 12rpx rgba(31, 36, 48, 0.04);
|
||
}
|
||
|
||
.btn {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
height: 88rpx;
|
||
border-radius: 12rpx;
|
||
background: var(--brand);
|
||
color: #fff;
|
||
font-size: 30rpx;
|
||
border: none;
|
||
line-height: 1;
|
||
}
|
||
|
||
.btn[disabled] {
|
||
opacity: 0.6;
|
||
}
|
||
|
||
.btn-ghost {
|
||
background: #eef2ff;
|
||
color: var(--brand);
|
||
}
|
||
|
||
.btn::after {
|
||
border: none;
|
||
}
|
||
|
||
.field {
|
||
margin-bottom: 24rpx;
|
||
}
|
||
|
||
.field-label {
|
||
display: block;
|
||
margin-bottom: 10rpx;
|
||
color: var(--text-muted);
|
||
font-size: 24rpx;
|
||
}
|
||
|
||
.input {
|
||
height: 84rpx;
|
||
padding: 0 24rpx;
|
||
border: 1rpx solid var(--border);
|
||
border-radius: 12rpx;
|
||
background: #fff;
|
||
font-size: 28rpx;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
.hint {
|
||
color: var(--text-muted);
|
||
font-size: 24rpx;
|
||
}
|
||
|
||
.muted {
|
||
color: var(--text-muted);
|
||
}
|
||
|
||
.alert {
|
||
padding: 18rpx 24rpx;
|
||
border-radius: 12rpx;
|
||
margin-bottom: 24rpx;
|
||
font-size: 26rpx;
|
||
}
|
||
|
||
.alert-error {
|
||
background: #fef2f2;
|
||
color: var(--danger);
|
||
}
|
||
|
||
.alert-ok {
|
||
background: #f0fdf4;
|
||
color: var(--ok);
|
||
}
|
||
|
||
.row {
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
|
||
.row-between {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
}
|
||
</style>
|