<template>
|
<div>
|
<div class="noticecontainer">
|
<div class="jiaoyimain">
|
<div class="notice_every">
|
<div class="notice_every_box">
|
<div class="twoinput">
|
<div class="tixianjine">
|
<span class="tixianwz">{{$t('hj170')}}:</span>
|
<el-input v-model="amount" :placeholder="$t('hj171')">
|
</el-input>
|
</div>
|
</div>
|
<div class="twoinput">
|
<div class="tixianjine">
|
<span class="tixianwz">{{$t('hj170a')}}:</span>
|
<el-select v-model="payType" :placeholder="$t('hj171a')">
|
<el-option v-for="item in optionsPay" :key="item.id" :label="item.channelName" :value="item.id">
|
</el-option>
|
</el-select>
|
</div>
|
</div>
|
<div class="buysellmain">
|
<div class="btns" @click="getrecharge">
|
{{$t('hj172')}}
|
</div>
|
</div>
|
</div>
|
<div class="notice_every_box_right" v-if="payType==10">
|
<div class="qrcode" ref="qrCodeUrl"></div>
|
<div class="notice_every_box_right_price">{{optionsPay[3].channelDesc}}</div>
|
</div>
|
</div>
|
<div class="tixianliet">
|
<el-table :data="tixianlist" style="width: 100%" border :highlight-current-row="false"
|
:header-cell-style="{ 'padding': '2px 0', 'background': 'rgb(37,38,42)', 'color': '#9d9d9d', 'font-size': '12px' }">
|
<el-table-column prop="nickName" :label="$t('hj139')">
|
</el-table-column>
|
<el-table-column prop="payAmt" :label="$t('hj170')">
|
</el-table-column>
|
<el-table-column prop="orderSn" :label="$t('hj234')">
|
</el-table-column>
|
<el-table-column prop="orderStatus">
|
<template slot-scope="scope">
|
<span :class="scope.row.orderStatus === 1 ? 'greens' : scope.row.orderStatus === 2 ? 'reds' : 'reds'">
|
<i v-if="scope.row.orderStatus === 1" class="iconfont icon-tongguo4 animated bounceIn"></i>
|
<i v-if="scope.row.orderStatus == 0" class="iconfont icon-dengdai animated bounceInDown"></i>
|
<i v-if="scope.row.orderStatus === 2" class="iconfont icon-failure animated bounceInDown"></i>
|
<i v-if="scope.row.orderStatus === 3"
|
class="iconfont icon-iconfontweitongguo animated bounceInDown"></i>
|
{{ scope.row.orderStatus === 1 ? $t('hj231') : scope.row.orderStatus === 2 ? $t('hj232') :
|
scope.row.orderStatus ===
|
3 ? $t('hj233') : $t('hjshz')
|
}}
|
</span>
|
</template>
|
</el-table-column>
|
<el-table-column prop="addTime" :label="$t('sj')" width="160px">
|
<template slot-scope="scope">
|
<b v-if="scope.row.addTime">{{ scope.row.addTime }}</b>
|
</template>
|
</el-table-column>
|
</el-table>
|
<div class="paginationmain">
|
<el-pagination class="pull-right" @size-change="handleSizeChange" background
|
@current-change="handleCurrentChange" :current-page="pageNum" :page-sizes="[10, 20, 30, 40, 50]"
|
:page-size="pageSize" layout="total, sizes, prev, pager, next" :total="total">
|
</el-pagination>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</template>
|
<script>
|
import * as api from "@/axios/api";
|
// import QRCode from '@/components/Qrcode.vue'
|
import QRCode from 'qrcodejs2'
|
|
export default {
|
data() {
|
return {
|
amount: '',
|
pageNum: 1,
|
pageSize: 10,
|
tixianlist: [],
|
total: 0,
|
optionsPay: [],
|
payType: '',
|
}
|
},
|
// components:{
|
// QRCode,
|
// },
|
created() {
|
this.getinit();
|
},
|
mounted() {
|
this.creatQrCode();
|
},
|
methods: {
|
// //生成二维码
|
creatQrCode() {
|
var qrcode = new QRCode(this.$refs.qrCodeUrl, {
|
// text: this.array[3].channelDesc, // 需要转换为二维码的内容
|
text: 'https://blog.csdn.net/weixin_42601136', // 需要转换为二维码的内容
|
width: 100,
|
height: 100,
|
colorDark: '#000000',
|
colorLight: '#ffffff',
|
correctLevel: QRCode.CorrectLevel.H
|
})
|
},
|
getinit() {
|
this.rechargeList();
|
this.getPayInfo();
|
},
|
handleSizeChange(size) {
|
this.pageSize = size
|
this.rechargeList()
|
},
|
handleCurrentChange(page) {
|
this.pageNum = page
|
this.rechargeList()
|
},
|
async getPayInfo() {
|
// 获取支付渠道
|
let data = await api.queryPayChnnel();
|
if (data.status == 0) {
|
this.optionsPay = data.data;
|
} else {
|
this.$message.error(data.msg);
|
}
|
this.$parent.getcloseLoading();
|
},
|
async rechargeList() {
|
var opt = {
|
pageNum: this.pageNum,
|
pageSize: this.pageSize,
|
};
|
let data = await api.rechargeList(opt);
|
if (data.status == 0) {
|
this.tixianlist = data.data.list;
|
this.total = data.data.total;
|
}
|
},
|
async getrecharge() {
|
let opts = {
|
payAmt: this.amount,
|
payType: this.payType,
|
currency: '',
|
};
|
let data = await api.flyPay(opts);
|
if (data.status == 0) {
|
this.$message.success(data.msg ? data.msg : this.$t('hj231'));
|
this.rechargeList();
|
} else {
|
this.$message.error(data.msg ? data.msg : this.$t('hj232'));
|
}
|
},
|
}
|
}
|
</script>
|
<style lang="less" scoped>
|
.notice_every_box_right_price {
|
color: #fff;
|
}
|
|
.qrcode {
|
width: 100px;
|
height: 100px;
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
}
|
|
.notice_every_box_right {
|
width: 50%;
|
display: flex;
|
flex-direction: column;
|
justify-content: center;
|
align-items: center;
|
}
|
|
.notice_every_box {
|
width: 50%;
|
}
|
|
.greens {
|
color: #168740 !important;
|
}
|
|
.reds {
|
color: #ed3a3b !important;
|
}
|
|
.greenbg {
|
background: #168740 !important;
|
}
|
|
.redbg {
|
background: #ed3a3b !important;
|
}
|
|
/deep/ .el-form-item {
|
margin-bottom: 0 !important;
|
}
|
|
/deep/ .el-table {
|
background: #25262a !important;
|
}
|
|
.el-table::before {
|
background-color: unset !important;
|
}
|
|
/deep/ .selected {
|
float: unset !important;
|
text-align: unset !important;
|
}
|
|
.noticecontainer {
|
display: flex;
|
|
.jiaoyimain {
|
display: flex;
|
justify-content: space-between;
|
width: 100%;
|
|
|
.notice_every {
|
width: 50%;
|
height: 208px;
|
overflow-y: scroll;
|
display: flex;
|
// flex-direction: column;
|
justify-content: center;
|
|
&::-webkit-scrollbar {
|
width: 8px;
|
height: 8px;
|
background-color: rgb(37, 38, 42);
|
}
|
|
&::-webkit-scrollbar-track {
|
background-color: rgb(37, 38, 42);
|
}
|
|
&::-webkit-scrollbar-thumb {
|
background-color: rgb(37, 38, 42);
|
}
|
|
&::-webkit-scrollbar-corner {
|
width: 8px;
|
height: 8px;
|
display: none;
|
}
|
|
.twoinput {
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
color: #f0be83;
|
margin-top: 20px;
|
|
.tixianwz {
|
width: 100px;
|
text-align: right;
|
}
|
}
|
|
/deep/ .el-form-item__label {
|
color: #f0be83 !important;
|
}
|
|
/deep/ .el-input {
|
width: 200px;
|
}
|
|
/deep/ .el-input__inner {
|
height: 34px !important;
|
line-height: 34px !important;
|
width: 200px;
|
}
|
|
.buysellmain {
|
display: flex;
|
justify-content: center;
|
margin: 20px 0;
|
|
.btns {
|
padding: 10px 60px;
|
color: #fff;
|
text-align: center;
|
border-radius: 4px;
|
font-size: 14px;
|
letter-spacing: 2px;
|
background-color: #409EFF;
|
cursor: pointer;
|
}
|
}
|
}
|
|
.tixianliet {
|
color: #fff;
|
width: 50%;
|
overflow-y: scroll;
|
height: 208px;
|
position: relative;
|
|
&::-webkit-scrollbar {
|
width: 8px;
|
height: 8px;
|
background-color: rgb(37, 38, 42);
|
}
|
|
&::-webkit-scrollbar-track {
|
background-color: rgb(37, 38, 42);
|
}
|
|
&::-webkit-scrollbar-thumb {
|
background-color: rgb(37, 38, 42);
|
}
|
|
&::-webkit-scrollbar-corner {
|
width: 8px;
|
height: 8px;
|
display: none;
|
}
|
|
.paginationmain {
|
display: flex;
|
justify-content: center;
|
margin: 20px 0;
|
}
|
|
/deep/ .btn-next {
|
color: #000 !important;
|
}
|
|
/deep/ .btn-prev {
|
color: #000 !important;
|
}
|
}
|
}
|
}
|
</style>
|