MoQingYu 4 months ago
parent
commit
3a0edd0311
  1. 33
      backmanage/src/api/module/common_params.ts
  2. 56
      backmanage/src/views/betRecord/index.vue
  3. 99
      backmanage/src/views/userSearch/changeCheat.vue
  4. 59
      backmanage/src/views/userSearch/changeGameController.vue

33
backmanage/src/api/module/common_params.ts

@ -60,14 +60,14 @@ export const optionsDragonTigerBetArea: any = {
export const optionsABBetArea: any = {
1: "ANDAR",
2: "BAHAR",
3: "♥️",
4: "♠️",
5: "♣️",
6: "♦️",
7: "1 ~ 8",
8: "9 ~ 16",
9: "17 ~ 24",
10: "25",
3: "1~5",
4: "6~10",
5: "11~15",
6: "16~25",
7: "26~30",
8: "31~35",
9: "36~40",
10: "41",
}
//6人AB 下注区域
@ -158,6 +158,23 @@ export const optionsTexasBetArea: any = {
}
}
//Rummy 下注区域
export const optionsRummyBetArea: any = {
number: {
17: "♦A", 18: "♦2", 19: "♦3", 20: "♦4", 21: "♦5", 22: "♦6", 23: "♦7", 24: "♦8", 25: "♦9", 26: "♦10", 27: "♦J", 28: "♦Q", 29: "♦K", // 方块 A - K
33: "♣A", 34: "♣2", 35: "♣3", 36: "♣4", 37: "♣5", 38: "♣6", 39: "♣7", 40: "♣8", 41: "♣9", 42: "♣10", 43: "♣J", 44: "♣Q", 45: "♣K", // 梅花 A - K
49: "♥A", 50: "♥2", 51: "♥3", 52: "♥4", 53: "♥5", 54: "♥6", 55: "♥7", 56: "♥8", 57: "♥9", 58: "♥10", 59: "♥J", 60: "♥Q", 61: "♥K", // 红桃 A - K
65: "♠A", 66: "♠2", 67: "♠3", 68: "♠4", 69: "♠5", 70: "♠6", 71: "♠7", 72: "♠8", 73: "♠9", 74: "♠10", 75: "♠J", 76: "♠Q", 77: "♠K", // 黑桃 A - K
95: "🃏", 111: "🃏"
},
type: {
0: "散排",
1: "纯顺",
2: "不纯顺子",
3: "套牌",
}
}
//打码量类型
export const optionsRealBet: any[] = [
{ value: 0, label: '全部' },

56
backmanage/src/views/betRecord/index.vue

@ -13,6 +13,7 @@ import {
options7Up7DownBetArea,
options3PattiBetArea,
optionsTexasBetArea,
optionsRummyBetArea,
} from '@/api/module/common_params'
import CustomPaginate from '@/components/common/CustomPaginate.vue'
@ -111,24 +112,8 @@ const getBetRecord = async (page: number = 1) => {
item.realPlayer = item.players.split(',')
//
if (item.area != '') {
//
if (item.game_id == 20008) {
const formattedArea = item.area.replace(/(\d+):/g, '"$1":')
item.betArea = JSON.parse(formattedArea)
}
if (
item.game_id == 10001 ||
item.game_id == 20010 ||
item.game_id == 20009 ||
item.game_id == 20006 ||
item.game_id == 20001 ||
item.game_id == 20005
) {
item.betArea = JSON.parse(item.area)
}
}
if (item.area != '') item.betArea = JSON.parse(item.area)
}
}
@ -160,11 +145,7 @@ onMounted(async () => {
getBetRecord()
})
const showUserList = (item: string) => {
data.players = item.split(',')
data.dialog = true
return
}
</script>
<template>
@ -254,7 +235,7 @@ const showUserList = (item: string) => {
<el-table-column align="center" prop="robot_num" label="机器人数" />
<el-table-column align="center" prop="table_id" label="牌桌号" />
<el-table-column align="center" prop="seat_id" label="座位号" />
<el-table-column align="center" prop="area" label="下注区域" width="500">
<el-table-column align="center" prop="area" label="牌局详情" width="500">
<template #default="item">
<span v-if="item.row.game_id == 20001">
<p v-for="(v, index) in item.row.betArea" class="area-font" :key="index">
@ -280,9 +261,13 @@ const showUserList = (item: string) => {
<span>结果{{ v.isWin ? '赢' : '输' }}</span>
</p>
</span>
<span v-if="item.row.game_id == 20008">
<p v-for="(v, index) in item.row.betArea" class="area-font">
{{ `${optionsSixABBetArea[index]}: ${v}` }}
<span v-if="item.row.game_id == 20008" class="area-font">
<p v-if="item.row.area == ''"> <span>区域</span></p>
<p v-else v-for="(v, index) in item.row.betArea" :key="index">
<span>区域{{ optionsSixABBetArea[v.area] }}, </span>
<span>金额{{ v.betAmount }}, </span>
<span>赔率{{ v.areaPro }}, </span>
<span>结果{{ v.isWin ? '赢' : '输' }}</span>
</p>
</span>
<span v-if="item.row.game_id == 10001" class="area-font">
@ -309,7 +294,9 @@ const showUserList = (item: string) => {
</span>
<span v-if="item.row.game_id == 20009" class="area-font">
<p v-for="(v, index) in item.row.betArea?.player">
<span>{{ `玩家${index + 1}: ${v.userNo == '' ? '机器人' : v.userNo},` }}</span>
<span>{{
`玩家${index + 1}: ${v.userNo == '' ? '机器人' : v.userNo}, (${v.isBanker ? '庄' : '闲'})`
}}</span>
<span
>手牌: <span v-for="poker in v.handPoker">{{ optionsTexasBetArea.number[poker] }}, </span></span
>
@ -336,6 +323,19 @@ const showUserList = (item: string) => {
>
</p>
</span>
<span v-if="item.row.game_id == 70001" class="area-font">
<p>鬼牌:{{ optionsTexasBetArea.number[item.row.betArea?.wildJokerCard] }}</p>
<p v-for="(v, index) in item.row.betArea?.player">
<el-divider v-show="index > 0" />
<span>{{ `玩家${index + 1}: ${v.userNo == '' ? '机器人' : v.userNo}` }}, 分数: {{ v.score }}, 结果{{ v.isWin ? '赢' : '输' }}</span>
<p>手牌:</p>
<p v-for="p in v.handPoker">
<span v-for="poker in p.pokers">{{ optionsTexasBetArea.number[poker] }}, </span>
<span>牌型{{ optionsRummyBetArea.type[p.card_type] }}, </span>
<span>牌值{{ p.all_coin }}</span>
</p>
</p>
</span>
</template>
</el-table-column>
<el-table-column align="center" prop="tax_amount" label="明水" />

99
backmanage/src/views/userSearch/changeCheat.vue

@ -1,99 +0,0 @@
<script setup lang="ts">
import { onMounted, reactive, watch } from 'vue';
import request from "@/api/config";
import { ElMessage } from "element-plus";
const emits = defineEmits(["closeBox"])
const props = defineProps(["uid", "user_no", "type", "value", "remark", "gold", "diamonds"])
const data = reactive({
form: {
id: props.uid,
cheatType: props.type,
cheatValue: props.value,
cheatRemark: props.remark,
},
options: [
{ value: 1, label: "1000(小输)" },
{ value: 2, label: "2000(中输)" },
{ value: 3, label: "3000(大输)" },
{ value: 4, label: "4000(大杀)" },
{ value: 5, label: "-1000(小赢)" },
{ value: 6, label: "-2000(中赢)" },
{ value: 7, label: "-3000(大赢)" },
],
cheat_info: { gear: "", value: props.value }
})
const onSubmit = async () => {
if (props.uid == undefined) {
ElMessage.error("参数错误")
return
}
data.form.cheatValue = parseInt(data.form.cheatValue)
const params = { ...data.form }
const respond = await request.post("/customer/modify-user-cheat", params)
if (respond.code != 0) {
ElMessage.error("操作失败")
return
}
ElMessage.success("操作成功")
emits("closeBox", false)
}
const getGear = (newValue: number) => {
for (const item of data.options) {
if (item.value == newValue) {
data.cheat_info.gear = item.label
break
}
}
}
watch(() => props.type, (newValue) => {
//
getGear(newValue)
})
onMounted(() => {
getGear(props.type)
})
</script>
<template>
<el-form>
<el-form-item label="玩家ID" label-width="100">
<el-input :value="user_no" disabled></el-input>
</el-form-item>
<el-form-item label="玩家拥有资产" label-width="100">
<el-input :value="`金币 ${props.gold}`" disabled></el-input>
</el-form-item>
<el-form-item label="当前作弊情况" label-width="100">
<el-input :value="`挡位 ${data.cheat_info.gear} 剩余值 ${data.cheat_info.value}`" disabled></el-input>
</el-form-item>
<el-form-item label="新赠作弊率" label-width="100">
<el-select v-model="data.form.cheatType" style="width: 100%;">
<el-option v-for="item in data.options" :key="item.label" :label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="新赠作弊值" label-width="100">
<el-input v-model="data.form.cheatValue" type="number" />
</el-form-item>
<el-form-item label="操作理由" label-width="100">
<el-input v-model="data.form.cheatRemark" type="textarea" :rows="5" />
</el-form-item>
<div class="paginate-center">
<el-button type="primary" @click="$emit('closeBox', false)">取消</el-button>
<el-button type="danger" @click="onSubmit">确定</el-button>
</div>
</el-form>
</template>

59
backmanage/src/views/userSearch/changeGameController.vue

@ -1,29 +1,28 @@
<script setup lang="ts">
import { onMounted, reactive, watch } from 'vue';
import request from "@/api/config";
import { ElMessage } from "element-plus";
import { optionsPointControl } from '@/api/module/common_params';
import { onMounted, reactive, watch } from 'vue'
import request from '@/api/config'
import { ElMessage } from 'element-plus'
import { optionsPointControl } from '@/api/module/common_params'
const emits = defineEmits(["closeBox"])
const props = defineProps(["uid", "user_no"])
const emits = defineEmits(['closeBox'])
const props = defineProps(['uid', 'user_no'])
const data = reactive({
form: {
uid: props.uid,
user_no: props.user_no,
cheat_type: 1000,
cheat_value: "",
remark: "",
cheat_type: 0,
cheat_value: '',
remark: '',
},
options: {
cheat_type: optionsPointControl,
cheat_type: [{ label: '无点控', value: 0 }, ...optionsPointControl],
},
currentCheatValue: 0,
})
//
const getPointControl = async () => {
const respond: any = await request.post("/person/getPointControlConfig", { user_id: data.form.uid })
const respond: any = await request.post('/person/getPointControlConfig', { user_id: data.form.uid })
if (respond.code != 0) {
ElMessage.error(respond.msg)
return
@ -37,55 +36,53 @@ const getPointControl = async () => {
}
const clearPointControl = () => {
data.form.cheat_type = 1000
data.form.cheat_value = ""
data.form.remark = ""
data.form.cheat_type = 0
data.form.cheat_value = ''
data.form.remark = ''
}
const onSubmit = async () => {
if (props.uid == undefined) {
ElMessage.error("参数错误")
ElMessage.error('参数错误')
return
}
//4
if (data.form.cheat_type > 0 && parseInt(data.form.cheat_value) > 0) {
ElMessage.error("点控输作弊值必须小于0")
ElMessage.error('点控输作弊值必须小于0')
return
}
//4
if (data.form.cheat_type < 0 && parseInt(data.form.cheat_value) < 0) {
ElMessage.error("点控赢作弊值必须大于0")
ElMessage.error('点控赢作弊值必须大于0')
return
}
const params = {
user_id: data.form.uid,
cheat_type: data.form.cheat_type,
cheat_value: data.form.cheat_value != "" ? parseInt(data.form.cheat_value) : 0,
cheat_value: data.form.cheat_value != '' ? parseInt(data.form.cheat_value) : 0,
remark: data.form.remark,
}
const respond = await request.post("/person/changePointControl", params)
const respond = await request.post('/person/changePointControl', params)
if (respond.code != 0) {
ElMessage.error("操作失败")
ElMessage.error('操作失败')
return
}
ElMessage.success("操作成功")
emits("closeBox", false)
ElMessage.success('操作成功')
emits('closeBox', false)
}
watch(
() => [props.uid, props.user_no],
(v) => {
data.form.uid = v[0]
data.form.user_no = v[1]
},
}
)
onMounted(() => {
@ -93,9 +90,7 @@ onMounted(() => {
})
</script>
<template>
<el-form>
<el-form-item label="玩家ID" label-width="100">
<el-input :value="data.form.user_no" disabled></el-input>
@ -105,9 +100,8 @@ onMounted(() => {
<el-input v-else :value="`挡位 ${data.form.cheat_type} 剩余值 ${data.form.cheat_value}`" disabled></el-input>
</el-form-item>
<el-form-item label="新赠作弊率" label-width="100">
<el-select v-model="data.form.cheat_type" style="width: 100%;">
<el-option v-for="item in data.options.cheat_type" :key="item.label" :label="item.label"
:value="item.value"></el-option>
<el-select v-model="data.form.cheat_type" style="width: 100%">
<el-option v-for="item in data.options.cheat_type" :key="item.label" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="新赠作弊值" label-width="100">
@ -123,5 +117,4 @@ onMounted(() => {
<el-button type="danger" @click="onSubmit">确定</el-button>
</div>
</el-form>
</template>
</template>

Loading…
Cancel
Save