225 lines
4.1 KiB
Vue
225 lines
4.1 KiB
Vue
<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">
|
|
<image v-if="user.avatar" :src="baseUrl + user.avatar" mode="aspectFit"></image>
|
|
<image v-else src="../../static/imgs/myx.png" mode="aspectFit"></image>
|
|
</view>
|
|
<view class="">
|
|
<view class="username">{{user.name?user.name:"未填写"}}({{user.mobile}})</view>
|
|
<view class="">
|
|
<u-rate active-color="#ffd74e" :count="count" v-model="value"></u-rate>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!-- <view class="wrap-box">
|
|
<view class="w-box" v-for="(item,index) in textlist" :key="index" @click="textindex">
|
|
{{item.text || "下次还来"}}
|
|
</view>
|
|
</view> -->
|
|
<u--textarea v-model="value1" placeholder="请输入内容"></u--textarea>
|
|
</view>
|
|
<view class="anniu" @click="editOilOrder">
|
|
<text>提交</text>
|
|
</view>
|
|
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import request from "../../utils/request";
|
|
export default {
|
|
data() {
|
|
return {
|
|
title: '',
|
|
description: '您的宝贵建议,就是我们前进的动力~动动手指,帮助我们做得更好~~',
|
|
count: 5,
|
|
value: 0,
|
|
value1: '',
|
|
textlist: [{
|
|
text: '外瑞古德'
|
|
},
|
|
{
|
|
text: '外瑞古德'
|
|
},
|
|
{
|
|
text: '外瑞古德'
|
|
},
|
|
{
|
|
text: '外瑞古德'
|
|
},
|
|
{
|
|
text: '外瑞古德'
|
|
},
|
|
{
|
|
text: '外瑞古德'
|
|
},
|
|
{
|
|
text: ''
|
|
},
|
|
],
|
|
user:{},
|
|
// url信息
|
|
baseUrl: this.$baseUrl,
|
|
}
|
|
},
|
|
onLoad(e){
|
|
this.orderId = e.orderId
|
|
},
|
|
onShow() {
|
|
this.getUser()
|
|
},
|
|
components: {
|
|
|
|
},
|
|
methods: {
|
|
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()
|
|
}
|
|
})
|
|
},
|
|
// 查询当前登录用户信息
|
|
getUser(){
|
|
request({
|
|
url: 'business/userManager/user/getUser',
|
|
method: 'get',
|
|
}).then(res => {
|
|
if (res.data) {
|
|
this.user = res.data
|
|
}
|
|
})
|
|
},
|
|
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> |