From a06d8fdfcd9d68c60629dacd2ac89595806c391a Mon Sep 17 00:00:00 2001 From: "1960116313@qq.com" <1960116313@qq.com> Date: Tue, 23 Jan 2024 21:49:53 +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=20fix:=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E8=A7=92=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/base/login.ts | 3 +- src/api/task/index.ts | 18 +++++ src/components/AppRecharge/index.vue | 30 +++----- src/components/AppTaskMenuList/index.d.ts | 19 +++-- src/components/AppTaskMenuList/index.vue | 17 +++-- src/components/AppUserInfo/index.vue | 2 +- src/layout/AppMenu/index.vue | 35 +++++++-- src/store/moules/taskListStore/index.ts | 41 ++++++++++ src/store/moules/userStore/index.ts | 2 +- src/views/login/index.d.ts | 2 +- src/views/login/index.vue | 17 ++++- .../task/components/BasicTask/index.d.ts | 10 ++- src/views/task/components/BasicTask/index.vue | 74 +++++++++++-------- src/views/task/components/DailyTask/index.vue | 7 +- src/views/task/components/HisTory/index.vue | 21 ++++-- .../task/components/NoviceTask/index.vue | 3 + src/views/task/components/OtherTask/index.vue | 7 +- src/views/task/components/TaskList/index.vue | 18 +++-- src/views/task/index.vue | 5 +- 19 files changed, 238 insertions(+), 93 deletions(-) create mode 100644 src/store/moules/taskListStore/index.ts diff --git a/src/api/base/login.ts b/src/api/base/login.ts index 946d61b..398f13b 100644 --- a/src/api/base/login.ts +++ b/src/api/base/login.ts @@ -7,10 +7,11 @@ export interface TokenParams { phone: string phoneCode: string type: string + inviteCode: string } export async function token(params: TokenParams) { return defHttp.post({ - url: `/hulk-auth/oauth/token?grant_type=${params.grant_type}&user_type=${params.user_type}&invite_code=${params.invite_code}&phone=${params.phone}&phoneCode=${params.phoneCode}&type=${params.type}`, + url: `/hulk-auth/oauth/token?grant_type=${params.grant_type}&user_type=${params.user_type}&invite_code=${params.invite_code}&phone=${params.phone}&phoneCode=${params.phoneCode}&type=${params.type}&inviteCode=${params.inviteCode}`, }, { isTransformResponse: false, }) diff --git a/src/api/task/index.ts b/src/api/task/index.ts index e9856f9..9f42f53 100644 --- a/src/api/task/index.ts +++ b/src/api/task/index.ts @@ -27,3 +27,21 @@ export async function noviceTask() { url: `/open-chat/taskCenter/noviceTask/list`, }) } +// 做任务赚积分 +export async function routineTask() { + return defHttp.get({ + url: `/open-chat/taskCenter/routineTask/list`, + }) +} +// 每日任务列表 +export async function dailyTask() { + return defHttp.get({ + url: `/open-chat/taskCenter/dailyTask/list`, + }) +} +// 领取接口 +export async function receiveAward(id: string) { + return defHttp.post({ + url: `/open-chat/taskCenter/receiveAward?taskId=${id}`, + }) +} diff --git a/src/components/AppRecharge/index.vue b/src/components/AppRecharge/index.vue index 3ebc336..3ad65fd 100644 --- a/src/components/AppRecharge/index.vue +++ b/src/components/AppRecharge/index.vue @@ -108,24 +108,6 @@ function tabClass(index: number) { return 'tab' } } -// 至尊权益 -// const extreme = ref([{ -// num: 10000, -// unit: '点数', -// name: '同聪点数', -// }, { -// num: '无限', -// unit: '', -// name: '可回答3.5版本问题', -// }, { -// num: 5000, -// unit: '条', -// name: '可回答4.0版本问题', -// }, { -// num: 10000, -// unit: '幅', -// name: '可生成图片', -// }]) // 走马灯向上 function onPrevClick() { @@ -135,6 +117,13 @@ function onPrevClick() { function onNextClick() { carouselRef.value.next() } + +// 数字分隔符 +function separator(num: number | string) { + const numParts = num.toString().split('.') + numParts[0] = numParts[0].replace(/\B(?=(\d{3})+(?!\d))/g, '’') + return numParts.join('.') +}