Files
frontend-app/pages/rwa_package/dongjian/jia.vue
T

243 lines
6.6 KiB
Vue
Raw Normal View History

2025-08-13 20:45:25 +08:00
<template>
<view class="content">
<TopSafe></TopSafe>
2025-08-17 00:17:56 +08:00
<Header title="加速次数" />
2025-08-13 20:45:25 +08:00
<view class="contract-view">
2025-08-17 00:17:56 +08:00
<image src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/mine-purse/jia_bg.png" class="jia-img">
</image>
2025-08-13 20:45:25 +08:00
<view class="box-panel" style="margin-top:384rpx">
2025-08-13 22:06:38 +08:00
<view class="box-top flex-r-lr" style="margin-bottom:48rpx;">
2025-08-17 00:17:56 +08:00
<view class="flex-c-lr" v-for="(item, index) in tList" :key="index" style="align-items: center;width:40%;">
<text class="text-48 text-zu1 text-bold">{{ item.text }}</text>
<text class="text-28 text-zu1">{{ item.value }}</text>
2025-08-13 22:06:38 +08:00
</view>
</view>
2025-08-17 00:17:56 +08:00
<view class="box-list flex-r-lr" style="align-items: center;" v-for="(item, index) in topList" :key="item.text">
<text class="text-28 text-zu1">{{ item.text }}</text>
<text class="text-32 text-bold text-zu1">{{ item.value }}</text>
2025-08-13 20:45:25 +08:00
</view>
2025-08-13 21:52:16 +08:00
<text class="text-zu txt-28 mt-24">加速明细</text>
<view class="mt-12 table-view">
<view class="table-head ">
2025-08-17 00:17:56 +08:00
<view class="head-box flex-c" :class="{ 'border-lr': index == 1 }" v-for="(item, index) in tableHead"
:key="index">
<text class="text-20 text-zu1">{{ item }}</text>
2025-08-13 21:52:16 +08:00
</view>
2025-08-17 00:17:56 +08:00
2025-08-13 21:52:16 +08:00
</view>
2025-08-17 00:17:56 +08:00
<view class="table-list" v-for="(item, index) in tableList" :key="index">
<view class="list-box flex-c" v-for="(key, indexT) in 3" :key="indexT"
2025-08-17 07:30:15 +08:00
:style="{ 'border-bottom-right-radius': index == tableList.length - 1 && indexT == 2 ? '16rpx' : 0 }"
:class="{
2025-08-17 00:17:56 +08:00
'border-lr': indexT != 1,
'border-left-1': index == tableList.length - 1 && indexT == 0
}">
<text class="text-20 text-zu text-bold" v-if="indexT == 0">{{ item.one }}</text>
<text class="text-20 text-zu text-bold" v-if="indexT == 1">{{ item.two }}</text>
<text class="text-20 text-zu text-bold" v-if="indexT == 2">{{ item.three }}</text>
2025-08-13 21:52:16 +08:00
</view>
2025-08-17 00:17:56 +08:00
2025-08-13 21:52:16 +08:00
</view>
2025-08-17 00:17:56 +08:00
2025-08-13 21:52:16 +08:00
</view>
2025-08-13 20:45:25 +08:00
</view>
2025-08-17 00:17:56 +08:00
<view class="box-panel mt-32 mb-32">
2025-08-19 00:11:16 +08:00
<text class="text-zu text-32" style="font-weight: bold;">加速说明</text>
2025-08-13 21:52:16 +08:00
<text class="text-zu1 text-28 mt-24">获取方式: </text>
2025-08-19 00:11:16 +08:00
<text class="text-zu1 text-28">加速包仅能通过【九宫格抽奖】获得</text>
<!-- <text class="text-zu1 text-28">(2)转盘抽奖获得</text> -->
2025-08-17 00:17:56 +08:00
2025-08-19 00:11:16 +08:00
<text class="text-zu1 text-28 mt-24" style="font-weight: bold; margin-bottom: 10px;">逻辑说明: </text>
<text class="text-zu1 text-28">(1)加速包是 TBC 股权快速释放的专属途径。</text>
<text class="text-zu1 text-28">(2)使用加速包释放的 TBC 股权可进行交割和出售。</text>
<text class="text-zu1 text-28">(2) 持有 TBC 股权,可享受商城每日分红,分红收益将直接发放至您的现金余额</text>
<text class="text-zu1 text-28 mt-24 " style="font-weight: bold; margin-bottom: 10px;">特别声明: </text>
<text class="text-zu1 text-28">本活动最终解释权归信任桥所有。</text>
2025-08-13 21:52:16 +08:00
</view>
2025-08-17 00:17:56 +08:00
<!-- (2)转盘抽奖获得 -->
2025-08-13 20:45:25 +08:00
</view>
2025-08-13 22:06:38 +08:00
<!-- <DownPopup :show="true"></DownPopup> -->
2025-08-14 20:22:46 +08:00
<up-toast ref="uToastRef"></up-toast>
2025-08-13 20:45:25 +08:00
</view>
</template>
<script>
import { getUserInfo } from '@/api/auth.js';
import Header from '@/components/common/header.vue';
import TopSafe from '@/components/common/top-safe.nvue'
import DownPopup from '@/components/common/down-popup.vue';
2025-08-14 20:22:46 +08:00
import { quickens } from '@/api/contract.js'
2025-08-17 07:30:15 +08:00
import Decimal from 'decimal.js';
2025-08-13 22:06:38 +08:00
2025-08-13 20:45:25 +08:00
import func from '@/utils/func.js';
export default {
2025-08-17 00:17:56 +08:00
components: { Header, TopSafe, DownPopup },
2025-08-13 20:45:25 +08:00
data() {
return {
2025-08-17 00:17:56 +08:00
tList: [
{ text: '100', value: '锁仓TBC' },
{ text: '100', value: '剩余加速包' }
2025-08-13 22:06:38 +08:00
],
2025-08-17 00:17:56 +08:00
topList: [
{ text: '已获得加速包次数', value: '100' },
{ text: '已释放TBC数量', value: '20000' },
{ text: '剩余未使用加速包次数', value: '200' },
2025-08-13 21:52:16 +08:00
],
2025-08-17 00:17:56 +08:00
tableHead: ['加速比例', '释放TBC数量', '时间'],
tableList: [
2025-08-13 20:45:25 +08:00
]
};
},
2025-08-14 20:22:46 +08:00
onLoad() {
this.init();
2025-08-13 20:45:25 +08:00
},
methods: {
2025-08-17 00:17:56 +08:00
init() {
2025-08-13 20:45:25 +08:00
// this.isSignContract()
2025-08-14 20:22:46 +08:00
this.getQuichens()
2025-08-13 20:45:25 +08:00
},
2025-08-17 00:17:56 +08:00
getQuichens() {
quickens().then(res => {
if (res.bizcode == 100) {
2025-08-14 20:22:46 +08:00
// this.type = res.data;
this.tList[0].text = res.data.vcoinsLock;
this.tList[1].text = res.data.quickenBalance;
this.topList[0].value = res.data.quickenTotal;
this.topList[1].value = res.data.quickenValue;
this.topList[2].value = res.data.quickenBalance;
this.tableList = res.data.quickenDetail;
2025-08-17 00:17:56 +08:00
this.tableList.forEach(item => {
2025-08-17 07:30:15 +08:00
const ratio = new Decimal(item.quickenRate);
item.one = ratio.times(100).toNumber() + '%';
item.two = new Decimal(item.quickenValue);
2025-08-14 20:22:46 +08:00
item.three = func.formatDate(new Date(item.ctdate), 3)
})
2025-08-17 00:17:56 +08:00
} else {
2025-08-13 20:45:25 +08:00
this.$refs.uToastRef.show({
type: 'error',
message: res.msg,
});
}
})
},
2025-08-17 00:17:56 +08:00
onBtn() {
if (this.type) {
2025-08-13 20:45:25 +08:00
//查看
uni.navigateTo({
2025-08-17 01:13:23 +08:00
url: `/pages/rwa_package/dongjian/check`
2025-08-13 20:45:25 +08:00
})
2025-08-17 00:17:56 +08:00
} else {
2025-08-13 20:45:25 +08:00
//去签署
2025-08-17 00:17:56 +08:00
2025-08-13 20:45:25 +08:00
}
2025-08-17 07:30:15 +08:00
},
2025-08-13 20:45:25 +08:00
}
}
</script>
<style lang="scss" scoped>
2025-08-17 00:17:56 +08:00
.contract-view {
width: 100%;
height: calc(100% - 88rpx - var(--status-bar-height));
2025-08-13 20:45:25 +08:00
display: flex;
flex-direction: column;
align-items: center;
overflow-y: auto;
padding: 0 32rpx;
box-sizing: border-box;
2025-08-17 00:17:56 +08:00
background: linear-gradient(315deg, #AF39C4 0%, #7732FF 100%);
2025-08-13 20:45:25 +08:00
position: relative;
2025-08-17 00:17:56 +08:00
.jia-img {
width: 724rpx;
height: 400rpx;
2025-08-13 20:45:25 +08:00
position: absolute;
z-index: 0;
2025-08-17 00:17:56 +08:00
margin-top: calc(var(--status-bar-height) + 52rpx);
2025-08-13 20:45:25 +08:00
}
2025-08-17 00:17:56 +08:00
.box-panel {
2025-08-13 20:45:25 +08:00
position: relative;
z-index: 1;
display: flex;
flex-direction: column;
padding: 50rpx 32rpx;
2025-08-17 00:17:56 +08:00
width: 690rpx;
2025-08-13 20:45:25 +08:00
border-radius: 36rpx;
background-color: #fff;
box-sizing: border-box;
2025-08-17 00:17:56 +08:00
.box-top {
width: 100%;
height: 86rpx;
min-height: 86rpx;
2025-08-13 22:06:38 +08:00
}
2025-08-17 00:17:56 +08:00
.box-list {
width: 100%;
min-height: 84rpx;
border-bottom: 1rpx solid #ececec;
2025-08-13 20:45:25 +08:00
}
2025-08-17 00:17:56 +08:00
.table-view {
width: 100%;
2025-08-13 21:52:16 +08:00
display: flex;
flex-direction: column;
border-radius: 16rpx;
overflow: hidden;
2025-08-17 00:17:56 +08:00
.table-list {
width: 100%;
height: 64rpx;
min-height: 64rpx;
2025-08-13 21:52:16 +08:00
display: flex;
flex-direction: row;
justify-content: space-between;
2025-08-17 00:17:56 +08:00
border-bottom: 1rpx solid #EAEAEA;
.list-box {
flex: 1;
height: 100%;
2025-08-13 21:52:16 +08:00
box-sizing: border-box;
}
}
2025-08-17 00:17:56 +08:00
.table-head {
width: 100%;
height: 80rpx;
min-height: 80rpx;
2025-08-13 21:52:16 +08:00
display: flex;
flex-direction: row;
justify-content: space-between;
2025-08-17 00:17:56 +08:00
.head-box {
flex: 1;
height: 100%;
2025-08-13 21:52:16 +08:00
background-color: #FAF8FE;
box-sizing: border-box;
}
2025-08-17 00:17:56 +08:00
2025-08-13 21:52:16 +08:00
}
}
2025-08-17 00:17:56 +08:00
.border-lr {
border-left: 1rpx solid #EAEAEA;
border-right: 1rpx solid #EAEAEA;
2025-08-13 21:52:16 +08:00
}
2025-08-17 00:17:56 +08:00
.border-left-1 {
2025-08-13 21:52:16 +08:00
border-bottom-left-radius: 16rpx;
}
2025-08-17 00:17:56 +08:00
2025-08-13 20:45:25 +08:00
}
}
</style>