|
|
@@ -13,9 +13,9 @@
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="渠道余额" style="width: 300px;">
|
|
|
+ <!-- <el-form-item label="渠道余额" style="width: 300px;">
|
|
|
<el-input v-model="balanceMoney" type="number" class="inline-input filter-item" disabled style="width: 160px;" /> 元
|
|
|
- </el-form-item>
|
|
|
+ </el-form-item> -->
|
|
|
<el-form-item label="渠道账号" prop="cid">
|
|
|
<el-select v-model="dataForm.cid" placeholder="Select" class="filter-item">
|
|
|
<el-option
|
|
|
@@ -78,9 +78,9 @@
|
|
|
<span>9.8折</span>
|
|
|
</el-form-item> -->
|
|
|
<el-form-item label="支付方式">
|
|
|
- <el-radio-group v-model="dataForm.payway" disabled prop="payway" class="filter-item">
|
|
|
+ <el-radio-group v-model="dataForm.payway" prop="payway" class="filter-item">
|
|
|
<el-radio :label="1">久币支付</el-radio>
|
|
|
- <el-radio :label="2">商务币支付</el-radio>
|
|
|
+ <!-- <el-radio :label="2">商务币支付</el-radio> -->
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="支付金额">
|
|
|
@@ -90,7 +90,7 @@
|
|
|
<el-button type="primary" @click="onSubmit">立即支付</el-button>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="6">
|
|
|
+ <el-col :span="6" class="el-bg-border">
|
|
|
<el-row :gutter="30">
|
|
|
<el-col :span="12">
|
|
|
<span style="font-size: 5px; color: #67C23A;">成功账户:</span>
|
|
|
@@ -111,14 +111,12 @@
|
|
|
</el-row>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
-
|
|
|
</el-form>
|
|
|
-
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { Message, MessageBox } from 'element-ui'
|
|
|
+import { Message, MessageBox, Loading } from 'element-ui'
|
|
|
import { rechargeChannelPlatformAccount } from '@/api/common'
|
|
|
|
|
|
export default {
|
|
|
@@ -131,7 +129,7 @@ export default {
|
|
|
cid: '', // 渠道账号ID
|
|
|
gfid: '', // 游戏ID
|
|
|
paypwd: '', // 支付密码
|
|
|
- username: '13121776520\n17719118763', // 充值账户
|
|
|
+ username: '', // 充值账户
|
|
|
money: 1, // 充值金额(单位:元)
|
|
|
recharge: 2, //
|
|
|
payway: 1, // 充值方式
|
|
|
@@ -155,7 +153,7 @@ export default {
|
|
|
'length': 2
|
|
|
}
|
|
|
],
|
|
|
- balanceMoney: 0, // 渠道余额
|
|
|
+ // balanceMoney: 0, // 渠道余额
|
|
|
rechargeChannelPlatform: [], // 渠道账号
|
|
|
rechargeGame: [], // 游戏列表
|
|
|
|
|
|
@@ -164,27 +162,43 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- this.getBalanceMoney(this.dataForm.pid)
|
|
|
+ // this.getBalanceMoney(this.dataForm.pid)
|
|
|
this.getRechargePlatform(this.dataForm.pid)
|
|
|
this.getRechargeGame(this.dataForm.pid)
|
|
|
},
|
|
|
methods: {
|
|
|
- async onSubmit() {
|
|
|
+ openFull() {
|
|
|
+ const loading = Loading.service({
|
|
|
+ lock: true,
|
|
|
+ text: 'Loading',
|
|
|
+ background: 'rgba(0, 0, 0, 0.7)'
|
|
|
+ })
|
|
|
+ setTimeout(() => {
|
|
|
+ loading.close()
|
|
|
+ }, 2000)
|
|
|
+ },
|
|
|
+ onSubmit() {
|
|
|
+ this.openFull()
|
|
|
+ },
|
|
|
+ async onSubmits() {
|
|
|
this.thenAccount = ''
|
|
|
this.catchAccount = ''
|
|
|
|
|
|
- if ((this.balanceMoney - this.dataForm.money) < 0) {
|
|
|
- return Message({
|
|
|
- type: 'info',
|
|
|
- message: '余额不足以充值.'
|
|
|
- })
|
|
|
- }
|
|
|
+ // TODO: 正式服务器未上线,暂时不需要
|
|
|
+ // if ((this.balanceMoney - this.dataForm.money) < 0) {
|
|
|
+ // return Message({
|
|
|
+ // type: 'info',
|
|
|
+ // message: '余额不足以充值.'
|
|
|
+ // })
|
|
|
+ // }
|
|
|
this.$refs['dataForm'].validate((valid) => {
|
|
|
console.log('# form-validate:', valid)
|
|
|
if (valid) {
|
|
|
// 截取数据
|
|
|
var userLists = this.dataForm.username.split('\n')
|
|
|
|
|
|
+ // TODO: 账号重复判断、账号为空判断
|
|
|
+
|
|
|
MessageBox.prompt('输入支付密码', 'Tip', {
|
|
|
confirmButtonText: '确认',
|
|
|
cancelButtonText: '取消'
|
|
|
@@ -237,7 +251,7 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- // 账户余额
|
|
|
+ // 账户余额 -- 弃用
|
|
|
getBalanceMoney(val) {
|
|
|
this.$store.dispatch('common/getMainChannelMoney', val).then((res) => {
|
|
|
this.balanceMoney = res
|
|
|
@@ -267,7 +281,7 @@ export default {
|
|
|
getRechargeGame(pid) {
|
|
|
this.$store.dispatch('common/rechargeGame', pid).then((res) => {
|
|
|
this.rechargeGame = res
|
|
|
- this.dataForm.gfid = res[0]['id']
|
|
|
+ this.dataForm.gfid = 42670
|
|
|
}).catch((res) => {
|
|
|
return Message({
|
|
|
message: res,
|
|
|
@@ -275,52 +289,6 @@ export default {
|
|
|
duration: 5 * 1000
|
|
|
})
|
|
|
})
|
|
|
- },
|
|
|
- // 账号检测 -- 弃用
|
|
|
- async confirmAccount() {
|
|
|
- if (this.accountHandle === '') {
|
|
|
- return Message({
|
|
|
- message: '请输入检测账号!',
|
|
|
- type: 'error',
|
|
|
- duration: 5 * 1000
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
- // 截取每一条数据
|
|
|
- var accountHandle = this.accountHandle.split('\n')
|
|
|
-
|
|
|
- // TODO: 检测账号数据去重
|
|
|
-
|
|
|
- var successList = [] // 成功数据
|
|
|
- var failList = [] // 失败数据
|
|
|
- for (var i = 0; i < accountHandle.length; i++) {
|
|
|
- await this.requestFunc({ successList, failList }, accountHandle[i])
|
|
|
- }
|
|
|
- if (successList) {
|
|
|
- this.accountHandleSuccess = successList.join('\n')
|
|
|
- }
|
|
|
- console.log('# 成功:', successList)
|
|
|
- console.log('# 失败:', failList)
|
|
|
- },
|
|
|
- // 异步进行账户检测处理
|
|
|
- requestFunc(request, mobile) {
|
|
|
- return new Promise((resolve, reject) => {
|
|
|
- const _this = this
|
|
|
- const _request = request
|
|
|
- const _mobile = mobile
|
|
|
- setTimeout((_this, _request, _mobile, { pid, cid, gfid }) => {
|
|
|
- _this.$store.dispatch('common/rechargePlayerType', { pid: pid, cid: cid, gfid: gfid, username: _mobile }).then((res) => {
|
|
|
- if (res.status === true) {
|
|
|
- _request.successList.push(_mobile)
|
|
|
- } else {
|
|
|
- _request.failList.push(_mobile)
|
|
|
- }
|
|
|
- resolve()
|
|
|
- }).catch(() => {
|
|
|
- resolve()
|
|
|
- })
|
|
|
- }, 1000, _this, _request, _mobile, { pid: this.rechargePlatformDefault, cid: this.rechargeChannelPlatformDefault, gfid: this.rechargeGameDefault })
|
|
|
- })
|
|
|
}
|
|
|
|
|
|
}
|
|
|
@@ -330,5 +298,11 @@ export default {
|
|
|
<style lang="scss">
|
|
|
.login-container{
|
|
|
margin: 20px;
|
|
|
+ background-color: #FFFFFF;
|
|
|
+
|
|
|
+ .el-bg-border{
|
|
|
+ border: 2px dashed #909399;
|
|
|
+ padding: 10px;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|