|
|
@@ -2,55 +2,80 @@
|
|
|
<div class="assets" @scroll="handleScroll">
|
|
|
<div class="head">
|
|
|
<img @click="back" src="@/assets/images/back.png" class="arrow_img" />
|
|
|
- <span>{{ $t('lang40') }}</span>
|
|
|
+ <span>{{ $t('lang252') }}</span>
|
|
|
</div>
|
|
|
<div class="pd">
|
|
|
<div class="">
|
|
|
<div class="total_box">
|
|
|
- <div>
|
|
|
- <span class="text">{{ $t('lang94') }}({{ $t('lang95') }})</span>
|
|
|
- </div>
|
|
|
- <div class="total">
|
|
|
- <span>{{ total || 0 }}</span>
|
|
|
+ <div class="total_box_item" v-for="(item, index) in tabList" :key="index" @click="changeTab(item, index)">
|
|
|
+ <div :class="[tabIndex == item.index ? 'total total_active' : 'total']">
|
|
|
+ <img :src="tabIndex == item.index ? item.icon_active : item.icon" alt="" />
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <span class="text">{{ item.text }}</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <div class="bare" v-if="total <= 0">
|
|
|
- <span>{{ $t('lang60') }}</span>
|
|
|
- </div>
|
|
|
- <div v-else>
|
|
|
- <div class="list">
|
|
|
- <div v-for="(item, index) in list" :key="index" class="li">
|
|
|
- <div class="box">
|
|
|
- <div class="box_item">
|
|
|
- <span class="mobile">{{ item.phone || item.nickname }}</span>
|
|
|
- <div class="f-row">
|
|
|
- <span
|
|
|
- :class="[
|
|
|
- item.address_level == 1
|
|
|
- ? 'address level1'
|
|
|
- : item.address_level == 2
|
|
|
- ? 'address level2'
|
|
|
- : item.address_level == 3
|
|
|
- ? 'address level3'
|
|
|
- : item.address_level == 4
|
|
|
- ? 'address level4'
|
|
|
- : item.address_level >= 5
|
|
|
- ? 'address level5'
|
|
|
- : 'address',
|
|
|
- ]"
|
|
|
- >
|
|
|
- {{ $t('lang35') }} {{ item.address.slice(0, 6) + '****' + item.address.slice(item.address.length - 6, item.address.length) }}
|
|
|
- </span>
|
|
|
- <img src="@/assets/images/trade/copy.png" alt="" class="copys" @click="copy(item.address)" :data-clipboard-text="item.address" />
|
|
|
- </div>
|
|
|
+ <template v-if="tabIndex == 0">
|
|
|
+ <div class="sort-box">
|
|
|
+ <div class="sort-item" v-for="(item, index) in sortList" :key="index">
|
|
|
+ <span>{{ item.key }}</span>
|
|
|
+ <span>({{ item.value }})</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="bare" v-if="total <= 0">
|
|
|
+ <span>{{ $t('lang60') }}</span>
|
|
|
+ </div>
|
|
|
+ <div v-else>
|
|
|
+ <div class="list">
|
|
|
+ <div v-for="(item, index) in list" :key="index" class="li">
|
|
|
+ <div class="box">
|
|
|
+ <div class="box_item">
|
|
|
+ <span class="mobile">{{ item.phone || item.nickname }}</span>
|
|
|
+ <div class="f-row">
|
|
|
+ <span
|
|
|
+ :class="[
|
|
|
+ item.address_level == 1
|
|
|
+ ? 'address level1'
|
|
|
+ : item.address_level == 2
|
|
|
+ ? 'address level2'
|
|
|
+ : item.address_level == 3
|
|
|
+ ? 'address level3'
|
|
|
+ : item.address_level == 4
|
|
|
+ ? 'address level4'
|
|
|
+ : item.address_level >= 5
|
|
|
+ ? 'address level5'
|
|
|
+ : 'address',
|
|
|
+ ]"
|
|
|
+ >
|
|
|
+ {{ $t('lang35') }} {{ item.address.slice(0, 6) + '****' + item.address.slice(item.address.length - 6, item.address.length) }}
|
|
|
+ </span>
|
|
|
+ <img src="@/assets/images/trade/copy.png" alt="" class="copys" @click="copy(item.address)" :data-clipboard-text="item.address" />
|
|
|
+ </div>
|
|
|
|
|
|
- <span class="key">{{ $t('lang96') }}{{ dateFormatFn(item.create_time) }}</span>
|
|
|
+ <span class="key">{{ $t('lang96') }}{{ dateFormatFn(item.create_time) }}</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </template>
|
|
|
+ <template v-if="tabIndex == 1">
|
|
|
+ <van-popup v-model="activationShow" round style="width: 80%" @close="closeActive">
|
|
|
+ <div class="bind_box">
|
|
|
+ <van-icon name="cross" class="close" size="20" @click="closeActive" />
|
|
|
+ <div class="title">{{ $t('lang500') }}</div>
|
|
|
+ <div class="sub-title">{{ $t('lang501') }}</div>
|
|
|
+ <div class="address_field">
|
|
|
+ <van-field v-model="activationCode" type="text" input-align="center" class="input1" />
|
|
|
+ </div>
|
|
|
+ <div class="bind_button" @click="activeSubmit">
|
|
|
+ <span>{{ $t('lang502') }}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </van-popup>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -74,10 +99,56 @@ export default {
|
|
|
one: 0,
|
|
|
two: 0,
|
|
|
},
|
|
|
+ tabList: [
|
|
|
+ {
|
|
|
+ icon: require('@/assets/images/icon_1_1.png'),
|
|
|
+ icon_active: require('@/assets/images/icon_1.png'),
|
|
|
+ text: this.$t('lang252'),
|
|
|
+ index: 0,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ icon: require('@/assets/images/icon_2_1.png'),
|
|
|
+ icon_active: require('@/assets/images/icon_2.png'),
|
|
|
+ text: this.$t('lang498'),
|
|
|
+ index: 1,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ icon: require('@/assets/images/icon_3_1.png'),
|
|
|
+ icon_active: require('@/assets/images/icon_3.png'),
|
|
|
+ text: this.$t('lang499'),
|
|
|
+ index: 2,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ tabIndex: 0,
|
|
|
+ sortList: [
|
|
|
+ {
|
|
|
+ key: this.$t('lang201'),
|
|
|
+ value: 0,
|
|
|
+ index: 0,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: this.$t('lang503'),
|
|
|
+ value: 0,
|
|
|
+ index: 1,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: this.$t('lang504'),
|
|
|
+ value: 0,
|
|
|
+ index: 2,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: this.$t('lang505'),
|
|
|
+ value: 0,
|
|
|
+ index: 3,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ activationShow: true,
|
|
|
+ activationCode: '',
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
this.getChaList();
|
|
|
+ this.getCommunityCount();
|
|
|
this.direct_super = JSON.parse(localStorage.getItem('userinfo')).direct_super;
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -115,11 +186,24 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ getCommunityCount() {
|
|
|
+ homeApi.getCommunityCount({}).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ res.data.forEach(element => {
|
|
|
+ element.level == 1 ? (this.sortList[1].value = element.num) : '';
|
|
|
+ element.level == 2 ? (this.sortList[2].value = element.num) : '';
|
|
|
+ element.level == 3 ? (this.sortList[3].value = element.num) : '';
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
getChaList() {
|
|
|
homeApi.getChaList({ page: this.page }).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
// this.list = res.data.data.data;
|
|
|
this.total = res.data.total;
|
|
|
+ this.sortList[0].value = this.total;
|
|
|
if (this.list.length >= res.data.data.total) {
|
|
|
this.page = -1; // 重置为 -1,表示没有更多数据
|
|
|
} else {
|
|
|
@@ -146,8 +230,28 @@ export default {
|
|
|
changeNav(item, index) {
|
|
|
this.navIndex = index;
|
|
|
},
|
|
|
- dateFormatFn(date) {
|
|
|
- return dateFormat(new Date(date * 1000), 'yyyy-MM-dd hh:mm:ss');
|
|
|
+ changeTab(item, index) {
|
|
|
+ this.tabIndex = index;
|
|
|
+ if (this.tabIndex == 1) {
|
|
|
+ this.activationShow = true;
|
|
|
+ } else if (this.tabIndex == 2) {
|
|
|
+ this.$router.push({ name: 'createCode' });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ closeActive() {
|
|
|
+ this.activationShow = false;
|
|
|
+ this.tabIndex = 0;
|
|
|
+ },
|
|
|
+ activeSubmit() {
|
|
|
+ if (!this.activationCode) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ homeApi.activateCode({ code_no: this.activationCode }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.activationCode = '';
|
|
|
+ this.$toast(this.$t('lang512'));
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
},
|
|
|
};
|
|
|
@@ -233,8 +337,7 @@ export default {
|
|
|
position: relative;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- flex-direction: column;
|
|
|
- justify-content: center;
|
|
|
+ justify-content: space-between;
|
|
|
// position: relative;
|
|
|
font-size: 12px;
|
|
|
color: #fff;
|
|
|
@@ -246,14 +349,42 @@ export default {
|
|
|
margin: 10px;
|
|
|
background: linear-gradient(to right, #1ab986, #25d7bb);
|
|
|
|
|
|
+ &_item {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ flex-direction: column;
|
|
|
+ width: 30%;
|
|
|
+
|
|
|
+ .text {
|
|
|
+ display: inline-block;
|
|
|
+ color: rgba(#fff, 1);
|
|
|
+ font-size: 15px;
|
|
|
+ font-weight: 600;
|
|
|
+ width: 100px;
|
|
|
+ text-align: center;
|
|
|
+ overflow: hidden; //超出的文本隐藏
|
|
|
+ text-overflow: ellipsis; //溢出用省略号显示
|
|
|
+ white-space: nowrap; //溢出不换行
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
.total {
|
|
|
- font-size: 28px;
|
|
|
- text-align: center;
|
|
|
- padding-top: 10px;
|
|
|
+ width: 50px;
|
|
|
+ height: 50px;
|
|
|
+ padding: 10px;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ border-radius: 50%;
|
|
|
+ border: 2px solid #fff;
|
|
|
+
|
|
|
+ img {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
}
|
|
|
- .text {
|
|
|
- color: rgba(#fff, 0.8);
|
|
|
+ .total_active {
|
|
|
+ background-color: #fff;
|
|
|
}
|
|
|
+
|
|
|
.buy {
|
|
|
position: absolute;
|
|
|
right: 14px;
|
|
|
@@ -273,6 +404,31 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ .sort-box {
|
|
|
+ color: #000;
|
|
|
+ font-size: 13px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ padding-bottom: 10px;
|
|
|
+ margin: 16px 10px 0;
|
|
|
+ border-bottom: 1px solid #f0f0f0;
|
|
|
+
|
|
|
+ .sort-item {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ flex-direction: column;
|
|
|
+ text-align: center;
|
|
|
+ span:first-child {
|
|
|
+ max-width: 100px;
|
|
|
+ overflow: hidden; //超出的文本隐藏
|
|
|
+ text-overflow: ellipsis; //溢出用省略号显示
|
|
|
+ white-space: nowrap; //溢出不换行
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
.bare {
|
|
|
text-align: center;
|
|
|
font-size: 14px;
|
|
|
@@ -291,7 +447,7 @@ export default {
|
|
|
// justify-content: space-between;
|
|
|
font-size: 14px;
|
|
|
color: rgba(51, 51, 51, 1);
|
|
|
- padding: 18px 0 0;
|
|
|
+ padding: 0 0 18px;
|
|
|
|
|
|
.box {
|
|
|
padding-bottom: 18px;
|
|
|
@@ -337,7 +493,7 @@ export default {
|
|
|
background-color: #000;
|
|
|
}
|
|
|
.level4 {
|
|
|
- color: #00A733 !important;
|
|
|
+ color: #00a733 !important;
|
|
|
border-radius: 10px;
|
|
|
padding: 2px 6px;
|
|
|
background-color: #000;
|
|
|
@@ -357,5 +513,49 @@ export default {
|
|
|
height: 14px;
|
|
|
margin-left: 4px;
|
|
|
}
|
|
|
+
|
|
|
+ .bind_box {
|
|
|
+ font-size: 15px;
|
|
|
+ text-align: center;
|
|
|
+ color: #000;
|
|
|
+ .close {
|
|
|
+ position: absolute;
|
|
|
+ right: 20px;
|
|
|
+ top: 20px;
|
|
|
+ }
|
|
|
+ .title {
|
|
|
+ padding: 20px 20px 26px;
|
|
|
+ }
|
|
|
+ .sub-title {
|
|
|
+ color: #b3b3b3;
|
|
|
+ letter-spacing: 0.5px;
|
|
|
+ }
|
|
|
+ .address_field {
|
|
|
+ padding: 10px 0;
|
|
|
+ margin: 0 30px 16px;
|
|
|
+ }
|
|
|
+ .input1 {
|
|
|
+ height: 35px;
|
|
|
+ line-height: 35px;
|
|
|
+ text-align: center;
|
|
|
+ border-radius: 10px;
|
|
|
+ background-color: #ebebeb;
|
|
|
+ }
|
|
|
+ .bind_button {
|
|
|
+ color: #fff;
|
|
|
+ text-align: center;
|
|
|
+ font-size: 14px;
|
|
|
+ letter-spacing: 1px;
|
|
|
+ border: none;
|
|
|
+ padding: 6px 0;
|
|
|
+ margin: 0px 30px 20px;
|
|
|
+ border-radius: 30px;
|
|
|
+ background-color: #1dc297;
|
|
|
+ // border-top: 1px solid #cccccc9d;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ::v-deep .van-overlay {
|
|
|
+ background-color: rgba(#000, 0.2);
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|