123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125 |
- import { server } from "@/utils/client";
- export interface Activity {
- /**
- * ID 编号
- */
- id: number;
- /**
- * 活动名称
- */
- name: string;
- /**
- * 渠道管理配置
- */
- share_configs: ShareConfig[];
- /**
- * 分享渠道开关
- */
- share_enable: string;
- /**
- * 分享手机号开关1 开启 2 关闭
- */
- share_phone_enable: 1 | 2;
- // 短信内容
- note: string;
- }
- export interface ShareConfig {
- icon: string;
- id: string;
- name: string;
- url: string;
- }
- export interface WheelsType {
- /**
- * 正在进行的转盘活动
- */
- activate: Activate;
- activities: Activity[];
- not_receive: NotReceive[];
- total: number;
- num: number;
- }
- /**
- * 正在进行的转盘活动
- */
- export interface Activate {
- /**
- * 转盘基金余额
- */
- amount: number;
- /**
- * 截止时间
- */
- end_time: number;
- history: History[];
- can: 0 | 1;
- // 倒计时
- count_down: number;
- }
- export interface History {
- /**
- * 增加的金额
- */
- amount: number;
- /**
- * 时间
- */
- time: number;
- /**
- * 获取来源 1 初始化 2 玩转盘 3 邀请下载
- */
- type: number;
- }
- export interface NotReceive {
- /**
- * 领取ID
- */
- unique_id: string;
- }
- /**
- * 启动转盘
- * POST /v1/api/user/turntable/run
- * 接口ID:237904502
- * 接口地址:https://app.apifox.com/link/project/4790544/apis/api-237904502
- */
- export interface RunType {
- index: number;
- amount: number;
- }
- export const getWheelRunApi = (data: { activity_id: number }) => {
- return server.post<RunType>({
- url: "/v1/api/user/turntable/run",
- data,
- });
- };
- /**
- * @description 获取转盘信息
- */
- export interface WheelComboType extends Activate, Activity {}
- export const getWheelApi = () => {
- return server.request<WheelsType>({
- url: "/v1/api/user/turntable/info",
- method: "post",
- data: {},
- });
- };
- /**
- * 领取转盘奖励
- * POST /v1/api/user/turntable/receive
- * 接口ID:237883491
- * 接口地址:https://app.apifox.com/link/project/4790544/apis/api-237883491
- */
- export const getWheelReceiveApi = (data: { unique_id: string }) => {
- return server.post({
- url: "/v1/api/user/turntable/receive",
- data,
- });
- };
|