Files
frontend-app/pages/rwa_package/account/shu.vue
T
2025-11-19 00:03:45 +08:00

369 lines
11 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template>
<view class="content">
<TopSafe bgColor="#fff"></TopSafe>
<Header bgColor="#fff" title="兑换区块链数字积分" >
<template v-slot:right>
<text class="text-32 text-zi" @click="onRight">记录</text>
</template>
</Header>
<view class="setting-view">
<text class="text-32 text-fu" style="margin:54rpx 0 32rpx">兑换地址</text>
<view class="input-box">
<input style="flex:1"
placeholder="请输入或选择地址"
placeholder-style="color:#999;font-weight:400;"
border="0" v-model="inputOne" :customStyle="inputCss"></input>
<image src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/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 class="text-zi" @click="jumpSettingPwd">《共享计划终止协议》</text>
</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="`https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/new/eye_${isEve}.png`" class="right-img"></image>
</view>
</view>
<view class="bottom-btn">
<view class="bottom-top">
<image src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/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>
<DownPopup :show="tipsShow"
title="股权交割协议"
:contentText="text"
articleTitle="股权交割协议"
ok="我已知晓"
@cancel="tipsShow = false"
@ok="tipsShow = false"
></DownPopup>
<SelectLian :itemShow="addressShow" :itemData="addressList" @ok="onOk" @add="onAdd"
@close="onClose"></SelectLian>
<up-toast ref="uToastRef"></up-toast>
</view>
</template>
<script>
import { getExchUsers,exchTransfer,getAcctBalance } 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 DownPopup from '@/components/common/down-popup.vue'
import CryptoJS from "crypto-js";
export default {
components: { DownPopup,Header, TopSafe,MyBtn,SelectLian },
data() {
return {
money:'',
isEve:0,
tipsShow:false,
inputOne:'',
inputTwo:'BNB Smart Chain(BEP20)',
addressList:[],
addressShow:false,
inputThree:'',
inputFour:'',
inputCss: {
"height": '80rpx',
"background": "#F3F3F3FF",
"border-radius": "30rpx",
"border": "0rpx",
"padding-left": "12rpx",
},
text:`甲方(委托人):信任桥用户
乙方(受托人): 信任桥(深圳)网络科技有限公司
统一社会信用代码:91440300MAD3XHDP7C
鉴于条款
1. 甲乙双方已签署《消费型合伙人合作协议》《分红权代持协议》及《承诺书》(以下统称“原协议”),甲方通过购买TB信任桥商城产品取得分红权代持资格。
2. 为规范甲方对“TBC”(TrustBridge Coin,信任桥数字权益凭证)的行权行为,明确双方权利义务,现就甲方将TBC转移至交易所变现事宜达成补充约定。
第一条 定义与行权规则
1. TBC行权变现:指甲方向乙方申请将其持有的TBC通过非关联交易所进行行权的行为。
2. 自动失效条款:
 若甲方将TBC转移至非关联交易所进行行权变现,视为甲方单方终止原协议项下所有权利义务。
 甲方行权变现后,立即丧失以下权益:
(1)TB信任桥商城产品分红权;
(2)所有未兑现的分红收益;
第二条 协议终止与责任划分
1. 协议终止:
 甲方触发行权变现条件后,原协议、《分红权代持协议》及《承诺书》自动终止,双方权利义务关系终结。
 乙方有权立即冻结甲方账户,停止后续分红发放。
2. 责任承担:
 甲方承诺行权变现行为合法合规,若因行权行为导致乙方或关联方遭受行政处罚、声誉损失或第三方索赔,甲方应承担全部赔偿责任。
 乙方对甲方行权后的资金流向不承担监管责任。
第三条 特别提示与风险告知
1. 风险警示:
 TBC行权变现可能涉及市场波动、汇率风险及合规风险,甲方应自行承担全部后果。
 乙方不对TBC的流通性、价值稳定性作出任何承诺。
2. 合规要求:
 甲方承诺行权变现资金用途合法,不得用于非法活动或洗钱行为。
 若监管部门要求追溯资金来源或用途,甲方应全力配合并提供证明材料。
第四条 生效条件
1. 本补充协议自甲方点击确认后生效,与原协议具有同等法律效力。
2. 本协议未尽事宜,以原协议约定为准;与原协议冲突的,以本协议为准。`
};
},
onShow(){
this.acctBalance();
this.getExchUsersList();
},
methods: {
onRight(){
uni.navigateTo({
url:'/pages/rwa_package/rwa_withdrawal_log/rwa_withdrawal_log?back=withdrawal'
})
},
acctBalance() {
getAcctBalance().then(resp=>{
if (resp && resp.bizcode === 100) {
resp.data.forEach(item=>{
if(item.categoty == 'vcoin'){
this.money = item.curAmount;
}
})
}
});
},
jumpSettingPwd() {
this.tipsShow = true;
},
getExchUsersList(){
getExchUsers({name:'WALLET'}).then(res=>{
if (res.bizcode === 100) {
this.addressList = [];
this.addressList = res.data.entitys ? 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.navigateTo({
url:`/pages/rwa_package/account/shuSuccess?money=${this.inputThree}`
})
this.inputOne = '';
this.inputTwo = 'BNB Smart Chain(BEP20)';
this.inputThree = '';
this.inputFour = '';
} 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/index?id=3'
})
},
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>