Initial commit

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-17 12:02:35 +08:00
co-authored by Claude Opus 5
commit d999a5c0e6
643 changed files with 178681 additions and 0 deletions
@@ -0,0 +1,323 @@
<template>
<div class="louFeng-box">
<!--操作栏-->
<div class="action-bar">
<el-input
placeholder="裸聊id"
v-model.trim="params.nid"
clearable
size="small"
class="param-input"
>
</el-input>
<el-input
placeholder="订单id"
v-model.number="params.orderId"
clearable
size="small"
class="param-input"
>
</el-input>
<el-input
placeholder="请输入用户id"
v-model.number="params.uid"
clearable
size="small"
class="param-input"
>
</el-input>
<!-- <el-select placeholder="是否使用" v-model="params.isUse" size="small" clearable style="width:200px;margin-right:5px">
<el-option :value="true" label="已使用" key="已使用"></el-option>
<el-option :value="false" label="未使用" key="未使用"></el-option>
</el-select> -->
<el-button
type="primary"
size="small"
@click="getNakedChatBuyList('status')"
style="margin-right: 20px"
>搜索
</el-button>
</div>
<!--数据表格-->
<el-table
:data="tableData"
style="width: 100%"
border
v-loading="loading"
element-loading-text="拼命加载中"
element-loading-spinner="el-icon-loading"
ref="multipleTable"
height="550"
>
<el-table-column
prop="id"
label="ID"
align="center"
fixed
min-width="210"
>
<template slot-scope="scope">
<span>{{ scope.row.id || "未知" }}</span>
</template>
</el-table-column>
<el-table-column prop="uid" label="用户ID" align="center" min-width="100">
<template slot-scope="scope">
<span>{{ scope.row.uid || "未知" }}</span>
</template>
</el-table-column>
<el-table-column prop="userContact" label="用户联系方式" align="center" min-width="120">
<template slot-scope="scope">
<span>{{ scope.row.userContact || "未知" }}</span>
</template>
</el-table-column>
<el-table-column
prop="amount"
label="总额"
align="center"
min-width="100"
>
<template slot-scope="scope">
<span>{{ scope.row.amount }}</span>
</template>
</el-table-column>
<el-table-column
prop="num"
label="购买数量"
align="center"
min-width="100"
>
<template slot-scope="scope">
<span>{{ scope.row.num }}</span>
</template>
</el-table-column>
<el-table-column prop="nid" label="裸聊id" align="center" min-width="100">
<template slot-scope="scope">
<span>{{ scope.row.nid || "-" }}</span>
</template>
</el-table-column>
<el-table-column
prop="status"
label="状态"
align="center"
min-width="100"
>
<template slot-scope="scope">
<el-button
v-if="scope.row.status == 0"
size="small"
type="success"
disabled
>已下单</el-button
>
<el-button
v-else-if="scope.row.status == 1"
size="small"
type="warning"
@click="confirmUseCode(scope.row)"
>已完成</el-button
>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column
prop="price"
label="购买的单价"
align="center"
min-width="100"
>
<template slot-scope="scope">
<span>{{ scope.row.price }}</span>
</template>
</el-table-column>
<el-table-column
prop="remark"
label="订单备注信息"
align="center"
min-width="140"
>
<template slot-scope="scope">
<span>{{ scope.row.remark }}</span>
</template>
</el-table-column>
<el-table-column
prop="snapshot"
label="快照"
align="center"
min-width="100"
>
<template slot-scope="scope">
<el-button slot="reference" @click="clickSnapshort(scope.row.snapshot)" type="success" size="small"
>快照查看</el-button
>
</template>
</el-table-column>
<el-table-column
prop="createdAt"
label="创建时间"
align="center"
min-width="200"
>
<template slot-scope="scope">
<span>{{ scope.row.createdAt | changeDate }}</span>
</template>
</el-table-column>
<el-table-column
prop="updatedAt"
label="修改时间"
align="center"
min-width="200"
>
<template slot-scope="scope">
<span>{{ scope.row.updatedAt | changeDate }}</span>
</template>
</el-table-column>
<el-table-column
label="操作"
align="center"
fixed="right"
min-width="100"
>
<template slot-scope="scope">
<el-button
type="success"
size="mini"
icon="el-icon-edit"
@click="editChat(scope.row)"
></el-button>
</template>
</el-table-column>
</el-table>
<!--分页组件-->
<el-pagination
:page-sizes="[10, 15, 20, 30]"
:current-page="params.pageNumber"
:page-size="params.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
background
v-if="total > 10"
@size-change="changeSize"
@current-change="changeCurrent"
></el-pagination>
<el-drawer title="快照" :visible.sync="snapShortShow" direction="rtl" size="70%">
<SnapShortTable
:tableData="snapShortData"
/>
</el-drawer>
<UpdateStatusPopup ref="updateStatusPopup" @close="getNakedChatBuyList"/>
</div>
</template>
<script>
import API from "@/api";
import SnapShortTable from "./components/SnapShortTable";
import UpdateStatusPopup from "./components/UpdateStatusPopup"
export default {
data() {
return {
snapShortShow: false,
snapShortData: [],
// 表格数据加载动画
loading: false,
// 列表数据
tableData: [],
total: 0,
// 系统管理列表请求参数
params: {
pageNumber: 1,
pageSize: 10,
uid: "",
orderId: "", //订单ID
nid: "", //裸聊id
// isUse: undefined,//是否使用
},
dialogVisible: false,
};
},
components: { SnapShortTable, UpdateStatusPopup },
created() {
this.getNakedChatBuyList();
},
methods: {
editChat(row) {
this.$refs.updateStatusPopup.form.status = row.status;
this.$refs.updateStatusPopup.form.id = row.id;
this.$refs.updateStatusPopup.dialogVisible = true;
},
clickSnapshort(data) {
if(!data) return;
this.snapShortData = [data]
this.snapShortShow = true;
},
// 请求列表
getNakedChatBuyList(type) {
this.loading = true;
if (type === "status") {
this.params.pageNumber = 1;
}
API.getNakedChatBuyList(this.params)
.then((res) => {
if (res.code === 200 && res.data) {
this.tableData = res.data.list;
this.total = res.data.total;
} else {
this.tableData = [];
}
this.loading = false;
})
.catch(() => {
this.loading = false;
});
},
confirmUseCode(row) {
this.$confirm("确认该裸聊已使用?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
const params = Object.assign(
{},
{
id: row.id,
}
);
API.confirmUseCode(params)
.then((res) => {
if (res.code === 200) {
this.$message({
message: "确认成功",
type: "success",
});
this.getNakedChatBuyList();
} else {
this.$message.error("确认失败!");
}
})
.catch(() => {
this.flag = false;
this.getNakedChatBuyList();
this.$message.error("确认失败!");
});
});
},
// 分页条数改变回掉
changeSize(size) {
this.params.pageSize = size;
this.getNakedChatBuyList();
},
// 分页页码改变回掉
changeCurrent(pageNumber) {
this.params.pageNumber = pageNumber;
this.getNakedChatBuyList();
},
},
};
</script>
<style lang="scss" scoped>
.payMethod {
.add-input {
margin-left: 0 !important;
}
}
</style>