diff --git a/common/server/interface/sq.js b/common/server/interface/sq.js index fd49504..75c0f92 100644 --- a/common/server/interface/sq.js +++ b/common/server/interface/sq.js @@ -77,6 +77,25 @@ export const addEvaluateServices = async (evaluate) => { return false; } +/** + * 获取我的声誉记录 + * @param {number} pageIndex 起始页 + * @param {number} pageSize 页大小 + * @returns {Promise} + */ +export const getReputationByUser = async (pageIndex = 1, pageSize = 20) => { + const res = await request.get("sq/GetReputationByUser", { + pageIndex: pageIndex, + pageSize: pageSize + }); + if (res.code == 0) { + //data:[{title:"标题",reputation_value:"变化值","created_at":"变化时间"}] + return res.data; + } + return null; +} + + export const sqInterface = { @@ -84,5 +103,6 @@ export const sqInterface = { getMyReservation, getMyUseReservation, getEvaluateServices, - addEvaluateServices + addEvaluateServices, + getReputationByUser } \ No newline at end of file diff --git a/common/server/user.js b/common/server/user.js index 50817c3..82e3f99 100644 --- a/common/server/user.js +++ b/common/server/user.js @@ -222,7 +222,8 @@ export const addBlack = async (userId) => { } return false; - } + + diff --git a/common/system/timeUtile.js b/common/system/timeUtile.js index a71d0a2..d985169 100644 --- a/common/system/timeUtile.js +++ b/common/system/timeUtile.js @@ -1,3 +1,5 @@ +import dayjs from 'dayjs'; + /** * 将时间字符串格式化为时间对象 * @param {string} timeStr - 时间字符串,格式:2025/09/03 04:05:40 @@ -72,4 +74,33 @@ function calculateTimeRange(time1, time2) { return result; } -export { parseTimeString, formatTime, calculateTimeRange } +/** + * 判断给定日期是今天、明天还是后天 + * @param {string|number|Date|dayjs} input - 目标日期,可以是时间戳、日期字符串、Date 对象等 + * @returns {string} - 返回 '今天' | '明天' | '后天' | '其他' + */ +function getDayDescription(input) { + + + if (input == null || input == "" || input == 0) { + return "请选择时间"; + } + const target = dayjs(input); // 解析输入日期 + const today = dayjs().startOf('day'); // 今天的 00:00:00 + const tomorrow = today.add(1, 'day'); // 明天的 00:00:00 + const dayAfterTomorrow = today.add(2, 'day'); // 后天的 00:00:00 + + let tips = ""; + if (target.isSame(today, 'day')) { + tips = '(今天)'; + } else if (target.isSame(tomorrow, 'day')) { + tips = '(明天)'; + } else if (target.isSame(dayAfterTomorrow, 'day')) { + tips = '(后天)'; + } else { + tips = ''; + } + return target.format('MM-DD ' + tips + ' HH:mm') +} + +export { parseTimeString, formatTime, calculateTimeRange, getDayDescription } diff --git a/common/utils.js b/common/utils.js index df26397..3d956bc 100644 --- a/common/utils.js +++ b/common/utils.js @@ -1,3 +1,4 @@ + /** * 延迟执行 * @param {Number} ms diff --git a/components.d.ts b/components.d.ts index 75dbe14..e0bd056 100644 --- a/components.d.ts +++ b/components.d.ts @@ -9,9 +9,12 @@ export {} declare module 'vue' { export interface GlobalComponents { Container: typeof import('./components/com/page/container.vue')['default'] + ContainerBase: typeof import('./components/com/page/container-base.vue')['default'] MahjongCard: typeof import('./components/index/MahjongCard.vue')['default'] NoData: typeof import('./components/com/page/no-data.vue')['default'] NoEmpty: typeof import('./components/com/index/NoEmpty.vue')['default'] + ReservationEvaluate: typeof import('./components/com/page/reservation-evaluate.vue')['default'] + ReservationItem: typeof import('./components/com/page/reservation-item.vue')['default'] ReservationPopup: typeof import('./components/com/index/ReservationPopup.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] diff --git a/components/com/page/container-base.vue b/components/com/page/container-base.vue new file mode 100644 index 0000000..8a2a7b8 --- /dev/null +++ b/components/com/page/container-base.vue @@ -0,0 +1,116 @@ + + + \ No newline at end of file diff --git a/components/com/page/reservation-evaluate.vue b/components/com/page/reservation-evaluate.vue new file mode 100644 index 0000000..2bb1cf0 --- /dev/null +++ b/components/com/page/reservation-evaluate.vue @@ -0,0 +1,190 @@ + + + + + diff --git a/components/com/page/reservation-item.vue b/components/com/page/reservation-item.vue new file mode 100644 index 0000000..ac2ec39 --- /dev/null +++ b/components/com/page/reservation-item.vue @@ -0,0 +1,222 @@ + + + + + diff --git a/pages.json b/pages.json index 0841542..30cc586 100644 --- a/pages.json +++ b/pages.json @@ -78,6 +78,13 @@ "navigationBarTitleText": "", "navigationStyle": "custom" } + }, + { + "path": "pages/me/my-record", + "style": { + "navigationBarTitleText": "", + "navigationStyle": "custom" + } } ], "globalStyle": { @@ -92,8 +99,7 @@ "selectedColor": "#59AB6D", "borderStyle": "black", "height": "129.17rpx", - "list": [ - { + "list": [{ "pagePath": "pages/index/index", "iconPath": "/static/tabbar/home.png", "selectedIconPath": "/static/tabbar/home_s.png", diff --git a/pages/appointment/appointment-page.vue b/pages/appointment/appointment-page.vue index 811ca9c..b0ed083 100644 --- a/pages/appointment/appointment-page.vue +++ b/pages/appointment/appointment-page.vue @@ -1,321 +1,341 @@ - \ No newline at end of file diff --git a/pages/me/appointment-record-page.vue b/pages/me/appointment-record-page.vue index b9a6a6c..8e563f0 100644 --- a/pages/me/appointment-record-page.vue +++ b/pages/me/appointment-record-page.vue @@ -1,274 +1,78 @@ \ No newline at end of file diff --git a/pages/me/my-record.vue b/pages/me/my-record.vue new file mode 100644 index 0000000..fe32e76 --- /dev/null +++ b/pages/me/my-record.vue @@ -0,0 +1,218 @@ + + + + + \ No newline at end of file diff --git a/uni_modules/uni-transition/components/uni-transition/uni-transition.vue b/uni_modules/uni-transition/components/uni-transition/uni-transition.vue index 7677553..ba94bb7 100644 --- a/uni_modules/uni-transition/components/uni-transition/uni-transition.vue +++ b/uni_modules/uni-transition/components/uni-transition/uni-transition.vue @@ -1,6 +1,7 @@