|
|
@ -116,12 +116,12 @@ const data = reactive({ |
|
|
|
special_condition: { |
|
|
|
today_winlose: '今日输赢', |
|
|
|
total_winlose: '总输赢', |
|
|
|
today_deposit: '今日充值', |
|
|
|
total_deposit: '总充值', |
|
|
|
today_withdraw: '今日提现', |
|
|
|
total_withdraw: '总提现', |
|
|
|
today_surplus: '今日充提差', |
|
|
|
total_surplus: '总提差', |
|
|
|
today_deposit: '今日充值(₹)', |
|
|
|
total_deposit: '总充值(₹)', |
|
|
|
today_withdraw: '今日提现(₹)', |
|
|
|
total_withdraw: '总提现(₹)', |
|
|
|
today_surplus: '今日充提差(₹)', |
|
|
|
total_surplus: '总提差(₹)', |
|
|
|
device_num: '设备账号数量', |
|
|
|
ip_num: 'IP账号数量', |
|
|
|
vip: 'VIP等级', |
|
|
@ -226,6 +226,9 @@ const delBox = (action: number, item: any) => { |
|
|
|
} |
|
|
|
|
|
|
|
const submitData = async () => { |
|
|
|
const params: any = {} |
|
|
|
params.id = data.form.id |
|
|
|
|
|
|
|
if (data.request.action < 2) { |
|
|
|
if ( |
|
|
|
!(await form.value.validate((valid: any) => { |
|
|
@ -233,60 +236,55 @@ const submitData = async () => { |
|
|
|
})) |
|
|
|
) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
//小于等于4为输 |
|
|
|
if ((data.form.point_gear as number) > 0 && parseInt(data.form.point_coin as string) > 0) { |
|
|
|
ElMessage.error('点控输作弊值必须小于0') |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
//大于4赢 |
|
|
|
if ((data.form.point_gear as number) < 0 && parseInt(data.form.point_coin as string) < 0) { |
|
|
|
ElMessage.error('点控赢作弊值必须大于0') |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
const params: any = {} |
|
|
|
params.id = data.form.id |
|
|
|
params.new_register_status = encodeStatus(data.form.new_register_status, data.form.new_register_type) |
|
|
|
params.channel_status = data.form.channel_status |
|
|
|
params.channel_values = JSON.stringify(data.form.channel_values) |
|
|
|
params.point_gear = data.form.point_gear |
|
|
|
params.point_coin = parseInt(data.form.point_coin as string) |
|
|
|
params.lower_rate = parseFloat(data.form.lower_rate as string) |
|
|
|
params.upper_rate = parseFloat(data.form.upper_rate as string) |
|
|
|
params.remark = data.form.remark |
|
|
|
params.refresh_times = parseInt(data.form.refresh_times as string) |
|
|
|
params.refresh_status = data.form.refresh_status |
|
|
|
|
|
|
|
for (const item in data.special_condition) { |
|
|
|
const type_key = item + '_type' |
|
|
|
const status_key = item + '_status' |
|
|
|
const values_key = item + '_values' |
|
|
|
//小于等于4为输 |
|
|
|
if ((data.form.point_gear as number) > 0 && parseInt(data.form.point_coin as string) > 0) { |
|
|
|
ElMessage.error('点控输作弊值必须小于0') |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
params[status_key] = encodeStatus((data.form as any)[status_key], (data.form as any)[type_key]) |
|
|
|
//大于4赢 |
|
|
|
if ((data.form.point_gear as number) < 0 && parseInt(data.form.point_coin as string) < 0) { |
|
|
|
ElMessage.error('点控赢作弊值必须大于0') |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
let values = [] |
|
|
|
for (const v of (data.form as any)[values_key]) { |
|
|
|
if (v < 0) { |
|
|
|
ElMessage.error('数值不能小于0') |
|
|
|
params.new_register_status = encodeStatus(data.form.new_register_status, data.form.new_register_type) |
|
|
|
params.channel_status = data.form.channel_status |
|
|
|
params.channel_values = JSON.stringify(data.form.channel_values) |
|
|
|
params.point_gear = data.form.point_gear |
|
|
|
params.point_coin = parseInt(data.form.point_coin as string) |
|
|
|
params.lower_rate = parseFloat(data.form.lower_rate as string) |
|
|
|
params.upper_rate = parseFloat(data.form.upper_rate as string) |
|
|
|
params.remark = data.form.remark |
|
|
|
params.refresh_times = parseInt(data.form.refresh_times as string) |
|
|
|
params.refresh_status = data.form.refresh_status |
|
|
|
|
|
|
|
for (const item in data.special_condition) { |
|
|
|
const type_key = item + '_type' |
|
|
|
const status_key = item + '_status' |
|
|
|
const values_key = item + '_values' |
|
|
|
|
|
|
|
params[status_key] = encodeStatus((data.form as any)[status_key], (data.form as any)[type_key]) |
|
|
|
|
|
|
|
let values = [] |
|
|
|
for (const v of (data.form as any)[values_key]) { |
|
|
|
if (v < 0) { |
|
|
|
ElMessage.error('数值不能小于0') |
|
|
|
return |
|
|
|
} |
|
|
|
values.push(parseInt(v as string)) |
|
|
|
} |
|
|
|
if ((data.form as any)[status_key] == 1 && values.length == 0) { |
|
|
|
ElMessage.error('条件数值不能为空') |
|
|
|
return |
|
|
|
} |
|
|
|
values.push(parseInt(v as string)) |
|
|
|
} |
|
|
|
if ((data.form as any)[status_key] == 1 && values.length == 0) { |
|
|
|
ElMessage.error('条件数值不能为空') |
|
|
|
return |
|
|
|
params[values_key] = JSON.stringify(values) |
|
|
|
} |
|
|
|
params[values_key] = JSON.stringify(values) |
|
|
|
} |
|
|
|
|
|
|
|
const respond = await request.post(data.request.url, params) |
|
|
|
if (respond.code != 0) { |
|
|
|
ElMessage.error(respond.msg) |
|
|
|
return |
|
|
|
} |
|
|
|
if (respond.code != 0) return |
|
|
|
|
|
|
|
data.dialog = false |
|
|
|
data.destroy.show = false |
|
|
|