| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 |
- <script>
- import homeIndex from "@/pages/home/home-index.vue";
- import myIndex from "@/pages/my/my-index.vue";
- import convertIndex from "@/pages/convert/convert-index.vue";
- // import tokenpocketBnb from "@/common/wallet/tokenpocket-wallet/tokenpocket-bnb";
- export default {
- components: { homeIndex, myIndex, convertIndex },
- data() {
- return {
- tab_index: 1
- };
- },
- mounted() {
- this.getMyData()
- // this.handlerDateDurationCurrent()
- },
- methods: {
- getMyData() {
- // let token = uni.getStorageSync('token')
- // if (token) {
- // getMemberInfo().then((res) => {
- // if (res.code === 1) {
- // this.memberData = res.data
- // tokenpocketBnb.getAccounts().then((babAddress)=>{
- // if(babAddress && this.memberData.address.toLocaleLowerCase()!==babAddress.toLocaleLowerCase()){
- // // uni.clearStorageSync()
- // // uni.reLaunch({
- // // 'url': 'pages/login/index'
- // // })
- // }
- // })
- // }
- // })
- // }
- },
- tabClick(num) {
- if(num) {
- this.tab_index = num
- }
- }
- },
- }
- </script>
- <template>
- <view class="flex-common-css">
- <view class="top-b bgc-f plr-20 box-sizing-border align-items-center flex-justify-space">
- <image
- class="img-box"
- src="@/static/img/logo/logo.png"
- ></image>
- <view class="fs-30">
- sdfsdfsfsd222
- </view>
- </view>
- <view class="content-b p-20 box-sizing-border">
- <view class="scroll-view-css">
- <homeIndex v-if="tab_index === 1"></homeIndex>
- <convertIndex v-else-if="tab_index === 2"></convertIndex>
- <myIndex v-else></myIndex>
- </view>
- <view class="tab-b align-items-center flex-justify-space b-rad-10 bgc-f">
- <view @click="tabClick(1)" class="flex-1 flex-direction-column align-items-center flex-justify-center">
- <image
- class="tab-img mb-4"
- v-if="tab_index === 1"
- :src="require('@/static/img/tab/index.svg')"
- ></image>
- <image
- class="tab-img mb-4"
- v-else
- :src="require('@/static/img/tab/index-two.svg')"
- ></image>
- <view class="fs-28" :class="tab_index === 1?'fc-f78820':''">首页</view>
- </view>
- <view @click="tabClick(2)" class="flex-1 flex-direction-column align-items-center flex-justify-center">
- <image
- class="tab-img mb-4"
- :src="require('@/static/img/tab/jh.svg')"
- ></image>
- <view class="fs-28" :class="tab_index === 2?'fc-f78820':''">兑换</view>
- </view>
- <view @click="tabClick(3)" class="flex-1 flex-direction-column align-items-center flex-justify-center">
- <image
- v-if="tab_index === 3"
- class="tab-img mb-4"
- :src="require('@/static/img/tab/my-two.svg')"
- ></image>
- <image
- v-else
- class="tab-img mb-4"
- :src="require('@/static/img/tab/my.svg')"
- ></image>
- <view class="fs-28" :class="tab_index === 3?'fc-f78820':''">我的</view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <style scoped lang="scss">
- .content-b{
- width: 100%;
- height: calc(100vh - 98rpx);
- display: flex;
- flex-direction: column;
- }
- .top-b{
- width: 100%;
- height: 98rpx;
- line-height: 98rpx;
- }
- .img-box{
- width: 78rpx;
- height: 60rpx;
- }
- .tab-img{
- width: 50rpx;
- height: 50rpx;
- }
- .tab-b{
- width: 100%;
- height: 138rpx;
- padding: 20rpx 0;
- box-sizing: border-box;
- }
- </style>
|