|
@@ -54,13 +54,13 @@
|
|
|
<el-button type="text" v-else>已开通</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="u-item flex" v-if="userInfo.agent_id != 1">
|
|
|
- <div class="base">账号有效时间</div>
|
|
|
- <div style="display: flex;flex-direction: column;align-items: flex-end;">
|
|
|
- <el-button type="text" @click="xfVisible = true">点击续费</el-button>
|
|
|
- <div>到期时间:{{showTime(userInfo.order_create_endtime) }}</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <div class="u-item flex" v-if="userInfo.agent_id != 1">
|
|
|
+ <div class="base">账号有效时间</div>
|
|
|
+ <div style="display: flex;flex-direction: column;align-items: flex-end;">
|
|
|
+ <el-button type="text" @click="xfVisible = true">点击续费</el-button>
|
|
|
+ <div>到期时间:{{showTime(userInfo.order_create_endtime) }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<!-- <el-card>
|
|
|
<div class="wrap">
|
|
@@ -96,20 +96,74 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-card> -->
|
|
|
- <!-- 账号续费 -->
|
|
|
- <el-dialog title="提示" :visible.sync="xfVisible" width="350px">
|
|
|
- <span style="display: block; padding: 0 0 20px 20px;">账号续费需支付{{baseInfo.code_price}}元</span>
|
|
|
-
|
|
|
- <el-form v-if="userInfo.is_binding == 1">
|
|
|
- <el-form-item label="动态口令">
|
|
|
- <el-input v-model="dtkl" type="number"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- <span slot="footer" class="dialog-footer" style="width: 300px;">
|
|
|
- <el-button @click="xfVisible = false">取 消</el-button>
|
|
|
- <el-button type="primary" @click="xfzh">确 定</el-button>
|
|
|
- </span>
|
|
|
- </el-dialog>
|
|
|
+ <el-dialog title="充值" :visible.sync="czVisible" width="350px">
|
|
|
+ <el-form :model="form">
|
|
|
+ <el-form-item label="充值金额" :label-width="formLabelWidth">
|
|
|
+ <div class="flex">
|
|
|
+ <el-input v-model="czForm.recharge_num" type="text"></el-input>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="czVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="getInfo">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog title="充值" :visible.sync="cztVisible" width="500px">
|
|
|
+ <div class="biaoti">
|
|
|
+ 温馨提示
|
|
|
+ </div>
|
|
|
+ <div class="tis" style="color: red;">
|
|
|
+ 充值地址请以当前地址为准,如转错地址导致货币丢失,责任自负
|
|
|
+ </div>
|
|
|
+ <div class="biaoti">
|
|
|
+ 钱包二维码
|
|
|
+ </div>
|
|
|
+ <div class="tis">
|
|
|
+ <vueQrCode :size=qrCodeSize :text="czForm.address"> </vueQrCode>
|
|
|
+ <div v-if="timer && time.isend == false" style="color: red;">充值剩余时间 :
|
|
|
+ {{time.minutes + ':' + time.seconds }}</div>
|
|
|
+ <div v-if="timer && time.isend" style="color: red;">当前地址已过期</div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="biaoti">
|
|
|
+ 钱包地址
|
|
|
+ </div>
|
|
|
+ <div class="flex tis">
|
|
|
+ <el-input v-model="czForm.address" type="text" disabled></el-input>
|
|
|
+ <el-button @click="onCopy(czForm.address)" style="margin-left: 20px;">复制地址</el-button>
|
|
|
+ </div>
|
|
|
+ <div class="biaoti">
|
|
|
+ 充值金额
|
|
|
+ </div>
|
|
|
+ <div class="tis">
|
|
|
+ <el-input v-model="czForm.recharge_num" type="text" disabled></el-input>
|
|
|
+ </div>
|
|
|
+ <div class="biaoti">
|
|
|
+ 充值金额提示
|
|
|
+ </div>
|
|
|
+ <div style="color: red;">
|
|
|
+ 请按照实际到账金额(扣除手续费之后的到账):{{czForm.recharge_num}}进行充值,错误到账金额不予到账!
|
|
|
+ </div>
|
|
|
+ <div class="dialog-footer">
|
|
|
+ <el-button @click="cztVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="cztVisible = false">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ <!-- 账号续费 -->
|
|
|
+ <el-dialog title="提示" :visible.sync="xfVisible" width="350px">
|
|
|
+ <span style="display: block; padding: 0 0 20px 20px;">账号续费需支付{{baseInfo.code_price}}元</span>
|
|
|
+
|
|
|
+ <el-form v-if="userInfo.is_binding == 1">
|
|
|
+ <el-form-item label="动态口令">
|
|
|
+ <el-input v-model="dtkl" type="number"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <span slot="footer" class="dialog-footer" style="width: 300px;">
|
|
|
+ <el-button @click="xfVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="xfzh">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
<!-- 添加地址 -->
|
|
|
<el-dialog title="设置地址" :visible.sync="adVisible" @close="closeAd" width="600px">
|
|
|
<el-form :model="adForm" style="width: 500px;">
|
|
@@ -236,9 +290,8 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
<!-- 充值 -->
|
|
|
- <el-dialog title="充值" :visible.sync="czVisible" @close="closeCz" width="600px">
|
|
|
+ <!-- <el-dialog title="充值" :visible.sync="czVisible" @close="closeCz" width="600px">
|
|
|
<el-form :model="czForm">
|
|
|
- <!-- payimg -->
|
|
|
<el-form-item label="充值二维码" :label-width="formLabelWidth">
|
|
|
<vueQrCode :size=qrCodeSize :text="qrCodeText"> </vueQrCode>
|
|
|
</el-form-item>
|
|
@@ -249,27 +302,17 @@
|
|
|
</div>
|
|
|
|
|
|
</el-form-item>
|
|
|
- <!-- <el-form-item label="充值凭证" :label-width="formLabelWidth">
|
|
|
+ <el-form-item label="充值凭证" :label-width="formLabelWidth">
|
|
|
<el-upload class="avatar-uploader" action="http://www.pingguozhushou.shop/api/common/upload"
|
|
|
:show-file-list="false" :headers="headers" :on-success="handleCzSuccess"
|
|
|
:before-upload="beforeAvatarUpload">
|
|
|
<img v-if="czForm.image" :src="czForm.image" class="czimg">
|
|
|
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
</el-upload>
|
|
|
- </el-form-item> -->
|
|
|
+ </el-form-item>
|
|
|
|
|
|
</el-form>
|
|
|
- <!-- <div class="t-r">
|
|
|
- 到账: {{((form.recharge_num*1 || 0)*(baseInfo.to_rmb*1)).toFixed(2)}}元
|
|
|
- </div>
|
|
|
- <div class="t-r">
|
|
|
- 当前余额: {{userInfo.money*1}}元
|
|
|
- </div>
|
|
|
- <div slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="closeCz">取 消</el-button>
|
|
|
- <el-button type="primary" @click="goCz">确 定</el-button>
|
|
|
- </div> -->
|
|
|
- </el-dialog>
|
|
|
+ </el-dialog> -->
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -295,9 +338,13 @@
|
|
|
payAuto,
|
|
|
repwd,
|
|
|
address,
|
|
|
- xfZh
|
|
|
+ xfZh,
|
|
|
+ getrecharge
|
|
|
} from '@/request/user.js'
|
|
|
- import { showTime } from '@/assets/js/tools.js'
|
|
|
+ import {
|
|
|
+ showTime,
|
|
|
+ timeComputed
|
|
|
+ } from '@/assets/js/tools.js'
|
|
|
export default {
|
|
|
name: 'Order',
|
|
|
components: {
|
|
@@ -305,8 +352,10 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- xfVisible: false,
|
|
|
-
|
|
|
+ time: {},
|
|
|
+ timer: '',
|
|
|
+ xfVisible: false,
|
|
|
+ cztVisible: false,
|
|
|
dtkl: '',
|
|
|
xdVisible: false,
|
|
|
images: '',
|
|
@@ -321,7 +370,7 @@
|
|
|
czVisible: false,
|
|
|
czForm: {
|
|
|
recharge_num: '',
|
|
|
- image: ''
|
|
|
+ // image: ''
|
|
|
},
|
|
|
txVisible: false,
|
|
|
txForm: {
|
|
@@ -396,19 +445,37 @@
|
|
|
// this.getga()
|
|
|
},
|
|
|
methods: {
|
|
|
- showTime,
|
|
|
+ showTime,
|
|
|
...mapMutations(['setUserInfo', 'setBaseInfo']),
|
|
|
- xfzh() {
|
|
|
- let that = this
|
|
|
- if(that.baseInfo.code_price*1 > that.userInfo.money*1) {
|
|
|
- return that.$msg.error('您的账号余额不足,请充值后操作')
|
|
|
- }
|
|
|
- xfZh().then(res => {
|
|
|
- that.$msg.success('续费成功')
|
|
|
- that.getUserInfo()
|
|
|
- that.xfVisible = false
|
|
|
- })
|
|
|
- },
|
|
|
+ getInfo() {
|
|
|
+ this.timer = null
|
|
|
+ this.time = {}
|
|
|
+ getrecharge(this.czForm).then(res => {
|
|
|
+ console.log(res);
|
|
|
+ this.czVisible = false
|
|
|
+ this.cztVisible = true
|
|
|
+ this.czForm = res.data
|
|
|
+ this.qrCodeText = res.data.address
|
|
|
+ if (this.timer) {
|
|
|
+ clearInterval(this.timer)
|
|
|
+ }
|
|
|
+ this.timer = setInterval(() => {
|
|
|
+ this.time = timeComputed(res.data.endtime * 1000)
|
|
|
+ }, 1000)
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
+ xfzh() {
|
|
|
+ let that = this
|
|
|
+ if (that.baseInfo.code_price * 1 > that.userInfo.money * 1) {
|
|
|
+ return that.$msg.error('您的账号余额不足,请充值后操作')
|
|
|
+ }
|
|
|
+ xfZh().then(res => {
|
|
|
+ that.$msg.success('续费成功')
|
|
|
+ that.getUserInfo()
|
|
|
+ that.xfVisible = false
|
|
|
+ })
|
|
|
+ },
|
|
|
closeAd() {
|
|
|
this.adVisible = false
|
|
|
this.adForm.address = ''
|
|
@@ -726,7 +793,7 @@
|
|
|
.dialog-footer {
|
|
|
display: flex;
|
|
|
justify-content: flex-end;
|
|
|
- width: 500px;
|
|
|
+ // width: 500px;
|
|
|
}
|
|
|
|
|
|
.avatar-uploader-icon {
|
|
@@ -766,4 +833,10 @@
|
|
|
width: 178px;
|
|
|
height: 178px;
|
|
|
}
|
|
|
+ .biaoti {
|
|
|
+ font-size: 18px;
|
|
|
+ color: #000;
|
|
|
+ font-weight: bold;
|
|
|
+ padding: 20px 0;
|
|
|
+ }
|
|
|
</style>
|