125 lines
2.6 KiB
Vue
125 lines
2.6 KiB
Vue
<template>
|
|
<view class="content">
|
|
<TopSafe></TopSafe>
|
|
<Header title="加速次数" />
|
|
<view class="contract-view">
|
|
<image src="@/static/new/jia_bg.png" class="jia-img"></image>
|
|
<view class="box-panel" style="margin-top:384rpx">
|
|
<view class="box-list flex-r-lr"
|
|
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>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<DownPopup></DownPopup>
|
|
</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';
|
|
import { getContractList,signContract } from '@/api/contract.js'
|
|
import func from '@/utils/func.js';
|
|
|
|
export default {
|
|
components: { Header,TopSafe,DownPopup },
|
|
data() {
|
|
return {
|
|
topList:[
|
|
{text:'已获得加速包次数',value:'100'},
|
|
{text:'已释放TBC数量',value:'20000'},
|
|
{text:'剩余未使用加速包次数',value:'200'},
|
|
]
|
|
};
|
|
},
|
|
onShow() {
|
|
// this.init();
|
|
},
|
|
methods: {
|
|
init(){
|
|
// this.isSignContract()
|
|
this.getSignContract()
|
|
},
|
|
isSignContract(){
|
|
signContract().then(res=>{
|
|
if(res.bizcode == 100){
|
|
this.type = res.data;
|
|
}else{
|
|
this.$refs.uToastRef.show({
|
|
type: 'error',
|
|
message: res.msg,
|
|
});
|
|
}
|
|
})
|
|
},
|
|
getSignContract(){
|
|
getContractList().then(res=>{
|
|
if(res.bizcode == 100){
|
|
this.obj = res.data[0];
|
|
this.obj.time = func.formatDate(new Date(res.data[0].signatureTime),3)
|
|
}else{
|
|
this.$refs.uToastRef.show({
|
|
type: 'error',
|
|
message: res.msg,
|
|
});
|
|
}
|
|
})
|
|
},
|
|
onBtn(){
|
|
if(this.type){
|
|
//查看
|
|
uni.navigateTo({
|
|
url:`/pages/contract/check`
|
|
})
|
|
}else{
|
|
//去签署
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.contract-view{
|
|
width:100%;
|
|
height:calc(100% - 88rpx - var(--status-bar-height));
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
overflow-y: auto;
|
|
padding: 0 32rpx;
|
|
box-sizing: border-box;
|
|
background: linear-gradient( 315deg, #AF39C4 0%, #7732FF 100%);
|
|
position: relative;
|
|
.jia-img{
|
|
width:724rpx;
|
|
height:400rpx;
|
|
position: absolute;
|
|
z-index: 0;
|
|
margin-top:calc(var(--status-bar-height) + 52rpx);
|
|
}
|
|
.box-panel{
|
|
position: relative;
|
|
z-index: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
padding: 50rpx 32rpx;
|
|
width:690rpx;
|
|
border-radius: 36rpx;
|
|
background-color: #fff;
|
|
box-sizing: border-box;
|
|
.box-list{
|
|
width:100%;
|
|
min-height:84rpx;
|
|
border-bottom:1rpx solid #ececec;
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
</style>
|