原神 - 米游社 每日签到


前言

在使用接口前,要先学会获取Cookie。


https://81.68.255.132/API/ys/mihoyou/sign_in/index.php


请求地址

https://81.68.255.132/API/mihoyou/ys/sign_in/api.php

请求方式

get/post

请求参数

参数说明必填可能的值
uid原神uidtrue
cookie米游社Cookietrue
type1输出格式/json2/text3

请求示例

返回说明

返回数据

参数说明可能的值
retcode状态码0/-1001/-5003/

返回示例

成功示例

{
    "retcode": 0,
    "message": "OK",
    "data": {
        "code": "ok"
    }
}

失败示例

{
    "data":null,
    "message":"旅行者,你已经签到过了",
    "retcode":-5003
}

  1. 参数默认[返回官方输出] ↩︎

  2. 站主创建的JSON格式 ↩︎

  3. 站主创建的Text文本格式 ↩︎

  • 3
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 8
    评论
以下是Objective-C纯代码实现签到界面的示例代码: ```objective-c #import "CheckInViewController.h" @interface CheckInViewController () @property (nonatomic, strong) UILabel *titleLabel; @property (nonatomic, strong) UIButton *checkInButton; @end @implementation CheckInViewController - (void)viewDidLoad { [super viewDidLoad]; // 设置背景颜色 self.view.backgroundColor = [UIColor whiteColor]; // 添加标题 self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 100, self.view.frame.size.width, 30)]; self.titleLabel.text = @"今日签到"; self.titleLabel.textAlignment = NSTextAlignmentCenter; [self.view addSubview:self.titleLabel]; // 添加签到按钮 self.checkInButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 150, 50)]; self.checkInButton.center = self.view.center; [self.checkInButton setTitle:@"签到" forState:UIControlStateNormal]; [self.checkInButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; [self.checkInButton setBackgroundColor:[UIColor blueColor]]; [self.checkInButton addTarget:self action:@selector(checkInButtonClicked) forControlEvents:UIControlEventTouchUpInside]; [self.view addSubview:self.checkInButton]; } - (void)checkInButtonClicked { // 处理签到逻辑 NSLog(@"签到成功!"); } @end ``` 这段代码中,我们创建了一个`CheckInViewController`类,其中包括`titleLabel`和`checkInButton`两个控件。在`viewDidLoad`方法中,我们设置了背景颜色,并添加了标题和签到按钮。当用户点击签到按钮时,我们在`checkInButtonClicked`方法中处理签到逻辑,并在控制台输出签到成功的日志。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

ℳ๓Dream'凌ღ᭄

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值