注释搜索:主播发送消息

观看列表只能主播跟管理员查看
This commit is contained in:
cbb
2026-02-10 17:49:33 +08:00
parent 2cc252dce0
commit 20ccbf1f14
19 changed files with 190 additions and 67 deletions

View File

@@ -97,8 +97,6 @@
}
}
// 订单列表
.order-list {
padding: 24rpx 0;
@@ -111,7 +109,9 @@
margin-bottom: 24rpx;
padding: 32rpx;
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.03);
transition: transform 0.2s ease, box-shadow 0.2s ease;
transition:
transform 0.2s ease,
box-shadow 0.2s ease;
&:active {
transform: translateY(-2rpx);
@@ -314,4 +314,24 @@
}
}
// 底部按钮
.bottom-btn {
margin-top: 16rpx;
display: flex;
justify-content: end;
button {
margin: 0;
border-radius: 80rpx;
width: 180rpx;
height: 60rpx;
line-height: 60rpx;
font-size: 26rpx;
color: #333333;
background: #fff;
border: 2rpx solid #d4dae0;
box-sizing: border-box;
&:after {
display: none;
}
}
}

View File

@@ -1,8 +1,13 @@
<script setup>
import { ref, computed, onMounted, reactive } from 'vue'
import { navigateTo } from '@/utils/router'
import { getUserBuyRecordList } from '../../../api/my-index'
import {
getUserBuyRecordList,
updateUserBuyRecord
} from '../../../api/my-index'
import { useUI } from '../../../utils/use-ui'
const { showDialog, showToast } = useUI()
// 响应式数据
const paging = ref(null)
const activeFilter = ref('') // -1表示全部
@@ -36,6 +41,7 @@
const getList = async () => {
try {
const res = await getUserBuyRecordList({
// orderType: 1,
orderStatus: activeFilter.value,
pageNum: formData.pageNum,
pageSize: formData.pageSize
@@ -74,6 +80,19 @@
const getStatusClass = status => {
return statusMap[status]?.color || 'status-default'
}
/** 确认收货按钮回调 */
const confirmReceipt = async item => {
const show = await showDialog('提示', '确认已收到商品吗?')
if (!show) return
const data = {
orderStatus: 8,
id: item.id
}
await updateUserBuyRecord(data)
item.orderStatus = 8
showToast('收货成功', 'success')
}
</script>
<template>
@@ -187,7 +206,6 @@
<view class="goods-info">
<text class="goods-name">{{ item.userName }}</text>
<text class="goods-spec">
<!-- {{ item.orderType == 1 ? '普通订单' : '拼单订单' }} -->
{{ item.specText }}
</text>
<view class="goods-price-info">
@@ -206,6 +224,11 @@
</view>
</view>
<!-- 底部按钮 -->
<view v-if="item.orderStatus == 7" class="bottom-btn">
<button @click.stop="confirmReceipt(item)">确认收货</button>
</view>
<!-- 底部装饰线 -->
<view class="card-footer">
<view class="decorative-line"></view>