|
|
@@ -42,6 +42,9 @@
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="账户余额">
|
|
|
+ <span>{{ user_money }}元</span>
|
|
|
+ </el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="3">
|
|
|
@@ -69,9 +72,6 @@
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="4">
|
|
|
- <el-form-item label="账户余额">
|
|
|
- <span>{{ user_money }}元</span>
|
|
|
- </el-form-item>
|
|
|
<el-form-item label="充值金额" prop="money">
|
|
|
<el-input v-model="dataForm.money" type="number" min="0" :max="maxMoney" class="filter-item" />
|
|
|
<span style="font-size: var(--el-font-size-extra-small); color: #909399;">最大充值金额:{{ maxMoney }}</span>
|
|
|
@@ -92,13 +92,19 @@
|
|
|
<span>{{ rechargeMoney }} 元</span>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="账号检测">
|
|
|
- <el-radio-group v-model="dataForm.payway" prop="payway" class="filter-item">
|
|
|
+ <el-radio-group v-model="onCheck" prop="payway" class="filter-item">
|
|
|
<el-switch v-model="onCheck" />
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="是否充值">
|
|
|
+ <el-radio-group v-model="onRecharge" prop="onRecharge" class="filter-item">
|
|
|
+ <el-switch v-model="onRecharge" />
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button type="primary" @click="onSubmit()">立即支付</el-button>
|
|
|
+ <el-button type="primary" @click="onSubmit()">提交</el-button>
|
|
|
</el-form-item>
|
|
|
+
|
|
|
</el-col>
|
|
|
<el-col :span="9">
|
|
|
处理时间:<span>{{ startTime }}</span> -- <span>{{ endTime }}</span>
|
|
|
@@ -193,7 +199,8 @@ export default {
|
|
|
|
|
|
startTime: 0, // 开始时间
|
|
|
endTime: 0, // 结束时间
|
|
|
- onCheck: false, // 是否需要检测账号()
|
|
|
+ onCheck: false, // 是否需要检测账号
|
|
|
+ onRecharge: true, // 是否充值
|
|
|
rechargeMoney: 0 // 支付总金额
|
|
|
|
|
|
}
|
|
|
@@ -234,12 +241,16 @@ export default {
|
|
|
updateUserMoney() {
|
|
|
this.$store.dispatch('user/getInfo').then((res) => {
|
|
|
const { data } = res
|
|
|
- this.user_money = data.user_money
|
|
|
+ this.user_money = Math.floor(data.user_money)
|
|
|
if (this.accountNum > 0) {
|
|
|
this.maxMoney = Math.floor(data.user_money / this.accountNum)
|
|
|
} else {
|
|
|
this.maxMoney = Math.floor(data.user_money)
|
|
|
}
|
|
|
+ return Message({
|
|
|
+ type: 'success',
|
|
|
+ message: '账户余额已更新'
|
|
|
+ })
|
|
|
})
|
|
|
},
|
|
|
// 统计充值账户数量并处理行数是否账号
|
|
|
@@ -300,6 +311,24 @@ export default {
|
|
|
// message: '余额不足以充值.'
|
|
|
// })
|
|
|
// }
|
|
|
+
|
|
|
+ if (this.onCheck === false && this.onRecharge === false) {
|
|
|
+ return Message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '请选择是否检测或充值!'
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ // 截取账号
|
|
|
+ var accountLists = this.dataForm.username.split('\n')
|
|
|
+ // 检测不充值
|
|
|
+ if (this.onCheck === true && this.onRecharge === false) {
|
|
|
+ this.startLoading()
|
|
|
+ this.sublmeRecharge(accountLists, 1)
|
|
|
+ return false
|
|
|
+ }
|
|
|
+
|
|
|
+ // 需要充值则检测余额
|
|
|
if ((this.user_money - this.rechargeMoney) < 0) {
|
|
|
return Message({
|
|
|
type: 'warning',
|
|
|
@@ -308,24 +337,18 @@ export default {
|
|
|
}
|
|
|
this.$refs['dataForm'].validate((valid) => {
|
|
|
if (valid) {
|
|
|
- // 截取账号
|
|
|
- var accountLists = this.dataForm.username.split('\n')
|
|
|
- // console.log('# accountLists: ', accountLists)
|
|
|
-
|
|
|
MessageBox.prompt('输入支付密码', 'Tip', {
|
|
|
confirmButtonText: '确认',
|
|
|
cancelButtonText: '取消'
|
|
|
}).then(({ value }) => {
|
|
|
- // 遮屏
|
|
|
- this.loading = Loading.service({
|
|
|
- lock: true,
|
|
|
- text: '处理中, 请稍等...',
|
|
|
- background: 'rgba(0, 0, 0, 0.7)'
|
|
|
- })
|
|
|
- this.sublmeRecharge(accountLists, value)
|
|
|
+ this.startLoading()
|
|
|
+ if (this.onRecharge === true && this.onCheck === false) { // 充值不检测
|
|
|
+ this.sublmeRecharge(accountLists, 2, value)
|
|
|
+ } else if (this.onRecharge === true && this.onCheck === true) { // 充值并检测
|
|
|
+ this.sublmeRecharge(accountLists, 3, value)
|
|
|
+ }
|
|
|
}).catch(() => {
|
|
|
return Message({
|
|
|
- type: 'info',
|
|
|
message: '取消充值.'
|
|
|
})
|
|
|
})
|
|
|
@@ -338,119 +361,170 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
// 提交检测和充值
|
|
|
- sublmeRecharge(accountLists, paypwd) {
|
|
|
+ async sublmeRecharge(accountLists, operationType, paypwd = '') {
|
|
|
this.startTime = new Date().getHours() + ':' + new Date().getMinutes() + ':' + new Date().getSeconds()
|
|
|
-
|
|
|
- // 是否需要验证账户
|
|
|
// 提取第一条账号数据,进行提交测试
|
|
|
const oneAccount = accountLists[0]
|
|
|
- const oneData = { pid: this.dataForm.pid, cid: this.dataForm.cid, gfid: this.dataForm.gfid, paypwd: paypwd, username: oneAccount, money: this.dataForm.money, recharge: this.dataForm.recharge, payway: this.dataForm.payway, type: this.dataForm.type }
|
|
|
const loadingNum = accountLists.length - 2
|
|
|
- if (this.onCheck) {
|
|
|
- // 账号检测
|
|
|
- this.$store.dispatch('common/rechargePlayerType', { pid: this.dataForm.pid, cid: this.dataForm.cid, gfid: this.dataForm.gfid, username: oneAccount }).then((res) => {
|
|
|
- const { code, status, message } = res
|
|
|
-
|
|
|
- if (code === 200 && status === true) {
|
|
|
- // 充值
|
|
|
- this.$store.dispatch('common/rechargePlayer', oneData).then((res) => {
|
|
|
- const { code, status, message } = res
|
|
|
- if (code === 200 && status === true) {
|
|
|
- this.thenAccount = this.thenAccount + oneAccount + '\n'
|
|
|
- this.thenAccountNum++
|
|
|
-
|
|
|
- if (loadingNum > 1) {
|
|
|
- // 成功后处理剩下账号数据
|
|
|
- accountLists = LodashArray.drop(accountLists) // 删除第一个账户
|
|
|
- accountLists.forEach(async(item, index) => {
|
|
|
- await this.rechargePlayer(
|
|
|
- { pid: this.dataForm.pid, cid: this.dataForm.cid, gfid: this.dataForm.gfid, paypwd: paypwd, username: item, money: this.dataForm.money, recharge: this.dataForm.recharge, type: this.dataForm.type },
|
|
|
- index,
|
|
|
- this.onCheck,
|
|
|
- loadingNum
|
|
|
- )
|
|
|
- })
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.catchAccount = this.catchAccount + oneAccount + '\n'
|
|
|
- this.catchAccountNum++
|
|
|
|
|
|
- this.cloneLoading()
|
|
|
- return Message({
|
|
|
- type: 'warning',
|
|
|
- message: message
|
|
|
- })
|
|
|
- }
|
|
|
- }).catch((error) => {
|
|
|
- this.catchAccount = this.catchAccount + oneAccount + '\n'
|
|
|
- this.catchAccountNum++
|
|
|
+ switch (operationType) {
|
|
|
+ case 1: // 账号检测
|
|
|
+ await this.$store.dispatch('common/rechargePlayerType', { pid: this.dataForm.pid, cid: this.dataForm.cid, gfid: this.dataForm.gfid, username: oneAccount }).then((res) => {
|
|
|
+ const { code, status, message } = res
|
|
|
+
|
|
|
+ if (code === 200 && status === true) {
|
|
|
+ this.thenAccount = this.thenAccount + oneAccount + '\n'
|
|
|
+ this.thenAccountNum++
|
|
|
+ Message({
|
|
|
+ type: 'success',
|
|
|
+ message: '检测成功 ' + oneAccount + ' : ' + message
|
|
|
+ })
|
|
|
|
|
|
- this.cloneLoading()
|
|
|
+ // 成功后处理剩下账号数据
|
|
|
+ accountLists = LodashArray.drop(accountLists) // 删除第一个账户
|
|
|
+ accountLists.forEach(async(item, index) => {
|
|
|
+ await this.rechargePlayer(
|
|
|
+ { pid: this.dataForm.pid, cid: this.dataForm.cid, gfid: this.dataForm.gfid, paypwd: paypwd, username: item, money: this.dataForm.money, recharge: this.dataForm.recharge, type: this.dataForm.type },
|
|
|
+ index, operationType, loadingNum
|
|
|
+ )
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.noExistence = this.noExistence + oneAccount + '\n'
|
|
|
+ this.noExistenceNum++
|
|
|
+
|
|
|
+ this.cloneLoading(false)
|
|
|
return Message({
|
|
|
- type: 'error',
|
|
|
- message: error.message
|
|
|
+ message: '检测 ' + oneAccount + ' : ' + message
|
|
|
})
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.noExistence = this.noExistence + oneAccount + '\n'
|
|
|
- this.noExistenceNum++
|
|
|
+ }
|
|
|
+ }).catch((error) => {
|
|
|
+ this.catchAccount = this.catchAccount + oneAccount + '\n'
|
|
|
+ this.catchAccountNum++
|
|
|
|
|
|
- this.cloneLoading()
|
|
|
+ this.cloneLoading(false)
|
|
|
return Message({
|
|
|
type: 'error',
|
|
|
- message: '检测:' + message
|
|
|
+ message: '检测失败 ' + oneAccount + ' :' + error.message
|
|
|
})
|
|
|
- }
|
|
|
- }).catch((error) => {
|
|
|
- console.log('# catch-message:', error.message)
|
|
|
- this.catchAccount = this.catchAccount + oneAccount + '\n'
|
|
|
- this.catchAccountNum++
|
|
|
-
|
|
|
- this.cloneLoading()
|
|
|
- return Message({
|
|
|
- type: 'error',
|
|
|
- message: '检测:' + error.message
|
|
|
})
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.$store.dispatch('common/rechargePlayer', oneData).then((res) => {
|
|
|
- const { code, status, message } = res
|
|
|
- if (code === 200 && status === true) {
|
|
|
- this.thenAccount = this.thenAccount + oneAccount + '\n'
|
|
|
- this.thenAccountNum++
|
|
|
-
|
|
|
- if (loadingNum > 1) {
|
|
|
+ break
|
|
|
+ case 2: // 充值
|
|
|
+ this.$store.dispatch('common/rechargePlayer', { pid: this.dataForm.pid, cid: this.dataForm.cid, gfid: this.dataForm.gfid, paypwd: paypwd, username: oneAccount, money: this.dataForm.money, recharge: this.dataForm.recharge, payway: this.dataForm.payway, type: this.dataForm.type }).then((res) => {
|
|
|
+ const { code, status, message } = res
|
|
|
+ if (code === 200 && status === true) {
|
|
|
+ this.thenAccount = this.thenAccount + oneAccount + '\n'
|
|
|
+ this.thenAccountNum++
|
|
|
+ Message({
|
|
|
+ type: 'success',
|
|
|
+ message: '充值成功 ' + oneAccount + ' : ' + message
|
|
|
+ })
|
|
|
+
|
|
|
// 成功后处理剩下账号数据
|
|
|
accountLists = LodashArray.drop(accountLists) // 删除第一个账户
|
|
|
accountLists.forEach(async(item, index) => {
|
|
|
await this.rechargePlayer(
|
|
|
{ pid: this.dataForm.pid, cid: this.dataForm.cid, gfid: this.dataForm.gfid, paypwd: paypwd, username: item, money: this.dataForm.money, recharge: this.dataForm.recharge, type: this.dataForm.type },
|
|
|
- index,
|
|
|
- this.onCheck,
|
|
|
- loadingNum
|
|
|
+ index, operationType, loadingNum
|
|
|
)
|
|
|
})
|
|
|
+ } else {
|
|
|
+ this.catchAccount = this.catchAccount + oneAccount + '\n'
|
|
|
+ this.catchAccountNum++
|
|
|
+
|
|
|
+ this.cloneLoading()
|
|
|
+ return Message({
|
|
|
+ message: '充值 ' + oneAccount + ' : ' + message
|
|
|
+ })
|
|
|
}
|
|
|
- } else {
|
|
|
+ }).catch((error) => {
|
|
|
this.catchAccount = this.catchAccount + oneAccount + '\n'
|
|
|
this.catchAccountNum++
|
|
|
|
|
|
this.cloneLoading()
|
|
|
return Message({
|
|
|
- type: 'warning',
|
|
|
- message: message
|
|
|
+ type: 'error',
|
|
|
+ message: '充值失败 ' + oneAccount + ' : ' + error.message
|
|
|
})
|
|
|
- }
|
|
|
- }).catch((error) => {
|
|
|
- this.catchAccount = this.catchAccount + oneAccount + '\n'
|
|
|
- this.catchAccountNum++
|
|
|
+ })
|
|
|
+ break
|
|
|
+ case 3: // 充值并检测
|
|
|
+ // 账号检测
|
|
|
+ this.$store.dispatch('common/rechargePlayerType', { pid: this.dataForm.pid, cid: this.dataForm.cid, gfid: this.dataForm.gfid, username: oneAccount }).then((res) => {
|
|
|
+ const { code, status, message } = res
|
|
|
+
|
|
|
+ if (code === 200 && status === true) {
|
|
|
+ Message({
|
|
|
+ type: 'success',
|
|
|
+ message: '检测成功 ' + oneAccount + ' : ' + message
|
|
|
+ })
|
|
|
|
|
|
- this.cloneLoading()
|
|
|
- return Message({
|
|
|
+ // 充值
|
|
|
+ this.$store.dispatch('common/rechargePlayer', { pid: this.dataForm.pid, cid: this.dataForm.cid, gfid: this.dataForm.gfid, paypwd: paypwd, username: oneAccount, money: this.dataForm.money, recharge: this.dataForm.recharge, payway: this.dataForm.payway, type: this.dataForm.type }).then((res) => {
|
|
|
+ const { code, status, message } = res
|
|
|
+
|
|
|
+ if (code === 200 && status === true) {
|
|
|
+ this.thenAccount = this.thenAccount + oneAccount + '\n'
|
|
|
+ this.thenAccountNum++
|
|
|
+ Message({
|
|
|
+ type: 'success',
|
|
|
+ message: '充值成功 ' + oneAccount + ' : ' + message
|
|
|
+ })
|
|
|
+
|
|
|
+ // 成功后处理剩下账号数据
|
|
|
+ accountLists = LodashArray.drop(accountLists) // 删除第一个账户
|
|
|
+ accountLists.forEach(async(item, index) => {
|
|
|
+ await this.rechargePlayer(
|
|
|
+ { pid: this.dataForm.pid, cid: this.dataForm.cid, gfid: this.dataForm.gfid, paypwd: paypwd, username: item, money: this.dataForm.money, recharge: this.dataForm.recharge, type: this.dataForm.type },
|
|
|
+ index, operationType, loadingNum
|
|
|
+ )
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.catchAccount = this.catchAccount + oneAccount + '\n'
|
|
|
+ this.catchAccountNum++
|
|
|
+
|
|
|
+ this.cloneLoading()
|
|
|
+ return Message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '充值 ' + oneAccount + ' : ' + message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }).catch((error) => {
|
|
|
+ this.catchAccount = this.catchAccount + oneAccount + '\n'
|
|
|
+ this.catchAccountNum++
|
|
|
+
|
|
|
+ this.cloneLoading(false)
|
|
|
+ return Message({
|
|
|
+ type: 'error',
|
|
|
+ message: '充值失败 ' + oneAccount + ' : ' + error.message
|
|
|
+ })
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.noExistence = this.noExistence + oneAccount + '\n'
|
|
|
+ this.noExistenceNum++
|
|
|
+
|
|
|
+ this.cloneLoading(false)
|
|
|
+ return Message({
|
|
|
+ message: '检测 ' + oneAccount + ' : ' + message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }).catch((error) => {
|
|
|
+ this.catchAccount = this.catchAccount + oneAccount + '\n'
|
|
|
+ this.catchAccountNum++
|
|
|
+
|
|
|
+ this.cloneLoading(false)
|
|
|
+ return Message({
|
|
|
+ type: 'error',
|
|
|
+ message: '检测失败 ' + oneAccount + ' : ' + error.message
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
+ break
|
|
|
+ default:
|
|
|
+ Message({
|
|
|
type: 'error',
|
|
|
- message: error.message
|
|
|
+ message: '操作有误!!!'
|
|
|
})
|
|
|
- })
|
|
|
+ break
|
|
|
}
|
|
|
|
|
|
// // ## 测试(去除第一个账户单独测试)
|
|
|
@@ -472,112 +546,170 @@ export default {
|
|
|
// )
|
|
|
// })
|
|
|
},
|
|
|
- // 关闭加载页面
|
|
|
- cloneLoading() {
|
|
|
- // this.loading = false
|
|
|
+ // 启动遮屏
|
|
|
+ startLoading() {
|
|
|
+ this.loading = Loading.service({
|
|
|
+ lock: true,
|
|
|
+ text: '处理中, 请稍等...',
|
|
|
+ background: 'rgba(0, 0, 0, 0.7)'
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 关闭遮屏
|
|
|
+ cloneLoading(onMoney = true) {
|
|
|
this.loading.close()
|
|
|
- this.updateUserMoney()
|
|
|
+ if (onMoney) {
|
|
|
+ this.updateUserMoney()
|
|
|
+ }
|
|
|
this.endTime = new Date().getHours() + ':' + new Date().getMinutes() + ':' + new Date().getSeconds()
|
|
|
},
|
|
|
- // 异步进行账户充值
|
|
|
- rechargePlayer(data, index, onCheck, count) {
|
|
|
+ // 异步进行账户检测与充值
|
|
|
+ rechargePlayer(data, index, operationType, count) {
|
|
|
// 延迟一秒处理
|
|
|
- setTimeout((data, index, onCheck, count) => {
|
|
|
+ setTimeout((data, new_index, new_operationType, new_count) => {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
// 继续延迟
|
|
|
- setTimeout((_data, onCheck, { index, count }) => {
|
|
|
- if (index === count || index > count) {
|
|
|
- this.cloneLoading()
|
|
|
- }
|
|
|
- // 是否需要账号检测
|
|
|
- if (onCheck === true) {
|
|
|
- // 账号检测
|
|
|
- this.$store.dispatch('common/rechargePlayerType', { pid: _data.pid, cid: _data.cid, gfid: _data.gfid, username: _data.username }).then((res) => {
|
|
|
- const { code, status, message } = res
|
|
|
- if (code === 200 && status !== true) {
|
|
|
- // this.thenAccount = this.thenAccount + _data.username + '\n'
|
|
|
- // this.thenAccountNum++
|
|
|
-
|
|
|
- // 充值
|
|
|
- this.$store.dispatch('common/rechargePlayer', _data).then((res) => {
|
|
|
- const { code, status, message } = res
|
|
|
- if (code === 200 && status === true) {
|
|
|
- this.thenAccount = this.thenAccount + _data.username + '\n'
|
|
|
- this.thenAccountNum++
|
|
|
- } else {
|
|
|
+ setTimeout((_data, _index, _operationType, _count) => {
|
|
|
+ switch (_operationType) {
|
|
|
+ case 1: // 检测账户
|
|
|
+ this.$store.dispatch('common/rechargePlayerType', { pid: _data.pid, cid: _data.cid, gfid: _data.gfid, username: _data.username }).then((res) => {
|
|
|
+ const { code, status, message } = res
|
|
|
+ if (code === 200 && status === true) {
|
|
|
+ this.thenAccount = this.thenAccount + _data.username + '\n'
|
|
|
+ this.thenAccountNum++
|
|
|
+ Message({
|
|
|
+ type: 'success',
|
|
|
+ message: '检测成功 ' + _data.username + ' :' + message
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ if (code === 10001) {
|
|
|
this.catchAccount = this.catchAccount + _data.username + '\n'
|
|
|
this.catchAccountNum++
|
|
|
-
|
|
|
- Message({
|
|
|
- type: 'warning',
|
|
|
- message: 'Player:' + message
|
|
|
- })
|
|
|
+ } else {
|
|
|
+ this.noExistence = this.noExistence + _data.username + '\n'
|
|
|
+ this.noExistenceNum++
|
|
|
}
|
|
|
- }).catch((error) => {
|
|
|
- this.catchAccount = this.catchAccount + _data.username + '\n'
|
|
|
- this.catchAccountNum++
|
|
|
-
|
|
|
Message({
|
|
|
- type: 'error',
|
|
|
- message: 'Player:' + error.message
|
|
|
+ message: '检测 ' + _data.username + ' :' + message
|
|
|
})
|
|
|
+ }
|
|
|
+ }).catch((error) => {
|
|
|
+ this.catchAccount = this.catchAccount + _data.username + '\n'
|
|
|
+ this.catchAccountNum++
|
|
|
+
|
|
|
+ Message({
|
|
|
+ type: 'error',
|
|
|
+ message: '检测失败 ' + _data.username + ' :' + error.message
|
|
|
})
|
|
|
- } else {
|
|
|
- if (code === 10001) {
|
|
|
+ })
|
|
|
+ break
|
|
|
+ case 2: // 充值账户
|
|
|
+ // 充值
|
|
|
+ this.$store.dispatch('common/rechargePlayer', _data).then((res) => {
|
|
|
+ const { code, status, message } = res
|
|
|
+ if (code === 200 && status === true) {
|
|
|
+ this.thenAccount = this.thenAccount + _data.username + '\n'
|
|
|
+ this.thenAccountNum++
|
|
|
+ Message({
|
|
|
+ type: 'success',
|
|
|
+ message: '充值成功 ' + _data.username + ':' + message
|
|
|
+ })
|
|
|
+ } else {
|
|
|
this.catchAccount = this.catchAccount + _data.username + '\n'
|
|
|
this.catchAccountNum++
|
|
|
- } else {
|
|
|
- this.noExistence = this.noExistence + _data.username + '\n'
|
|
|
- this.noExistenceNum++
|
|
|
+
|
|
|
+ Message({
|
|
|
+ message: '充值 ' + _data.username + ':' + message
|
|
|
+ })
|
|
|
}
|
|
|
+ }).catch((error) => {
|
|
|
+ this.catchAccount = this.catchAccount + _data.username + '\n'
|
|
|
+ this.catchAccountNum++
|
|
|
|
|
|
Message({
|
|
|
type: 'error',
|
|
|
- message: '检测:' + message
|
|
|
+ message: '充值失败 ' + _data.username + ':' + error.message
|
|
|
})
|
|
|
- }
|
|
|
- }).catch((error) => {
|
|
|
- this.catchAccount = this.catchAccount + _data.username + '\n'
|
|
|
- this.catchAccountNum++
|
|
|
-
|
|
|
- Message({
|
|
|
- type: 'error',
|
|
|
- message: '检测:' + error.message
|
|
|
})
|
|
|
- resolve()
|
|
|
- })
|
|
|
- } else {
|
|
|
- // 充值
|
|
|
- this.$store.dispatch('common/rechargePlayer', _data).then((res) => {
|
|
|
- const { code, status, message } = res
|
|
|
- if (code === 200 && status === true) {
|
|
|
- this.thenAccount = this.thenAccount + _data.username + '\n'
|
|
|
- this.thenAccountNum++
|
|
|
- } else {
|
|
|
+ break
|
|
|
+ case 3: // 检测并充值
|
|
|
+ // 账号检测
|
|
|
+ this.$store.dispatch('common/rechargePlayerType', { pid: _data.pid, cid: _data.cid, gfid: _data.gfid, username: _data.username }).then((res) => {
|
|
|
+ const { code, status, message } = res
|
|
|
+ if (code === 200 && status === true) {
|
|
|
+ Message({
|
|
|
+ type: 'success',
|
|
|
+ message: '检测成功 ' + _data.username + ':' + message
|
|
|
+ })
|
|
|
+
|
|
|
+ // 充值
|
|
|
+ this.$store.dispatch('common/rechargePlayer', _data).then((res) => {
|
|
|
+ const { code, status, message } = res
|
|
|
+ if (code === 200 && status === true) {
|
|
|
+ this.thenAccount = this.thenAccount + _data.username + '\n'
|
|
|
+ this.thenAccountNum++
|
|
|
+ Message({
|
|
|
+ type: 'success',
|
|
|
+ message: '充值成功 ' + _data.username + ':' + message
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.catchAccount = this.catchAccount + _data.username + '\n'
|
|
|
+ this.catchAccountNum++
|
|
|
+
|
|
|
+ Message({
|
|
|
+ message: '充值 ' + _data.username + ':' + message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }).catch((error) => {
|
|
|
+ this.catchAccount = this.catchAccount + _data.username + '\n'
|
|
|
+ this.catchAccountNum++
|
|
|
+
|
|
|
+ Message({
|
|
|
+ type: 'error',
|
|
|
+ message: '充值失败 ' + _data.username + ':' + error.message
|
|
|
+ })
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ if (code === 10001) {
|
|
|
+ this.catchAccount = this.catchAccount + _data.username + '\n'
|
|
|
+ this.catchAccountNum++
|
|
|
+ } else {
|
|
|
+ this.noExistence = this.noExistence + _data.username + '\n'
|
|
|
+ this.noExistenceNum++
|
|
|
+ }
|
|
|
+
|
|
|
+ Message({
|
|
|
+ message: '检测 ' + _data.username + ':' + message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }).catch((error) => {
|
|
|
this.catchAccount = this.catchAccount + _data.username + '\n'
|
|
|
this.catchAccountNum++
|
|
|
|
|
|
Message({
|
|
|
- type: 'warning',
|
|
|
- message: '充值:' + message
|
|
|
+ type: 'error',
|
|
|
+ message: '检测失败 ' + _data.username + ':' + error.message
|
|
|
})
|
|
|
- }
|
|
|
- }).catch((error) => {
|
|
|
- this.catchAccount = this.catchAccount + _data.username + '\n'
|
|
|
- this.catchAccountNum++
|
|
|
-
|
|
|
- Message({
|
|
|
- type: 'error',
|
|
|
- message: '充值:' + error.message
|
|
|
})
|
|
|
- resolve()
|
|
|
- })
|
|
|
+ break
|
|
|
+ default:
|
|
|
+ break
|
|
|
+ }
|
|
|
+ if (_index !== null && _index === _count || _index > _count) {
|
|
|
+ setTimeout(() => {
|
|
|
+ // 检测不更新账户余额
|
|
|
+ var onMoney = true
|
|
|
+ if (new_operationType === 1) {
|
|
|
+ onMoney = false
|
|
|
+ }
|
|
|
+ this.cloneLoading(onMoney)
|
|
|
+ }, 1500)
|
|
|
}
|
|
|
- }, 1800 * (index + 1), data, onCheck, { index, count })
|
|
|
+ resolve()
|
|
|
+ }, 1800 * (index + 1), data, new_index, new_operationType, new_count)
|
|
|
// }, (1600 + Math.round(Math.random() * 300)) * (index + 1), data, onCheck)
|
|
|
// 1500 * (index + 1): +1的原因是,这里是从第二条数据开始处理的,异步处理之前单独处理了一个,所以时间久点。
|
|
|
})
|
|
|
- }, 1000, data, index, onCheck, count)
|
|
|
+ }, 1000, data, index, operationType, count)
|
|
|
},
|
|
|
// 渠道账号列表
|
|
|
getRechargePlatform(val) {
|