yx.dashenwangluo.com

API 接口说明:
	1.发送验证码
	POST /v1/user/send_code
	参数:
	- mobile: 手机号
	返回:
	{
	    "code": 200,
	    "msg": "发送成功",
	    "time": 1621234567,
	    "data": []
	}

	2.手机号登录
	POST /v1/user/login
	参数:
	- mobile: 手机号
	- code: 验证码
	返回:
	{
	    "code": 200,
	    "msg": "success",
	    "time": 1621234567,
	    "data": {
	        "token": "xxx",
	        "user_info": {
	            "id": 1,
	            "username": "13800138000",
	            "nickname": "138****8000",
	            "avatar": "",
	            "balance": "0.00"
	        }
	    }
	}

	3.微信登录
	POST /v1/user/wx_login
	参数:
	- code: 微信登录code
	- nickName: 用户昵称(可选)
	- avatarUrl: 头像URL(可选)
	返回:
	{
	    "code": 200,
	    "msg": "success",
	    "time": 1621234567,
	    "data": {
	        "token": "xxx",
	        "user_info": {
	            "id": 1,
	            "username": "",
	            "nickname": "微信用户",
	            "avatar": "https://xxx",
	            "balance": "0.00"
	        }
	    }
	}

	4.获取任务配置
	GET /v1/task/config
	Header:
	- token: 用户token
	返回:
	{
	    "code": 200,
	    "msg": "success",
	    "time": 1621234567,
	    "data": {
	        "ad_watch": {
	            "title": "观看广告",
	            "reward_min": "0.10",
	            "reward_max": "0.50",
	            "total_times": 10,
	            "finished_times": 3,
	            "status": "ongoing"
	        },
	        "sign_in": {
	            "title": "每日签到",
	            "reward": "0.30",
	            "continuous_days": 3,
	            "continuous_reward": "1.00",
	            "continuous_days_required": 7,
	            "status": "ongoing"
	        }
	    }
	}

	5.完成任务
	POST /v1/task/complete
	Header:
	- token: 用户token
	参数:
	- task_type: 任务类型(ad_watch/sign_in)
	返回:
	{
	    "code": 200,
	    "msg": "success",
	    "time": 1621234567,
	    "data": {
	        "reward": "0.30",
	        "message": "获得奖励0.30元"
	    }
	}

	6.获取提现规则
	GET /v1/withdraw/rule
	Header:
	- token: 用户token
	返回:
	{
	    "code": 200,
	    "msg": "success",
	    "time": 1621234567,
	    "data": {
	        "min_amount": "10.00",
	        "max_amount": "1000.00",
	        "fee_rate": "1.00",
	        "daily_times": 3,
	        "today_times": 1,
	        "remain_times": 2,
	        "balance": "100.00"
	    }
	}

	7.申请提现
	POST /v1/withdraw/apply
	Header:
	- token: 用户token
	参数:
	- amount: 提现金额
	- withdraw_type: 提现方式(alipay/wxpay/bank)
	- account: 提现账号
	- real_name: 真实姓名
	返回:
	{
	    "code": 200,
	    "msg": "success",
	    "time": 1621234567,
	    "data": {
	        "amount": "100.00",
	        "fee": "1.00",
	        "actual_amount": "99.00",
	        "status": "pending"
	    }
	}

	8.获取提现记录
	GET /v1/withdraw/log?page=1&limit=20
	Header:
	- token: 用户token
	返回:
	{
	    "code": 200,
	    "msg": "success",
	    "time": 1621234567,
	    "data": {
	        "total": 10,
	        "list": [
	            {
	                "id": 1,
	                "amount": "100.00",
	                "fee": "1.00",
	                "actual_amount": "99.00",
	                "withdraw_type": "alipay",
	                "withdraw_type_text": "支付宝",
	                "account": "18****88",
	                "status": "pending",
	                "status_text": "待审核",
	                "createtime": "2024-01-01 12:00:00"
	            }
	        ]
	    }
	}

	9.记录广告观看
	POST /v1/ad/record
	Header:
	- token: 用户token
	参数:
	- ad_type: 广告类型(默认reward)
	- duration: 观看时长，单位秒(默认30)
	返回:
	{
	    "code": 200,
	    "msg": "success",
	    "time": 1621234567,
	    "data": {
	        "reward": "0.50",          // 获得奖励金额
	        "balance": "100.50",       // 当前余额
	        "today_times": 1,          // 今日已观看次数
	        "remain_times": 9          // 今日剩余观看次数
	    }
	}
	错误码:
	- 401: 用户未登录
	- 0: 操作太频繁，请X分钟后再试
	- 0: 观看次数过多，请稍后再试
	- 0: 今日观看次数已达上限

	10. 获取广告配置
	GET /v1/ad/config
	Header:
	- token: 用户token
	参数: 无
	返回:
	{
	    "code": 200,
	    "msg": "success",
	    "time": 1621234567,
	    "data": [
	        {
	            "platform": "admob",           // 广告平台标识
	            "config": {                    // 平台配置参数
	                "app_id": "ca-app-pub-xxx",
	                "api_key": "xxx"
	            },
	            "positions": [                 // 广告位列表
	                {
	                    "title": "激励视频",    // 广告位标题
	                    "position_key": "reward_video",  // 广告位标识
	                    "ad_id": "ca-app-pub-xxx"       // 广告ID
	                }
	            ]
	        }
	    ]
	}