fix add
This commit is contained in:
@@ -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 = () => {
|
||||
<!-- 邀请码输入 -->
|
||||
<div class="form-item">
|
||||
<div class="form-label">邀请码</div>
|
||||
<div class="input-with-btn">
|
||||
<input v-model="inviteCode" class="form-input" type="text" placeholder="请输入邀请码" />
|
||||
<button class="get-invite-code-btn" @click="fillInviteCode">获取邀请码</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 手机号输入 -->
|
||||
@@ -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);
|
||||
|
||||
@@ -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, // 可选:确保路径不被修改
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user