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",
path: "/pages/rwa_package/dongjian/finance",
},
{
id: 11,
title: "股东行权",
url: "https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/mine/tool_gdxq.png",
path: "/pages/rwa_package/rwa/rwa",
},
// {
// id: 11,
// title: "股东行权",
// url: "https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/mine/tool_gdxq.png",
// path: "/pages/rwa_package/rwa/rwa",
// },
// {
// id:1,
// title:"IM聊天",
+101 -49
View File
@@ -1,53 +1,84 @@
<template>
<view class="purse_warp">
<header-component :leftTitle="$t('purse.title')" left-path-type="switchTab" left-path="/pages/mine/mine" />
<header-component
:leftTitle="$t('purse.title')"
left-path-type="switchTab"
left-path="/pages/mine/mine"
/>
<view class="purse_content_warp">
<view v-for="(item,vIndex) in balanceList" :key="item.id" class="purse_warp_item" @click="jumpBonus(item)">
<view
v-for="(item, vIndex) in balanceList"
:key="item.id"
class="purse_warp_item"
@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>
<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>
<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>
<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>
</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 class="bottom_item_title">{{
item.categoty === "raffle" ? "可用次数" : "可用余额"
}}</view>
</view>
<view class="bottom_item ">
<view class="bottom_item" @click.stop="onTip(vIndex)">
<view class="bottom_item_lock">{{ item.lockAmount || 0 }}</view>
<view class="bottom_item_title">{{ item.categoty === 'raffle' ? '不可用次数' : '不可用余额' }}</view>
</view>
</view>
<view class="bottom_item_title"
>{{ item.categoty === "raffle" ? "不可用次数" : "不可用余额" }}
<up-image
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_tip"
v-if="item.categoty == 'balance' && activeTip == vIndex"
>抽奖7天后释放到可用余额中</view
>
</view>
</view>
</view>
</template>
<script>
import Header from '@/components/header.vue';
import { getAcctBalance } from '@/api/finance.js';
import { getValue } from '@/utils/enumUtils.js';
import { formatDate, handleAmount } from '@/utils/index.js';
import Header from "@/components/header.vue";
import { getAcctBalance } from "@/api/finance.js";
import { getValue } from "@/utils/enumUtils.js";
import { formatDate, handleAmount } from "@/utils/index.js";
export default {
components: { headerComponent: Header },
@@ -55,7 +86,8 @@ export default {
return {
balanceLoading: false,
balanceList: [],
}
activeTip: -1,
};
},
onLoad() {
this.getAcctBalance();
@@ -67,17 +99,24 @@ export default {
getOperationButtons(item) {
return [
// { type: 'recharge', text: '充值', show: item.isRecharge },
{ type: 'withdraw', text: '提现', show: item.isWithdrawal },
{ type: 'exchange', text: '兑换', show: item.isExchange }
].filter(btn => btn.show);
{ type: "withdraw", text: "提现", show: item.isWithdrawal },
{ type: "exchange", text: "兑换", show: item.isExchange },
].filter((btn) => btn.show);
},
// 跳转到详情
jumpBonus(item) {
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() {
@@ -93,37 +132,44 @@ export default {
// 提现
jumpInfo(row, type) {
console.log("row", row);
if (type === "withdraw") {// 提现
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",
})
} else if (type === "recharge") {// 充值
});
} else if (type === "recharge") {
// 充值
uni.navigateTo({
url: "/pages/rwa_package/account/withdraw?type=1",
})
});
// uni.navigateTo({
// url: "/pages/mine_package/mine_purse_recharge/mine_purse_recharge?amount=" + row.curAmount + "&category=" + row.categoty,
// })
} else if (type === "exchange") {// 兑换
} 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"
})
url: "/pages/rwa_package/shop/fen-shop",
});
} else if (type === "transfer") {
console.log("transfer转出...")
}
}
console.log("transfer转出...");
}
},
onTip(index) {
if (index == this.activeTip) {
this.activeTip = -1;
return;
}
this.activeTip = index;
},
},
};
</script>
<style lang="scss" scoped>
@@ -140,7 +186,7 @@ export default {
.purse_warp_item {
margin-bottom: 30rpx;
background: #FFFFFF;
background: #ffffff;
border-radius: 16rpx;
padding: 32rpx;
@@ -161,7 +207,6 @@ export default {
.purse_amount {
margin-right: 15rpx;
margin-top: 6rpx;
}
.right_soild {
@@ -185,17 +230,16 @@ export default {
}
.exchange_button {
background: #FFFFFF;
color: #7934F6;
border: 2rpx solid #7934F6;
background: #ffffff;
color: #7934f6;
border: 2rpx solid #7934f6;
}
.recharge_button {
background: linear-gradient(270deg, #B164FB 0%, #7934F6 100%);
background: linear-gradient(270deg, #b164fb 0%, #7934f6 100%);
color: #fff;
}
}
}
.purse_item_bottom {
@@ -222,10 +266,18 @@ export default {
margin-top: 16rpx;
font-size: 20rpx;
color: #999999;
}
display: flex;
align-items: center;
}
}
}
.bottom_item_tip {
font-size: 20rpx;
color: #999999;
text-align: end;
margin-top: 5rpx;
}
}
}
</style>