feat(calendar): 更新日历接口并优化记录流程
- 将GetRecords接口替换为GetCalendar接口获取日历数据 - 重构首页日历数据显示逻辑,支持年月维度的数据获取 - 优化打卡记录流程,合并选酒和记量步骤为单一添加酒水步骤 - 移除登录页面的游客模式选项,简化首次启动逻辑 - 调整引导页逻辑,移除登录跳转改为直接进入首页 - 优化记录页面UI布局,添加状态栏安全距离适配 - 新增酒水列表管理功能,支持添加和删除已选酒水 - 更新依赖包HaveADrink至v1.0.3版本,同步API变更
This commit is contained in:
+26
-6
@@ -1165,16 +1165,32 @@ export class CalendarDayData {
|
||||
* @param hasRecord: boolean 是否有记录
|
||||
* @param mode: Mode 打卡模式
|
||||
* @param standardCupsTotal: number 标准杯总数
|
||||
* @param id: string|number 记录ID
|
||||
* @param drinks: Array<DrinkItem> 酒水列表
|
||||
* @param food: FoodInfo 配餐信息
|
||||
* @param feeling: Feeling 感受
|
||||
* @param photos: Array<string> 照片URL数组
|
||||
* @param visibility: Visibility 可见范围
|
||||
* @param quote: string 酒言酒语
|
||||
* @param createdAt: string 创建时间
|
||||
*/
|
||||
constructor(date,hasRecord,mode,standardCupsTotal,) {
|
||||
constructor(date,hasRecord,mode,standardCupsTotal,id,drinks,food,feeling,photos,visibility,quote,createdAt,) {
|
||||
this.date = date;
|
||||
this.hasRecord = hasRecord;
|
||||
this.mode = mode;
|
||||
this.standardCupsTotal = standardCupsTotal;
|
||||
this.id = id;
|
||||
this.drinks = drinks;
|
||||
this.food = food;
|
||||
this.feeling = feeling;
|
||||
this.photos = photos;
|
||||
this.visibility = visibility;
|
||||
this.quote = quote;
|
||||
this.createdAt = createdAt;
|
||||
|
||||
}
|
||||
static fromObject(o) {
|
||||
return new CalendarDayData(o.date,o.hasRecord,o.mode,o.standardCupsTotal,);
|
||||
return new CalendarDayData(o.date,o.hasRecord,o.mode,o.standardCupsTotal,o.id,o.drinks,o.food,o.feeling,o.photos,o.visibility,o.quote,o.createdAt,);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1183,14 +1199,18 @@ export class CalendarDayData {
|
||||
*/
|
||||
export class GetCalendarResp {
|
||||
/**
|
||||
* @param data: CalendarData 日历数据
|
||||
* @param year: number 年份
|
||||
* @param month: number 月份
|
||||
* @param days: Array<CalendarDayData> 每天的打卡数据,null表示当天无记录
|
||||
*/
|
||||
constructor(data,) {
|
||||
this.data = data;
|
||||
constructor(year,month,days,) {
|
||||
this.year = year;
|
||||
this.month = month;
|
||||
this.days = days;
|
||||
|
||||
}
|
||||
static fromObject(o) {
|
||||
return new GetCalendarResp(o.data,);
|
||||
return new GetCalendarResp(o.year,o.month,o.days,);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user