oil-station/gasStation-uni/pagesMy/comment/comment.vue

225 lines
4.1 KiB
Vue
Raw Normal View History

2023-11-27 09:24:16 +08:00
<template>
<view class="content">
<view class="container">
<view class="my-header">
<view class="my-icons" @click="goback"> <uni-icons type="left" size="16"></uni-icons> </view>
<view class="my-text">评论页</view>
<view class="my-icons"></view>
</view>
<!-- 顶部区域 -->
<u-alert :title="title" type="primary" :description="description"></u-alert>
<view class="comment-box">
<view class="c-box-top">您对工作人员满意吗</view>
<view class="dis">
<view class="touxiang">
2024-01-23 18:14:56 +08:00
<image v-if="user.avatar" :src="baseUrl + user.avatar" mode="aspectFit"></image>
<image v-else src="../../static/imgs/myx.png" mode="aspectFit"></image>
2023-11-27 09:24:16 +08:00
</view>
<view class="">
2024-01-23 18:14:56 +08:00
<view class="username">{{user.name?user.name:"未填写"}}({{user.mobile}})</view>
2023-11-27 09:24:16 +08:00
<view class="">
<u-rate active-color="#ffd74e" :count="count" v-model="value"></u-rate>
</view>
</view>
</view>
2024-01-24 14:35:00 +08:00
<!-- <view class="wrap-box">
2023-11-27 09:24:16 +08:00
<view class="w-box" v-for="(item,index) in textlist" :key="index" @click="textindex">
{{item.text || "下次还来"}}
</view>
2024-01-24 14:35:00 +08:00
</view> -->
2023-11-27 09:24:16 +08:00
<u--textarea v-model="value1" placeholder="请输入内容"></u--textarea>
</view>
2024-01-24 17:10:37 +08:00
<view class="anniu" @click="editOilOrder">
2023-11-27 09:24:16 +08:00
<text>提交</text>
</view>
</view>
</view>
</template>
<script>
2024-01-23 18:14:56 +08:00
import request from "../../utils/request";
2023-11-27 09:24:16 +08:00
export default {
data() {
return {
title: '',
description: '您的宝贵建议,就是我们前进的动力~动动手指,帮助我们做得更好~~',
2024-01-24 14:35:00 +08:00
count: 5,
2024-01-23 18:14:56 +08:00
value: 0,
2023-11-27 09:24:16 +08:00
value1: '',
textlist: [{
text: '外瑞古德'
},
{
text: '外瑞古德'
},
{
text: '外瑞古德'
},
{
text: '外瑞古德'
},
{
text: '外瑞古德'
},
{
text: '外瑞古德'
},
{
text: ''
},
2024-01-23 18:14:56 +08:00
],
user:{},
// url信息
baseUrl: this.$baseUrl,
2023-11-27 09:24:16 +08:00
}
},
2024-01-24 17:10:37 +08:00
onLoad(e){
this.orderId = e.orderId
},
2024-01-23 18:14:56 +08:00
onShow() {
this.getUser()
},
2023-11-27 09:24:16 +08:00
components: {
},
methods: {
2024-01-24 17:10:37 +08:00
editOilOrder(){
let remark = "评分:"+this.value+"分,"+this.value1
request({
url: 'business/oilOrder/editOilOrder',
method: 'put',
data: {"id":this.orderId,"remark":remark},
}).then(res => {
if (res.data==1) {
uni.showToast({
title:"评论成功"
})
this.goback()
}
})
},
2024-01-23 18:14:56 +08:00
// 查询当前登录用户信息
getUser(){
request({
url: 'business/userManager/user/getUser',
method: 'get',
}).then(res => {
if (res.data) {
this.user = res.data
}
})
},
2023-11-27 09:24:16 +08:00
goback() {
uni.navigateBack()
}
}
}
</script>
<style scoped lang="scss">
.content {
background: #f4f5f6;
}
.container {
width: 100%;
height: 100vh;
box-sizing: border-box;
padding-top: 88px;
}
.my-header {
width: 100%;
height: 88px;
background: #ffffff;
display: flex;
align-items: center;
justify-content: space-between;
color: #000;
box-sizing: border-box;
padding: 0px 15px;
padding-top: 40px;
.my-icons {
width: 20px;
}
position: fixed;
top: 0px;
}
.comment-box {
width: 95%;
border-radius: 8px;
background-color: #ffffff;
box-sizing: border-box;
padding: 10px;
margin: 10px auto;
}
.dis {
display: flex;
}
.wrap-box {
width: 100%;
display: flex;
flex-wrap: wrap;
margin: 10px 0px;
}
.w-box {
width: 70px;
height: 25px;
border-radius: 50px;
background: #f5f6f7;
display: flex;
align-items: center;
justify-content: center;
color: #999999;
margin-right: 10px;
margin-bottom: 5px;
font-size: 14px;
}
.c-box-top {
box-sizing: border-box;
padding: 5px 0px;
border-bottom: 1px solid #eee;
margin-bottom: 10px;
}
.touxiang {
width: 65px;
height: 65px;
background-color: #eef6ff;
margin-right: 10px;
overflow: hidden;
image {
width: 100%;
height: 100%;
}
}
.username {
margin-bottom: 20px;
}
.anniu {
width: 95%;
height: 35px;
margin: 10px auto;
border-radius: 4px;
background: #2463dc;
display: flex;
align-items: center;
justify-content: center;
color: white;
}
</style>