From 9d1a65eefeb4cf02f056843b7df497a541412756 Mon Sep 17 00:00:00 2001 From: "1960116313@qq.com" <1960116313@qq.com> Date: Tue, 23 Jan 2024 22:39:52 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E7=99=BB=E5=BD=95=E9=A1=B5=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E9=82=80=E8=AF=B7=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/login/index.vue | 8 +++++- src/views/task/components/BasicTask/index.vue | 26 ++++++++++++------- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 12d9cb1..f42ad7c 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -2,7 +2,7 @@ import { reactive, ref } from 'vue' import { Button, Form, FormItem, Input, message } from 'ant-design-vue' -import { useRouter } from 'vue-router' +import { useRoute, useRouter } from 'vue-router' import type { Rule } from 'ant-design-vue/es/form' import { UsergroupAddOutlined } from '@ant-design/icons-vue' @@ -19,6 +19,9 @@ import Yzm from '@/assets/images/login/yzm.png' const router = useRouter() const userStore = useUserStore() +const route = useRoute() +const inviteCode = route.query.inviteCode + const formRef = ref() const btnTxt = ref('获取验证码') const disabled = ref(false) @@ -29,6 +32,9 @@ const ruleForm = reactive({ code: '', inviteCode: '', }) +if (inviteCode) { + ruleForm.inviteCode = inviteCode as string +} const loading = ref(false) async function validatePhone(_rule: Rule, value: string) { if (!value || !(/^1\d{10}$/.test(value))) diff --git a/src/views/task/components/BasicTask/index.vue b/src/views/task/components/BasicTask/index.vue index 54830c1..6c91be3 100644 --- a/src/views/task/components/BasicTask/index.vue +++ b/src/views/task/components/BasicTask/index.vue @@ -169,17 +169,22 @@ function handleInvite() { -
- 已完成 -
-
- 领取 -
-
-
+
+
+ 领取 +
+
去邀请
-
+
+
+
+ 已完成 +
+
+ 领取 +
+
未完成
@@ -465,6 +470,7 @@ function handleInvite() { text-align: center; padding: 2px 5px; &.accomplish { + width: 45px; background: linear-gradient( 90deg, #b5ceff 0%, @@ -473,12 +479,14 @@ function handleInvite() { color: #ffffff; } &.unfinished { + width: 48px; background: #ffffff; border: 1px solid #cdcdcd; line-height: 18px; color: #888c90; } &.invite { + width: 47px; background: linear-gradient( 90deg, #6fa3ff 0%,