|
@@ -0,0 +1,498 @@
|
|
|
|
|
+·<template>
|
|
|
|
|
+ <div class="assets">
|
|
|
|
|
+ <div class="head">
|
|
|
|
|
+ <img @click="back" src="@/assets/images/back.png" class="arrow_img" />
|
|
|
|
|
+ <span>{{ $t('lang38') }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="total_box">
|
|
|
|
|
+ <div>{{ $t('lang328') }}</div>
|
|
|
|
|
+ <div class="total f-sb">
|
|
|
|
|
+ <!-- <div>{{ total }}</div> -->
|
|
|
|
|
+ <countTo :startVal="total" :endVal="endVal" :duration="2000" :decimals="6"></countTo>
|
|
|
|
|
+ <van-button class="get_btn" type="primary" @click="collectPledge">{{ $t('lang329') }}</van-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="">
|
|
|
|
|
+ <div class="pd1 goods_box" v-if="nft_list.length > 0">
|
|
|
|
|
+ <div class="goods_list" v-for="(item, index) in nft_list" :key="index">
|
|
|
|
|
+ <div class="f-sb">
|
|
|
|
|
+ <span class="title">{{ item.title }}</span>
|
|
|
|
|
+ <span class="status">{{ $t('lang222') }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="f-r box">
|
|
|
|
|
+ <div class="f-col item" v-for="(item1, index1) in JSON.parse(item.details)" :key="index1">
|
|
|
|
|
+ <van-image class="goods_list_img" radius="10" :src="item1.thum" />
|
|
|
|
|
+ <div class="right">
|
|
|
|
|
+ <div style="font-size: 13px">{{ item1.order_no.substring(0, 4) + '****' + item1.order_no.substring(item1.order_no.length - 5, item1.order_no.length) }}</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="btn_box">
|
|
|
|
|
+ <!-- 按钮 -->
|
|
|
|
|
+ <div class="buy" @click="removePledge(item.id)">
|
|
|
|
|
+ <van-button class="buy_btn btn1" type="primary">{{ $t('lang322') }}</van-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="bare" v-if="nft_list.length <= 0">
|
|
|
|
|
+ <span>{{ $t('lang82') }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <van-overlay :show="show">
|
|
|
|
|
+ <div class="wrapper" @click.stop>
|
|
|
|
|
+ <van-loading type="spinner" class="loading" color="#29b286" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </van-overlay>
|
|
|
|
|
+ </div>
|
|
|
|
|
+</template>
|
|
|
|
|
+
|
|
|
|
|
+<script>
|
|
|
|
|
+import { homeApi } from '@/api/index';
|
|
|
|
|
+import { Dialog, Notify, Toast } from 'vant';
|
|
|
|
|
+import countTo from 'vue-count-to';
|
|
|
|
|
+export default {
|
|
|
|
|
+ components: { countTo },
|
|
|
|
|
+ data() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ loading: false,
|
|
|
|
|
+ total: 0,
|
|
|
|
|
+ endVal: 0,
|
|
|
|
|
+ growth: 0,
|
|
|
|
|
+ nft_list: [],
|
|
|
|
|
+ timer: null,
|
|
|
|
|
+ show: false,
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
|
|
+ mounted() {
|
|
|
|
|
+ this.teamine();
|
|
|
|
|
+ },
|
|
|
|
|
+ beforeDestroy() {
|
|
|
|
|
+ clearInterval(this.timer);
|
|
|
|
|
+ this.timer = null;
|
|
|
|
|
+ },
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ //返回上一页
|
|
|
|
|
+ back() {
|
|
|
|
|
+ this.$router.back();
|
|
|
|
|
+ },
|
|
|
|
|
+ teamine() {
|
|
|
|
|
+ homeApi.teamine({}).then(res => {
|
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
|
+ this.total = res.data.total;
|
|
|
|
|
+ this.endVal = res.data.total;
|
|
|
|
|
+ this.growth = res.data.growth;
|
|
|
|
|
+ this.nft_list = res.data.list;
|
|
|
|
|
+ this.timer = setInterval(() => {
|
|
|
|
|
+ this.total = this.endVal;
|
|
|
|
|
+ this.endVal += this.growth * 7;
|
|
|
|
|
+ }, 7000);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ removePledge(pledge_id) {
|
|
|
|
|
+ let _this = this;
|
|
|
|
|
+ Dialog.confirm({
|
|
|
|
|
+ title: _this.$t('lang136'),
|
|
|
|
|
+ message: _this.$t('lang335'),
|
|
|
|
|
+ confirmButtonText: _this.$t('lang111'),
|
|
|
|
|
+ cancelButtonText: _this.$t('lang135'),
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ _this.show = true;
|
|
|
|
|
+ homeApi.removePledge({ pledge_id }).then(res => {
|
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
|
+ _this.show = false;
|
|
|
|
|
+ _this.nft_list = [];
|
|
|
|
|
+ _this.teamine();
|
|
|
|
|
+ Notify({ type: 'success', message: _this.$t('lang152') });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ _this.show = false;
|
|
|
|
|
+ _this.$toast(res.msg);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(() => {
|
|
|
|
|
+ // on cancel
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ collectPledge() {
|
|
|
|
|
+ this.show = true;
|
|
|
|
|
+ homeApi.collectPledge({}).then(res => {
|
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
|
+ this.show = false;
|
|
|
|
|
+ this.teamine();
|
|
|
|
|
+ Notify({ type: 'success', message: this.$t('lang152') });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.show = false;
|
|
|
|
|
+ this.$toast(res.msg);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+};
|
|
|
|
|
+</script>
|
|
|
|
|
+
|
|
|
|
|
+<style lang="less" scoped>
|
|
|
|
|
+.head {
|
|
|
|
|
+ position: fixed;
|
|
|
|
|
+ top: 0;
|
|
|
|
|
+ left: 0;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ color: rgba(#000, 0.8);
|
|
|
|
|
+ letter-spacing: 1.2px;
|
|
|
|
|
+ font-weight: 550;
|
|
|
|
|
+ background: #fff;
|
|
|
|
|
+ padding: 14px 0;
|
|
|
|
|
+ height: 50px;
|
|
|
|
|
+ z-index: 999;
|
|
|
|
|
+ .arrow_img {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ left: 20px;
|
|
|
|
|
+ width: 10px;
|
|
|
|
|
+ height: 16px;
|
|
|
|
|
+ // transform: translate(0, -50%);
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+.f-sb {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+}
|
|
|
|
|
+.f-sa {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: space-around;
|
|
|
|
|
+}
|
|
|
|
|
+.f-sb-n {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: flex-end;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+}
|
|
|
|
|
+.f-col {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+}
|
|
|
|
|
+.f-r {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+}
|
|
|
|
|
+.f {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+}
|
|
|
|
|
+.f-s {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: flex-start;
|
|
|
|
|
+}
|
|
|
|
|
+.btn_box {
|
|
|
|
|
+ padding-top: 14px;
|
|
|
|
|
+}
|
|
|
|
|
+.assets {
|
|
|
|
|
+ height: 100vh;
|
|
|
|
|
+ padding: 50px 0 0;
|
|
|
|
|
+ overflow: scroll;
|
|
|
|
|
+ // background-color: #fafbfc;
|
|
|
|
|
+ .top {
|
|
|
|
|
+ color: #000;
|
|
|
|
|
+ padding-bottom: 16px;
|
|
|
|
|
+ margin: 0 6px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .navbar {
|
|
|
|
|
+ position: fixed;
|
|
|
|
|
+ top: 50px;
|
|
|
|
|
+ z-index: 999;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ color: #000;
|
|
|
|
|
+ height: 50px;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ background-color: #fff;
|
|
|
|
|
+ span {
|
|
|
|
|
+ color: #aaaaaa;
|
|
|
|
|
+ width: 50%;
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ line-height: 50px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .pd {
|
|
|
|
|
+ min-height: 100vh;
|
|
|
|
|
+ padding: 4px;
|
|
|
|
|
+ margin-top: 54px;
|
|
|
|
|
+ background-color: #fff;
|
|
|
|
|
+ }
|
|
|
|
|
+ .total_box {
|
|
|
|
|
+ color: #707070;
|
|
|
|
|
+ padding: 18px;
|
|
|
|
|
+ margin: 16px 16px 0;
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+ border-radius: 10px;
|
|
|
|
|
+ background-color: #ffffff;
|
|
|
|
|
+
|
|
|
|
|
+ .total {
|
|
|
|
|
+ color: #000;
|
|
|
|
|
+ font-size: 24px;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ font-weight: 600;
|
|
|
|
|
+ padding-top: 26px;
|
|
|
|
|
+ .get_btn {
|
|
|
|
|
+ color: #ffffff;
|
|
|
|
|
+ height: 30px;
|
|
|
|
|
+ line-height: 30px;
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ font-weight: normal;
|
|
|
|
|
+ border: none;
|
|
|
|
|
+ padding: 0 20px;
|
|
|
|
|
+ white-space: nowrap;
|
|
|
|
|
+ border-radius: 30px;
|
|
|
|
|
+ background-color: #29b286;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .text {
|
|
|
|
|
+ color: rgba(#fff, 0.8);
|
|
|
|
|
+ }
|
|
|
|
|
+ .buy_box {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ bottom: 14px;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ padding: 0 14px;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ }
|
|
|
|
|
+ .buy {
|
|
|
|
|
+ &_btn {
|
|
|
|
|
+ color: #29b286;
|
|
|
|
|
+ height: 30px;
|
|
|
|
|
+ line-height: 30px;
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ background-color: #ffffff;
|
|
|
|
|
+ border: none;
|
|
|
|
|
+ padding: 0 16px;
|
|
|
|
|
+ white-space: nowrap;
|
|
|
|
|
+ border-radius: 30px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .bare {
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ padding: 110px 14px 60px;
|
|
|
|
|
+ color: #aaa;
|
|
|
|
|
+ }
|
|
|
|
|
+ .list {
|
|
|
|
|
+ border-radius: 20px;
|
|
|
|
|
+ padding: 0 8px;
|
|
|
|
|
+ margin-top: 16px;
|
|
|
|
|
+ background-color: #fff;
|
|
|
|
|
+ margin: 16px 6px;
|
|
|
|
|
+ .li {
|
|
|
|
|
+ // display: flex;
|
|
|
|
|
+ // align-items: center;
|
|
|
|
|
+ // justify-content: space-between;
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ color: rgba(51, 51, 51, 1);
|
|
|
|
|
+ padding: 14px 0;
|
|
|
|
|
+
|
|
|
|
|
+ .li_left {
|
|
|
|
|
+ // display: flex;
|
|
|
|
|
+ // align-items: center;
|
|
|
|
|
+ .imgbox {
|
|
|
|
|
+ width: 40px;
|
|
|
|
|
+ height: 40px;
|
|
|
|
|
+ border-radius: 15px;
|
|
|
|
|
+ background-color: #f1f1f1;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ margin-right: 6px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .li_img {
|
|
|
|
|
+ display: block;
|
|
|
|
|
+ width: 32px;
|
|
|
|
|
+ height: 32px;
|
|
|
|
|
+ border-radius: 50%;
|
|
|
|
|
+ }
|
|
|
|
|
+ .title {
|
|
|
|
|
+ color: #29b286;
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .box {
|
|
|
|
|
+ padding-top: 10px;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ &_item {
|
|
|
|
|
+ width: 33%;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ .key {
|
|
|
|
|
+ color: #aaa;
|
|
|
|
|
+ font-size: 12px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .num {
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ color: #000;
|
|
|
|
|
+ padding-top: 2px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .box_item:last-child {
|
|
|
|
|
+ text-align: right;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .goods_box {
|
|
|
|
|
+ // margin: 14px;
|
|
|
|
|
+ height: 100vh;
|
|
|
|
|
+ overflow: auto;
|
|
|
|
|
+ border-radius: 14px;
|
|
|
|
|
+ .good_icon {
|
|
|
|
|
+ width: 16px;
|
|
|
|
|
+ height: 16px;
|
|
|
|
|
+ margin-right: 5px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .pd1 {
|
|
|
|
|
+ padding: 16px 14px 14px;
|
|
|
|
|
+ height: auto;
|
|
|
|
|
+ }
|
|
|
|
|
+ .goods_list {
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ color: #000;
|
|
|
|
|
+ padding: 18px;
|
|
|
|
|
+ border-radius: 10px;
|
|
|
|
|
+ margin-bottom: 16px;
|
|
|
|
|
+ background-color: #fff;
|
|
|
|
|
+
|
|
|
|
|
+ .tags {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ left: 0;
|
|
|
|
|
+ top: 0;
|
|
|
|
|
+ font-size: 10px;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ padding: 4px 14px;
|
|
|
|
|
+ z-index: 99;
|
|
|
|
|
+ background-color: #29b2b0;
|
|
|
|
|
+ border-radius: 6px 0 6px 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ .tags1 {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ left: 0;
|
|
|
|
|
+ top: 0;
|
|
|
|
|
+ font-size: 10px;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ padding: 4px 14px;
|
|
|
|
|
+ z-index: 99;
|
|
|
|
|
+ background-color: #f4ab1e;
|
|
|
|
|
+ border-radius: 6px 0 6px 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ .tags3 {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ left: 3px;
|
|
|
|
|
+ top: 3px;
|
|
|
|
|
+ z-index: 99;
|
|
|
|
|
+ font-size: 15px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .tags2 {
|
|
|
|
|
+ background-color: #1e8df4;
|
|
|
|
|
+ }
|
|
|
|
|
+ &_img {
|
|
|
|
|
+ width: 60px;
|
|
|
|
|
+ height: 60px;
|
|
|
|
|
+ margin: 16px 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ .title {
|
|
|
|
|
+ width: 80%;
|
|
|
|
|
+ font-weight: 700;
|
|
|
|
|
+ font-size: 18px;
|
|
|
|
|
+ overflow: hidden; /* 确保超出容器的文本被裁剪 */
|
|
|
|
|
+ white-space: nowrap; /* 确保文本在一行内显示 */
|
|
|
|
|
+ text-overflow: ellipsis; /* 使用省略号表示文本超出 */
|
|
|
|
|
+ }
|
|
|
|
|
+ .status {
|
|
|
|
|
+ font-size: 12px;
|
|
|
|
|
+ color: #a0a0a0;
|
|
|
|
|
+ }
|
|
|
|
|
+ .box {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ overflow: auto;
|
|
|
|
|
+ .item {
|
|
|
|
|
+ margin-right: 6px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .buy {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: flex-end;
|
|
|
|
|
+ justify-content: flex-end;
|
|
|
|
|
+ &_btn {
|
|
|
|
|
+ height: 32px;
|
|
|
|
|
+ min-width: 96px;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ line-height: 32px;
|
|
|
|
|
+ font-size: 13px;
|
|
|
|
|
+ border: none;
|
|
|
|
|
+ white-space: nowrap;
|
|
|
|
|
+ border-radius: 30px;
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+ border: 1px solid #29b286;
|
|
|
|
|
+ background-color: #29b286;
|
|
|
|
|
+ }
|
|
|
|
|
+ .btn1 {
|
|
|
|
|
+ color: #29b286;
|
|
|
|
|
+ background-color: #fff;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .buy1 {
|
|
|
|
|
+ justify-content: flex-end;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+::v-deep .van-cell {
|
|
|
|
|
+ padding: 10px 0 !important;
|
|
|
|
|
+}
|
|
|
|
|
+::v-deep .van-button--danger {
|
|
|
|
|
+ background-color: #29b286;
|
|
|
|
|
+ border-color: #29b286;
|
|
|
|
|
+}
|
|
|
|
|
+::v-deep .van-address-edit {
|
|
|
|
|
+ padding: 10px 0;
|
|
|
|
|
+}
|
|
|
|
|
+::v-deep .van-ellipsis {
|
|
|
|
|
+ font-size: 10px !important;
|
|
|
|
|
+}
|
|
|
|
|
+::v-deep .van-overlay {
|
|
|
|
|
+ background-color: rgba(#000, 0.3);
|
|
|
|
|
+}
|
|
|
|
|
+::v-deep van-hairline-unset--top-bottom,
|
|
|
|
|
+::v-deep .van-picker__frame {
|
|
|
|
|
+ border: 1px solid #fff !important;
|
|
|
|
|
+}
|
|
|
|
|
+::v-deep .van-address-edit__buttons {
|
|
|
|
|
+ padding-bottom: 10px !important;
|
|
|
|
|
+ padding-top: 10px !important;
|
|
|
|
|
+}
|
|
|
|
|
+.wrapper {
|
|
|
|
|
+ // display: flex;
|
|
|
|
|
+ // justify-content: center;
|
|
|
|
|
+ .loading {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ left: 46%;
|
|
|
|
|
+ top: 46%;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+</style>
|