修改评价部分的页面

This commit is contained in:
赵毅 2025-09-15 14:25:30 +08:00
parent 38eedaffe0
commit bfcf74aaf0
7 changed files with 39 additions and 613 deletions

View File

@ -1,190 +0,0 @@
[
{
"id": 9001,
"after_sales_no": "AS202508130001",
"commodity_order_id": 1001,
"after_sales_status": 1,
"applicant": "张三",
"after_sales_reason": "拍错商品/不想要了",
"after_sales_type": 1,
"application_description": "请尽快处理退款",
"application_images": "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
"is_need_process": 1,
"process_status": 1,
"refund_amount": 68.00,
"after_sales_goods": "1@8001",
"refund_method": 1,
"review_status": 1,
"creator": "customer",
"create_time": "2025-08-13T11:20:00Z",
"commodity_order_item": [
{
"id": 7001,
"goods_id": 8001,
"goods_name": "澳洲牛排",
"is_support_same_day": 1,
"commodity_pic": "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
"sales_price": 68.00,
"count": 1,
"after_sales_status": 1
}
]
},
{
"id": 9002,
"after_sales_no": "AS202508130002",
"commodity_order_id": 1002,
"after_sales_status": 1,
"after_sales_type": 1,
"refund_no": "RF202508130001",
"refund_completed_time": "2025-08-13T14:30:00Z",
"is_need_process": 2,
"process_status": 2,
"refund_amount": 45.80,
"after_sales_goods": "2@8004",
"refund_method": 1,
"review_status": 2,
"review_remark": "审核通过,已原路退款",
"reviewer": "客服008",
"review_time": "2025-08-13T14:15:00Z",
"create_time": "2025-08-13T13:45:00Z",
"commodity_order_item": [
{
"id": 7004,
"goods_id": 8004,
"goods_name": "东北大米",
"sales_price": 22.90,
"count": 2,
"after_sales_status": 3
}
]
},
{
"id": 9003,
"after_sales_no": "AS202508130003",
"commodity_order_id": 1003,
"after_sales_status": 1,
"applicant": "李四",
"after_sales_reason": "商品质量问题",
"after_sales_type": 2,
"application_description": "商品包装破损",
"application_images": "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
"return_description": "已通过顺丰寄回",
"return_images": "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
"return_tracking_no": "SF1234567890",
"return_logistics_company": "顺丰速运",
"return_contact_phone": "13800138000",
"is_need_process": 1,
"process_status": 1,
"refund_amount": 152.00,
"after_sales_goods": "1@8003",
"refund_method": 1,
"review_status": 1,
"create_time": "2025-08-13T15:30:00Z",
"commodity_order_item": [
{
"id": 7003,
"goods_id": 8003,
"goods_name": "精品榴莲",
"sales_price": 152.00,
"count": 1,
"after_sales_status": 1
}
]
},
{
"id": 9004,
"after_sales_no": "AS202508130004",
"after_sales_type": 2,
"after_sales_status": 1,
"process_status": 2,
"refund_amount": 39.90,
"review_status": 2,
"review_remark": "商品已验货,符合退款条件",
"reviewer": "质检005",
"review_time": "2025-08-13T16:45:00Z",
"refund_no": "RF202508130002",
"refund_completed_time": "2025-08-13T17:30:00Z",
"create_time": "2025-08-13T09:30:00Z",
"commodity_order_item": [
{
"id": 7005,
"goods_name": "酸奶套装",
"sales_price": 39.90,
"count": 1,
"after_sales_status": 2
}
]
},
{
"id": 9005,
"after_sales_no": "AS202508130005",
"commodity_order_id": 1004,
"after_sales_type": 3,
"after_sales_status": 1,
"applicant": "王五",
"after_sales_reason": "商品发错型号",
"application_description": "购买的是XL码收到L码",
"application_images": "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
"is_need_process": 1,
"process_status": 1,
"after_sales_goods": "1@8006",
"receiving_address": "上海市浦东新区张江高科88号",
"review_status": 1,
"create_time": "2025-08-13T10:15:00Z",
"commodity_order_item": [
{
"id": 7006,
"goods_id": 8006,
"goods_name": "冷冻虾仁",
"sales_price": 76.50,
"count": 1,
"after_sales_status": 1
}
]
},
{
"id": 9006,
"after_sales_no": "AS202508130006",
"after_sales_type": 3,
"after_sales_status": 1,
"process_status": 2,
"processor": "客服012",
"process_time": "2025-08-13T14:20:00Z",
"process_remark": "已补发新商品物流单号YT987654321",
"review_status": 2,
"reviewer": "客服主管",
"review_time": "2025-08-13T13:40:00Z",
"create_time": "2025-08-13T09:00:00Z",
"commodity_order_item": [
{
"id": 7007,
"goods_id": 8007,
"goods_name": "进口橙子",
"sales_price": 32.00,
"count": 2,
"after_sales_status": 2
}
]
},
{
"id": 9007,
"after_sales_no": "AS202508130007",
"after_sales_status": 2,
"revoke_time": "2025-08-13T11:05:00Z",
"after_sales_type": 1,
"applicant": "赵六",
"after_sales_reason": "商品运输损坏",
"create_time": "2025-08-13T10:30:00Z",
"update_time": "2025-08-13T11:05:00Z",
"commodity_order_item": [
{
"id": 7002,
"goods_name": "有机西兰花",
"sales_price": 10.50,
"count": 1,
"after_sales_status": 4
}
]
}
]

