no message
This commit is contained in:
+21
@@ -326,6 +326,27 @@
|
||||
"navigationBarTextStyle": "black"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "account/shu",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTextStyle": "black"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "account/shuAdd",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTextStyle": "black"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "account/shuSuccess",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTextStyle": "black"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "account/bind",
|
||||
"style": {
|
||||
|
||||
@@ -0,0 +1,190 @@
|
||||
<template>
|
||||
<u-popup :show="itemShow" mode="bottom" bgColor="transparent">
|
||||
<view class="select-item">
|
||||
<view class="select-head">
|
||||
<view></view>
|
||||
<text class="text-28 text-fu1">选择地址</text>
|
||||
<u-icon name="close" color="#333" size="16" @click="onClose"></u-icon>
|
||||
</view>
|
||||
<view class="item-mid-view" v-if="data.length">
|
||||
<view class="item-mid-list" @click="onOk(item)" v-for="(item,index) in data" :key="item.id">
|
||||
<text class="text-32 text-zu1">BNB Smart Chain(BEP20)</text>
|
||||
<text class="text-28 text-fu">{{item.addressOne}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-mid-view-two" @click="onAdd" v-if="!data.length">
|
||||
<image src="/static/new/no_black_data.png" class="no-data-black"></image>
|
||||
<text class="text-28 text-fu mt-48">{{`请先添加一个区块链地址`}}</text>
|
||||
|
||||
</view>
|
||||
<view class="item-bottom-btn">
|
||||
<view class="add-btn" @click="onAdd">
|
||||
<image src="/static/new/add.png" style="margin-right:5rpx;"></image>
|
||||
<text class="text-32 text-zi text-bold" style="margin-left:5rpx;">添加地址</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import MyBtn from '@/components/common/my-btn.vue'
|
||||
import func from '@/utils/func.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
itemSelect:''
|
||||
}
|
||||
},
|
||||
components: { MyBtn },
|
||||
computed:{
|
||||
data(){
|
||||
let tmp = [];
|
||||
if(this.itemData.length){
|
||||
this.itemData.forEach(item=>{
|
||||
console.log('item',item)
|
||||
item.addressOne = func.addressTurn(item.account,6);
|
||||
})
|
||||
tmp = this.itemData;
|
||||
}
|
||||
return tmp;
|
||||
}
|
||||
},
|
||||
props:{
|
||||
itemShow:{
|
||||
type:Boolean,
|
||||
default:false
|
||||
},
|
||||
itemData:{
|
||||
type:[Array,Object],
|
||||
default:()=>{}
|
||||
},
|
||||
type:{
|
||||
type:[Number,String],
|
||||
default:'0'
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
},
|
||||
methods: {
|
||||
onOk(item){
|
||||
this.$emit('ok',item);
|
||||
},
|
||||
onAdd(){
|
||||
this.$emit('add');
|
||||
},
|
||||
onClose(){
|
||||
this.$emit('close');
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.add-btn{
|
||||
width:100%;
|
||||
height:72rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border:2rpx solid #7934f6;
|
||||
border-radius: 12rpx;
|
||||
image{
|
||||
width:32rpx;
|
||||
height:32rpx;
|
||||
}
|
||||
}
|
||||
.select-item{
|
||||
width:100%;
|
||||
min-height:724rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 0 32rpx 24rpx;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
border-radius: 24rpx 24rpx 0 0;
|
||||
.item-bottom-btn{
|
||||
width:100%;
|
||||
margin-top:24rpx;
|
||||
min-height:72rpx;
|
||||
display: flex;
|
||||
}
|
||||
.item-mid-view-two{
|
||||
width:100%;
|
||||
height:564rpx;
|
||||
min-height:564rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
.no-data-black{
|
||||
width:120rpx;
|
||||
height:120rpx;
|
||||
margin-top:120rpx;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
.item-mid-view{
|
||||
width:100%;
|
||||
height:564rpx;
|
||||
min-height:564rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
overflow-y: auto;
|
||||
.item-mid-list{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
width:98%;
|
||||
height:152rpx;
|
||||
min-height:152rpx;
|
||||
border-radius: 16rpx;
|
||||
margin-top:24rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 0px 16rpx 0px #F4F4F4;
|
||||
border-radius: 16px;
|
||||
border: 1px solid #E3E3E3;
|
||||
padding: 32rpx;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
.show-item-left{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height:88rpx;
|
||||
min-height:88rpx;
|
||||
margin-left:24rpx;
|
||||
|
||||
}
|
||||
.item-right-btn{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #f3f3f3;
|
||||
border-radius: 24rpx;
|
||||
position: absolute;
|
||||
right:28rpx;
|
||||
}
|
||||
image{
|
||||
width:88rpx;
|
||||
height:88rpx;
|
||||
border-radius: 44rpx;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
.select-head{
|
||||
width:100%;
|
||||
height:88rpx;
|
||||
min-height:88rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,110 @@
|
||||
<template>
|
||||
<u-popup :show="itemShow" mode="bottom" bgColor="transparent">
|
||||
<view class="select-item">
|
||||
<view class="select-head">
|
||||
<view></view>
|
||||
<text class="text-28 text-fu1">兑换方式</text>
|
||||
<u-icon name="close" color="#333" size="16" @click="onClose"></u-icon>
|
||||
</view>
|
||||
<view class="select-box" @click="onOk(0)">
|
||||
<image src="@/static/new/shu_0.png"></image>
|
||||
<view class="select-box-one">
|
||||
<text class="text-32 text-zu1">区块链数字积分</text>
|
||||
<text class="text-26 text-fu1">通过区块链兑换</text>
|
||||
</view>
|
||||
<u-icon name="arrow-right" color="#999" size="14" class="select-icon"></u-icon>
|
||||
</view>
|
||||
<view class="select-box" @click="onOk(1)">
|
||||
<image src="@/static/new/shu_1.png"></image>
|
||||
<view class="select-box-one">
|
||||
<text class="text-32 text-zu1">alpha数字积分</text>
|
||||
<text class="text-26 text-fu1">通过邮箱兑换</text>
|
||||
</view>
|
||||
<u-icon name="arrow-right" color="#999" size="14" class="select-icon"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import MyBtn from '@/components/common/my-btn.vue'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
props:{
|
||||
itemShow:{
|
||||
type:Boolean,
|
||||
default:false
|
||||
},
|
||||
|
||||
},
|
||||
mounted(){
|
||||
},
|
||||
methods: {
|
||||
onOk(index){
|
||||
this.$emit('ok',index);
|
||||
},
|
||||
onClose(){
|
||||
this.$emit('close');
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.select-item{
|
||||
width:100%;
|
||||
min-height:588rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 0 32rpx 24rpx;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
border-radius: 24rpx 24rpx 0 0;
|
||||
.select-box{
|
||||
width:100%;
|
||||
height:152rpx;
|
||||
min-height:152rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 0px 16rpx 0px #F4F4F4;
|
||||
border-radius: 16rpx;
|
||||
border: 1rpx solid #E3E3E3;
|
||||
padding: 0 28rpx;
|
||||
box-sizing: border-box;
|
||||
margin-top:32rpx;
|
||||
position: relative;
|
||||
.select-icon{
|
||||
position: absolute;
|
||||
right:28rpx;
|
||||
}
|
||||
.select-box-one{
|
||||
flex:1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
height:88rpx;
|
||||
}
|
||||
image{
|
||||
width:88rpx;
|
||||
height:88rpx;
|
||||
}
|
||||
}
|
||||
.select-head{
|
||||
width:100%;
|
||||
height:88rpx;
|
||||
min-height:88rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,27 +1,21 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<TopSafe bgColor="rgba(0,0,0,0)"></TopSafe>
|
||||
<Header title="账户管理" bgColor="rgba(0,0,0,0)" />
|
||||
<Header bgColor="rgba(0,0,0,0)" />
|
||||
<view class="setting-view">
|
||||
<view class="tab-view">
|
||||
<view class="tab-list" v-for="(item,index) in tabList" :key="index" @click="onTab(index)">
|
||||
<text class="text-fu text-28" :style="{color:type == index ? '#7934F6' :'#666' }">{{item}}</text>
|
||||
<view class="tab-line" v-if="type == index"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mid-view">
|
||||
<AccountItem :type="type" :itemData="item" @ok="onItemOk" v-for="(item,index) in dataList" :key="index"></AccountItem>
|
||||
</view>
|
||||
<u-icon size="54" name="checkmark-circle-fill" style="margin-top:84rpx" color="#7934F6" ></u-icon>
|
||||
<text class="text-zu text-32 mt-24">提现成功 ¥{{money || 0}}</text>
|
||||
<text class="text-fu1 text-28 mt-24" style="text-align: center;">由于第三方结算原因,提现成功后可能存在一定延迟请关注提现账户变动情况~</text>
|
||||
</view>
|
||||
<view class="bottom-btn">
|
||||
<MyBtn :text="type == 0 ? '添加支付宝账户' : '添加微信账户'" @ok="onJump"></MyBtn>
|
||||
<MyBtn text="好的我知道了" @ok="onAdd"></MyBtn>
|
||||
</view>
|
||||
<up-toast ref="uToastRef"></up-toast>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getWithdraw,unbindWithdraw } from '@/api/common.js';
|
||||
import { bindWithdraw } from '@/api/common.js';
|
||||
import Header from '@/components/common/header.vue';
|
||||
import { clear } from '@/utils/auth.js';
|
||||
import TopSafe from '@/components/common/top-safe.nvue'
|
||||
@@ -33,76 +27,18 @@ export default {
|
||||
components: { Header, TopSafe,MyBtn,AccountItem },
|
||||
data() {
|
||||
return {
|
||||
type:0,
|
||||
tabList:['支付宝账户','微信账户'],
|
||||
dataList:[]
|
||||
money:''
|
||||
};
|
||||
},
|
||||
onLoad(option){
|
||||
if(option.id){
|
||||
this.type = option.id == '1' ? 0 : 1;
|
||||
onLoad(option) {
|
||||
if(option && option.money){
|
||||
this.money = Number(option.money);
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.init();
|
||||
// this.userinfo();
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
// this.userinfo()
|
||||
// #ifdef WEB
|
||||
this.tabList = ['支付宝账户'];
|
||||
// #endif
|
||||
this.getList();
|
||||
},
|
||||
onItemOk(item){
|
||||
let params = {
|
||||
bindId:item.id
|
||||
}
|
||||
unbindWithdraw(params).then(res=>{
|
||||
if (res.bizcode === 100) {
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'success',
|
||||
message:'解绑成功',
|
||||
});
|
||||
this.init();
|
||||
return null;
|
||||
} else {
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'error',
|
||||
message: res.msg,
|
||||
});
|
||||
return null;
|
||||
}
|
||||
})
|
||||
},
|
||||
getList(){
|
||||
getWithdraw({platform:this.type == 0?1:2}).then(res=>{
|
||||
if (res.bizcode === 100) {
|
||||
this.dataList = res.data;
|
||||
this.dataList.forEach(item=>{
|
||||
item.name = item.accountName;
|
||||
item.account = item.accountNumber;
|
||||
})
|
||||
} else {
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'error',
|
||||
message: res.msg,
|
||||
});
|
||||
return null;
|
||||
}
|
||||
})
|
||||
},
|
||||
onTab(index){
|
||||
if(index != this.type){
|
||||
this.type = index;
|
||||
this.init();
|
||||
}
|
||||
},
|
||||
onJump(){
|
||||
uni.navigateTo({
|
||||
url:`/pages/rwa_package/account/bind?type=${this.type}`
|
||||
})
|
||||
onAdd(){
|
||||
uni.navigateBack()
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -132,34 +68,27 @@ export default {
|
||||
position: relative;
|
||||
.mid-view{
|
||||
width:100%;
|
||||
height:calc(100% - 88rpx);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow-y: auto;
|
||||
padding-bottom: 24rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.tab-view{
|
||||
width:100%;
|
||||
height:88rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
// align-items: center;
|
||||
.tab-list{
|
||||
margin-right:32rpx;
|
||||
height:55rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 16rpx;
|
||||
padding: 48rpx 32rpx;
|
||||
margin-top:24rpx;
|
||||
.input-view{
|
||||
width:100%;
|
||||
height:100rpx;
|
||||
background-color: #f5f5f5;
|
||||
border-radius: 20rpx;
|
||||
margin-top:32rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
.tab-line{
|
||||
width:50rpx;
|
||||
height:4rpx;
|
||||
min-height:4rpx;
|
||||
background-color: #7934F6;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,302 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<TopSafe bgColor="#fff"></TopSafe>
|
||||
<Header bgColor="#fff" title="兑换区块链数字积分" />
|
||||
<view class="setting-view">
|
||||
<text class="text-32 text-fu" style="margin:54rpx 0 32rpx">兑换地址</text>
|
||||
<view class="input-box" style="">
|
||||
<input style="flex:1"
|
||||
placeholder="请输入或选择地址"
|
||||
placeholder-style="color:#999;font-weight:400;"
|
||||
border="0" v-model="inputOne" :customStyle="inputCss"></input>
|
||||
<image src="@/static/new/right_icon.png" class="right-img" @click="onSelectAddress"></image>
|
||||
</view>
|
||||
|
||||
<text class="text-32 text-fu" style="margin:54rpx 0 32rpx">主网络</text>
|
||||
<view class="input-box" style="marign-top:32rpx">
|
||||
<text class="text-32" :style="{color:inputTwo ? '#333' : '#C1C5C9'}">{{inputTwo ? inputTwo : '请选择网络'}}</text>
|
||||
<u-icon name="arrow-right" color="#999" size="14" class="select-icon"></u-icon>
|
||||
</view>
|
||||
|
||||
<text class="text-32 text-fu" style="margin:54rpx 0 32rpx">兑换金额</text>
|
||||
<view class="input-box" style="marign-top:32rpx">
|
||||
<input style="flex:1"
|
||||
placeholder="请输入兑换金额(最低1TBC)"
|
||||
placeholder-style="color:#999;font-weight:400;"
|
||||
@input="onInput"
|
||||
border="0" v-model="inputThree" :customStyle="inputCss"></input>
|
||||
<text class="text-zi text-32" @click="onAll">全部</text>
|
||||
</view>
|
||||
<text class="text-28 text-fu" style="margin-top:28rpx">余额 {{money}} TBC</text>
|
||||
|
||||
<text class="text-32 text-fu" style="margin:54rpx 0 32rpx">支付密码</text>
|
||||
<view class="input-box" style="marign-top:32rpx;margin-bottom:32rpx" >
|
||||
<input style="flex:1"
|
||||
:type="isEve ? 'text' : 'password'"
|
||||
placeholder="请输入支付密码"
|
||||
placeholder-style="color:#999;font-weight:400;"
|
||||
@input="onInputTwo"
|
||||
border="0" v-model="inputFour" :customStyle="inputCss"></input>
|
||||
|
||||
<image @click="onIsSys" :src="`/static/new/eye_${isEve}.png`" class="right-img"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom-btn">
|
||||
<view class="bottom-top">
|
||||
<image src="/static/new/icon.png"></image>
|
||||
<text class="text-24 text-zi">为了保障用户体验感,额外赠送0.0001主网gas</text>
|
||||
</view>
|
||||
<view class="bottom-view">
|
||||
<view class="bottom-left">
|
||||
<text class="text-24 text-fu1">到账数量</text>
|
||||
<text class="text-32 text-zu text-bold">{{inputThree || 0}}
|
||||
<text class="text-26">TBC</text>
|
||||
</text>
|
||||
<text class="text-24 text-fu1">网络手续费 0 TBC</text>
|
||||
</view>
|
||||
<MyBtn text="兑换" @ok="onC" wd="346rpx" br="8rpx"></MyBtn>
|
||||
</view>
|
||||
</view>
|
||||
<SelectLian :itemShow="addressShow" :itemData="addressList" @ok="onOk" @add="onAdd"
|
||||
@close="onClose"></SelectLian>
|
||||
<up-toast ref="uToastRef"></up-toast>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { getExchUsers,exchTransfer } from '@/api/finance.js';
|
||||
import Header from '@/components/common/header.vue';
|
||||
import { clear } from '@/utils/auth.js';
|
||||
import TopSafe from '@/components/common/top-safe.nvue'
|
||||
import MyBtn from '@/components/common/my-btn.vue'
|
||||
import func from '@/utils/func.js';
|
||||
import SelectLian from './components/select-lian.vue'
|
||||
import CryptoJS from "crypto-js";
|
||||
|
||||
export default {
|
||||
components: { Header, TopSafe,MyBtn,SelectLian },
|
||||
data() {
|
||||
return {
|
||||
money:'',
|
||||
isEve:0,
|
||||
inputOne:'',
|
||||
inputTwo:'BNB Smart Chain(BEP20)',
|
||||
addressList:[],
|
||||
addressShow:false,
|
||||
inputThree:'',
|
||||
inputFour:'',
|
||||
inputCss: {
|
||||
"height": '80rpx',
|
||||
"background": "#F3F3F3FF",
|
||||
"border-radius": "30rpx",
|
||||
"border": "0rpx",
|
||||
"padding-left": "12rpx",
|
||||
},
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
if(option && option.money){
|
||||
this.money = Number(option.money);
|
||||
|
||||
}
|
||||
},
|
||||
onShow(){
|
||||
this.getExchUsersList();
|
||||
},
|
||||
methods: {
|
||||
getExchUsersList(){
|
||||
getExchUsers({name:'WALLET'}).then(res=>{
|
||||
if (res.bizcode === 100) {
|
||||
this.addressList = [];
|
||||
this.addressList = res.data.entitys;
|
||||
} else {
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'error',
|
||||
message: res.msg,
|
||||
});
|
||||
return null;
|
||||
}
|
||||
})
|
||||
},
|
||||
onC(){
|
||||
if(!this.inputOne){
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'error',
|
||||
message: '地址不可为空',
|
||||
});
|
||||
return;
|
||||
}
|
||||
if(this.inputOne[0] != 0 || (this.inputOne[1] != 'x' && this.inputOne[1] != 'X') || this.inputOne.length != 42){
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'error',
|
||||
message: '请输入/选择正确的地址',
|
||||
});
|
||||
return;
|
||||
}
|
||||
if(!this.inputThree){
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'error',
|
||||
message: '请输入金额',
|
||||
});
|
||||
return;
|
||||
}
|
||||
if(Number(this.inputThree) < 1){
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'error',
|
||||
message: '最低1TBC',
|
||||
});
|
||||
return;
|
||||
}
|
||||
if(this.inputFour.length < 6){
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'error',
|
||||
message: '请输入6位密码',
|
||||
});
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
category:'vcoin',
|
||||
name:'WALLET',
|
||||
password:CryptoJS.MD5(this.inputFour).toString(),
|
||||
amount:this.inputThree,
|
||||
network:this.inputTwo,
|
||||
address:this.inputOne
|
||||
|
||||
}
|
||||
// CryptoJS.MD5(form.password).toString();
|
||||
exchTransfer(params).then(res=>{
|
||||
if (res.bizcode === 100) {
|
||||
uni.redirectTo({
|
||||
url:`/pages/rwa_package/account/shuSuccess?money=${this.inputThree}`
|
||||
})
|
||||
} else {
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'error',
|
||||
message: res.msg,
|
||||
});
|
||||
return null;
|
||||
}
|
||||
})
|
||||
},
|
||||
onSelectAddress(){
|
||||
this.addressShow = true;
|
||||
},
|
||||
onClose(){
|
||||
this.addressShow = false;
|
||||
},
|
||||
onOk(item){
|
||||
this.inputOne = item.account;
|
||||
this.onClose();
|
||||
},
|
||||
onAdd(){
|
||||
this.onClose();
|
||||
uni.navigateTo({
|
||||
url:'/pages/rwa_package/account/shuAdd'
|
||||
})
|
||||
},
|
||||
onAll(){
|
||||
this.inputThree = this.money;
|
||||
},
|
||||
onInputTwo(e){
|
||||
this.$nextTick(() => {
|
||||
this.inputFour = func.checkInputNum(e.detail.value,null,6);
|
||||
})
|
||||
},
|
||||
onInput(e){
|
||||
this.$nextTick(() => {
|
||||
this.inputThree = func.checkInputPrice(e.detail.value,this.money);
|
||||
})
|
||||
},
|
||||
onIsSys(){
|
||||
this.isEve = this.isEve == 1?0:1;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.bottom-btn{
|
||||
width: 100%;
|
||||
// margin-bottom:230rpx;
|
||||
height:230rpx;
|
||||
min-height:230rpx;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
.bottom-view{
|
||||
width:100%;
|
||||
height:136rpx;
|
||||
min-height:136rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 32rpx;
|
||||
background-color: #fff;
|
||||
box-sizing: border-box;
|
||||
border-top:1rpx solid #ECECEC;
|
||||
.bottom-left{
|
||||
height:110rpx;
|
||||
min-height:110rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
.bottom-top{
|
||||
width:100%;
|
||||
display: flex;
|
||||
height:68rpx;
|
||||
min-height:68rpx;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
background: rgba(121,52,246,0.05);
|
||||
padding: 0 32rpx;
|
||||
box-sizing: border-box;
|
||||
image{
|
||||
width:24rpx;
|
||||
height:24rpx;
|
||||
margin-right:10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.setting-view {
|
||||
width: 100%;
|
||||
height: calc(100% - 88rpx - 230rpx - var(--status-bar-height));
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow-y: auto;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
background-color: #fff;
|
||||
padding: 0 32rpx;
|
||||
box-sizing: border-box;
|
||||
.input-box{
|
||||
width:100%;
|
||||
height:100rpx;
|
||||
min-height:100rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background: #F5F5F5;
|
||||
border-radius: 16rpx;
|
||||
padding: 0 32rpx;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
|
||||
.right-img{
|
||||
width:44rpx;
|
||||
height:44rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,154 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<TopSafe bgColor="rgba(0,0,0,0)"></TopSafe>
|
||||
<Header title="绑定区块链地址" bgColor="rgba(0,0,0,0)" />
|
||||
<view class="setting-view">
|
||||
<view class="mid-view">
|
||||
<text class="text-zu1 text-32 mt-24">地址</text>
|
||||
<view class="input-view">
|
||||
<up-input placeholder="请输入地址" border="surround" v-model="account" :customStyle="inputCss"></up-input>
|
||||
</view>
|
||||
<text class="text-zu1 text-32 mt-48">主网络</text>
|
||||
<view class="input-view">
|
||||
<up-input placeholder="请选择主网络" border="surround" v-model="name" :customStyle="inputCss"></up-input>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom-btn">
|
||||
<MyBtn text="添加" @ok="onAdd"></MyBtn>
|
||||
</view>
|
||||
<up-toast ref="uToastRef"></up-toast>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { bindExchUsers } from '@/api/finance.js';
|
||||
import Header from '@/components/common/header.vue';
|
||||
import { clear } from '@/utils/auth.js';
|
||||
import TopSafe from '@/components/common/top-safe.nvue'
|
||||
import MyBtn from '@/components/common/my-btn.vue'
|
||||
import func from '@/utils/func.js';
|
||||
import AccountItem from './components/account-item.vue'
|
||||
|
||||
export default {
|
||||
components: { Header, TopSafe,MyBtn,AccountItem },
|
||||
data() {
|
||||
return {
|
||||
topText:'',
|
||||
type:0,
|
||||
account:'',
|
||||
name:'BNB Smart Chain(BEP20)',
|
||||
wxCode:'',
|
||||
inputCss: {
|
||||
"height": '80rpx',
|
||||
"background": "#F3F3F3FF",
|
||||
"border-radius": "30rpx",
|
||||
"border": "0rpx",
|
||||
"padding-left": "12rpx",
|
||||
},
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
|
||||
},
|
||||
methods: {
|
||||
onAdd(){
|
||||
if(!this.account){
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'error',
|
||||
message: '地址不可为空',
|
||||
});
|
||||
return;
|
||||
}
|
||||
if(this.account[0] != 0 || (this.account[1] != 'x' && this.account[1] != 'X') || this.account.length != 42){
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'error',
|
||||
message: '请输入正确的地址',
|
||||
});
|
||||
return;
|
||||
}
|
||||
if(!this.name){
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'error',
|
||||
message: '请选择网络',
|
||||
});
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
name:'WALLET',
|
||||
address:this.account,
|
||||
netword:this.name
|
||||
}
|
||||
bindExchUsers(params).then(res=>{
|
||||
if (res.bizcode === 100) {
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'success',
|
||||
message: '绑定成功',
|
||||
});
|
||||
this.account = '';
|
||||
this.name = '';
|
||||
setTimeout(()=>{
|
||||
uni.navigateBack();
|
||||
},1000)
|
||||
} else {
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'error',
|
||||
message: res.msg,
|
||||
});
|
||||
return null;
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.bottom-btn{
|
||||
width: 100%;
|
||||
margin-bottom:92rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 0 32rpx;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
|
||||
}
|
||||
.setting-view {
|
||||
width: 100%;
|
||||
height: calc(100% - 88rpx - 92rpx - 88rpx - var(--status-bar-height));
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
overflow-y: auto;
|
||||
padding: 0 32rpx;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
.mid-view{
|
||||
width:100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow-y: auto;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
border-radius: 16rpx;
|
||||
padding: 48rpx 32rpx;
|
||||
margin-top:24rpx;
|
||||
.input-view{
|
||||
width:100%;
|
||||
height:100rpx;
|
||||
background-color: #f5f5f5;
|
||||
border-radius: 20rpx;
|
||||
margin-top:32rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,96 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<TopSafe bgColor="rgba(0,0,0,0)"></TopSafe>
|
||||
<Header bgColor="rgba(0,0,0,0)" />
|
||||
<view class="setting-view">
|
||||
<u-icon size="54" name="checkmark-circle-fill" style="margin-top:84rpx" color="#7934F6" ></u-icon>
|
||||
<text class="text-zu text-32 mt-24">兑换成功 {{money || 0}}TBC</text>
|
||||
<text class="text-fu1 text-28 mt-24" style="text-align: center;">由于第三方结算原因,兑换成功后可能存在一定延迟请关注兑换账户变动情况~</text>
|
||||
</view>
|
||||
<view class="bottom-btn">
|
||||
<MyBtn text="好的我知道了" @ok="onAdd"></MyBtn>
|
||||
</view>
|
||||
<up-toast ref="uToastRef"></up-toast>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { bindWithdraw } from '@/api/common.js';
|
||||
import Header from '@/components/common/header.vue';
|
||||
import { clear } from '@/utils/auth.js';
|
||||
import TopSafe from '@/components/common/top-safe.nvue'
|
||||
import MyBtn from '@/components/common/my-btn.vue'
|
||||
import func from '@/utils/func.js';
|
||||
import AccountItem from './components/account-item.vue'
|
||||
|
||||
export default {
|
||||
components: { Header, TopSafe,MyBtn,AccountItem },
|
||||
data() {
|
||||
return {
|
||||
money:''
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
if(option && option.money){
|
||||
this.money = Number(option.money);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onAdd(){
|
||||
uni.redirectTo({
|
||||
url:`/pages/rwa_package/rwa/rwa`
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.bottom-btn{
|
||||
width: 100%;
|
||||
margin-bottom:92rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 0 32rpx;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
|
||||
}
|
||||
.setting-view {
|
||||
width: 100%;
|
||||
height: calc(100% - 88rpx - 92rpx - 88rpx - var(--status-bar-height));
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
overflow-y: auto;
|
||||
padding: 0 32rpx;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
.mid-view{
|
||||
width:100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow-y: auto;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
border-radius: 16rpx;
|
||||
padding: 48rpx 32rpx;
|
||||
margin-top:24rpx;
|
||||
.input-view{
|
||||
width:100%;
|
||||
height:100rpx;
|
||||
background-color: #f5f5f5;
|
||||
border-radius: 20rpx;
|
||||
margin-top:32rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -57,6 +57,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<ShuTips :itemShow="tipsShow" @close="onClose" @ok="onOk"></ShuTips>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -65,12 +66,15 @@
|
||||
import { getExchUsers } from '@/api/finance.js';
|
||||
import { formatDate } from '@/utils/index.js';
|
||||
import { getAcctBalance } from '@/api/finance.js';
|
||||
import ShuTips from '@/pages/rwa_package/account/components/shu-tips.vue';
|
||||
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
balanceObj: {},
|
||||
amountList: [],
|
||||
tipsShow:false,
|
||||
form: {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
@@ -78,21 +82,36 @@ export default {
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
components:{ShuTips},
|
||||
onShow() {
|
||||
this.getAcctBalance();
|
||||
this.loadData();
|
||||
},
|
||||
methods: {
|
||||
formatDate,
|
||||
onClose(){
|
||||
this.tipsShow = false;
|
||||
},
|
||||
onOk(index){
|
||||
if(index == 0){
|
||||
uni.navigateTo({
|
||||
url: '/pages/rwa_package/account/shu?money=' + this.balanceObj.curAmount,
|
||||
})
|
||||
}else if(index == 1){
|
||||
uni.navigateTo({
|
||||
url: '/pages/rwa_package/rwa_binding/rwa_binding',
|
||||
})
|
||||
}
|
||||
this.onClose();
|
||||
},
|
||||
leftJump() {
|
||||
uni.switchTab({
|
||||
url: '/pages/mine/mine',
|
||||
});
|
||||
},
|
||||
addRwa() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/rwa_package/rwa_binding/rwa_binding',
|
||||
})
|
||||
this.tipsShow = true;
|
||||
|
||||
},
|
||||
addWithdrawal() {
|
||||
uni.navigateTo({
|
||||
@@ -137,6 +156,7 @@ export default {
|
||||
},
|
||||
// 模拟获取数据的方法,实际应用中应该替换为你的数据获取逻辑,例如从服务器获取数据
|
||||
async fetchData(page, pageSize) {
|
||||
|
||||
const params = {
|
||||
page,
|
||||
pageSize,
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 914 B |
Binary file not shown.
|
After Width: | Height: | Size: 729 B |
Binary file not shown.
|
After Width: | Height: | Size: 858 B |
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
+2
-2
@@ -2,9 +2,9 @@
|
||||
// export const BASE_URL="https://frontend.jdns360.com/api"; // 正式环境
|
||||
// export const BASE_URL="http://cl55un59859.vicp.fun:24346"; // 测试环境
|
||||
|
||||
export const BASE_URL = "https://api.tbmall.xin"; //生产
|
||||
// export const BASE_URL = "https://api.tbmall.xin"; //生产
|
||||
// export const BASE_URL ='http://api.hm.a-d.work:6880' // 测试
|
||||
// export const BASE_URL ='https://api.o.tbmall.xin' // 本地测试
|
||||
export const BASE_URL ='https://api.o.tbmall.xin' // 本地测试
|
||||
|
||||
|
||||
|
||||
|
||||
+24
-1
@@ -58,6 +58,20 @@ export default {
|
||||
}, wait)
|
||||
}
|
||||
},
|
||||
checkInputNum(value,max = null,num = null){
|
||||
if(max === 0){
|
||||
return '';
|
||||
}
|
||||
// value = value.replace(/^0*/g, ''); // 第一个数不能为0 ,若为0替换为空
|
||||
value = value.replace(/[^\d]/g,''); // 是否是数字,若是除数字之外的则替换为空
|
||||
if(num && value.length > num){
|
||||
value = value.substr(0, num);
|
||||
}
|
||||
if(max && (Number(value) >= Number(max))){
|
||||
value = max;
|
||||
}
|
||||
return value;
|
||||
},
|
||||
checkInputPrice(value,max = null) {
|
||||
if(max === 0){
|
||||
return '';
|
||||
@@ -72,7 +86,16 @@ export default {
|
||||
value = max;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
},
|
||||
addressTurn(val,num = 9) {
|
||||
if (val.length < 10) {
|
||||
return val
|
||||
} else {
|
||||
let str = val.slice(num, val.length - num)
|
||||
val = val.replace(str, '...')
|
||||
return val
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user