diff --git a/src/api/recharge/index.ts b/src/api/recharge/index.ts index cf81bed..fdccc97 100644 --- a/src/api/recharge/index.ts +++ b/src/api/recharge/index.ts @@ -1,7 +1,39 @@ import { defHttp } from '@/utils/axios/index' +// 商品分类tabs export async function goodsType() { return defHttp.get({ url: `/open-chat/sys/sys/dict/getDictItems/goods_type`, }) } +// 商品分类列表 +export async function goodsList(params: { + type: string +}) { + return defHttp.get({ + url: `/open-chat/chatGoods/list`, + params, + }) +} + +// pc支付 +export async function payment(data: { + goodsId: string + type: string +}) { + return defHttp.post({ + url: `/open-chat/chat/pay/order`, + data, + }) +} + +// 是否支付成功 + +export async function getIsPay(params: { + orderCode: string +}) { + return defHttp.get({ + url: `/open-chat/chat/pay/getIsPay`, + params, + }) +} diff --git a/src/api/task/index.ts b/src/api/task/index.ts new file mode 100644 index 0000000..e9856f9 --- /dev/null +++ b/src/api/task/index.ts @@ -0,0 +1,29 @@ +import { defHttp } from '@/utils/axios/index' + +// 签到详情 +export async function current() { + return defHttp.get({ + url: `/open-chat/logUserSign/current`, + }) +} +// 签到 +export async function logUserSign() { + return defHttp.post({ + url: `/open-chat/logUserSign/sign`, + }) +} +// 历史记录 +export async function history(params: { + yearAndMonth: string +}) { + return defHttp.get({ + url: `/open-chat/logUserSign/history`, + params, + }) +} +// 新手任务 +export async function noviceTask() { + return defHttp.get({ + url: `/open-chat/taskCenter/noviceTask/list`, + }) +} diff --git a/src/components/AppRecharge/index.d.ts b/src/components/AppRecharge/index.d.ts new file mode 100644 index 0000000..c488264 --- /dev/null +++ b/src/components/AppRecharge/index.d.ts @@ -0,0 +1,15 @@ +interface Racharge { + title: string + key: string +} +interface GoodsData { + giveNum: number + title: string + gpt35Num: number + gpt40Num: number + pictureNum: number + price: number + costPrice: number + id: string +} +export { Racharge, GoodsData } diff --git a/src/components/AppRecharge/index.vue b/src/components/AppRecharge/index.vue index 0fc6aa9..f02b474 100644 --- a/src/components/AppRecharge/index.vue +++ b/src/components/AppRecharge/index.vue @@ -1,42 +1,99 @@ @@ -264,16 +86,15 @@ onMounted(async () => { -