diff --git a/pages-home/home/home.vue b/pages-home/home/home.vue index 9b30c1c..9e2a7ad 100644 --- a/pages-home/home/home.vue +++ b/pages-home/home/home.vue @@ -59,6 +59,7 @@ import VNavigationBar from '@/components/VNavigationBar.vue' import request from "../../utils/request"; import config from "@/config"; + import {setJSONData} from '@/utils/auth' export default { components: { tabBarVue, @@ -149,9 +150,10 @@ }) }, gotoShopDetail(row) { + setJSONData("shopInfo",row) // 直接把那一行的数据转发过去 uni.navigateTo({ - url: '/pages-shop/shopDetail/shopDetail?info=' + encodeURIComponent(JSON.stringify(row)) + url: '/pages-shop/shopDetail/shopDetail?id='+row.id }) }, gotoPage(menu) { diff --git a/pages-order/my/evaluate.vue b/pages-order/my/evaluate.vue index 3bff0e8..4f458ed 100644 --- a/pages-order/my/evaluate.vue +++ b/pages-order/my/evaluate.vue @@ -3,24 +3,26 @@ - 07-06 + {{ item.commentTime }} {{item.commentDesc}} - + - {{ item.tenantName }} - + {{ item.goodsTitle }} + + + @@ -47,6 +49,26 @@ this.getAppraisePage() }, methods:{ + /** + * 时间戳转文字 + * */ + timestampToDate(timestamp) { + let date = new Date(timestamp); // 将时间戳转换为Date对象 + let year = date.getFullYear(); // 获取年份 + let month = date.getMonth() + 1; // 获取月份,需要+1因为月份是从0开始计算的 + let day = date.getDate(); // 获取日 + let hours = date.getHours(); // 获取小时 + let minutes = date.getMinutes(); // 获取分钟 + let seconds = date.getSeconds(); // 获取秒钟 + // 格式化月份、日期、小时、分钟、秒 + month = month < 10 ? '0' + month : month; + day = day < 10 ? '0' + day : day; + hours = hours < 10 ? '0' + hours : hours; + minutes = minutes < 10 ? '0' + minutes : minutes; + seconds = seconds < 10 ? '0' + seconds : seconds; + // 拼接成 yyyy-MM-dd HH:mm:ss 格式 + return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; // 返回格式化后的时间字符串 + }, async getAppraisePage(){ const res = await request({ url: "/userClient/repair/order/getAppraise", @@ -58,6 +80,7 @@ }) this.evaluateList = res.data.records this.evaluateList.forEach(item => { + item.commentTime = this.timestampToDate(item.commentTime) item.image = require("../static/inImage.jpg") }) } @@ -130,5 +153,8 @@ color: #666666; } } + .no-data{ + text-align: center; + } } diff --git a/pages-order/orderDetail/evaluate.vue b/pages-order/orderDetail/evaluate.vue index 35db6f2..892dbf1 100644 --- a/pages-order/orderDetail/evaluate.vue +++ b/pages-order/orderDetail/evaluate.vue @@ -15,7 +15,7 @@ 服务评价 -