更新打包配置

This commit is contained in:
2025-12-16 09:13:50 +08:00
parent bd84809d02
commit 0bc7e24de6
542 changed files with 80435 additions and 80435 deletions
+182 -182
View File
@@ -1,182 +1,182 @@
<template>
<view class="content">
<TopSafe bgColor="rgba(0,0,0,0)"></TopSafe>
<Header :title="topText" bgColor="rgba(0,0,0,0)" />
<view class="setting-view">
<view class="mid-view">
<text class="text-zu1 text-32" v-if="type == 1">注:请与当前登录微信信息一致</text>
<text class="text-zu1 text-32 mt-24">{{type == 0 ? '支付宝账号' : '微信账号'}}</text>
<view class="input-view">
<up-input :placeholder="`请输入${type == 0 ? '支付宝' : '微信'}账号`" border="surround" v-model="account" :customStyle="inputCss"></up-input>
</view>
<text class="text-zu1 text-32 mt-48">{{type == 0 ? '支付宝姓名' : '微信姓名'}}</text>
<view class="input-view">
<up-input :placeholder="`请输入${type == 0 ? '支付宝' : '微信真实'}姓名`" 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 { 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 {
topText:'',
type:0,
account:'',
name:'',
wxCode:'',
inputCss: {
"height": '80rpx',
"background": "#F3F3F3FF",
"border-radius": "30rpx",
"border": "0rpx",
"padding-left": "12rpx",
},
};
},
onLoad(option) {
if(option && option.type){
this.type = Number(option.type);
this.init();
}
},
methods: {
init() {
if(this.type == 0 ){
this.topText = '绑定支付宝账户';
}else if(this.type == 1){
this.topText = '绑定微信账户';
}
},
setBindWithdraw(){
if(!this.account){
this.$refs.uToastRef.show({
type: 'error',
message: '账户不可为空',
});
return;
}
if(!this.name){
this.$refs.uToastRef.show({
type: 'error',
message: '名字不可为空',
});
return;
}
let params = {
platform:this.type + 1,
accountNumber:this.account,
accountName:this.name
}
if(this.type == 1){
params['code'] = this.wxCode;
}
console.log('wxCode',params)
bindWithdraw(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;
}
})
},
onAdd(){
if(this.type == 1){
let _this = this;
uni.login({
provider: 'weixin',
onlyAuthorize:true,
success: function (loginRes) {
_this.wxCode = loginRes.code;
console.log('aaaaa',loginRes.code)
console.log('bbbb',loginRes)
_this.setBindWithdraw();
},
fail:(err)=>{
console.log('login',err);
}
});
}else{
this.setBindWithdraw();
}
}
}
}
</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>
<template>
<view class="content">
<TopSafe bgColor="rgba(0,0,0,0)"></TopSafe>
<Header :title="topText" bgColor="rgba(0,0,0,0)" />
<view class="setting-view">
<view class="mid-view">
<text class="text-zu1 text-32" v-if="type == 1">注:请与当前登录微信信息一致</text>
<text class="text-zu1 text-32 mt-24">{{type == 0 ? '支付宝账号' : '微信账号'}}</text>
<view class="input-view">
<up-input :placeholder="`请输入${type == 0 ? '支付宝' : '微信'}账号`" border="surround" v-model="account" :customStyle="inputCss"></up-input>
</view>
<text class="text-zu1 text-32 mt-48">{{type == 0 ? '支付宝姓名' : '微信姓名'}}</text>
<view class="input-view">
<up-input :placeholder="`请输入${type == 0 ? '支付宝' : '微信真实'}姓名`" 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 { 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 {
topText:'',
type:0,
account:'',
name:'',
wxCode:'',
inputCss: {
"height": '80rpx',
"background": "#F3F3F3FF",
"border-radius": "30rpx",
"border": "0rpx",
"padding-left": "12rpx",
},
};
},
onLoad(option) {
if(option && option.type){
this.type = Number(option.type);
this.init();
}
},
methods: {
init() {
if(this.type == 0 ){
this.topText = '绑定支付宝账户';
}else if(this.type == 1){
this.topText = '绑定微信账户';
}
},
setBindWithdraw(){
if(!this.account){
this.$refs.uToastRef.show({
type: 'error',
message: '账户不可为空',
});
return;
}
if(!this.name){
this.$refs.uToastRef.show({
type: 'error',
message: '名字不可为空',
});
return;
}
let params = {
platform:this.type + 1,
accountNumber:this.account,
accountName:this.name
}
if(this.type == 1){
params['code'] = this.wxCode;
}
console.log('wxCode',params)
bindWithdraw(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;
}
})
},
onAdd(){
if(this.type == 1){
let _this = this;
uni.login({
provider: 'weixin',
onlyAuthorize:true,
success: function (loginRes) {
_this.wxCode = loginRes.code;
console.log('aaaaa',loginRes.code)
console.log('bbbb',loginRes)
_this.setBindWithdraw();
},
fail:(err)=>{
console.log('login',err);
}
});
}else{
this.setBindWithdraw();
}
}
}
}
</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>
@@ -1,121 +1,121 @@
<template>
<view class="shop-item-view" v-if="dataItem">
<image src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/new/alpha.png" v-if="dataItem.name != 'WALLET'"></image>
<image src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/new/no_black_data.png" v-else></image>
<view class="shop-mid-view-one" v-if="dataItem.name != 'WALLET'">
<text class="text-32 text-zu1 text-overflow">{{dataItem.account}}</text>
</view>
<view class="shop-mid-view" v-else>
<text class="text-32 text-zu1 text-overflow">BNB Smart Chain(BEP20)</text>
<text class="text-32 text-fu1 text-overflow">{{address}}</text>
</view>
<view class="biao-view">
<text class="text-20 text-zi" style="line-height: 1.2;">{{dataItem.name != 'WALLET' ? 'Alpha账户' : '区块链账户'}}</text>
</view>
<view class="jie-bind" @click="onJie">
<text class="text-zu1 text-24">解绑</text>
</view>
</view>
</template>
<script>
import func from '@/utils/func.js';
export default {
props:{
dataItem:{
type:Object,
default:null
},
},
computed:{
address(){
let tmp = '';
console.log('this.data',this.dataItem)
if(this.dataItem && this.dataItem.name == 'WALLET'){
this.dataItem.address = func.addressTurn(this.dataItem.account,6);
tmp = this.dataItem.address;
}
return tmp;
}
},
mounted(){
},
methods: {
onJie(){
this.$emit('jie',this.dataItem);
}
}
}
</script>
<style lang="scss" scoped>
.shop-item-view{
width:100%;
min-height:152rpx;
display: flex;
flex-direction: row;
align-items: center;
padding: 32rpx 28rpx;
box-sizing: border-box;
position: relative;
border-radius: 12rpx;
overflow: hidden;
background-color: #fff;
margin-top:24rpx;
border:2rpx solid #e3e3e3;
.jie-bind{
height:48rpx;
width:112rpx;
display: flex;
align-items: center;
justify-content: center;
border-radius:24rpx;
position: absolute;
right:32rpx;
bottom:24rpx;
background-color: #F3F3F3;
}
.biao-view{
padding: 0 12rpx;
display: flex;
align-items: center;
justify-content: center;
height:36rpx;
min-height:36rpx;
position: absolute;
border-radius: 0px 12rpx 0px 12rpx;
top:0;
right:0;
background-color: #F2EBFE;
}
.shop-mid-view{
margin:0 24rpx;
display: flex;
flex:1;
height:88rpx;
min-height:88rpx;
flex-direction: column;
justify-content: space-between;
}
.shop-mid-view-one{
margin:0 24rpx;
display: flex;
flex:1;
height:88rpx;
min-height:88rpx;
flex-direction: column;
justify-content: center;
}
image{
width:88rpx;
min-width:88rpx;
height:88rpx;
}
}
</style>
<template>
<view class="shop-item-view" v-if="dataItem">
<image src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/new/alpha.png" v-if="dataItem.name != 'WALLET'"></image>
<image src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/new/no_black_data.png" v-else></image>
<view class="shop-mid-view-one" v-if="dataItem.name != 'WALLET'">
<text class="text-32 text-zu1 text-overflow">{{dataItem.account}}</text>
</view>
<view class="shop-mid-view" v-else>
<text class="text-32 text-zu1 text-overflow">BNB Smart Chain(BEP20)</text>
<text class="text-32 text-fu1 text-overflow">{{address}}</text>
</view>
<view class="biao-view">
<text class="text-20 text-zi" style="line-height: 1.2;">{{dataItem.name != 'WALLET' ? 'Alpha账户' : '区块链账户'}}</text>
</view>
<view class="jie-bind" @click="onJie">
<text class="text-zu1 text-24">解绑</text>
</view>
</view>
</template>
<script>
import func from '@/utils/func.js';
export default {
props:{
dataItem:{
type:Object,
default:null
},
},
computed:{
address(){
let tmp = '';
console.log('this.data',this.dataItem)
if(this.dataItem && this.dataItem.name == 'WALLET'){
this.dataItem.address = func.addressTurn(this.dataItem.account,6);
tmp = this.dataItem.address;
}
return tmp;
}
},
mounted(){
},
methods: {
onJie(){
this.$emit('jie',this.dataItem);
}
}
}
</script>
<style lang="scss" scoped>
.shop-item-view{
width:100%;
min-height:152rpx;
display: flex;
flex-direction: row;
align-items: center;
padding: 32rpx 28rpx;
box-sizing: border-box;
position: relative;
border-radius: 12rpx;
overflow: hidden;
background-color: #fff;
margin-top:24rpx;
border:2rpx solid #e3e3e3;
.jie-bind{
height:48rpx;
width:112rpx;
display: flex;
align-items: center;
justify-content: center;
border-radius:24rpx;
position: absolute;
right:32rpx;
bottom:24rpx;
background-color: #F3F3F3;
}
.biao-view{
padding: 0 12rpx;
display: flex;
align-items: center;
justify-content: center;
height:36rpx;
min-height:36rpx;
position: absolute;
border-radius: 0px 12rpx 0px 12rpx;
top:0;
right:0;
background-color: #F2EBFE;
}
.shop-mid-view{
margin:0 24rpx;
display: flex;
flex:1;
height:88rpx;
min-height:88rpx;
flex-direction: column;
justify-content: space-between;
}
.shop-mid-view-one{
margin:0 24rpx;
display: flex;
flex:1;
height:88rpx;
min-height:88rpx;
flex-direction: column;
justify-content: center;
}
image{
width:88rpx;
min-width:88rpx;
height:88rpx;
}
}
</style>
@@ -1,84 +1,84 @@
<template>
<view class="shop-item-view" >
<image :src="type == 2 ? 'https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/new/zfb.png' : 'https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/new/wx.png'" ></image>
<view class="show-item-left">
<text class="text-32 text-zu1">{{itemData.name}}</text>
<text class="text-26 text-fu1">账号:{{itemData.account}}</text>
</view>
<view class="item-right-btn" @click="onBtn">
<text class="text-zu1 text-24">解绑</text>
</view>
</view>
</template>
<script>
export default {
props:{
obj:{
type:Object,
default:null
},
type:{
type:Number,
default:0
},
itemData:{
type:[Array,Object],
default:()=>{}
},
},
mounted(){
},
methods: {
onBtn(){
this.$emit('ok',this.itemData);
}
}
}
</script>
<style lang="scss" scoped>
.shop-item-view{
width:100%;
min-height:152rpx;
display: flex;
flex-direction: row;
align-items: center;
padding: 32rpx 28rpx;
box-sizing: border-box;
position: relative;
border-radius: 24rpx;
overflow: hidden;
background-color: #fff;
margin-top:24rpx;
.show-item-left{
display: flex;
flex-direction: column;
height:88rpx;
min-height:88rpx;
margin-left:24rpx;
}
.item-right-btn{
width:112rpx;
height:48rpx;
min-height:48rpx;
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;
}
}
</style>
<template>
<view class="shop-item-view" >
<image :src="type == 2 ? 'https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/new/zfb.png' : 'https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/new/wx.png'" ></image>
<view class="show-item-left">
<text class="text-32 text-zu1">{{itemData.name}}</text>
<text class="text-26 text-fu1">账号:{{itemData.account}}</text>
</view>
<view class="item-right-btn" @click="onBtn">
<text class="text-zu1 text-24">解绑</text>
</view>
</view>
</template>
<script>
export default {
props:{
obj:{
type:Object,
default:null
},
type:{
type:Number,
default:0
},
itemData:{
type:[Array,Object],
default:()=>{}
},
},
mounted(){
},
methods: {
onBtn(){
this.$emit('ok',this.itemData);
}
}
}
</script>
<style lang="scss" scoped>
.shop-item-view{
width:100%;
min-height:152rpx;
display: flex;
flex-direction: row;
align-items: center;
padding: 32rpx 28rpx;
box-sizing: border-box;
position: relative;
border-radius: 24rpx;
overflow: hidden;
background-color: #fff;
margin-top:24rpx;
.show-item-left{
display: flex;
flex-direction: column;
height:88rpx;
min-height:88rpx;
margin-left:24rpx;
}
.item-right-btn{
width:112rpx;
height:48rpx;
min-height:48rpx;
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;
}
}
</style>
+147 -147
View File
@@ -1,148 +1,148 @@
<template>
<u-popup :show="codeShow" 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">
<view class="input-view">
<up-input placeholder="请输入验证码" border="surround" v-model="code"
:customStyle="inputCss">
<template #suffix style="margin-right: 10rpx;">
<view v-if="countdown" class="code-warp">
<up-count-down :time="60 * 1000" format="ss" @finish="countdown = false"></up-count-down>
<text style="margin-left: 10rpx;">s</text>
</view>
<view v-else @click="getMobileCode" class="code_msg">
获取验证码
</view>
</template>
</up-input>
</view>
</view>
<view class="item-bottom-btn">
<MyBtn @ok="onOk" text="确定"></MyBtn>
</view>
</view>
<up-toast ref="uToastRef"></up-toast>
</u-popup>
</template>
<script>
import { getUserList } from '@/api/common.js';
import MyBtn from '@/components/common/my-btn.vue'
export default {
data() {
return {
code:'',
countdown:'',
inputCss: {
"background": "#fff",
},
}
},
components: { MyBtn },
props:{
codeShow:{
type:Boolean,
default:false
},
phone:{
type:String,
default:''
},
},
mounted(){
},
methods: {
onOk(){
if(!this.code){
this.$refs.uToastRef.show({
type: 'error',
message: "验证码不可为空",
});
return;
}
this.$emit('ti',this.code);
this.code = '';
},
onClose(){
this.$emit('close');
this.countdown = false;
},
async getMobileCode() {
if (!this.phone) {
this.$refs.uToastRef.show({
type: 'error',
message: "请输入手机号码",
});
return;
}
this.countdown = true;
const params = {
mobile: this.phone,
type: 'withdraw'
}
const response = await getUserList(params);
if (response && response.bizcode === 100) {
this.$refs.uToastRef.show({
type: 'success',
message: response.msg,
});
} else {
this.countdown = false;
}
},
}
}
</script>
<style scoped lang="scss">
.select-item{
width:100%;
min-height:418rpx;
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:88rpx;
display: flex;
}
.item-mid-view{
width:100%;
height:218rpx;
min-height:218rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
overflow-y: auto;
.input-view{
width:100%;
height:88rpx;
min-height:88rpx;
}
}
.select-head{
width:100%;
height:88rpx;
min-height:88rpx;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
}
<template>
<u-popup :show="codeShow" 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">
<view class="input-view">
<up-input placeholder="请输入验证码" border="surround" v-model="code"
:customStyle="inputCss">
<template #suffix style="margin-right: 10rpx;">
<view v-if="countdown" class="code-warp">
<up-count-down :time="60 * 1000" format="ss" @finish="countdown = false"></up-count-down>
<text style="margin-left: 10rpx;">s</text>
</view>
<view v-else @click="getMobileCode" class="code_msg">
获取验证码
</view>
</template>
</up-input>
</view>
</view>
<view class="item-bottom-btn">
<MyBtn @ok="onOk" text="确定"></MyBtn>
</view>
</view>
<up-toast ref="uToastRef"></up-toast>
</u-popup>
</template>
<script>
import { getUserList } from '@/api/common.js';
import MyBtn from '@/components/common/my-btn.vue'
export default {
data() {
return {
code:'',
countdown:'',
inputCss: {
"background": "#fff",
},
}
},
components: { MyBtn },
props:{
codeShow:{
type:Boolean,
default:false
},
phone:{
type:String,
default:''
},
},
mounted(){
},
methods: {
onOk(){
if(!this.code){
this.$refs.uToastRef.show({
type: 'error',
message: "验证码不可为空",
});
return;
}
this.$emit('ti',this.code);
this.code = '';
},
onClose(){
this.$emit('close');
this.countdown = false;
},
async getMobileCode() {
if (!this.phone) {
this.$refs.uToastRef.show({
type: 'error',
message: "请输入手机号码",
});
return;
}
this.countdown = true;
const params = {
mobile: this.phone,
type: 'withdraw'
}
const response = await getUserList(params);
if (response && response.bizcode === 100) {
this.$refs.uToastRef.show({
type: 'success',
message: response.msg,
});
} else {
this.countdown = false;
}
},
}
}
</script>
<style scoped lang="scss">
.select-item{
width:100%;
min-height:418rpx;
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:88rpx;
display: flex;
}
.item-mid-view{
width:100%;
height:218rpx;
min-height:218rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
overflow-y: auto;
.input-view{
width:100%;
height:88rpx;
min-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,193 +1,193 @@
<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">选择{{type == 0 ? '微信' : '支付宝'}}账户</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" v-for="(item,index) in data" :key="item.id">
<image :src="type == 1 ? 'https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/new/zfb.png' : 'https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/new/wx.png'" ></image>
<view class="show-item-left">
<text class="text-32 text-zu1">{{item.name}}</text>
<text class="text-26 text-fu1">账号:{{item.account}}</text>
</view>
<u-radio-group v-model="itemSelect" style="position: absolute;right:28rpx">
<u-radio :name="item.id" activeColor="#7934F6"></u-radio>
</u-radio-group>
</view>
</view>
<view class="item-mid-view-two" @click="onAdd" v-if="!data.length">
<image src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/new/no_black_data.png" class="no-data-black"></image>
<text class="text-28 text-fu mt-48">{{`请先绑定一个${type == 0 ? '微信' : '支付宝'}账户,用于收款`}}</text>
<view class="add-btn mt-48">
<image src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/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 class="item-bottom-btn" v-if="data.length">
<MyBtn @ok="onOk" text="确定"></MyBtn>
</view>
</view>
</u-popup>
</template>
<script>
import MyBtn from '@/components/common/my-btn.vue'
export default {
data() {
return {
itemSelect:''
}
},
components: { MyBtn },
computed:{
data(){
let tmp = [];
if(this.itemData.length){
this.itemSelect = this.itemData[0].id;
tmp = this.itemData;
console.log('tmp',tmp)
}
return tmp;
}
},
props:{
itemShow:{
type:Boolean,
default:false
},
itemData:{
type:[Array,Object],
default:()=>{}
},
type:{
type:[Number,String],
default:'0'
}
},
mounted(){
},
methods: {
onOk(){
console.log('this',this.itemSelect);
this.$emit('ok',this.itemSelect);
},
onAdd(){
this.$emit('add');
},
onClose(){
this.$emit('close');
}
}
}
</script>
<style scoped lang="scss">
.select-item{
width:100%;
min-height:942rpx;
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:88rpx;
display: flex;
}
.item-mid-view-two{
width:100%;
height:742rpx;
min-height:742rpx;
display: flex;
flex-direction: column;
align-items: center;
.no-data-black{
width:120rpx;
height:120rpx;
margin-top:120rpx;
}
.add-btn{
width:248rpx;
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;
}
}
}
.item-mid-view{
width:100%;
height:742rpx;
min-height:742rpx;
display: flex;
flex-direction: column;
align-items: center;
overflow-y: auto;
.item-mid-list{
display: flex;
flex-direction: row;
align-items: center;
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: 0 24rpx;
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;
}
}
<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">选择{{type == 0 ? '微信' : '支付宝'}}账户</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" v-for="(item,index) in data" :key="item.id">
<image :src="type == 1 ? 'https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/new/zfb.png' : 'https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/new/wx.png'" ></image>
<view class="show-item-left">
<text class="text-32 text-zu1">{{item.name}}</text>
<text class="text-26 text-fu1">账号:{{item.account}}</text>
</view>
<u-radio-group v-model="itemSelect" style="position: absolute;right:28rpx">
<u-radio :name="item.id" activeColor="#7934F6"></u-radio>
</u-radio-group>
</view>
</view>
<view class="item-mid-view-two" @click="onAdd" v-if="!data.length">
<image src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/new/no_black_data.png" class="no-data-black"></image>
<text class="text-28 text-fu mt-48">{{`请先绑定一个${type == 0 ? '微信' : '支付宝'}账户,用于收款`}}</text>
<view class="add-btn mt-48">
<image src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/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 class="item-bottom-btn" v-if="data.length">
<MyBtn @ok="onOk" text="确定"></MyBtn>
</view>
</view>
</u-popup>
</template>
<script>
import MyBtn from '@/components/common/my-btn.vue'
export default {
data() {
return {
itemSelect:''
}
},
components: { MyBtn },
computed:{
data(){
let tmp = [];
if(this.itemData.length){
this.itemSelect = this.itemData[0].id;
tmp = this.itemData;
console.log('tmp',tmp)
}
return tmp;
}
},
props:{
itemShow:{
type:Boolean,
default:false
},
itemData:{
type:[Array,Object],
default:()=>{}
},
type:{
type:[Number,String],
default:'0'
}
},
mounted(){
},
methods: {
onOk(){
console.log('this',this.itemSelect);
this.$emit('ok',this.itemSelect);
},
onAdd(){
this.$emit('add');
},
onClose(){
this.$emit('close');
}
}
}
</script>
<style scoped lang="scss">
.select-item{
width:100%;
min-height:942rpx;
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:88rpx;
display: flex;
}
.item-mid-view-two{
width:100%;
height:742rpx;
min-height:742rpx;
display: flex;
flex-direction: column;
align-items: center;
.no-data-black{
width:120rpx;
height:120rpx;
margin-top:120rpx;
}
.add-btn{
width:248rpx;
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;
}
}
}
.item-mid-view{
width:100%;
height:742rpx;
min-height:742rpx;
display: flex;
flex-direction: column;
align-items: center;
overflow-y: auto;
.item-mid-list{
display: flex;
flex-direction: row;
align-items: center;
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: 0 24rpx;
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>
@@ -1,212 +1,212 @@
<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">
<image src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/new/alpha.png" style="min-width:88rpx;heihgt:88rpx;"></image>
<view class="item-mid-li">
<text class="text-28 text-fu">{{item.account}}</text>
</view>
</view>
</view>
<view class="item-mid-view-two" @click="onAdd" v-if="!data.length">
<image src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/new/no_black_data.png" class="no-data-black"></image>
<text class="text-28 text-fu mt-48">{{`请先绑定一个ALPHACEX账户,用于收款`}}</text>
<view class="add-btn mt-48">
<image src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/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 class="item-bottom-btn" v-if="data.length">
<MyBtn @ok="onOk" text="确定"></MyBtn>
</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 },
props:{
itemShow:{
type:Boolean,
default:false
},
itemData:{
type:Array,
default:[]
},
type:{
type:[Number,String],
default:'0'
}
},
computed:{
data(){
let tmp = [];
if(this.itemData && this.itemData.length){
this.itemData.forEach(item=>{
console.log('item',item)
item.addressOne = func.addressTurn(item.account,6);
})
tmp = this.itemData;
}
return tmp || [];
}
},
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: 8rpx;
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:88rpx;
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;
}
.add-btn{
width:248rpx;
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;
}
}
}
.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: row;
justify-content: center;
width:98%;
height:152rpx;
min-height:152rpx;
border-radius: 8rpx;
margin-top:24rpx;
background: #FFFFFF;
border: 1px solid #E3E3E3;
padding: 32rpx;
box-sizing: border-box;
position: relative;
.item-mid-li{
flex:1;
display: flex;
flex-direction: column;
justify-content: center;
height:88rpx;
margin-left:24rpx;
}
.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;
}
}
<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">
<image src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/new/alpha.png" style="min-width:88rpx;heihgt:88rpx;"></image>
<view class="item-mid-li">
<text class="text-28 text-fu">{{item.account}}</text>
</view>
</view>
</view>
<view class="item-mid-view-two" @click="onAdd" v-if="!data.length">
<image src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/new/no_black_data.png" class="no-data-black"></image>
<text class="text-28 text-fu mt-48">{{`请先绑定一个ALPHACEX账户,用于收款`}}</text>
<view class="add-btn mt-48">
<image src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/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 class="item-bottom-btn" v-if="data.length">
<MyBtn @ok="onOk" text="确定"></MyBtn>
</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 },
props:{
itemShow:{
type:Boolean,
default:false
},
itemData:{
type:Array,
default:[]
},
type:{
type:[Number,String],
default:'0'
}
},
computed:{
data(){
let tmp = [];
if(this.itemData && this.itemData.length){
this.itemData.forEach(item=>{
console.log('item',item)
item.addressOne = func.addressTurn(item.account,6);
})
tmp = this.itemData;
}
return tmp || [];
}
},
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: 8rpx;
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:88rpx;
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;
}
.add-btn{
width:248rpx;
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;
}
}
}
.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: row;
justify-content: center;
width:98%;
height:152rpx;
min-height:152rpx;
border-radius: 8rpx;
margin-top:24rpx;
background: #FFFFFF;
border: 1px solid #E3E3E3;
padding: 32rpx;
box-sizing: border-box;
position: relative;
.item-mid-li{
flex:1;
display: flex;
flex-direction: column;
justify-content: center;
height:88rpx;
margin-left:24rpx;
}
.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>
@@ -1,212 +1,212 @@
<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">
<image src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/new/no_black_data.png" style="min-width:88rpx;heihgt:88rpx;"></image>
<view class="item-mid-li">
<text class="text-32 text-zu1">BNB Smart Chain(BEP20)</text>
<text class="text-28 text-fu">{{item.addressOne}}</text>
</view>
</view>
</view>
<view class="item-mid-view-two" @click="onAdd" v-if="!data.length">
<image src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/new/no_black_data.png" class="no-data-black"></image>
<text class="text-28 text-fu mt-48">{{`请先绑定一个区块链账户,用于收款`}}</text>
<view class="add-btn mt-48">
<image src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/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 class="item-bottom-btn" v-if="data.length">
<MyBtn @ok="onOk" text="确定"></MyBtn>
</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 },
props:{
itemShow:{
type:Boolean,
default:false
},
itemData:{
type:Array,
default:[]
},
type:{
type:[Number,String],
default:'0'
}
},
computed:{
data(){
let tmp = [];
if(this.itemData && this.itemData.length){
this.itemData.forEach(item=>{
console.log('item',item)
item.addressOne = func.addressTurn(item.account,6);
})
tmp = this.itemData;
}
return tmp || [];
}
},
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: 8rpx;
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:88rpx;
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;
}
.add-btn{
width:248rpx;
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;
}
}
}
.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: row;
width:98%;
height:152rpx;
min-height:152rpx;
border-radius: 8rpx;
margin-top:24rpx;
background: #FFFFFF;
border: 1px solid #E3E3E3;
padding: 32rpx;
box-sizing: border-box;
position: relative;
.item-mid-li{
margin-left:24rpx;
flex:1;
display: flex;
flex-direction: column;
justify-content: space-between;
height:88rpx;
}
.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;
}
}
<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">
<image src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/new/no_black_data.png" style="min-width:88rpx;heihgt:88rpx;"></image>
<view class="item-mid-li">
<text class="text-32 text-zu1">BNB Smart Chain(BEP20)</text>
<text class="text-28 text-fu">{{item.addressOne}}</text>
</view>
</view>
</view>
<view class="item-mid-view-two" @click="onAdd" v-if="!data.length">
<image src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/new/no_black_data.png" class="no-data-black"></image>
<text class="text-28 text-fu mt-48">{{`请先绑定一个区块链账户,用于收款`}}</text>
<view class="add-btn mt-48">
<image src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/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 class="item-bottom-btn" v-if="data.length">
<MyBtn @ok="onOk" text="确定"></MyBtn>
</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 },
props:{
itemShow:{
type:Boolean,
default:false
},
itemData:{
type:Array,
default:[]
},
type:{
type:[Number,String],
default:'0'
}
},
computed:{
data(){
let tmp = [];
if(this.itemData && this.itemData.length){
this.itemData.forEach(item=>{
console.log('item',item)
item.addressOne = func.addressTurn(item.account,6);
})
tmp = this.itemData;
}
return tmp || [];
}
},
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: 8rpx;
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:88rpx;
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;
}
.add-btn{
width:248rpx;
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;
}
}
}
.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: row;
width:98%;
height:152rpx;
min-height:152rpx;
border-radius: 8rpx;
margin-top:24rpx;
background: #FFFFFF;
border: 1px solid #E3E3E3;
padding: 32rpx;
box-sizing: border-box;
position: relative;
.item-mid-li{
margin-left:24rpx;
flex:1;
display: flex;
flex-direction: column;
justify-content: space-between;
height:88rpx;
}
.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>
+109 -109
View File
@@ -1,110 +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="https://cex-pub.s3.ap-southeast-1.amazonaws.com/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="https://cex-pub.s3.ap-southeast-1.amazonaws.com/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;
}
}
<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="https://cex-pub.s3.ap-southeast-1.amazonaws.com/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="https://cex-pub.s3.ap-southeast-1.amazonaws.com/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>
+237 -237
View File
@@ -1,237 +1,237 @@
<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="tab-view">
<view class="tab-list" v-for="(item,index) in tabList" :key="index" @click="onTab(index)" >
<text class="text-fu text-28" v-if="index != 1" :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" v-if="type == 2 || type == 3" :itemData="item" @ok="onItemOk" v-for="(item,index) in dataList" :key="index"></AccountItem>
<AccountItemTwo v-if="type == 0 || type == 1" :dataItem="item" @jie="onJie"
v-for="(item,index) in dataList" :key="index"></AccountItemTwo>
</view>
</view>
<view class="bottom-btn">
<MyBtn :text="bottomText" @ok="onJump"></MyBtn>
</view>
<up-toast ref="uToastRef"></up-toast>
</view>
</template>
<script>
import { getExchUsers,unbindExchUsers } from '@/api/finance.js';
import { getWithdraw,unbindWithdraw } 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'
import AccountItemTwo from './components/account-item-two.vue'
export default {
components: { Header, TopSafe,MyBtn,AccountItem,AccountItemTwo },
data() {
return {
type:0,
tabList:['区块链账户','Alpha账户','支付宝账户','微信账户'],
bottomText:'',
dataList:[]
};
},
onLoad(option){
if(option.id){
if(option.id == '3'){
this.type = 0;
this.bottomText = '添加区块链账户';
}else if(option.id == '4'){
this.type = 1;
this.bottomText = '添加Alpha账户';
}else if(option.id == '1'){
this.type = 2;
this.bottomText = '添加支付宝账户';
}else{
this.type = 3;
this.bottomText = '添加微信账户';
}
}
},
onShow() {
this.init();
// this.userinfo();
},
methods: {
init() {
if(this.type == 0){
this.bottomText = '添加区块链账户';
}else if(this.type == 1){
this.bottomText = '添加Alpha账户';
}else if(this.type == 2){
this.bottomText = '添加支付宝账户';
}else{
this.bottomText = '添加微信账户';
}
// this.userinfo()
// #ifdef WEB
this.tabList = ['区块链账户','Alpha账户','支付宝账户'];
// #endif
this.getList();
},
onJie(item){
let params = {
accountId:item.id
}
unbindExchUsers(params).then(resp=>{
if (resp && resp.bizcode === 100) {
this.$refs.uToastRef.show({
type: 'success',
message: '解绑成功',
});
this.init();
}
})
},
onItemOk(item){
let params = {
bindId:item.id
}
unbindWithdraw(params).then(res=>{
if (res.bizcode === 100) {
this.$refs.uToastRef.show({
type: 'success',
message:'解绑成功',
});
this.init();
} else {
this.$refs.uToastRef.show({
type: 'error',
message: res.msg,
});
return null;
}
})
},
getList(){
if(this.type == 0 || this.type == 1){
let params = {
name:this.type == 0 ? 'WALLET' : 'ALPHACEX'
}
getExchUsers(params).then(res=>{
if (res.bizcode === 100) {
this.dataList = res.data.entitys ? res.data.entitys : [];
} else {
this.$refs.uToastRef.show({
type: 'error',
message: res.msg,
});
return null;
}
})
}else{
getWithdraw({platform:this.type == 2?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.dataList = [];
this.type = index;
this.init();
}
},
onJump(){
console.log('his.typ',this.type)
if(this.type == 0){
uni.navigateTo({
url:`/pages/rwa_package/account/shuAdd`
})
}else if(this.type == 1){
uni.navigateTo({
url: '/pages/rwa_package/rwa_binding/rwa_binding',
})
}else{
uni.navigateTo({
url:`/pages/rwa_package/account/bind?type=${this.type == 2?0:1}`
})
}
}
}
}
</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%;
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;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
.tab-line{
width:50rpx;
height:4rpx;
min-height:4rpx;
background-color: #7934F6;
}
}
}
}
</style>
<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="tab-view">
<view class="tab-list" v-for="(item,index) in tabList" :key="index" @click="onTab(index)" >
<text class="text-fu text-28" v-if="index != 1" :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" v-if="type == 2 || type == 3" :itemData="item" @ok="onItemOk" v-for="(item,index) in dataList" :key="index"></AccountItem>
<AccountItemTwo v-if="type == 0 || type == 1" :dataItem="item" @jie="onJie"
v-for="(item,index) in dataList" :key="index"></AccountItemTwo>
</view>
</view>
<view class="bottom-btn">
<MyBtn :text="bottomText" @ok="onJump"></MyBtn>
</view>
<up-toast ref="uToastRef"></up-toast>
</view>
</template>
<script>
import { getExchUsers,unbindExchUsers } from '@/api/finance.js';
import { getWithdraw,unbindWithdraw } 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'
import AccountItemTwo from './components/account-item-two.vue'
export default {
components: { Header, TopSafe,MyBtn,AccountItem,AccountItemTwo },
data() {
return {
type:0,
tabList:['区块链账户','Alpha账户','支付宝账户','微信账户'],
bottomText:'',
dataList:[]
};
},
onLoad(option){
if(option.id){
if(option.id == '3'){
this.type = 0;
this.bottomText = '添加区块链账户';
}else if(option.id == '4'){
this.type = 1;
this.bottomText = '添加Alpha账户';
}else if(option.id == '1'){
this.type = 2;
this.bottomText = '添加支付宝账户';
}else{
this.type = 3;
this.bottomText = '添加微信账户';
}
}
},
onShow() {
this.init();
// this.userinfo();
},
methods: {
init() {
if(this.type == 0){
this.bottomText = '添加区块链账户';
}else if(this.type == 1){
this.bottomText = '添加Alpha账户';
}else if(this.type == 2){
this.bottomText = '添加支付宝账户';
}else{
this.bottomText = '添加微信账户';
}
// this.userinfo()
// #ifdef WEB
this.tabList = ['区块链账户','Alpha账户','支付宝账户'];
// #endif
this.getList();
},
onJie(item){
let params = {
accountId:item.id
}
unbindExchUsers(params).then(resp=>{
if (resp && resp.bizcode === 100) {
this.$refs.uToastRef.show({
type: 'success',
message: '解绑成功',
});
this.init();
}
})
},
onItemOk(item){
let params = {
bindId:item.id
}
unbindWithdraw(params).then(res=>{
if (res.bizcode === 100) {
this.$refs.uToastRef.show({
type: 'success',
message:'解绑成功',
});
this.init();
} else {
this.$refs.uToastRef.show({
type: 'error',
message: res.msg,
});
return null;
}
})
},
getList(){
if(this.type == 0 || this.type == 1){
let params = {
name:this.type == 0 ? 'WALLET' : 'ALPHACEX'
}
getExchUsers(params).then(res=>{
if (res.bizcode === 100) {
this.dataList = res.data.entitys ? res.data.entitys : [];
} else {
this.$refs.uToastRef.show({
type: 'error',
message: res.msg,
});
return null;
}
})
}else{
getWithdraw({platform:this.type == 2?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.dataList = [];
this.type = index;
this.init();
}
},
onJump(){
console.log('his.typ',this.type)
if(this.type == 0){
uni.navigateTo({
url:`/pages/rwa_package/account/shuAdd`
})
}else if(this.type == 1){
uni.navigateTo({
url: '/pages/rwa_package/rwa_binding/rwa_binding',
})
}else{
uni.navigateTo({
url:`/pages/rwa_package/account/bind?type=${this.type == 2?0:1}`
})
}
}
}
}
</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%;
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;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
.tab-line{
width:50rpx;
height:4rpx;
min-height:4rpx;
background-color: #7934F6;
}
}
}
}
</style>
+368 -368
View File
@@ -1,368 +1,368 @@
<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>
<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>
+154 -154
View File
@@ -1,154 +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>
<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>
+94 -94
View File
@@ -1,94 +1,94 @@
<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.navigateBack()
}
}
}
</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>
<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.navigateBack()
}
}
}
</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>
+94 -94
View File
@@ -1,94 +1,94 @@
<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}}</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.navigateBack()
}
}
}
</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>
<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}}</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.navigateBack()
}
}
}
</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>
+492 -492
View File
@@ -1,492 +1,492 @@
<template>
<view class="content">
<TopSafe bgColor="rgba(0,0,0,0)"></TopSafe>
<Header :title="topText" bgColor="rgba(0,0,0,0)" />
<view class="setting-view">
<view class="top-view">
<view class="top-left">
<text class="text-bold text-52 text-white">
{{amount}}
</text>
<text class="text-20 text-white" style="font-weight: 100;">可用余额</text>
</view>
<view class="top-right">
<text class="text-bold text-36 text-white">
{{noAmount}}
</text>
<text class="text-20 text-white" style="font-weight: 100;">不可用余额</text>
</view>
</view>
<view class="mid-view">
<text class="text-zu1 text-32">{{type == 0 ? '提现' : '充值'}}方式</text>
<view class="item-view" @click="onSelect('0')" v-if="!isWeb || type != 0">
<image src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/new/wx.png"></image>
<text class="text-zu1 text-32 " style="margin-left:20rpx;">微信</text>
<view class="right-icon-view" v-if="type == 1">
<u-radio-group v-model="curSelect">
<u-radio name="0" activeColor="#7934F6"></u-radio>
</u-radio-group>
</view>
<view class="right-icon-view" v-else>
<text class="text-32 text-zu1" style="margin-right:12rpx" v-if="selectVal && curSelect == '0'">{{selectVal.name + '/' + selectVal.account}}</text>
<u-icon size="14" name="arrow-right" color="#333" ></u-icon>
</view>
</view>
<view class="item-view" @click="onSelect('1')" style="border-width: 0;" >
<image src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/new/zfb.png"></image>
<text class="text-zu1 text-32 " style="margin-left:20rpx;">支付宝</text>
<view class="right-icon-view" v-if="type == 1">
<u-radio-group v-model="curSelect">
<u-radio name="1" activeColor="#7934F6"></u-radio>
</u-radio-group>
</view>
<view class="right-icon-view" v-else>
<text class="text-32 text-zu1" style="margin-right:12rpx" v-if="selectVal && curSelect == '1'">{{selectVal.name + '/' + selectVal.account}}</text>
<u-icon size="14" name="arrow-right" color="#333" ></u-icon>
</view>
</view>
</view>
<view class="mid-view">
<view class="flex-r-lr">
<text class="text-zu1 text-32">{{type == 0 ? '提现' : '充值'}}金额</text>
<text class="text-fu1 text-28" v-if="type == 0" style="font-weight:400">每日仅限提现1次</text>
</view>
<view class="input-view">
<text class="text-52 text-zu text-bold">¥</text>
<input style="background: #fff;margin-top:10rpx;"
:placeholder="type == 0 ? '请输入提现金额(0.3-2000)' : '输入充值金额'"
placeholder-style="color:#999;font-weight:400"
@input="onInput"
border="0" v-model="money" :customStyle="inputCss"></input>
</view>
</view>
<view class="zhu-view" v-if="selectVal">
<u-icon size="12" style="margin-top:5rpx;margin-right:12rpx" name="error-circle" color="#7934F6"></u-icon>
<text class="text-24 text-zi" style="font-weight: 400;">通过支付宝或微信提现时,将由支付宝/微信官方收取0.6%的费用,本平台不收取任何费用。</text>
</view>
</view>
<view class="bottom-btn">
<MyBtn :text="bottomText" @ok="onAdd"></MyBtn>
</view>
<SelectItem :itemData="dataList" @close="onClose" @ok="onOk" @add="onAddBack"
:type="curSelect" :itemShow="selectShow"></SelectItem>
<CodeItem @ti="onTi" @close="onClose" :codeShow="codeShow" :phone="userInfo ? userInfo.mobile :''"></CodeItem>
<up-toast ref="uToastRef"></up-toast>
</view>
</template>
<script>
import { getWithdraw,sendWithdraw } from '@/api/common.js';
import { getUserInfo,updateName,deleteAccount } from '@/api/auth.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 SelectItem from './components/select-item.vue'
import CodeItem from './components/code-item.vue'
import {uniPlatform} from '@/components/common/global.js'
import { getRechargeSupportPay, recharge,getAcctBalance } from '@/api/finance.js';
import { feedback } from '@/api/payment.js';
import { appWxpayFun, zfbPayFun } from '@/utils/payUtils.js'
export default {
components: { Header, TopSafe,MyBtn,SelectItem,CodeItem },
data() {
return {
isWeb:false,
topText:'',
type:0,
amount:'',
money:'',
noAmount:'',
account:'',
bottomText:'',
curSelect:'0',
selectShow:false,
codeShow:false,
name:'',
inputCss: {
"height": '80rpx',
"background": "#F3F3F3FF",
"border-radius": "30rpx",
"border": "0rpx",
"padding-left": "12rpx",
},
dataList:[
],
selectVal:null,
userInfo:null,
};
},
onShow(){
if(uniPlatform == 'web'){
this.isWeb = true;
}else{
this.isWeb = false;
}
},
onLoad(option) {
if(option && option.type){
this.type = Number(option.type);
this.init();
}
},
methods: {
userinfo() {
getUserInfo().then(res => {
if (res.bizcode == 100) {
this.userInfo = res.data;
}
})
},
onInput(e){
this.$nextTick(() => {
this.money = func.checkInputPrice(e.detail.value);
})
},
onOk(val){
this.selectVal = this.dataList.filter(i=>i.id == val)[0];
this.onClose();
},
onAddBack(){
this.onClose();
uni.navigateTo({
url:'/pages/rwa_package/account/index?id=' + this.curSelect
})
},
onClose(){
this.selectShow = false;
this.codeShow = false;
},
getList(val){
let params = {
platform:this.curSelect == '0' ? 2 : 1
}
getWithdraw(params).then(res=>{
if (res.bizcode === 100) {
this.dataList = res.data;
this.dataList.forEach(item=>{
item.name = item.accountName;
item.account = item.accountNumber;
})
this.selectShow = true;
} else {
this.$refs.uToastRef.show({
type: 'error',
message: res.msg,
});
return null;
}
})
},
onSelect(val){
this.curSelect = val;
if(this.type == 0){
this.selectVal = null;
this.getList();
}
},
async getAcctBalance() {
this.balanceLoading = true;
const resp = await getAcctBalance();
let data = [];
if (resp && resp.bizcode === 100) {
data = resp.data || [];
data.forEach(item=>{
if("balance" == item.categoty){
this.noAmount = item.lockAmount;
this.amount = item.curAmount;
}
})
}
this.balanceList = data;
this.balanceLoading = false;
},
init() {
if(this.type == 0 ){
this.topText = '现金余额提现';
this.bottomText = '提现';
}else if(this.type == 1){
this.topText = '现金余额充值';
this.bottomText = '充值';
}
this.userinfo();
this.getAcctBalance();
},
onAdd(){
if(this.type == 0){
if(!this.money){
this.$refs.uToastRef.show({
type: "error",
message: "请输入金额",
});
return;
}
if(Number(this.money) < 0.3){
this.$refs.uToastRef.show({
type: "error",
message: "提现金额不能低于0.3元",
});
return;
}
if(Number(this.money) > 2000){
this.$refs.uToastRef.show({
type: "error",
message: "提现金额不能大于2000元",
});
return;
}
if(Number(this.money)> Number(this.amount)){
this.$refs.uToastRef.show({
type: "error",
message: "输入金额大于可用余额",
});
return;
}
if(this.type == 0 && !this.selectVal){
this.$refs.uToastRef.show({
type: "error",
message: "请选择提现方式",
});
return;
}
console.log('onAdd',this.curSelect)
this.codeShow = true;
}else{
if(!this.money){
this.$refs.uToastRef.show({
type: "error",
message: "请输入金额",
});
return;
}
let params = {
amount:this.money,
category:'balance',
payway:this.curSelect == '0' ? 'wechat' : 'alipay'
}
recharge(params).then(result=>{
if (result && result.bizcode === 100) {
const item = result.data;
if (item.wechat && Object.keys(item.wechat).length !== 0) {
this.appWxpay(item.wechat, item.orderId, item.orderNum);
} else if (item.alipay && Object.keys(item.alipay).length !== 0 && item.alipay) {
this.zfbPay(item.alipay, item.orderId, item.orderNum);
} else {
this.$refs.uToastRef.show({
type: 'error',
message: "充值失败",
});
}
}
})
}
},
async appWxpay(alipay, orderId, orderNum) {
try {
const result = await appWxpayFun(alipay, orderId, orderNum);
console.log('支付成功', result);
// 处理支付成功后的逻辑,如更新订单状态等
} catch (error) {
console.error('支付失败', error);
// 处理支付失败后的逻辑,如提示用户等
}
},
// 支付宝支付
async zfbPay(alipay, orderId, orderNum) {
try {
const result = await zfbPayFun(alipay, orderId, orderNum);
console.log('支付成功', result);
// 处理支付成功后的逻辑,如更新订单状态等
} catch (error) {
console.error('支付失败', error);
// 处理支付失败后的逻辑,如提示用户等
}
},
onTi(code){
let params = {
verificationCode:code,
bindId:this.selectVal.id,
amount:Number(this.money),
accountType:this.curSelect == '0' ? 1 : 2
}
let _this = this;
sendWithdraw(params).then(res=>{
console.log('absc',res)
if (res && res.bizcode == 100) {
console.log('absc1111111111',res,this.curSelect)
// data = resp.data || [];
if(this.curSelect == '1'){
this.qing();
if(res.data.alResponse.msg == 'Success'){
uni.navigateTo({
url:'/pages/rwa_package/account/success?money=' + params.amount
})
}else{
setTimeout(()=>{
_this.$refs.uToastRef.show({
type: 'error',
message: res.data.alResponse.subMsg,
});
},400)
}
}else{
uni.requestMerchantTransfer({
"mchId": "1725999656",
"appId": "wx7a5902cd556d9396",
"package": res.data.wxResponse.packageInfo,
success: (res) => {
this.qing();
uni.navigateTo({
url:'/pages/rwa_package/account/success?money=' + params.amount
})
},
fail: (res) => {
_this.$refs.uToastRef.show({
type: 'error',
message: '提现失败',
});
},
})
}
}
})
},
qing(){
this.money = '';
this.curSelect = '0';
this.selectVal = null;
this.onClose();
}
}
}
</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;
.top-view{
width:100%;
margin-top:40rpx;
height:188rpx;
min-height:188rpx;
display: flex;
background:linear-gradient( 270deg, #B164FB 0%, #7934F6 100%);
padding: 36rpx 32rpx;
box-sizing: border-box;
flex-direction: row;
justify-content: space-between;
align-items: center;
border-radius: 16rpx;
.top-left{
display: flex;
flex-direction: column;
justify-content: space-between;
height:108rpx;
}
.top-right{
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: flex-end;
height:108rpx;
}
}
.zhu-view{
width:100%;
display: flex;
margin-top:32rpx;
flex-direction: row;
justify-content: flex-start;
align-items: flex-start;
padding: 16rpx;
box-sizing: border-box;
background: rgba(121, 52, 246, 0.05);
border-radius:8rpx ;
}
.mid-view{
width:100%;
display: flex;
flex-direction: column;
overflow-y: auto;
box-sizing: border-box;
background-color: #fff;
border-radius: 16rpx;
padding: 32rpx;
padding-bottom:0 ;
margin-top:24rpx;
.item-view{
width:100%;
height:110rpx;
min-height:110rpx;
display: flex;
flex-direction: row;
position: relative;
align-items: center;
border-bottom: 2rpx solid #ececec;
.right-icon-view{
position: absolute;
right:0;
display: flex;
}
image{
width:48rpx;
height:48rpx;
}
}
.input-view{
width:100%;
height:100rpx;
border-radius: 20rpx;
margin:32rpx 0 ;
display: flex;
flex-direction: row;
align-items: center;
}
}
}
</style>
<template>
<view class="content">
<TopSafe bgColor="rgba(0,0,0,0)"></TopSafe>
<Header :title="topText" bgColor="rgba(0,0,0,0)" />
<view class="setting-view">
<view class="top-view">
<view class="top-left">
<text class="text-bold text-52 text-white">
{{amount}}
</text>
<text class="text-20 text-white" style="font-weight: 100;">可用余额</text>
</view>
<view class="top-right">
<text class="text-bold text-36 text-white">
{{noAmount}}
</text>
<text class="text-20 text-white" style="font-weight: 100;">不可用余额</text>
</view>
</view>
<view class="mid-view">
<text class="text-zu1 text-32">{{type == 0 ? '提现' : '充值'}}方式</text>
<view class="item-view" @click="onSelect('0')" v-if="!isWeb || type != 0">
<image src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/new/wx.png"></image>
<text class="text-zu1 text-32 " style="margin-left:20rpx;">微信</text>
<view class="right-icon-view" v-if="type == 1">
<u-radio-group v-model="curSelect">
<u-radio name="0" activeColor="#7934F6"></u-radio>
</u-radio-group>
</view>
<view class="right-icon-view" v-else>
<text class="text-32 text-zu1" style="margin-right:12rpx" v-if="selectVal && curSelect == '0'">{{selectVal.name + '/' + selectVal.account}}</text>
<u-icon size="14" name="arrow-right" color="#333" ></u-icon>
</view>
</view>
<view class="item-view" @click="onSelect('1')" style="border-width: 0;" >
<image src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/new/zfb.png"></image>
<text class="text-zu1 text-32 " style="margin-left:20rpx;">支付宝</text>
<view class="right-icon-view" v-if="type == 1">
<u-radio-group v-model="curSelect">
<u-radio name="1" activeColor="#7934F6"></u-radio>
</u-radio-group>
</view>
<view class="right-icon-view" v-else>
<text class="text-32 text-zu1" style="margin-right:12rpx" v-if="selectVal && curSelect == '1'">{{selectVal.name + '/' + selectVal.account}}</text>
<u-icon size="14" name="arrow-right" color="#333" ></u-icon>
</view>
</view>
</view>
<view class="mid-view">
<view class="flex-r-lr">
<text class="text-zu1 text-32">{{type == 0 ? '提现' : '充值'}}金额</text>
<text class="text-fu1 text-28" v-if="type == 0" style="font-weight:400">每日仅限提现1次</text>
</view>
<view class="input-view">
<text class="text-52 text-zu text-bold">¥</text>
<input style="background: #fff;margin-top:10rpx;"
:placeholder="type == 0 ? '请输入提现金额(0.3-2000)' : '输入充值金额'"
placeholder-style="color:#999;font-weight:400"
@input="onInput"
border="0" v-model="money" :customStyle="inputCss"></input>
</view>
</view>
<view class="zhu-view" v-if="selectVal">
<u-icon size="12" style="margin-top:5rpx;margin-right:12rpx" name="error-circle" color="#7934F6"></u-icon>
<text class="text-24 text-zi" style="font-weight: 400;">通过支付宝或微信提现时,将由支付宝/微信官方收取0.6%的费用,本平台不收取任何费用。</text>
</view>
</view>
<view class="bottom-btn">
<MyBtn :text="bottomText" @ok="onAdd"></MyBtn>
</view>
<SelectItem :itemData="dataList" @close="onClose" @ok="onOk" @add="onAddBack"
:type="curSelect" :itemShow="selectShow"></SelectItem>
<CodeItem @ti="onTi" @close="onClose" :codeShow="codeShow" :phone="userInfo ? userInfo.mobile :''"></CodeItem>
<up-toast ref="uToastRef"></up-toast>
</view>
</template>
<script>
import { getWithdraw,sendWithdraw } from '@/api/common.js';
import { getUserInfo,updateName,deleteAccount } from '@/api/auth.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 SelectItem from './components/select-item.vue'
import CodeItem from './components/code-item.vue'
import {uniPlatform} from '@/components/common/global.js'
import { getRechargeSupportPay, recharge,getAcctBalance } from '@/api/finance.js';
import { feedback } from '@/api/payment.js';
import { appWxpayFun, zfbPayFun } from '@/utils/payUtils.js'
export default {
components: { Header, TopSafe,MyBtn,SelectItem,CodeItem },
data() {
return {
isWeb:false,
topText:'',
type:0,
amount:'',
money:'',
noAmount:'',
account:'',
bottomText:'',
curSelect:'0',
selectShow:false,
codeShow:false,
name:'',
inputCss: {
"height": '80rpx',
"background": "#F3F3F3FF",
"border-radius": "30rpx",
"border": "0rpx",
"padding-left": "12rpx",
},
dataList:[
],
selectVal:null,
userInfo:null,
};
},
onShow(){
if(uniPlatform == 'web'){
this.isWeb = true;
}else{
this.isWeb = false;
}
},
onLoad(option) {
if(option && option.type){
this.type = Number(option.type);
this.init();
}
},
methods: {
userinfo() {
getUserInfo().then(res => {
if (res.bizcode == 100) {
this.userInfo = res.data;
}
})
},
onInput(e){
this.$nextTick(() => {
this.money = func.checkInputPrice(e.detail.value);
})
},
onOk(val){
this.selectVal = this.dataList.filter(i=>i.id == val)[0];
this.onClose();
},
onAddBack(){
this.onClose();
uni.navigateTo({
url:'/pages/rwa_package/account/index?id=' + this.curSelect
})
},
onClose(){
this.selectShow = false;
this.codeShow = false;
},
getList(val){
let params = {
platform:this.curSelect == '0' ? 2 : 1
}
getWithdraw(params).then(res=>{
if (res.bizcode === 100) {
this.dataList = res.data;
this.dataList.forEach(item=>{
item.name = item.accountName;
item.account = item.accountNumber;
})
this.selectShow = true;
} else {
this.$refs.uToastRef.show({
type: 'error',
message: res.msg,
});
return null;
}
})
},
onSelect(val){
this.curSelect = val;
if(this.type == 0){
this.selectVal = null;
this.getList();
}
},
async getAcctBalance() {
this.balanceLoading = true;
const resp = await getAcctBalance();
let data = [];
if (resp && resp.bizcode === 100) {
data = resp.data || [];
data.forEach(item=>{
if("balance" == item.categoty){
this.noAmount = item.lockAmount;
this.amount = item.curAmount;
}
})
}
this.balanceList = data;
this.balanceLoading = false;
},
init() {
if(this.type == 0 ){
this.topText = '现金余额提现';
this.bottomText = '提现';
}else if(this.type == 1){
this.topText = '现金余额充值';
this.bottomText = '充值';
}
this.userinfo();
this.getAcctBalance();
},
onAdd(){
if(this.type == 0){
if(!this.money){
this.$refs.uToastRef.show({
type: "error",
message: "请输入金额",
});
return;
}
if(Number(this.money) < 0.3){
this.$refs.uToastRef.show({
type: "error",
message: "提现金额不能低于0.3元",
});
return;
}
if(Number(this.money) > 2000){
this.$refs.uToastRef.show({
type: "error",
message: "提现金额不能大于2000元",
});
return;
}
if(Number(this.money)> Number(this.amount)){
this.$refs.uToastRef.show({
type: "error",
message: "输入金额大于可用余额",
});
return;
}
if(this.type == 0 && !this.selectVal){
this.$refs.uToastRef.show({
type: "error",
message: "请选择提现方式",
});
return;
}
console.log('onAdd',this.curSelect)
this.codeShow = true;
}else{
if(!this.money){
this.$refs.uToastRef.show({
type: "error",
message: "请输入金额",
});
return;
}
let params = {
amount:this.money,
category:'balance',
payway:this.curSelect == '0' ? 'wechat' : 'alipay'
}
recharge(params).then(result=>{
if (result && result.bizcode === 100) {
const item = result.data;
if (item.wechat && Object.keys(item.wechat).length !== 0) {
this.appWxpay(item.wechat, item.orderId, item.orderNum);
} else if (item.alipay && Object.keys(item.alipay).length !== 0 && item.alipay) {
this.zfbPay(item.alipay, item.orderId, item.orderNum);
} else {
this.$refs.uToastRef.show({
type: 'error',
message: "充值失败",
});
}
}
})
}
},
async appWxpay(alipay, orderId, orderNum) {
try {
const result = await appWxpayFun(alipay, orderId, orderNum);
console.log('支付成功', result);
// 处理支付成功后的逻辑,如更新订单状态等
} catch (error) {
console.error('支付失败', error);
// 处理支付失败后的逻辑,如提示用户等
}
},
// 支付宝支付
async zfbPay(alipay, orderId, orderNum) {
try {
const result = await zfbPayFun(alipay, orderId, orderNum);
console.log('支付成功', result);
// 处理支付成功后的逻辑,如更新订单状态等
} catch (error) {
console.error('支付失败', error);
// 处理支付失败后的逻辑,如提示用户等
}
},
onTi(code){
let params = {
verificationCode:code,
bindId:this.selectVal.id,
amount:Number(this.money),
accountType:this.curSelect == '0' ? 1 : 2
}
let _this = this;
sendWithdraw(params).then(res=>{
console.log('absc',res)
if (res && res.bizcode == 100) {
console.log('absc1111111111',res,this.curSelect)
// data = resp.data || [];
if(this.curSelect == '1'){
this.qing();
if(res.data.alResponse.msg == 'Success'){
uni.navigateTo({
url:'/pages/rwa_package/account/success?money=' + params.amount
})
}else{
setTimeout(()=>{
_this.$refs.uToastRef.show({
type: 'error',
message: res.data.alResponse.subMsg,
});
},400)
}
}else{
uni.requestMerchantTransfer({
"mchId": "1725999656",
"appId": "wx7a5902cd556d9396",
"package": res.data.wxResponse.packageInfo,
success: (res) => {
this.qing();
uni.navigateTo({
url:'/pages/rwa_package/account/success?money=' + params.amount
})
},
fail: (res) => {
_this.$refs.uToastRef.show({
type: 'error',
message: '提现失败',
});
},
})
}
}
})
},
qing(){
this.money = '';
this.curSelect = '0';
this.selectVal = null;
this.onClose();
}
}
}
</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;
.top-view{
width:100%;
margin-top:40rpx;
height:188rpx;
min-height:188rpx;
display: flex;
background:linear-gradient( 270deg, #B164FB 0%, #7934F6 100%);
padding: 36rpx 32rpx;
box-sizing: border-box;
flex-direction: row;
justify-content: space-between;
align-items: center;
border-radius: 16rpx;
.top-left{
display: flex;
flex-direction: column;
justify-content: space-between;
height:108rpx;
}
.top-right{
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: flex-end;
height:108rpx;
}
}
.zhu-view{
width:100%;
display: flex;
margin-top:32rpx;
flex-direction: row;
justify-content: flex-start;
align-items: flex-start;
padding: 16rpx;
box-sizing: border-box;
background: rgba(121, 52, 246, 0.05);
border-radius:8rpx ;
}
.mid-view{
width:100%;
display: flex;
flex-direction: column;
overflow-y: auto;
box-sizing: border-box;
background-color: #fff;
border-radius: 16rpx;
padding: 32rpx;
padding-bottom:0 ;
margin-top:24rpx;
.item-view{
width:100%;
height:110rpx;
min-height:110rpx;
display: flex;
flex-direction: row;
position: relative;
align-items: center;
border-bottom: 2rpx solid #ececec;
.right-icon-view{
position: absolute;
right:0;
display: flex;
}
image{
width:48rpx;
height:48rpx;
}
}
.input-view{
width:100%;
height:100rpx;
border-radius: 20rpx;
margin:32rpx 0 ;
display: flex;
flex-direction: row;
align-items: center;
}
}
}
</style>