diff --git a/src/views/Register.vue b/src/views/Register.vue index ac960ec..ae160d7 100644 --- a/src/views/Register.vue +++ b/src/views/Register.vue @@ -22,6 +22,11 @@ const countdown = ref(60) const isPhoneDisabled = ref(false) let timer = null +// 填充默认邀请码 +function fillInviteCode() { + inviteCode.value = '16800' +} + // 从URL参数中读取邀请码并自动填入,如果用户已登录且有手机号则自动填充 onMounted(async () => { const inviteCodeParam = route.query.invite_code; @@ -245,7 +250,10 @@ const onClickLeft = () => {
邀请码
- +
+ + +
@@ -327,6 +335,30 @@ const onClickLeft = () => { border-bottom: 1px solid var(--color-border-primary); } +/* 输入框和按钮组合 */ +.input-with-btn { + position: relative; + display: flex; + align-items: center; + flex: 1; +} + +.input-with-btn .form-input { + padding-right: 6rem; +} + +.get-invite-code-btn { + position: absolute; + right: 0; + background: none; + border: none; + color: var(--color-primary); + font-size: 0.875rem; + cursor: pointer; + padding: 0.5rem; + font-weight: 500; +} + .form-label { font-size: 0.9375rem; color: var(--color-text-primary); diff --git a/vite.config.js b/vite.config.js index 22a70fd..582fd59 100644 --- a/vite.config.js +++ b/vite.config.js @@ -15,8 +15,8 @@ export default defineConfig({ strictPort: true, // 如果端口被占用则抛出错误而不是使用下一个可用端口 proxy: { "/api/v1": { - target: "http://127.0.0.1:8888", // 本地接口地址 - // target: "https://quannengcha.com", // 本地接口地址 + // target: "http://127.0.0.1:8888", // 本地接口地址 + target: "https://www.quannengcha.com", // 本地接口地址 changeOrigin: true, rewrite: (path) => path, // 可选:确保路径不被修改 },