no message

This commit is contained in:
2025-11-11 20:16:15 +08:00
parent ad378f164d
commit 806a074ce7
9 changed files with 1020 additions and 296 deletions
@@ -1,6 +1,6 @@
<template>
<view class="shop-item-view" >
<image :src="type == 0 ? '../../../static/new/zfb.png' : '../../../static/new/wx.png'" ></image>
<image :src="type == 2 ? '../../../static/new/zfb.png' : '../../../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>
@@ -0,0 +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="/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="/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="/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>
@@ -8,21 +8,24 @@
</view>
<view class="item-mid-view" v-if="data.length">
<view class="item-mid-list" @click="onOk(item)" v-for="(item,index) in data" :key="item.id">
<text class="text-32 text-zu1">BNB Smart Chain(BEP20)</text>
<text class="text-28 text-fu">{{item.addressOne}}</text>
<image src="/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="/static/new/no_black_data.png" class="no-data-black"></image>
<text class="text-28 text-fu mt-48">{{`请先添加一个区块链地址`}}</text>
</view>
<view class="item-bottom-btn">
<view class="add-btn" @click="onAdd">
<text class="text-28 text-fu mt-48">{{`请先绑定一个区块链账户,用于收款`}}</text>
<view class="add-btn mt-48">
<image src="/static/new/add.png" style="margin-right:5rpx;"></image>
<text class="text-32 text-zi text-bold" style="margin-left:5rpx;">添加地址</text>
<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>
@@ -110,7 +113,7 @@ import func from '@/utils/func.js';
.item-bottom-btn{
width:100%;
margin-top:24rpx;
min-height:72rpx;
min-height:88rpx;
display: flex;
}
.item-mid-view-two{
@@ -125,7 +128,20 @@ import func from '@/utils/func.js';
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{
@@ -138,8 +154,7 @@ import func from '@/utils/func.js';
overflow-y: auto;
.item-mid-list{
display: flex;
flex-direction: column;
justify-content: space-between;
flex-direction: row;
width:98%;
height:152rpx;
min-height:152rpx;
@@ -150,6 +165,14 @@ import func from '@/utils/func.js';
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;
+169 -26
View File
@@ -1,43 +1,179 @@
<template>
<view class="content">
<TopSafe bgColor="rgba(0,0,0,0)"></TopSafe>
<Header bgColor="rgba(0,0,0,0)" />
<Header title="账户管理" 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 class="tab-view">
<view class="tab-list" v-for="(item,index) in tabList" :key="index" @click="onTab(index)">
<text class="text-fu text-28" :style="{color:type == index ? '#7934F6' :'#666' }">{{item}}</text>
<view class="tab-line" v-if="type == index"></view>
</view>
</view>
<view class="mid-view">
<AccountItem :type="type" 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="好的我知道了" @ok="onAdd"></MyBtn>
<MyBtn :text="bottomText" @ok="onJump"></MyBtn>
</view>
<up-toast ref="uToastRef"></up-toast>
</view>
</template>
<script>
import { bindWithdraw } from '@/api/common.js';
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 },
components: { Header, TopSafe,MyBtn,AccountItem,AccountItemTwo },
data() {
return {
money:''
type:0,
tabList:['区块链账户','Alpha账户','支付宝账户','微信账户'],
bottomText:'',
dataList:[]
};
},
onLoad(option) {
if(option && option.money){
this.money = Number(option.money);
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: {
onAdd(){
uni.navigateBack()
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}`
})
}
}
}
@@ -68,27 +204,34 @@ export default {
position: relative;
.mid-view{
width:100%;
height:calc(100% - 88rpx);
display: flex;
flex-direction: column;
overflow-y: auto;
padding-bottom: 24rpx;
box-sizing: border-box;
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;
}
.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: row;
flex-direction: column;
align-items: center;
justify-content: space-between;
.tab-line{
width:50rpx;
height:4rpx;
min-height:4rpx;
background-color: #7934F6;
}
}
}
}
</style>
+4 -4
View File
@@ -4,7 +4,7 @@
<Header bgColor="#fff" title="兑换区块链数字积分" />
<view class="setting-view">
<text class="text-32 text-fu" style="margin:54rpx 0 32rpx">兑换地址</text>
<view class="input-box" style="">
<view class="input-box">
<input style="flex:1"
placeholder="请输入或选择地址"
placeholder-style="color:#999;font-weight:400;"
@@ -160,7 +160,7 @@ export default {
getExchUsers({name:'WALLET'}).then(res=>{
if (res.bizcode === 100) {
this.addressList = [];
this.addressList = res.data.entitys;
this.addressList = res.data.entitys ? res.data.entitys : [];
} else {
this.$refs.uToastRef.show({
type: 'error',
@@ -218,7 +218,7 @@ export default {
// CryptoJS.MD5(form.password).toString();
exchTransfer(params).then(res=>{
if (res.bizcode === 100) {
uni.redirectTo({
uni.navigateTo({
url:`/pages/rwa_package/account/shuSuccess?money=${this.inputThree}`
})
} else {
@@ -243,7 +243,7 @@ export default {
onAdd(){
this.onClose();
uni.navigateTo({
url:'/pages/rwa_package/account/shuAdd'
url:'/pages/rwa_package/account/index?id=3'
})
},
onAll(){
+1 -3
View File
@@ -37,9 +37,7 @@ export default {
},
methods: {
onAdd(){
uni.redirectTo({
url:`/pages/rwa_package/rwa/rwa`
})
uni.navigateBack()
}
}