Xiao_123 4 месяцев назад
Родитель
Сommit
66880db098
1 измененных файлов с 29 добавлено и 29 удалено
  1. 29 29
      src/views/mall/user/order/index.vue

+ 29 - 29
src/views/mall/user/order/index.vue

@@ -21,8 +21,8 @@
           <div>共{{ val.productCount }}件商品,合计:¥{{ fen2yuan(val.payPrice) }}</div>
           <v-btn v-if="val.buttons.length === 0" class="mt-2" variant="tonal" rounded="xl" @click.stop="handleDetail(val)">查看详情</v-btn>
           <v-btn v-if="val.buttons.includes('confirm')" class="mt-2" variant="tonal" color="success" rounded="xl" @click.stop="handleConfirm(val)">确认收货</v-btn>
-          <v-btn v-if="val.buttons.includes('comment')" class="mt-2" variant="tonal" rounded="xl" @click.stop="handleComment(val)">评价</v-btn>
-          <v-btn v-if="val.buttons.includes('express')" class="mt-2" variant="tonal" rounded="xl">查看物流</v-btn>
+          <!-- <v-btn v-if="val.buttons.includes('comment')" class="mt-2" variant="tonal" rounded="xl" @click.stop="handleComment(val)">评价</v-btn> -->
+          <!-- <v-btn v-if="val.buttons.includes('express')" class="mt-2" variant="tonal" rounded="xl">查看物流</v-btn> -->
           <v-btn v-if="val.buttons.includes('cancel')" class="mt-2" variant="tonal" rounded="xl" @click.stop="handleCancel(val)">取消订单</v-btn>
           <v-btn v-if="val.buttons.includes('delete')" class="mt-2" variant="tonal" color="error" rounded="xl" @click.stop="handleDelete(val)">删除订单</v-btn>
           <v-btn v-if="val.buttons.includes('pay')" class="mt-2 ml-3" variant="tonal" rounded="xl" @click.stop="handlePay(val)">继续支付</v-btn>
@@ -123,33 +123,33 @@ const handleCancel = async ({ id }) => {
 }
 
 // 商品评论
-const showDialog = ref(false)
-const commentOrderId = ref(null) // 订单id
-const commentFormRef = ref()
-const handleComment = (val) => {
-  commentOrderId.value = val.id
-  showDialog.value = true
-}
-const handleClose = () => {
-  commentOrderId.value = null
-  showDialog.value = false
-}
-const handleSubmit = async () => {
-  const commentList = commentFormRef.value.commentList
-  for (const comment of commentList) {
-    await createOrderItemComment(comment)
-  }
-  Snackbar.success('评论成功')
-  handleClose()
-  getOrderPage()
-}
-
-// 收货成功后提示去评论
-const handlePromptComment = (id) => {
-  Confirm('确认收货成功', '是否前往评价?', { sureText: '立即评价', cancelText: '关闭' }).then(() => {
-    handleComment({ id })
-  })
-}
+// const showDialog = ref(false)
+// const commentOrderId = ref(null) // 订单id
+// const commentFormRef = ref()
+// const handleComment = (val) => {
+//   commentOrderId.value = val.id
+//   showDialog.value = true
+// }
+// const handleClose = () => {
+//   commentOrderId.value = null
+//   showDialog.value = false
+// }
+// const handleSubmit = async () => {
+//   const commentList = commentFormRef.value.commentList
+//   for (const comment of commentList) {
+//     await createOrderItemComment(comment)
+//   }
+//   Snackbar.success('评论成功')
+//   handleClose()
+//   getOrderPage()
+// }
+
+// // 收货成功后提示去评论
+// const handlePromptComment = (id) => {
+//   Confirm('确认收货成功', '是否前往评价?', { sureText: '立即评价', cancelText: '关闭' }).then(() => {
+//     handleComment({ id })
+//   })
+// }
 
 // 确认收货
 const handleConfirm = ({ id }) => {