Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
jgdl
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2025-07-14 18:09:35 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
707901688e9d1746cf4023f44e6b135c6bab78c9
70790168
1 parent
0886a19a
fix(订单评价): 修复评价提交后数据不一致问题
确保评价数据同时更新到order.review和order.details.review字段,保持状态一致
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
src/pages/myOrders/index.vue
src/pages/myOrders/index.vue
View file @
7079016
...
...
@@ -678,18 +678,29 @@ const submitRate = async () => {
const currentOrders = viewMode.value === 'buy' ? boughtOrders : soldOrders
const order = currentOrders.value.find(o => o.id === currentRateOrder.value.id)
if (order) {
order.review = {
// 创建评价数据对象
const reviewData = {
rating: rateScore.value,
note: rateContent.value,
dat
e: new Date().toLocaleString('zh-CN')
created_tim
e: new Date().toLocaleString('zh-CN')
}
// 同时更新order.review和order.details.review,确保状态一致
order.review = reviewData
if (order.details) {
order.details.review = reviewData
}
// 确保订单状态为已完成
order.status = 5
}
Taro.showToast({
title: response.msg || '评价提交成功',
icon: 'success',
duration: 2000
})
closeRatePopup()
} else {
throw new Error(response.msg || '提交失败')
...
...
Please
register
or
login
to post a comment