lanan-repair/pages-order/orderDetail/evaluate.vue

135 lines
2.9 KiB
Vue
Raw Normal View History

2024-09-22 15:07:01 +08:00
<template>
<view class="container">
<v-navigation-bar background-color="#fff" title-color="#333" title="服务评价"></v-navigation-bar>
<view class="body">
<view style="padding: 0 32rpx;">
<view class="shopInfo">
2024-09-24 20:45:24 +08:00
<image class="shopImg" :src="info.image" mode="aspectFill"></image>
2024-09-22 15:07:01 +08:00
<view class="shopInfo_content">
2024-09-24 20:45:24 +08:00
<!-- <view class="shopName">顺捷汽车维修搭电救援补胎中心</view>-->
<view class="shopName">{{ info.tenantName }}</view>
<!-- <view class="shopAdress">济南市历下区福瑞达历下护理院东南门旁</view>-->
2024-09-22 15:07:01 +08:00
</view>
</view>
<view class="rate">
<text>服务评价</text>
2024-09-24 20:45:24 +08:00
<uni-rate allow-half="true" v-model="formData.commentStar"></uni-rate>
2024-09-22 15:07:01 +08:00
</view>
2024-09-24 20:45:24 +08:00
<textarea class="message" v-model="formData.commentDesc" placeholder="可在此输入当前维修厂的服务评价" />
2024-09-22 15:07:01 +08:00
<view class="submit" @click="submit">提交评价</view>
</view>
</view>
</view>
</template>
<script>
import VNavigationBar from '@/components/VNavigationBar.vue'
2024-09-24 20:45:24 +08:00
import request from "../../utils/request";
2024-09-22 15:07:01 +08:00
export default {
components: {
VNavigationBar
},
data() {
return {
2024-09-24 20:45:24 +08:00
info: {},
formData:{
id: null,
commentDesc: null,
commentStar: null,
}
2024-09-22 15:07:01 +08:00
};
},
2024-09-24 14:08:50 +08:00
onLoad(data){
this.info = JSON.parse(decodeURIComponent(data.info))
2024-09-28 00:17:38 +08:00
this.info['image'] = require("../static/inImage.jpg")
2024-09-24 14:08:50 +08:00
},
2024-09-22 15:07:01 +08:00
methods: {
submit() {
2024-09-24 20:45:24 +08:00
this.formData['id'] = this.info.id
request({
url: "/userClient/repair/order/appraise",
method: "post",
data: this.formData
}).then(res => {
uni.navigateBack()
}).catch(()=>{})
2024-09-22 15:07:01 +08:00
}
}
}
</script>
<style lang="less" scoped>
.container {
height: 100%;
background-color: #fff;
display: flex;
flex-direction: column;
.body {
flex: 1;
height: 0;
overflow: auto;
}
.shopInfo {
display: flex;
align-items: stretch;
column-gap: 20rpx;
margin: 30rpx 0;
2024-09-24 14:08:50 +08:00
2024-09-22 15:07:01 +08:00
.shopImg {
width: 160rpx;
height: 100rpx;
border-radius: 8rpx 8rpx 8rpx 8rpx;
background-color: #efefef;
}
.shopInfo_content {
display: flex;
flex-direction: column;
justify-content: space-between;
padding: 6rpx 0;
}
.shopName {
font-weight: 500;
font-size: 28rpx;
color: #333333;
}
.shopAdress {
font-weight: 500;
font-size: 24rpx;
color: #666666;
}
}
.rate {
padding: 30rpx 0;
border-bottom: 1rpx solid #DDDDDD;
2024-09-24 14:08:50 +08:00
2024-09-22 15:07:01 +08:00
display: flex;
align-items: center;
2024-09-24 14:08:50 +08:00
2024-09-22 15:07:01 +08:00
column-gap: 28rpx;
}
.message {
padding: 30rpx 0;
height: 400rpx;
}
.submit {
width: 510rpx;
height: 76rpx;
2024-09-24 14:08:50 +08:00
2024-09-22 15:07:01 +08:00
margin: 0 auto;
2024-09-24 14:08:50 +08:00
2024-09-22 15:07:01 +08:00
background: #0174F6;
border-radius: 38rpx 38rpx 38rpx 38rpx;
2024-09-24 14:08:50 +08:00
2024-09-22 15:07:01 +08:00
font-size: 32rpx;
color: #FFFFFF;
2024-09-24 14:08:50 +08:00
2024-09-22 15:07:01 +08:00
display: flex;
align-items: center;
justify-content: center;
}
}
2024-09-24 14:08:50 +08:00
</style>