feat: 现金加提示

This commit is contained in:
2026-01-15 19:23:35 +08:00
parent 04bd8f2b77
commit 1df1b3708a
2 changed files with 250 additions and 198 deletions
+6 -6
View File
@@ -478,12 +478,12 @@ export default {
url: "https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/mine/tool_cw.png", url: "https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/mine/tool_cw.png",
path: "/pages/rwa_package/dongjian/finance", path: "/pages/rwa_package/dongjian/finance",
}, },
{ // {
id: 11, // id: 11,
title: "股东行权", // title: "股东行权",
url: "https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/mine/tool_gdxq.png", // url: "https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/mine/tool_gdxq.png",
path: "/pages/rwa_package/rwa/rwa", // path: "/pages/rwa_package/rwa/rwa",
}, // },
// { // {
// id:1, // id:1,
// title:"IM聊天", // title:"IM聊天",
+244 -192
View File
@@ -1,231 +1,283 @@
<template> <template>
<view class="purse_warp"> <view class="purse_warp">
<header-component :leftTitle="$t('purse.title')" left-path-type="switchTab" left-path="/pages/mine/mine" /> <header-component
<view class="purse_content_warp"> :leftTitle="$t('purse.title')"
<view v-for="(item,vIndex) in balanceList" :key="item.id" class="purse_warp_item" @click="jumpBonus(item)"> left-path-type="switchTab"
<view class="purse_item_title"> left-path="/pages/mine/mine"
<view class="purse_item_title-left"> />
<up-image :src="`https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/mine-purse/${item.categoty}.png`" <view class="purse_content_warp">
width="22" height="22" bgColor="#f1f6ff00" class="purse_amount"></up-image> <view
<view class="title">{{ item.name }}</view> v-for="(item, vIndex) in balanceList"
<up-image src="/static/common/right_soild.png" width="10" height="10" bgColor="#fff" :key="item.id"
class="right_soild"></up-image> class="purse_warp_item"
</view> @click="jumpBonus(item)"
>
<view class="purse_item_title">
<view class="purse_item_title-left">
<up-image
:src="`https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/mine-purse/${item.categoty}.png`"
width="22"
height="22"
bgColor="#f1f6ff00"
class="purse_amount"
></up-image>
<view class="title">{{ item.name }}</view>
<up-image
src="/static/common/right_soild.png"
width="10"
height="10"
bgColor="#fff"
class="right_soild"
></up-image>
</view>
<view class="purse_item_title-right"> <!-- <view class="purse_item_title-right">
<view class="button exchange_button" @click.stop="jumpInfo(item, 'withdraw')" style="margin-right:24rpx" v-if="vIndex == 4"> <view class="button exchange_button" @click.stop="jumpInfo(item, 'withdraw')" style="margin-right:24rpx" v-if="vIndex == 4">
提现 提现
</view> </view>
<view v-for="(btn, index) in getOperationButtons(item)" :key="index" :type="btn.type" class="button" <view v-for="(btn, index) in getOperationButtons(item)" :key="index" :type="btn.type" class="button"
:class="btn.type + '_button'" @click.stop="jumpInfo(item, btn.type)">{{ btn.text }}</view> :class="btn.type + '_button'" @click.stop="jumpInfo(item, btn.type)">{{ btn.text }}</view>
</view> </view> -->
</view>
</view> <!-- 下 -->
<view class="purse_item_bottom">
<view class="bottom_item">
<view class="bottom_item_amount">{{ item.curAmount || 0 }}</view>
<view class="bottom_item_title">{{
item.categoty === "raffle" ? "可用次数" : "可用余额"
}}</view>
</view>
<!-- 下 --> <view class="bottom_item" @click.stop="onTip(vIndex)">
<view class="purse_item_bottom"> <view class="bottom_item_lock">{{ item.lockAmount || 0 }}</view>
<view class="bottom_item"> <view class="bottom_item_title"
<view class="bottom_item_amount">{{ item.curAmount || 0 }}</view> >{{ item.categoty === "raffle" ? "不可用次数" : "不可用余额" }}
<view class="bottom_item_title">{{ item.categoty === 'raffle' ? '可用次数' : '可用余额' }}</view> <up-image
</view> src="/static/common/tips.png"
width="12"
height="12"
bgColor="#fff"
style="margin-left: 8rpx; margin-top: 4rpx"
v-if="item.categoty == 'balance'"
/></view>
</view>
</view>
<view class="bottom_item "> <view
<view class="bottom_item_lock">{{ item.lockAmount || 0 }}</view> class="bottom_item_tip"
<view class="bottom_item_title">{{ item.categoty === 'raffle' ? '不可用次数' : '不可用余额' }}</view> v-if="item.categoty == 'balance' && activeTip == vIndex"
</view> >抽奖7天后释放到可用余额中</view
>
</view> </view>
</view>
</view>
</view>
</view>
</view>
</template> </template>
<script> <script>
import Header from '@/components/header.vue'; import Header from "@/components/header.vue";
import { getAcctBalance } from '@/api/finance.js'; import { getAcctBalance } from "@/api/finance.js";
import { getValue } from '@/utils/enumUtils.js'; import { getValue } from "@/utils/enumUtils.js";
import { formatDate, handleAmount } from '@/utils/index.js'; import { formatDate, handleAmount } from "@/utils/index.js";
export default { export default {
components: { headerComponent: Header }, components: { headerComponent: Header },
data() { data() {
return { return {
balanceLoading: false, balanceLoading: false,
balanceList: [], balanceList: [],
} activeTip: -1,
}, };
onLoad() { },
this.getAcctBalance(); onLoad() {
}, this.getAcctBalance();
methods: { },
getValue, methods: {
formatDate, getValue,
handleAmount, formatDate,
getOperationButtons(item) { handleAmount,
return [ getOperationButtons(item) {
// { type: 'recharge', text: '充值', show: item.isRecharge }, return [
{ type: 'withdraw', text: '提现', show: item.isWithdrawal }, // { type: 'recharge', text: '充值', show: item.isRecharge },
{ type: 'exchange', text: '兑换', show: item.isExchange } { type: "withdraw", text: "提现", show: item.isWithdrawal },
].filter(btn => btn.show); { type: "exchange", text: "兑换", show: item.isExchange },
}, ].filter((btn) => btn.show);
},
// 跳转到详情 // 跳转到详情
jumpBonus(item) { jumpBonus(item) {
uni.navigateTo({ uni.navigateTo({
url: "/pages/mine_package/mine_purse_log/mine_purse_log?category=" + item.categoty + "&lockId=" + item.lockId + "&curId=" + item.curId + "&preId=" + item.preId, url:
"/pages/mine_package/mine_purse_log/mine_purse_log?category=" +
item.categoty +
"&lockId=" +
item.lockId +
"&curId=" +
item.curId +
"&preId=" +
item.preId,
});
},
// 查询余额
async getAcctBalance() {
this.balanceLoading = true;
const resp = await getAcctBalance();
let data = [];
if (resp && resp.bizcode === 100) {
data = resp.data || [];
}
this.balanceList = data;
this.balanceLoading = false;
},
// 提现
jumpInfo(row, type) {
console.log("row", row);
if (type === "withdraw") {
// 提现
// uni.navigateTo({
// url: "/pages/mine_package/mine_purse_bonus_withdraw/mine_purse_bonus_withdraw?amount=" + row.curAmount + "&category=" + row.categoty,
}) // })
}, uni.navigateTo({
// 查询余额 url: "/pages/rwa_package/account/withdraw?type=0",
async getAcctBalance() { });
this.balanceLoading = true; } else if (type === "recharge") {
const resp = await getAcctBalance(); // 充值
let data = []; uni.navigateTo({
if (resp && resp.bizcode === 100) { url: "/pages/rwa_package/account/withdraw?type=1",
data = resp.data || []; });
} // uni.navigateTo({
this.balanceList = data; // url: "/pages/mine_package/mine_purse_recharge/mine_purse_recharge?amount=" + row.curAmount + "&category=" + row.categoty,
this.balanceLoading = false; // })
}, } else if (type === "exchange") {
// 提现 // 兑换
jumpInfo(row, type) { // uni.navigateTo({
console.log("row", row); // url: "/pages/mine_package/mine_purse_exchange/mine_purse_exchange?amount=" + row.curAmount + "&category=" + row.categoty,
if (type === "withdraw") {// 提现 // })
// uni.navigateTo({ uni.navigateTo({
// url: "/pages/mine_package/mine_purse_bonus_withdraw/mine_purse_bonus_withdraw?amount=" + row.curAmount + "&category=" + row.categoty, url: "/pages/rwa_package/shop/fen-shop",
});
// }) } else if (type === "transfer") {
uni.navigateTo({ console.log("transfer转出...");
url: "/pages/rwa_package/account/withdraw?type=0", }
},
}) onTip(index) {
} else if (type === "recharge") {// 充值 if (index == this.activeTip) {
uni.navigateTo({ this.activeTip = -1;
url: "/pages/rwa_package/account/withdraw?type=1", return;
}
}) this.activeTip = index;
// uni.navigateTo({ },
// url: "/pages/mine_package/mine_purse_recharge/mine_purse_recharge?amount=" + row.curAmount + "&category=" + row.categoty, },
// }) };
} else if (type === "exchange") {// 兑换
// uni.navigateTo({
// url: "/pages/mine_package/mine_purse_exchange/mine_purse_exchange?amount=" + row.curAmount + "&category=" + row.categoty,
// })
uni.navigateTo({
url: "/pages/rwa_package/shop/fen-shop"
})
} else if (type === "transfer") {
console.log("transfer转出...")
}
}
}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.purse_warp { .purse_warp {
height: 100%; height: 100%;
overflow-y: hidden; overflow-y: hidden;
background-color: $app-bj; background-color: $app-bj;
.purse_content_warp { .purse_content_warp {
padding: 30rpx 30rpx 10rpx; padding: 30rpx 30rpx 10rpx;
height: calc(100vh - 218rpx); height: calc(100vh - 218rpx);
overflow-y: auto; overflow-y: auto;
} }
.purse_warp_item { .purse_warp_item {
margin-bottom: 30rpx; margin-bottom: 30rpx;
background: #FFFFFF; background: #ffffff;
border-radius: 16rpx; border-radius: 16rpx;
padding: 32rpx; padding: 32rpx;
.purse_item_title { .purse_item_title {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.purse_item_title-left { .purse_item_title-left {
display: flex; display: flex;
align-items: center; align-items: center;
.title { .title {
font-weight: 500; font-weight: 500;
font-size: 30rpx; font-size: 30rpx;
color: #333333; color: #333333;
} }
.purse_amount { .purse_amount {
margin-right: 15rpx; margin-right: 15rpx;
margin-top: 6rpx; margin-top: 6rpx;
}
} .right_soild {
margin-left: 12rpx;
}
}
.right_soild { .purse_item_title-right {
margin-left: 12rpx; display: flex;
} flex-direction: row;
} align-items: center;
.button {
border-radius: 12rpx;
width: 120rpx;
height: 60rpx;
font-weight: 500;
font-size: 28rpx;
display: flex;
align-items: center;
justify-content: center;
}
.purse_item_title-right { .exchange_button {
display: flex; background: #ffffff;
flex-direction: row; color: #7934f6;
align-items: center; border: 2rpx solid #7934f6;
.button { }
border-radius: 12rpx;
width: 120rpx;
height: 60rpx;
font-weight: 500;
font-size: 28rpx;
display: flex;
align-items: center;
justify-content: center;
}
.exchange_button { .recharge_button {
background: #FFFFFF; background: linear-gradient(270deg, #b164fb 0%, #7934f6 100%);
color: #7934F6; color: #fff;
border: 2rpx solid #7934F6; }
} }
}
.recharge_button { .purse_item_bottom {
background: linear-gradient(270deg, #B164FB 0%, #7934F6 100%); display: flex;
color: #fff; justify-content: space-between;
}
}
} .bottom_item {
margin-top: 16rpx;
.purse_item_bottom { .bottom_item_amount {
display: flex; font-weight: bold;
justify-content: space-between; font-size: 36rpx;
color: #333333;
}
.bottom_item { .bottom_item_lock {
margin-top: 16rpx; font-weight: bold;
font-size: 36rpx;
color: #999999;
text-align: end;
}
.bottom_item_amount { .bottom_item_title {
font-weight: bold; margin-top: 16rpx;
font-size: 36rpx; font-size: 20rpx;
color: #333333; color: #999999;
} display: flex;
align-items: center;
.bottom_item_lock { }
font-weight: bold; }
font-size: 36rpx; }
color: #999999;
text-align: end;
}
.bottom_item_title {
margin-top: 16rpx;
font-size: 20rpx;
color: #999999;
}
}
}
}
.bottom_item_tip {
font-size: 20rpx;
color: #999999;
text-align: end;
margin-top: 5rpx;
}
}
} }
</style> </style>