聊天问题修复优化
This commit is contained in:
@@ -41,20 +41,29 @@
|
||||
</view>
|
||||
|
||||
<view class="u-m-t-32 table bg-fff">
|
||||
<view class="header">
|
||||
<view class="header">
|
||||
<view class="user">用户</view>
|
||||
<view class="gettime">领取时间</view>
|
||||
<view class="usetime">使用时间</view>
|
||||
<view class="status">状态</view>
|
||||
<view class="operation">操作</view>
|
||||
</view>
|
||||
<view class="body">
|
||||
<view class="item" v-for="(item,index) in 10" :key="index">
|
||||
<view class="user">用户昵称(40239)</view>
|
||||
<view class="gettime">2025/06/27 20:07:18)</view>
|
||||
<view class="usetime">2025/01/15 08:02:38</view>
|
||||
<view class="status">已使用</view>
|
||||
<view class="operation status3">失效</view>
|
||||
<view class="body">
|
||||
<view class="item" v-for="(item, index) in list" :key="index">
|
||||
<view class="user">
|
||||
<view>
|
||||
{{ item.nickName }}
|
||||
</view>
|
||||
<view> ({{ item.shopUserId }}) </view>
|
||||
</view>
|
||||
<view class="gettime">{{ item.createTime }}</view>
|
||||
<view class="usetime">{{ item.useTime }}</view>
|
||||
<view class="status">{{ returnStatus(item.status) }}</view>
|
||||
<view class="operation status3">
|
||||
<text v-if="item.status == 0" @click="deleteRecord(item)"
|
||||
>失效</text
|
||||
></view
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -70,12 +79,49 @@ import { reactive, ref, watch } from "vue";
|
||||
import { onShow } from "@dcloudio/uni-app";
|
||||
import go from "@/commons/utils/go.js";
|
||||
import * as chatCouponApi from "@/http/api/market/chat";
|
||||
|
||||
function deleteRecord(item) {
|
||||
uni
|
||||
.showModal({
|
||||
title: "提示",
|
||||
content: "确定要让该记录失效吗?",
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.confirm) {
|
||||
chatCouponApi
|
||||
.deleteRecord({
|
||||
id: item.id,
|
||||
})
|
||||
.then((res) => {
|
||||
uni.showToast({
|
||||
title: "操作成功",
|
||||
icon: "none",
|
||||
});
|
||||
|
||||
setTimeout(() => {
|
||||
refresh();
|
||||
}, 1000);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
const statusOptions = ref([
|
||||
{ label: "全部", value: "" },
|
||||
{ label: "未使用", value: 0 },
|
||||
{ label: "已使用", value: 1 },
|
||||
{ label: "已过期", value: 2 },
|
||||
]);
|
||||
function returnStatus(status) {
|
||||
if (status == 0) {
|
||||
return "未使用";
|
||||
}
|
||||
if (status == 1) {
|
||||
return "已使用";
|
||||
}
|
||||
if (status == 2) {
|
||||
return "已过期";
|
||||
}
|
||||
}
|
||||
const selStatus = ref("");
|
||||
const query = reactive({
|
||||
page: 1,
|
||||
@@ -146,39 +192,39 @@ onLoad((opt) => {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.table{
|
||||
.user{
|
||||
.table {
|
||||
.user {
|
||||
width: 142rpx;
|
||||
}
|
||||
.gettime{
|
||||
.gettime {
|
||||
width: 172rpx;
|
||||
}
|
||||
.usetime{
|
||||
.usetime {
|
||||
width: 158rpx;
|
||||
}
|
||||
.status{
|
||||
.status {
|
||||
width: 84rpx;
|
||||
}
|
||||
.operation{
|
||||
.operation {
|
||||
width: 56rpx;
|
||||
&.status3{
|
||||
color: #FF383C;
|
||||
&.status3 {
|
||||
color: #ff383c;
|
||||
}
|
||||
}
|
||||
.header{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 32rpx 16rpx;
|
||||
color: #666;
|
||||
border-bottom: 1px solid #E5E5E5;
|
||||
}
|
||||
.body{
|
||||
.item{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 24rpx 16rpx;
|
||||
border-bottom: 1px solid #E5E5E5;
|
||||
}
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 32rpx 16rpx;
|
||||
color: #666;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
}
|
||||
.body {
|
||||
.item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 24rpx 16rpx;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user