diff --git a/src/aiService-sub/index/index.vue b/src/aiService-sub/index/index.vue index c9f8b7a..7daa291 100644 --- a/src/aiService-sub/index/index.vue +++ b/src/aiService-sub/index/index.vue @@ -17,8 +17,18 @@ diff --git a/src/pages-sub/home/line/index.vue b/src/pages-sub/home/line/index.vue index 6a8ec6a..57d089e 100644 --- a/src/pages-sub/home/line/index.vue +++ b/src/pages-sub/home/line/index.vue @@ -53,9 +53,9 @@ - - - + + + diff --git a/src/pages-sub/home/wishesList/components/DataTable.vue b/src/pages-sub/home/wishesList/components/DataTable.vue index 24d6d12..dd9cb6c 100644 --- a/src/pages-sub/home/wishesList/components/DataTable.vue +++ b/src/pages-sub/home/wishesList/components/DataTable.vue @@ -136,7 +136,9 @@ const columns = ref([ const rankDiff = (index: number, item) => { return index === props.data.length - 1 ? item['rankLine'] - : item['rankLine'] - props.data[index + 1]['rankLine'] + : item['rankLine'] !== '--' + ? item['rankLine'] - props.data[index + 1]['rankLine'] + : '--' } const recompileData = computed(() => { @@ -148,7 +150,7 @@ const recompileData = computed(() => { ? '--' : item['rankLine'] - props.lowscoreRank : rankDiff(index, item) - item['lineDiff'] = item['score'] - props.score + item['lineDiff'] = item['score'] !== '--' ? item['score'] - props.score : 0 return item }) return _data diff --git a/src/pages-sub/home/wishesList/index.vue b/src/pages-sub/home/wishesList/index.vue index b0659e3..73bdea4 100644 --- a/src/pages-sub/home/wishesList/index.vue +++ b/src/pages-sub/home/wishesList/index.vue @@ -66,15 +66,6 @@ - ([]) const userStore = useUserStore() @@ -113,7 +114,7 @@ const handleAppointment = ( addSpecial({ sId: item.id, openId: userStore.userInfo?.estimatedAchievement.wxId.toString(), - appointmentTime: '2025-07-31', + appointmentTime: formatTimeStr(new Date(), 'YYYY-MM-DD'), isDelete: item.isAppointment, }).then((res) => { if (res.code === 200) { diff --git a/src/utils/tools.ts b/src/utils/tools.ts new file mode 100644 index 0000000..57c1e37 --- /dev/null +++ b/src/utils/tools.ts @@ -0,0 +1,17 @@ +export function formatTimeStr(time: string | Date, format: string) { + const date = new Date(time) + const formatObj: any = { + YYYY: date.getFullYear(), + MM: date.getMonth() + 1, + DD: date.getDate(), + HH: date.getHours(), + mm: date.getMinutes(), + ss: date.getSeconds(), + } + const time_str = format.replace(/(YYYY|MM|DD|HH|mm|ss)/g, (result, key) => { + const value = formatObj[key] + return value.toString().padStart(2, '0') + }) + + return time_str +}