|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="login-container">
|
|
<div class="login-container">
|
|
|
<el-form ref="dataForm" :model="dataForm" :rules="ruleForm">
|
|
<el-form ref="dataForm" :model="dataForm" :rules="ruleForm">
|
|
|
- <el-row :gutter="30">
|
|
|
|
|
|
|
+ <el-row :gutter="30" class="el-bg-border">
|
|
|
<el-col :span="5">
|
|
<el-col :span="5">
|
|
|
<el-form-item label="游戏平台" prop="pid">
|
|
<el-form-item label="游戏平台" prop="pid">
|
|
|
<el-select v-model="dataForm.pid" placeholder="Select" class="filter-item">
|
|
<el-select v-model="dataForm.pid" placeholder="Select" class="filter-item">
|
|
@@ -40,11 +40,13 @@
|
|
|
|
|
|
|
|
<el-col :span="3">
|
|
<el-col :span="3">
|
|
|
<el-form-item label="充值账户" prop="username" class="filter-item">
|
|
<el-form-item label="充值账户" prop="username" class="filter-item">
|
|
|
|
|
+ <span style="font-size: 5px; color: #67C23A;">:{{ accountNum }}</span>
|
|
|
<el-input
|
|
<el-input
|
|
|
v-model="dataForm.username"
|
|
v-model="dataForm.username"
|
|
|
type="textarea"
|
|
type="textarea"
|
|
|
placeholder="待检测账号."
|
|
placeholder="待检测账号."
|
|
|
:autosize="{ minRows: 15, maxRows: 100 }"
|
|
:autosize="{ minRows: 15, maxRows: 100 }"
|
|
|
|
|
+ @change="setAccountNum"
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
|
@@ -68,7 +70,10 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="3">
|
|
<el-col :span="3">
|
|
|
- <el-form-item label="充值金额" style="width: 160px;" prop="money">
|
|
|
|
|
|
|
+ <el-form-item label="账户余额">
|
|
|
|
|
+ <span>0元</span>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="充值金额" prop="money">
|
|
|
<el-input v-model="dataForm.money" type="number" min="0" class="filter-item" />
|
|
<el-input v-model="dataForm.money" type="number" min="0" class="filter-item" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<!-- <el-form-item label="平台折扣">
|
|
<!-- <el-form-item label="平台折扣">
|
|
@@ -90,10 +95,10 @@
|
|
|
<el-button type="primary" @click="onSubmit">立即支付</el-button>
|
|
<el-button type="primary" @click="onSubmit">立即支付</el-button>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :span="6" class="el-bg-border">
|
|
|
|
|
|
|
+ <el-col :span="6">
|
|
|
<el-row :gutter="30">
|
|
<el-row :gutter="30">
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
- <span style="font-size: 5px; color: #67C23A;">成功账户:</span>
|
|
|
|
|
|
|
+ <span style="font-size: 5px; color: #67C23A;">成功账户:{{ thenAccountNum }}</span>
|
|
|
<el-input
|
|
<el-input
|
|
|
v-model="thenAccount"
|
|
v-model="thenAccount"
|
|
|
type="textarea"
|
|
type="textarea"
|
|
@@ -101,7 +106,7 @@
|
|
|
/>
|
|
/>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
- <span style="font-size: 5px; color: #F56C6C;">失败账户:</span>
|
|
|
|
|
|
|
+ <span style="font-size: 5px; color: #F56C6C;">失败账户:{{ catchAccountNum }}</span>
|
|
|
<el-input
|
|
<el-input
|
|
|
v-model="catchAccount"
|
|
v-model="catchAccount"
|
|
|
type="textarea"
|
|
type="textarea"
|
|
@@ -118,18 +123,19 @@
|
|
|
<script>
|
|
<script>
|
|
|
import { Message, MessageBox, Loading } from 'element-ui'
|
|
import { Message, MessageBox, Loading } from 'element-ui'
|
|
|
import { rechargeChannelPlatformAccount } from '@/api/common'
|
|
import { rechargeChannelPlatformAccount } from '@/api/common'
|
|
|
|
|
+import { validMobile } from '@/utils/validate'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: 'Recharge',
|
|
name: 'Recharge',
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- accountHandleSuccess: '', // 处理成功账号
|
|
|
|
|
|
|
+ // accountHandleSuccess: '', // 处理成功账号
|
|
|
dataForm: {
|
|
dataForm: {
|
|
|
pid: 'd65aa6d7614589bffe62456b88e98811', // 游戏平台ID;默认魅族平台
|
|
pid: 'd65aa6d7614589bffe62456b88e98811', // 游戏平台ID;默认魅族平台
|
|
|
cid: '', // 渠道账号ID
|
|
cid: '', // 渠道账号ID
|
|
|
gfid: '', // 游戏ID
|
|
gfid: '', // 游戏ID
|
|
|
paypwd: '', // 支付密码
|
|
paypwd: '', // 支付密码
|
|
|
- username: '', // 充值账户
|
|
|
|
|
|
|
+ username: '13121776520\n13121776521\n13121776522\n13121776523\n13121776524\n13121776525', // 充值账户
|
|
|
money: 1, // 充值金额(单位:元)
|
|
money: 1, // 充值金额(单位:元)
|
|
|
recharge: 2, //
|
|
recharge: 2, //
|
|
|
payway: 1, // 充值方式
|
|
payway: 1, // 充值方式
|
|
@@ -157,8 +163,13 @@ export default {
|
|
|
rechargeChannelPlatform: [], // 渠道账号
|
|
rechargeChannelPlatform: [], // 渠道账号
|
|
|
rechargeGame: [], // 游戏列表
|
|
rechargeGame: [], // 游戏列表
|
|
|
|
|
|
|
|
|
|
+ accountNum: 0, // 总账户个数
|
|
|
thenAccount: '', // 成功账户
|
|
thenAccount: '', // 成功账户
|
|
|
- catchAccount: '' // 失败账户
|
|
|
|
|
|
|
+ thenAccountNum: 0, // 成功个数
|
|
|
|
|
+ catchAccount: '', // 失败账户
|
|
|
|
|
+ catchAccountNum: 0, // 失败个数
|
|
|
|
|
+ loadingText: '处理中,请稍等。。。',
|
|
|
|
|
+ loadingTextNum: 0 // 操作百分比
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
@@ -167,20 +178,17 @@ export default {
|
|
|
this.getRechargeGame(this.dataForm.pid)
|
|
this.getRechargeGame(this.dataForm.pid)
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- openFull() {
|
|
|
|
|
- const loading = Loading.service({
|
|
|
|
|
- lock: true,
|
|
|
|
|
- text: 'Loading',
|
|
|
|
|
- background: 'rgba(0, 0, 0, 0.7)'
|
|
|
|
|
- })
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- loading.close()
|
|
|
|
|
- }, 2000)
|
|
|
|
|
- },
|
|
|
|
|
- onSubmit() {
|
|
|
|
|
- this.openFull()
|
|
|
|
|
|
|
+ setAccountNum() {
|
|
|
|
|
+ this.accountNum = 0
|
|
|
|
|
+ const list = this.dataForm.username.split('\n')
|
|
|
|
|
+ for (var i = 0; i < list.length; i++) {
|
|
|
|
|
+ // console.log(list[i])
|
|
|
|
|
+ if (validMobile(list[i])) {
|
|
|
|
|
+ this.accountNum++
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
- async onSubmits() {
|
|
|
|
|
|
|
+ async onSubmit() {
|
|
|
this.thenAccount = ''
|
|
this.thenAccount = ''
|
|
|
this.catchAccount = ''
|
|
this.catchAccount = ''
|
|
|
|
|
|
|
@@ -206,9 +214,29 @@ export default {
|
|
|
var successList = [] // 成功数据
|
|
var successList = [] // 成功数据
|
|
|
var failList = [] // 失败数据
|
|
var failList = [] // 失败数据
|
|
|
|
|
|
|
|
|
|
+ const loading = Loading.service({
|
|
|
|
|
+ lock: true,
|
|
|
|
|
+ text: this.loadingText,
|
|
|
|
|
+ background: 'rgba(0, 0, 0, 0.7)'
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ // setTimeout(() => {
|
|
|
|
|
+ // loading.close()
|
|
|
|
|
+ // }, 2000)
|
|
|
|
|
+
|
|
|
|
|
+ const loadingNum = userLists.length - 1
|
|
|
|
|
+ // console.log('# loadingNum:', loadingNum)
|
|
|
|
|
+
|
|
|
userLists.forEach(async(item, index) => {
|
|
userLists.forEach(async(item, index) => {
|
|
|
- var _data = { pid: this.dataForm.pid, cid: this.dataForm.cid, gfid: this.dataForm.gfid, paypwd: value, username: item, money: this.dataForm.money, recharge: this.dataForm.recharge, payway: this.dataForm.payway, type: this.dataForm.type }
|
|
|
|
|
- await this.rechargePlayer({ successList, failList }, _data, index)
|
|
|
|
|
|
|
+ // console.log('# index:', index)
|
|
|
|
|
+ // this.loadingText = '处理中,当前' + index
|
|
|
|
|
+ if (validMobile(item)) {
|
|
|
|
|
+ var _data = { pid: this.dataForm.pid, cid: this.dataForm.cid, gfid: this.dataForm.gfid, paypwd: value, username: item, money: this.dataForm.money, recharge: this.dataForm.recharge, payway: this.dataForm.payway, type: this.dataForm.type }
|
|
|
|
|
+ await this.rechargePlayer({ successList, failList }, _data, index)
|
|
|
|
|
+ }
|
|
|
|
|
+ if (loadingNum === index) {
|
|
|
|
|
+ loading.close()
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
console.log('# 成功:', successList)
|
|
console.log('# 成功:', successList)
|
|
@@ -236,15 +264,17 @@ export default {
|
|
|
if (code === 200 && status === true) {
|
|
if (code === 200 && status === true) {
|
|
|
_request.successList.push(_data.username)
|
|
_request.successList.push(_data.username)
|
|
|
this.thenAccount = this.thenAccount + _data.username + '\n'
|
|
this.thenAccount = this.thenAccount + _data.username + '\n'
|
|
|
|
|
+ this.thenAccountNum++
|
|
|
resolve()
|
|
resolve()
|
|
|
} else {
|
|
} else {
|
|
|
_request.failList.push(_data.username)
|
|
_request.failList.push(_data.username)
|
|
|
this.catchAccount = this.catchAccount + _data.username + '\n'
|
|
this.catchAccount = this.catchAccount + _data.username + '\n'
|
|
|
|
|
+ this.catchAccountNum++
|
|
|
resolve()
|
|
resolve()
|
|
|
}
|
|
}
|
|
|
}).catch((res) => {
|
|
}).catch((res) => {
|
|
|
this.catchAccount = this.catchAccount + _data.username + '\n'
|
|
this.catchAccount = this.catchAccount + _data.username + '\n'
|
|
|
-
|
|
|
|
|
|
|
+ this.catchAccountNum++
|
|
|
resolve()
|
|
resolve()
|
|
|
})
|
|
})
|
|
|
}, 2000 * index, request, data)
|
|
}, 2000 * index, request, data)
|