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) {