View File

@ -52,7 +52,6 @@
</template> </template>
<script> <script>
import afterSaleData from './afterSale.json';
import { apiArr } from "../../../api/afterSale"; import { apiArr } from "../../../api/afterSale";
import { import {
isPhone, isPhone,
@ -71,7 +70,6 @@ export default {
}, },
data() { data() {
return { return {
// currentAfterSale: afterSaleData
currentAfterSale: this.afterSaleList, currentAfterSale: this.afterSaleList,
}; };
}, },
@ -156,7 +154,6 @@ export default {
}); });
}, },
pendingPage(item) { pendingPage(item) {
console.log("🚀 ~ pendingPage ~ item:", item)
// NavgateTo(`/packages/myOrders/sendBack/index?item=${JSON.stringify(item)}`); // NavgateTo(`/packages/myOrders/sendBack/index?item=${JSON.stringify(item)}`);
if (item.after_sales_type === 3) { if (item.after_sales_type === 3) {

View File

@ -18,7 +18,7 @@
<text class="product-unit">{{ product.sales_price }}/{{ product.goods_unit }}</text> <text class="product-unit">{{ product.sales_price }}/{{ product.goods_unit }}</text>
</view> </view>
</view> </view>
<button class="evaluate-btn" @click="evaluateOrder(product)"> <button class="evaluate-btn" @click="evaluateOrder(item)">
评价 评价
</button> </button>
</view> </view>
@ -44,21 +44,18 @@ export default {
}, },
methods: { methods: {
evaluateOrder(item) { evaluateOrder(item) {
console.log("🚀 ~ evaluateOrder ~ orderNumber:", item);
NavgateTo(`../evaluate/index?item=${JSON.stringify(item)}`); NavgateTo(`../evaluate/index?item=${JSON.stringify(item)}`);
}, },
}, },
mounted() { mounted() {
// //
this.orderList = this.orderData; this.orderList = this.orderData;
console.log("🚀 ~ mounted ~ this.orderList:", this.orderList);
}, },
watch: { watch: {
// orderData // orderData
orderData: { orderData: {
handler(newVal) { handler(newVal) {
this.orderList = newVal; this.orderList = newVal;
console.log("🚀 ~ watch orderData ~ this.orderList:", this.orderList);
}, },
deep: true deep: true
} }

View File

@ -128,7 +128,6 @@ import AfterSale from "../afterSale/index.vue";
import cancelOrderPopup from './popup/cancelOrder/cancelOrder.vue'; import cancelOrderPopup from './popup/cancelOrder/cancelOrder.vue';
import refundPopup from './popup/refund/refund.vue'; import refundPopup from './popup/refund/refund.vue';
import afterSalePopup from './popup/afterSale/index.vue'; import afterSalePopup from './popup/afterSale/index.vue';
import orderMockData from "./orderMockData.json";
export default { export default {
@ -346,7 +345,7 @@ export default {
}, },
orderEvaluate(item) { orderEvaluate(item) {
NavgateTo(`/packages/myOrders/evaluate/index?item=${JSON.stringify(item)}`); NavgateTo(`/packages/myOrders/orderEvaluate/index?item=${JSON.stringify(item)}`);
}, },
getOrderStatus(order_status) { getOrderStatus(order_status) {

View File

@ -1,349 +0,0 @@
[
{
"id": 1001,
"user_id": 20001,
"supplier_id": 3001,
"supplier_name": "鲜丰水果供应链有限公司",
"order_group_id": 40001,
"order_no": "SH20240823001001",
"total_amount": 156.80,
"total_count": 3,
"order_status": 3,
"cancelled_by": "",
"cancel_time": "",
"cancel_reason": "",
"evauate_status": 2,
"after_sales_status": 2,
"receiving_name": "李佳",
"receiving_phone": "15901518415",
"receiving_address": "北京市朝阳区珠江绿洲文化广场3号楼2单元1002室",
"pay_method": "微信支付",
"payment_amount": 156.80,
"payment_status": "已支付",
"payment_time": "2024-08-23 10:15:30",
"payment_serial": "WX202408231015300012345678",
"payer_name": "李佳",
"completed_at": "",
"order_time": "2024-08-23 10:10:22",
"is_same_day": 2,
"estimated_delivery_time": "2024-08-24 09:00-18:00",
"remark": "请放在小区丰巢柜,谢谢",
"shiliu_score": 156.8,
"shiliu_seed": 28.5,
"timeout_time_stamp": 1724413822,
"order_cate": 1,
"create_time": "2024-08-23 10:10:22",
"update_time": "2024-08-23 10:15:30",
"after_sales_count": 0,
"commodity_order_item_list": [
{
"id": 50001,
"order_id": 1001,
"goods_id": 6001,
"goods_name": "泰国金枕榴莲2-2.5斤/个)",
"commodity_pic": "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
"goods_unit": "个",
"goods_spec": "2-2.5斤",
"cost_price": 45.00,
"sales_price": 69.90,
"count": 1,
"after_sales_status": 2,
"is_support_same_day": 1,
"is_same_day": false
},
{
"id": 50002,
"order_id": 1001,
"goods_id": 6002,
"goods_name": "阳光玫瑰葡萄1斤装",
"commodity_pic": "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
"goods_unit": "斤",
"goods_spec": "1斤",
"cost_price": 12.00,
"sales_price": 25.90,
"count": 2,
"after_sales_status": 2,
"is_support_same_day": 1,
"is_same_day": false
}
]
},
{
"id": 1002,
"user_id": 20002,
"supplier_id": 3002,
"supplier_name": "优选生鲜超市供应链",
"order_group_id": 40002,
"order_no": "SH20240823001002",
"total_amount": 89.50,
"total_count": 2,
"order_status": 6,
"cancelled_by": "用户",
"cancel_time": "2024-08-23 09:45:10",
"cancel_reason": "临时改变需求,不需要该商品",
"evauate_status": 2,
"after_sales_status": 2,
"receiving_name": "张伟",
"receiving_phone": "13812345678",
"receiving_address": "上海市浦东新区张江高科技园区博云路2号",
"pay_method": "支付宝支付",
"payment_amount": 0.00,
"payment_status": "未支付",
"payment_time": "",
"payment_serial": "",
"payer_name": "",
"completed_at": "",
"order_time": "2024-08-23 09:30:05",
"is_same_day": 1,
"estimated_delivery_time": "2024-08-23 12:00-14:00",
"remark": "无",
"shiliu_score": 0.0,
"shiliu_seed": 0.0,
"timeout_time_stamp": 1724399405,
"order_cate": 2,
"create_time": "2024-08-23 09:30:05",
"update_time": "2024-08-23 09:45:10",
"after_sales_count": 0,
"commodity_order_item_list": [
{
"id": 50003,
"order_id": 1002,
"goods_id": 6003,
"goods_name": "精品富士苹果5斤装",
"commodity_pic": "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
"goods_unit": "斤",
"goods_spec": "5斤",
"cost_price": 3.50,
"sales_price": 9.90,
"count": 1,
"after_sales_status": 2,
"is_support_same_day": 1,
"is_same_day": true
},
{
"id": 50004,
"order_id": 1002,
"goods_id": 6004,
"goods_name": "蒙牛纯牛奶200ml*16盒",
"commodity_pic": "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
"goods_unit": "箱",
"goods_spec": "200ml*16盒",
"cost_price": 35.00,
"sales_price": 79.60,
"count": 1,
"after_sales_status": 2,
"is_support_same_day": 1,
"is_same_day": true
}
]
},
{
"id": 1003,
"user_id": 20003,
"supplier_id": 3003,
"supplier_name": "美菜网餐饮供应链",
"order_group_id": 40003,
"order_no": "SH20240822001003",
"total_amount": 328.00,
"total_count": 5,
"order_status": 5,
"cancelled_by": "",
"cancel_time": "",
"cancel_reason": "",
"evauate_status": 1,
"after_sales_status": 1,
"receiving_name": "王芳",
"receiving_phone": "13987654321",
"receiving_address": "广州市天河区天河路385号天俊阁15楼",
"pay_method": "企业对公转账",
"payment_amount": 328.00,
"payment_status": "已支付",
"payment_time": "2024-08-22 15:20:40",
"payment_serial": "BANK202408221520400098765",
"payer_name": "王芳(企业代付)",
"completed_at": "2024-08-22 18:30:15",
"order_time": "2024-08-22 14:50:33",
"is_same_day": 2,
"estimated_delivery_time": "2024-08-23 08:00-10:00",
"remark": "餐饮用食材,请优先配送,包装需防震",
"shiliu_score": 328.0,
"shiliu_seed": 45.2,
"timeout_time_stamp": 1724319033,
"order_cate": 1,
"create_time": "2024-08-22 14:50:33",
"update_time": "2024-08-22 18:30:15",
"after_sales_count": 1,
"supplier_address": "供应商收货地址",
"supplier_phone": "11111111111",
"commodity_order_item_list": [
{
"id": 50005,
"order_id": 1003,
"goods_id": 6005,
"goods_name": "新鲜生菜1斤装",
"commodity_pic": "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
"goods_unit": "斤",
"goods_spec": "1斤",
"cost_price": 1.80,
"sales_price": 3.50,
"count": 2,
"after_sales_status": 1,
"is_support_same_day": 2,
"is_same_day": false
},
{
"id": 50006,
"order_id": 1003,
"goods_id": 6006,
"goods_name": "冷冻鸡胸肉1kg装",
"commodity_pic": "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
"goods_unit": "袋",
"goods_spec": "1kg",
"cost_price": 12.00,
"sales_price": 22.80,
"count": 3,
"after_sales_status": 2,
"is_support_same_day": 2,
"is_same_day": false
}
]
},
{
"id": 1004,
"user_id": 20004,
"supplier_id": 3004,
"supplier_name": "美菜网餐饮供应链",
"order_group_id": 40004,
"order_no": "SH20240822001003",
"total_amount": 328.00,
"total_count": 5,
"order_status": 4,
"cancelled_by": "",
"cancel_time": "",
"cancel_reason": "",
"evauate_status": 1,
"after_sales_status": 1,
"receiving_name": "王芳",
"receiving_phone": "13987654321",
"receiving_address": "广州市天河区天河路385号天俊阁15楼",
"pay_method": "企业对公转账",
"payment_amount": 328.00,
"payment_status": "已支付",
"payment_time": "2024-08-24 10:20:40",
"payment_serial": "BANK202408221520400098765",
"payer_name": "王芳(企业代付)",
"completed_at": "2024-08-24 18:30:15",
"order_time": "2024-08-24 14:50:33",
"is_same_day": 2,
"estimated_delivery_time": "2024-08-23 08:00-10:00",
"remark": "餐饮用食材,请优先配送,包装需防震",
"shiliu_score": 328.0,
"shiliu_seed": 45.2,
"timeout_time_stamp": 1724319033,
"order_cate": 1,
"create_time": "2024-08-24 14:50:33",
"update_time": "2024-08-24 18:30:15",
"after_sales_count": 1,
"commodity_order_item_list": [
{
"id": 50005,
"order_id": 1003,
"goods_id": 6005,
"goods_name": "新鲜生菜1斤装",
"commodity_pic": "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
"goods_unit": "斤",
"goods_spec": "1斤",
"cost_price": 1.80,
"sales_price": 3.50,
"count": 2,
"after_sales_status": 1,
"is_support_same_day": 2,
"is_same_day": false
},
{
"id": 50006,
"order_id": 1003,
"goods_id": 6006,
"goods_name": "冷冻鸡胸肉1kg装",
"commodity_pic": "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
"goods_unit": "袋",
"goods_spec": "1kg",
"cost_price": 12.00,
"sales_price": 22.80,
"count": 3,
"after_sales_status": 2,
"is_support_same_day": 2,
"is_same_day": false
}
]
},
{
"id": 1005,
"user_id": 20005,
"supplier_id": 3005,
"supplier_name": "鲜丰水果供应链有限公司",
"order_group_id": 40005,
"order_no": "SH20240823001001",
"total_amount": 156.80,
"total_count": 3,
"order_status": 1,
"cancelled_by": "",
"cancel_time": "",
"cancel_reason": "",
"evauate_status": 2,
"after_sales_status": 2,
"receiving_name": "李佳",
"receiving_phone": "15901518415",
"receiving_address": "北京市朝阳区珠江绿洲文化广场3号楼2单元1002室",
"pay_method": "微信支付",
"payment_amount": 156.80,
"payment_status": "已支付",
"payment_time": "2024-08-23 10:15:30",
"payment_serial": "WX202408231015300012345678",
"payer_name": "李佳",
"completed_at": "",
"order_time": "2024-08-23 10:10:22",
"is_same_day": 2,
"estimated_delivery_time": "2024-08-24 09:00-18:00",
"remark": "请放在小区丰巢柜,谢谢",
"shiliu_score": 156.8,
"shiliu_seed": 28.5,
"timeout_time_stamp": 1724413822,
"order_cate": 1,
"create_time": "2024-08-23 10:10:22",
"update_time": "2024-08-23 10:15:30",
"after_sales_count": 0,
"commodity_order_item_list": [
{
"id": 50001,
"order_id": 1001,
"goods_id": 6001,
"goods_name": "泰国金枕榴莲2-2.5斤/个)",
"commodity_pic": "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
"goods_unit": "个",
"goods_spec": "2-2.5斤",
"cost_price": 45.00,
"sales_price": 69.90,
"count": 1,
"after_sales_status": 2,
"is_support_same_day": 1,
"is_same_day": false
},
{
"id": 50002,
"order_id": 1001,
"goods_id": 6002,
"goods_name": "阳光玫瑰葡萄1斤装",
"commodity_pic": "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
"goods_unit": "斤",
"goods_spec": "1斤",
"cost_price": 12.00,
"sales_price": 25.90,
"count": 2,
"after_sales_status": 2,
"is_support_same_day": 1,
"is_same_day": false
}
]
}
]

View File

@ -311,7 +311,7 @@ export default {
}, },
orderEvaluate() { orderEvaluate() {
NavgateTo(`/packages/myOrders/evaluate/index?item=${JSON.stringify(this.orderInfo)}`); NavgateTo(`/packages/myOrders/orderEvaluate/index?item=${JSON.stringify(this.orderInfo)}`);
}, },
// //

View File

@ -3,8 +3,8 @@
<!-- 商品图片区域 --> <!-- 商品图片区域 -->
<scroll-view class="goods-scroll" scroll-x> <scroll-view class="goods-scroll" scroll-x>
<view class="goods-list"> <view class="goods-list">
<view class="goods-item" v-for="(item, index) in goods" :key="index"> <view class="goods-item" v-for="(item, index) in itemObj.commodity_order_item_list" :key="index">
<image :src="item.image" class="goods-img"></image> <image :src="item.commodity_pic" class="goods-img"></image>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
@ -14,7 +14,7 @@
<!-- 订单编号 --> <!-- 订单编号 -->
<view class="order-info"> <view class="order-info">
<text class="order-label">订单编号</text> <text class="order-label">订单编号</text>
<text class="order-value">38757328485</text> <text class="order-value">{{ itemObj.order_no }}</text>
</view> </view>
<view class="rating"> <view class="rating">
<view>很差</view> <view>很差</view>
@ -26,70 +26,38 @@
<!-- 商品品质 --> <!-- 商品品质 -->
<view class="rating-item"> <view class="rating-item">
<text class="rating-label">商品品质</text> <text class="rating-label">商品品质</text>
<u-rate <u-rate v-model="qualityRating" size="40" active-color="#FFB400" inactive-color="#EEEEEE" gutter="60"></u-rate>
v-model="qualityRating"
size="40"
active-color="#FFB400"
inactive-color="#EEEEEE"
gutter="60"
></u-rate>
</view> </view>
<!-- 配送速度 --> <!-- 配送速度 -->
<view class="rating-item"> <view class="rating-item">
<text class="rating-label">配送速度</text> <text class="rating-label">配送速度</text>
<u-rate <u-rate v-model="speedRating" size="40" active-color="#FFB400" inactive-color="#EEEEEE" gutter="60"></u-rate>
v-model="speedRating"
size="40"
active-color="#FFB400"
inactive-color="#EEEEEE"
gutter="60"
></u-rate>
</view> </view>
<!-- 快递员服务 --> <!-- 快递员服务 -->
<view class="rating-item"> <view class="rating-item">
<text class="rating-label">快递员服务</text> <text class="rating-label">快递员服务</text>
<u-rate <u-rate v-model="serviceRating" size="40" active-color="#FFB400" inactive-color="#EEEEEE" gutter="60"></u-rate>
v-model="serviceRating"
size="40"
active-color="#FFB400"
inactive-color="#EEEEEE"
gutter="60"
></u-rate>
</view> </view>
<!-- 评价输入 --> <!-- 评价输入 -->
<view class="comment-section"> <view class="comment-section">
<textarea <textarea class="comment-input" placeholder="亲,可以从其他角度评价商品,可以帮助我们为您提供更好的服务~" v-model="comment"></textarea>
class="comment-input"
placeholder="亲,可以从其他角度评价商品,可以帮助我们为您提供更好的服务~"
v-model="comment"
></textarea>
</view> </view>
<!-- 图片上传 --> <!-- 图片上传 -->
<view class="upload-section"> <view class="upload-section">
<view class="image-list"> <view class="image-list">
<view <view class="image-item" v-for="(img, index) in imageList" :key="index">
class="image-item"
v-for="(img, index) in imageList"
:key="index"
>
<image :src="img" class="uploaded-img"></image> <image :src="img" class="uploaded-img"></image>
<view class="delete-btn" @click="deleteImage(index)"> <view class="delete-btn" @click="deleteImage(index)">
<text class="delete-icon">×</text> <text class="delete-icon">×</text>
</view> </view>
</view> </view>
</view> </view>
<view <view class="upload-btn" @click="chooseImage" v-if="imageList.length < 3">
class="upload-btn" <image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/upload.png" class="upload-icon">
@click="chooseImage" </image>
v-if="imageList.length < 3"
>
<image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/upload.png"
class="upload-icon"
></image>
<view class="upload-text">上传图片</view> <view class="upload-text">上传图片</view>
<view class="upload-count">({{ imageList.length }}/3)</view> <view class="upload-count">({{ imageList.length }}/3)</view>
</view> </view>
@ -103,24 +71,14 @@
</template> </template>
<script> <script>
import { picUrl, NavgateTo, request } from "../../../utils";
import { apiArr } from "../../../api/afterSale";
export default { export default {
data() { data() {
return { return {
// itemObj: {},
goods: [
{ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index1.png" },
{ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index2.png" },
{ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index3.png" },
{ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index4.png" },
{ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index5.png" },
{ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index1.png" },
{ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index2.png" },
{ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index3.png" },
{ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index4.png" },
{ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index5.png" },
],
// //
qualityRating: 5, qualityRating: 0,
speedRating: 0, speedRating: 0,
serviceRating: 0, serviceRating: 0,
// //
@ -129,6 +87,9 @@ export default {
imageList: [], imageList: [],
}; };
}, },
onLoad(options) {
this.itemObj = JSON.parse(decodeURIComponent(options.item));
},
methods: { methods: {
// //
chooseImage() { chooseImage() {
@ -161,7 +122,17 @@ export default {
}); });
return; return;
} }
// API const params = {
order_id: this.itemObj.id,
goods_id: this.itemObj.commodity_order_item_list[0].goods_id,
user_id: uni.getStorageSync("userId"),
quality_score: this.qualityRating,
speed_score: this.speedRating,
service_score: this.serviceRating,
user_review: this.comment,
review_image: this.imageList,
}
request(apiArr.createReview, "POST", params).then((res) => {
uni.showToast({ uni.showToast({
title: "评价提交成功", title: "评价提交成功",
icon: "success", icon: "success",
@ -169,6 +140,7 @@ export default {
setTimeout(() => { setTimeout(() => {
uni.navigateBack(); uni.navigateBack();
}, 1500); }, 1500);
});
}, },
}, },
}; };