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 @@
服务评价
-
+
提交评价
@@ -46,14 +46,34 @@
},
methods: {
submit() {
- this.formData['id'] = this.info.id
- request({
- url: "/userClient/repair/order/appraise",
- method: "post",
- data: this.formData
- }).then(res => {
- uni.navigateBack()
- }).catch(()=>{})
+ if(null==this.formData.commentStar || ""==this.formData.commentStar){
+ uni.showToast({
+ title: '请对本次服务打分!',
+ icon: 'none'
+ })
+ }else if(null==this.formData.commentDesc || ""==this.formData.commentDesc){
+ uni.showToast({
+ title: '请输入本次服务的评价或建议!',
+ icon: 'none'
+ })
+ }else{
+ this.formData['id'] = this.info.id
+ request({
+ url: "/userClient/repair/order/appraise",
+ method: "post",
+ data: this.formData
+ }).then(res => {
+ uni.showToast({
+ title: '评价成功!',
+ icon: 'none'
+ })
+ setTimeout(()=>{
+ uni.navigateBack()
+ },500)
+ }).catch(()=>{
+ uni.navigateBack()
+ })
+ }
}
}
}
@@ -113,6 +133,7 @@
.message {
padding: 30rpx 0;
height: 400rpx;
+ width: 100%;
}
.submit {
width: 510rpx;
diff --git a/pages-order/orderList/orderList.vue b/pages-order/orderList/orderList.vue
index 6347830..d8195a9 100644
--- a/pages-order/orderList/orderList.vue
+++ b/pages-order/orderList/orderList.vue
@@ -39,10 +39,12 @@
支付
查看订单
- 评价订单
+ 评价订单
-
+
+
+
@@ -382,5 +384,8 @@ export default {
}
}
}
+ .no-data{
+ text-align: center;
+ }
}
diff --git a/pages-shop/shopDetail/shopDetail.vue b/pages-shop/shopDetail/shopDetail.vue
index d5f81f4..f580bab 100644
--- a/pages-shop/shopDetail/shopDetail.vue
+++ b/pages-shop/shopDetail/shopDetail.vue
@@ -66,21 +66,37 @@
+
+
+
+
+
+
+
+
+