From 458a070f1608638a7be335fb7bd1782f3b524b36 Mon Sep 17 00:00:00 2001
From: dcc <dcc@163.com>
Date: Sun, 12 May 2024 18:11:24 +0800
Subject: [PATCH] dapp的充币功能
---
src/API/recharge.js | 11 +++++
src/page/recharge/rechargePage.vue | 98 ++++++++++++++++++++++++++----------------------
2 files changed, 63 insertions(+), 46 deletions(-)
diff --git a/src/API/recharge.js b/src/API/recharge.js
index 23e2b3d..74a976e 100644
--- a/src/API/recharge.js
+++ b/src/API/recharge.js
@@ -85,5 +85,14 @@
}, params)
};
+// 获取充值说明
+const appList = (params) => {
+ return httpJson({
+ url: "api/user!appList",
+ method: "get",
+ isLoading: false
+ }, params)
+};
-export default {exchange,user_wallet,getRechargeTips, getBlock,getRechargeToken,rechargeApply,getRechargeDetail,getRechargeList,uploadImages }
+
+export default {appList,exchange,user_wallet,getRechargeTips, getBlock,getRechargeToken,rechargeApply,getRechargeDetail,getRechargeList,uploadImages }
diff --git a/src/page/recharge/rechargePage.vue b/src/page/recharge/rechargePage.vue
index 8991d1c..24dcce3 100644
--- a/src/page/recharge/rechargePage.vue
+++ b/src/page/recharge/rechargePage.vue
@@ -21,23 +21,23 @@
{{ $t('复制地址') }}
</div>
</div>
- <!-- <div>-->
- <!-- <div class="font-26 textColor">{{ $t('转出地址(选填)') }}</div>-->
- <!-- <div style="position: relative;" class="mt-26 mb-60">-->
- <!-- <input style="padding-right: 80px;" v-model="enterAddress"-->
- <!-- class="input-view font-26 textColor inputBackground" :placeholder="$t('请输入转出地址')" />-->
- <!-- <div style="position: absolute;right: 10px;top: 50%;color: #2C78F8;transform: translateY(-50%)"-->
- <!-- @click="enterAddress = address">-->
- <!-- {{ $t('粘贴') }}</div>-->
- <!-- </div>-->
- <!-- </div>-->
- <!-- <div class="mb-60">-->
- <!-- <div class="font-26 textColor">{{ $t('充币数量') }}</div>-->
- <!-- <div>-->
- <!-- <input v-model="amount" class="input-view w-full font-26 textColor inputBackground"-->
- <!-- :placeholder="$t('请输入充币数量')" />-->
- <!-- </div>-->
- <!-- </div>-->
+ <div>
+ <div class="font-26 textColor">{{ $t('转出地址(选填)') }}</div>
+ <div style="position: relative;" class="mt-26 mb-60">
+ <input style="padding-right: 80px;" v-model="enterAddress"
+ class="input-view font-26 textColor inputBackground" :placeholder="$t('请输入转出地址')" />
+ <div style="position: absolute;right: 10px;top: 50%;color: #2C78F8;transform: translateY(-50%)"
+ @click="enterAddress = address">
+ {{ $t('粘贴') }}</div>
+ </div>
+ </div>
+ <div class="mb-60">
+ <div class="font-26 textColor">{{ $t('充币数量') }}</div>
+ <div>
+ <input v-model="amount" class="input-view w-full font-26 textColor inputBackground"
+ :placeholder="$t('请输入充币数量')" />
+ </div>
+ </div>
<div>
<div class="font-26 textColor">{{ $t('链名称') }}</div>
<div class="flex ">
@@ -49,21 +49,21 @@
</div>
</div>
</div>
- <!-- <div>-->
- <!-- <div class="font-26 textColor">{{ $t('付款凭证(上传支付详情截图)') }}</div>-->
- <!-- <div class="img-box">-->
- <!-- <van-uploader accept="image/*" style="width:100%;height:100%;" v-model="fileList" multiple-->
- <!-- :max-count="1" :before-read="beforeRead" :after-read="afterRead" />-->
- <!-- </div>-->
- <!-- </div>-->
+ <div>
+ <div class="font-26 textColor">{{ $t('付款凭证(上传支付详情截图)') }}</div>
+ <div class="img-box">
+ <van-uploader accept="image/*" style="width:100%;height:100%;" v-model="fileList" multiple
+ :max-count="1" :before-read="beforeRead" :after-read="afterRead" />
+ </div>
+ </div>
</div>
- <!-- <div class="hint-box">-->
- <!-- <div class="pl-30 pr-30">-->
- <!-- <div class="font-26 mb-27 textColor">{{ $t('重要提示') }}</div>-->
- <!-- <div class="font-28 text-grey" v-html="tip"></div>-->
- <!-- <button class="btnMain text-white next-btn font-30 rounded-lg" @click="nextBtn">{{ $t('下一步') }}</button>-->
- <!-- </div>-->
- <!-- </div>-->
+ <div class="hint-box">
+ <div class="pl-30 pr-30">
+ <div class="font-26 mb-27 textColor">{{ $t('重要提示') }}</div>
+ <div class="font-28 text-grey" v-html="tip"></div>
+ <button class="btnMain text-white next-btn font-30 rounded-lg" @click="nextBtn">{{ $t('下一步') }}</button>
+ </div>
+ </div>
</div>
</template>
@@ -138,7 +138,7 @@
},
methods: {
getData() {
- Axios.exchange({}).then((res) => {
+ /* Axios.exchange({}).then((res) => {
if (res.data&&res.data.filter(item => {
return item.userid == this.userInfo.usercode
}).length >0) {
@@ -171,20 +171,28 @@
this.getQRCode();
})
} else {
- Axios.getBlock({
- coin: this.coin
- }).then((res) => {
- if (res.code == "0") {
- this.chainList = res.data;
- this.address = res.data[0].address;
- this.blockchain_name = res.data[0].blockchain_name;
- this.getQRCode();
- }
- });
+ Axios.getBlock({
+ coin: this.coin
+ }).then((res) => {
+ if (res.code == "0") {
+ this.chainList = res.data;
+ this.address = res.data[0].address;
+ this.blockchain_name = res.data[0].blockchain_name;
+ this.getQRCode();
+ }
+ });
}
- })
-
-
+ })*/
+ Axios.appList({
+ coin_para: this.coin
+ }).then((res) => {
+ if (res.code == "0") {
+ this.chainList = res.data.page.elements;
+ this.address = this.chainList[0].address;
+ this.blockchain_name = this.chainList[0].blockchain_name;
+ this.getQRCode();
+ }
+ });
},
changeBlockchain(index) {
this.blockchainIndex = index;
--
Gitblit v1.9.3