|
@@ -12,19 +12,19 @@
|
|
|
<view style="background: #FFFFFF;" class="feedback-body">
|
|
|
<view class="flex align-center padding-tb-sm">
|
|
|
<view>
|
|
|
- <image v-if="globalImages" :src="globalImages + 'images/order/tiem.png'" style="width: 100rpx;height: 100rpx;" mode=""></image>
|
|
|
+ <image :src="UsertList.avatar" style="width: 100rpx;height: 100rpx;border-radius: 50%;" mode=""></image>
|
|
|
</view>
|
|
|
<view style="margin-left: 30rpx; line-height: 40rpx;">
|
|
|
- <view style="color: #999;">司机师傅</view>
|
|
|
- <view>什么时间段的订单</view>
|
|
|
+ <view style="color: #999;">{{ UsertList.nickName }}</view>
|
|
|
+ <view>{{ data.endTime }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="flex align-center add_name" style="margin: 30rpx 0rpx 4rpx;">
|
|
|
- <view class="green"></view>出发地点:12312
|
|
|
+ <view class="green"></view>出发地点:{{ data.shipProvince }}{{ data.shipCity }}{{ data.shipDistrict }}{{ data.deliveryAddress }}
|
|
|
</view>
|
|
|
<image v-if="globalImages" :src="globalImages + 'images/static/upload/up.png'" class="order_up"></image>
|
|
|
<view class="flex align-center add_name">
|
|
|
- <view class="orgin"></view>到达地点:111111
|
|
|
+ <view class="orgin"></view>到达地点:{{ data.deliveryProvince }}{{ data.deliveryCity }}{{ data.deliveryDistrict }}{{ data.shipAddress }}
|
|
|
</view>
|
|
|
</view>
|
|
|
<view style="background: #FFFFFF;" class="feedback-body">
|
|
@@ -32,7 +32,15 @@
|
|
|
为本次服务评分
|
|
|
</view>
|
|
|
<view style="display: flex; justify-content: center; margin-bottom: 30rpx;">
|
|
|
- <u-rate :allow-half="false" :disabled="true" size="58" active-color="#fe6b01" :is-fill="false" :value="3.5" />
|
|
|
+ <u-rate
|
|
|
+ :allow-half="false"
|
|
|
+ :disabled="false"
|
|
|
+ size="58"
|
|
|
+ active-color="#fe6b01"
|
|
|
+ :is-fill="false"
|
|
|
+ v-model="ratevalue"
|
|
|
+ @change="handleRateChange"
|
|
|
+ />
|
|
|
</view>
|
|
|
<view style="font-size: 24rpx;color: #ccc;text-align: center;">点击星星评分</view>
|
|
|
</view>
|
|
@@ -41,11 +49,10 @@
|
|
|
快速评价
|
|
|
</view>
|
|
|
<view class="flex-container">
|
|
|
- <view class="item"><image v-if="globalImages" :src="globalImages + 'images/evaluate/icon_1.png'" style="width: 25rpx;height: 25rpx; margin-right: 10rpx;" mode=""></image>车内整洁</view>
|
|
|
- <view class="item"><image v-if="globalImages" :src="globalImages + 'images/evaluate/icon_2.png'" style="width: 25rpx;height: 25rpx; margin-right: 10rpx;" mode=""></image>礼貌热情</view>
|
|
|
- <view class="item"><image v-if="globalImages" :src="globalImages + 'images/evaluate/icon_3.png'" style="width: 25rpx;height: 25rpx; margin-right: 10rpx;" mode=""></image>准时到达</view>
|
|
|
- <view class="item"><image v-if="globalImages" :src="globalImages + 'images/evaluate/icon_4.png'" style="width: 25rpx;height: 25rpx; margin-right: 10rpx;" mode=""></image>乐于助人</view>
|
|
|
- <view class="item"><image v-if="globalImages" :src="globalImages + '/images/evaluate/icon_5.png'" style="width: 25rpx;height: 25rpx; margin-right: 10rpx;" mode=""></image>驾驶平稳</view>
|
|
|
+ <view class="item" v-for="(item, index) in CreditList" :key="index" :class="{ selected: item.selected }" @click="toggleSelect(index)">
|
|
|
+ <image v-if="globalImages" :src="globalImages + item.icon" style="width: 25rpx;height: 25rpx; margin-right: 10rpx;" mode=""></image>
|
|
|
+ {{ item.description }}
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view style="background: #FFFFFF;" class="feedback-body">
|
|
@@ -106,19 +113,31 @@
|
|
|
content: '',
|
|
|
contact: ''
|
|
|
},
|
|
|
- riderUserId: '',
|
|
|
+ // riderUserId: '',
|
|
|
+ // indentNumber: '',
|
|
|
satisfactionFlag: '',
|
|
|
- globalImages: ''
|
|
|
+ globalImages: '',
|
|
|
+ CreditList: [],
|
|
|
+ // userId: '',
|
|
|
+ // ordersNo: '',
|
|
|
+ // ordersId: '',
|
|
|
+ ratevalue: 0,
|
|
|
+ data: {},
|
|
|
+ UsertList: {}
|
|
|
};
|
|
|
},
|
|
|
- onLoad(e) {
|
|
|
+ onLoad(option) {
|
|
|
waitForGlobalImages().then((path) => {
|
|
|
console.log('✅ 全局图片路径:', path)
|
|
|
this.globalImages = path
|
|
|
})
|
|
|
- console.log(e)
|
|
|
- this.riderUserId = e.riderUserId
|
|
|
- this.indentNumber = e.indentNumber
|
|
|
+ // this.riderUserId = e.riderUserId
|
|
|
+ // this.indentNumber = e.indentNumber
|
|
|
+ // this.userId = e.userId
|
|
|
+ // this.ordersNo = e.ordersNo
|
|
|
+ // this.ordersId = e.ordersId
|
|
|
+ this.data = JSON.parse(decodeURIComponent(option.data))
|
|
|
+
|
|
|
// console.log(this.riderUserId,'........',this.indentNumber)
|
|
|
// let deviceInfo = {
|
|
|
// appid: plus.runtime.appid,
|
|
@@ -131,6 +150,18 @@
|
|
|
// net: '' + plus.networkinfo.getCurrentType()
|
|
|
// };
|
|
|
// this.sendDate = Object.assign(deviceInfo, this.sendDate);
|
|
|
+
|
|
|
+ this.$Request.getT('/app/credit/getCreditList?isDriver=0').then(res => {
|
|
|
+ if (res.code === 0) {
|
|
|
+ this.CreditList = res.data
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ this.$Request.getT('/user/getUserById?id=' + this.data.driverUserId).then(res => {
|
|
|
+ if (res.code === 0) {
|
|
|
+ this.UsertList = res.data
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
methods: {
|
|
|
close(e) {
|
|
@@ -179,6 +210,22 @@
|
|
|
// urls: this.imageList
|
|
|
// });
|
|
|
// },
|
|
|
+ handleRateChange(value) {
|
|
|
+ console.log('用户评分:', value);
|
|
|
+ this.ratevalue = value
|
|
|
+ // 你可以这里处理逻辑,比如赋值给 sendData.content、上传等
|
|
|
+ },
|
|
|
+ toggleSelect(index) {
|
|
|
+ const item = this.CreditList[index];
|
|
|
+ item.selected = !item.selected;
|
|
|
+
|
|
|
+ // 更新 textarea 内容
|
|
|
+ const selectedDescriptions = this.CreditList
|
|
|
+ .filter(i => i.selected)
|
|
|
+ .map(i => i.description);
|
|
|
+
|
|
|
+ this.sendDate.content = selectedDescriptions.join(',');
|
|
|
+ },
|
|
|
send() {
|
|
|
//发送反馈
|
|
|
// console.log(JSON.stringify(this.sendDate), '11111');
|
|
@@ -190,6 +237,43 @@
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
+
|
|
|
+ const selectedItems = this.CreditList.filter(i => i.selected);
|
|
|
+ const totalScore = selectedItems.reduce((sum, i) => sum + i.score, 0);
|
|
|
+ const types = totalScore >= 0 ? 1 : 0;
|
|
|
+ const data = {
|
|
|
+ userId: this.data.userId,
|
|
|
+ type: types,
|
|
|
+ score: totalScore,
|
|
|
+ remark: this.sendDate.content,
|
|
|
+ orderNo: this.data.ordersNo,
|
|
|
+ isDriver: 1,
|
|
|
+ ordersId: this.data.ordersId,
|
|
|
+ star: this.ratevalue
|
|
|
+ }
|
|
|
+
|
|
|
+ this.$Request.postT("/user/updateUserCredit", data).then(res => {
|
|
|
+ if (res.code == 0) {
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '评价成功',
|
|
|
+ showCancel: false
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: res.msg,
|
|
|
+ showCancel: false
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '网络错误,请重试',
|
|
|
+ showCancel: false
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
// if (this.value = 0) {
|
|
|
// uni.showToast({
|
|
|
// icon: 'none',
|
|
@@ -199,36 +283,36 @@
|
|
|
// }
|
|
|
// uni.report( this.sendDate,'意见反馈');
|
|
|
// console.log("uni.report( '意见反馈',this.sendDate)", uni.report('意见反馈', this.sendDate))
|
|
|
- uni.report('意见反馈', this.sendDate);
|
|
|
- console.log(this.indentNumber, this.satisfactionFlag)
|
|
|
- this.$queue.showLoading('加载中...');
|
|
|
- this.$Request
|
|
|
- .postJson('/app/indent/userEvaluate', {
|
|
|
- // state: this.value,
|
|
|
- // title: this.sendDate.contact,
|
|
|
- // evaluateMessage: JSON.stringify(this.sendDate.content),
|
|
|
- evaluateMessage: this.sendDate.content,
|
|
|
- // riderUserId: this.riderUserId,
|
|
|
- indentNumber: this.indentNumber,
|
|
|
- satisfactionFlag: this.value
|
|
|
- })
|
|
|
- .then(res => {
|
|
|
- if (res.code == 0) {
|
|
|
- uni.showToast({
|
|
|
- title: '评论成功'
|
|
|
- });
|
|
|
- setTimeout(function() {
|
|
|
- uni.navigateBack();
|
|
|
- }, 1000);
|
|
|
- } else {
|
|
|
- uni.hideLoading();
|
|
|
- uni.showModal({
|
|
|
- showCancel: false,
|
|
|
- title: '评论失败',
|
|
|
- content: res.msg
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
+ // uni.report('意见反馈', this.sendDate);
|
|
|
+ // console.log(this.indentNumber, this.satisfactionFlag)
|
|
|
+ // this.$queue.showLoading('加载中...');
|
|
|
+ // this.$Request
|
|
|
+ // .postJson('/app/indent/userEvaluate', {
|
|
|
+ // // state: this.value,
|
|
|
+ // // title: this.sendDate.contact,
|
|
|
+ // // evaluateMessage: JSON.stringify(this.sendDate.content),
|
|
|
+ // evaluateMessage: this.sendDate.content,
|
|
|
+ // // riderUserId: this.riderUserId,
|
|
|
+ // indentNumber: this.indentNumber,
|
|
|
+ // satisfactionFlag: this.value
|
|
|
+ // })
|
|
|
+ // .then(res => {
|
|
|
+ // if (res.code == 0) {
|
|
|
+ // uni.showToast({
|
|
|
+ // title: '评论成功'
|
|
|
+ // });
|
|
|
+ // setTimeout(function() {
|
|
|
+ // uni.navigateBack();
|
|
|
+ // }, 1000);
|
|
|
+ // } else {
|
|
|
+ // uni.hideLoading();
|
|
|
+ // uni.showModal({
|
|
|
+ // showCancel: false,
|
|
|
+ // title: '评论失败',
|
|
|
+ // content: res.msg
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // });
|
|
|
}
|
|
|
}
|
|
|
};
|
|
@@ -488,7 +572,7 @@
|
|
|
}
|
|
|
|
|
|
.item {
|
|
|
- flex-basis: calc(33.33% - 30rpx);
|
|
|
+ /* flex-basis: calc(33.33% - 30rpx); */
|
|
|
text-align: center;
|
|
|
border-radius: 8rpx;
|
|
|
border: 1px solid #999; /* 为了便于观察布局,添加边框 */
|
|
@@ -496,4 +580,9 @@
|
|
|
margin: 15rpx 10rpx;
|
|
|
line-height: 50rpx;
|
|
|
}
|
|
|
+
|
|
|
+ .selected {
|
|
|
+ background-color: #fcf6ec;
|
|
|
+ border: 1rpx solid #fe6b01;
|
|
|
+ }
|
|
|
</style>
|