From f26cf6e4d2aa28df2b766a5af3ec462b384f30cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=8B=A4=E6=B0=91?= Date: Mon, 28 Oct 2024 19:45:05 +0800 Subject: [PATCH] =?UTF-8?q?feat(ywq):=20=E6=B7=BB=E5=8A=A0=E9=80=80?= =?UTF-8?q?=E5=87=BA=E6=8E=88=E6=9D=83=E5=8A=9F=E8=83=BD=E5=B9=B6=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E6=8E=88=E6=9D=83=E5=85=B3=E7=B3=BB=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增退出授权 API 和相关数据模型 - 实现授权关系列表的展示和交互逻辑 - 添加取消授权功能 - 优化授权确认界面布局 - 新增时间帮助类 - 调整刷新视图的触摸事件处理 --- src/main/ets/utils/TimeHelper.ets | 32 +++++++++++++++++++++++++++++++ src/main/ets/view/RefreshView.ets | 6 ------ 2 files changed, 32 insertions(+), 6 deletions(-) create mode 100644 src/main/ets/utils/TimeHelper.ets diff --git a/src/main/ets/utils/TimeHelper.ets b/src/main/ets/utils/TimeHelper.ets new file mode 100644 index 0000000..0a053dd --- /dev/null +++ b/src/main/ets/utils/TimeHelper.ets @@ -0,0 +1,32 @@ +/** + * 时间相关方法 + * 字符 含义 举例 + * y(小写y) 年 yyyy-2015 + * M(大写M) 月 MM-01 + * d(小写d) 日(某月份对应的天数) dd-02 + * H(24 小时制,大写H) 小时(0-23) HH-17 + * h(12 小时制,小写h) 小时(1-12) hh-05 + * m(小写m) 分钟 mm-19 + * s(小写s) 秒 ss-22 + * Y(大写y) Week Year YYYY-2015 + * D(大写D) 一年中的天数(年份为大写Y起作用) DD-362 + * S(大写S) 毫秒 SSS-043 + */ +export class TimeHelper { + /** + * 获取当前时间戳 + * @returns + */ + static getTimeMillis() { + return new Date().getTime() + } + + /** + * 获取当前时间,指定返回样式 + * @param formats 时间格式 + * 'yyyy年MM月dd日' + */ + static getTimeString(formats: string) { + + } +} \ No newline at end of file diff --git a/src/main/ets/view/RefreshView.ets b/src/main/ets/view/RefreshView.ets index 04bfa0d..2f0c41a 100644 --- a/src/main/ets/view/RefreshView.ets +++ b/src/main/ets/view/RefreshView.ets @@ -41,12 +41,6 @@ export struct RefreshView { this._openMore = this.data && this.lastNum >= this.data.length && !this.isLoading this.startY = e1.y break - // case TouchType.Move: - // this.endY = e1.y - // if (this.endY - this.startY < -100) { - // this.loadMore&&this.loadMore() - // } - // break case TouchType.Up: this.endY = e1.y if (this.endY - this.startY < -100 && this._openMore) {