123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614 |
- <template>
- <view :style="colorStyle">
- <view class="acea-row nav">
- <view
- class="acea-row row-center-wrapper"
- :class="{ on: nav === 1 }"
- @click="navTab(1)"
- >团队人数
- </view>
- <view
- class="acea-row row-center-wrapper"
- :class="{ on: nav === 2 }"
- @click="navTab(2)"
- >直荐人数
- </view>
- <view
- class="acea-row row-center-wrapper"
- :class="{ on: nav === 3 }"
- @click="navTab(3)"
- >创客人数
- </view>
- </view>
- <view class="main-body">
- <view class="number_of_members" v-show="nav === 1">
- <!-- <view class="members_top">
- <text class="integral">0.0积分</text>
- <text class="explain">团队收益</text>
- </view> -->
- <view class="members_list">
- <view
- class="item acea-row row-between-wrapper"
- v-for="(item, index) in orderList"
- :key="index"
- >
- <view class="text-info">
- {{ item.createTime }}
- </view>
- <view class="left">
- <view class="state">
- <view class="order">{{ index + 1 }}</view>
- <img :src="item.avatar" alt="" />
- <view class="s-r">
- <text>
- {{ item.name }}
- </text>
- </view>
- <view class="op-area">
- <u-button type="primary" shape="circle"> 联系他 </u-button>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="direct_of_push" v-show="nav === 2">
- <!-- <view class="push_top">
- <text class="integral">0.0积分</text>
- <text class="explain">直推收益</text>
- </view> -->
- <view class="pus_list">
- <view
- class="item acea-row row-between-wrapper"
- v-for="(item, index) in integralList"
- :key="index"
- >
- <view class="text-info">
- {{ item.createTime }}
- </view>
- <view class="left">
- <view class="state">
- <view class="order">{{ index + 1 }}</view>
- <img :src="item.avatar" alt="" />
- <view class="s-r">
- <text>
- {{ item.name }}
- </text>
- </view>
- <view class="op-area">
- <u-button type="primary" shape="circle"> 联系他 </u-button>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="mark_of_members" v-show="nav === 3">
- <!-- <view class="mark_top">
- <text class="integral">0.0积分</text>
- <text class="explain">直推收益</text>
- </view> -->
- <view class="mark_list">
- <view
- class="item acea-row row-between-wrapper"
- v-for="(item, index) in makerList"
- :key="index"
- >
- <view class="text-info">
- {{ item.createTime }}
- </view>
- <view class="left">
- <view class="state">
- <view class="order">{{ index + 1 }}</view>
- <img :src="item.avatar" alt="" />
- <view class="s-r">
- <text>
- {{ item.name }}
- </text>
- </view>
- <view class="op-area">
- <u-button type="primary" shape="circle"> 联系他 </u-button>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import {
- userRecomPage,
- makerPage
- } from '@/api/home.js';
- import dayjs from '@/plugin/dayjs/dayjs.min.js';
- import {
- toLogin
- } from '@/libs/login.js';
- import {
- mapGetters
- } from "vuex";
- // #ifdef MP
- import authorize from '@/components/Authorize';
- // #endif
- import emptyPage from '@/components/emptyPage.vue';
- import colors from '@/mixins/color'
- export default {
- components: {
- // #ifdef MP
- authorize,
- // #endif
- emptyPage
- },
- filters: {
- dateFormat: function (value) {
- return dayjs(value * 1000).format('YYYY-MM-DD');
- }
- },
- mixins: [colors],
- data () {
- return {
- nav: 1, // 1:发票记录 2:抬头管理
- current: 0,
- page: 1,
- limit: 10,
- integralList: [],
- userInfo: {},
- loadend: false,
- loading: false,
- loadTitle: this.$t(`加载更多`),
- isAuto: false, //没有授权的不会自动授权
- isShowAuth: false, //是否隐藏授权
- orderList: [],
- makerList: [],
- invoiceList: [],
- isTime: 0
- };
- },
- computed: mapGetters(['isLogin']),
- watch: {
- nav: {
- immediate: true,
- handler (value) {
- this.page = 1;
- switch (value) {
- case 1:
- this.orderList = [];
- this.getOrderList();
- break;
- case 2:
- this.invoiceList = [];
- this.getIntegralList();
- break;
- case 3:
- this.makerList = [];
- this.getMakerPage();
- break;
- }
- }
- },
- isLogin: {
- handler: function (newV, oldV) {
- if (newV) {
- // this.getUserInfo();
- // this.userRecomPage();
- }
- },
- deep: true
- }
- },
- onLoad () {
- if (this.isLogin) {
- // this.getUserInfo();
- // this.getIntegralList();
- } else {
- toLogin();
- }
- },
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom: function () {
- },
- methods: {
- // 菜单切换
- navTab (nav) {
- if (this.nav !== nav) {
- this.nav = nav;
- }
- },
- /**
- * 授权回调
- */
- onLoadFun: function () {
- this.getUserInfo();
- },
- // 授权关闭
- authColse: function (e) {
- this.isShowAuth = e
- },
- /**
- * 获取积分明细
- */
- getOrderList: function () {
- let that = this;
- if (that.loading) return;
- // if (that.loadend) return;
- that.loading = true;
- that.loadTitle = '';
- userRecomPage({
- type: 1,
- userId: this.$store.state.app.uid,
- current: that.page,
- size: that.limit
- }).then(function (res) {
- let list = res.data,
- loadend = list.length < that.limit;
- that.$set(that, 'orderList', list);
- that.page = that.page + 1;
- that.loading = false;
- that.loadend = loadend;
- that.loadTitle = loadend ? that.$t(`我也是有底线的`) : that.$t(`加载更多`);
- }, function (res) {
- this.loading = false;
- that.loadTitle = that.$t(`加载更多`);
- });
- },
- getIntegralList: function () {
- let that = this;
- if (that.loading) return;
- // if (that.loadend) return;
- that.loading = true;
- that.loadTitle = '';
- userRecomPage({
- type: 2,
- userId: this.$store.state.app.uid,
- current: that.page,
- size: that.limit
- }).then(function (res) {
- let list = res.data,
- loadend = list.length < that.limit;
- // that.integralList = that.$util.SplitArray(list, that.integralList);
- that.$set(that, 'integralList', list);
- that.page = that.page + 1;
- that.loading = false;
- that.loadend = loadend;
- that.loadTitle = loadend ? that.$t(`我也是有底线的`) : that.$t(`加载更多`);
- }, function (res) {
- this.loading = false;
- that.loadTitle = that.$t(`加载更多`);
- });
- },
- getMakerPage: function () {
- let that = this;
- console.log(that.loading,that.loadend);
- if (that.loading) return;
- // if (that.loadend) return;
- that.loading = true;
- that.loadTitle = '';
- makerPage({
- userId: this.$store.state.app.uid,
- current: that.page,
- size: that.limit
- }).then(function (res) {
- let list = res.data,
- loadend = list.length < that.limit;
- // that.makerList = that.$util.SplitArray(list, that.makerList);
- that.$set(that, 'makerList', list);
- that.page = that.page + 1;
- that.loading = false;
- that.loadend = loadend;
- that.loadTitle = loadend ? that.$t(`我也是有底线的`) : that.$t(`加载更多`);
- }, function (res) {
- this.loading = false;
- that.loadTitle = that.$t(`加载更多`);
- });
- },
- nav: function (current) {
- this.current = current;
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .nav {
- position: fixed;
- top: 0;
- left: 0;
- z-index: 9;
- width: 100%;
- height: 90rpx;
- background-color: #ffffff;
- }
- .nav .acea-row {
- flex: 1;
- border-top: 3rpx solid transparent;
- border-bottom: 3rpx solid transparent;
- font-size: 30rpx;
- color: #282828;
- }
- .nav .on {
- border-bottom-color: var(--view-theme);
- color: var(--view-theme);
- }
- .main-body {
- margin-top: 90rpx;
- .number_of_members {
- .members_top {
- height: 150rpx;
- background: white;
- display: flex;
- text-align: center;
- flex-direction: column;
- .integral {
- flex: 1;
- color: #ff4b4b;
- font-size: 38rpx;
- padding-top: 30rpx;
- }
- .explain {
- flex: 2;
- }
- }
- .members_list {
- .item {
- line-height: 50rpx;
- padding: 30rpx;
- background: white;
- margin-bottom: 10rpx;
- .text-info {
- color: #999999;
- margin-bottom: 10rpx;
- }
- .left {
- width: 100%;
- .state {
- height: 100rpx;
- .order {
- margin: auto 0;
- text-align: center;
- width: 50rpx;
- height: 50rpx;
- line-height: 50rpx;
- background: rgb(200, 153, 75);
- color: white;
- border-radius: 50%;
- }
- display: flex;
- image {
- margin-left: 30rpx;
- margin-right: 30rpx;
- width: 100rpx;
- height: 100rpx;
- border-radius: 50%;
- overflow: hidden;
- }
- .s-r {
- font-size: 34rpx;
- display: flex;
- flex-direction: column;
- }
- .op-area {
- display: flex;
- justify-content: flex-end;
- flex-grow: 1;
- /deep/ .u-button {
- height: 60rpx;
- width: 200rpx !important;
- margin: auto 0;
- font-size: 26rpx;
- }
- }
- }
- }
- .right {
- .num {
- height: 100rpx;
- }
- }
- }
- }
- }
- .direct_of_push {
- .push_top {
- margin-bottom: 10rpx;
- height: 150rpx;
- background: white;
- display: flex;
- text-align: center;
- flex-direction: column;
- .integral {
- flex: 1;
- color: #ff4b4b;
- font-size: 38rpx;
- padding-top: 30rpx;
- }
- .explain {
- flex: 2;
- }
- }
- .pus_list {
- .item {
- line-height: 50rpx;
- padding: 30rpx;
- background: white;
- margin-bottom: 10rpx;
- .text-info {
- color: #999999;
- margin-bottom: 10rpx;
- }
- .left {
- width: 100%;
- .state {
- height: 100rpx;
- .order {
- margin: auto 0;
- text-align: center;
- width: 50rpx;
- height: 50rpx;
- line-height: 50rpx;
- background: rgb(200, 153, 75);
- color: white;
- border-radius: 50%;
- }
- display: flex;
- image {
- margin-left: 30rpx;
- margin-right: 30rpx;
- width: 100rpx;
- height: 100rpx;
- border-radius: 50%;
- overflow: hidden;
- }
- .s-r {
- font-size: 34rpx;
- display: flex;
- flex-direction: column;
- }
- .op-area {
- display: flex;
- justify-content: flex-end;
- flex-grow: 1;
- /deep/ .u-button {
- height: 60rpx;
- width: 200rpx !important;
- margin: auto 0;
- font-size: 26rpx;
- }
- }
- }
- }
- .right {
- .num {
- height: 100rpx;
- }
- }
- }
- }
- }
- .mark_of_members {
- .mark_top {
- margin-bottom: 10rpx;
- height: 150rpx;
- background: white;
- display: flex;
- text-align: center;
- flex-direction: column;
- .integral {
- flex: 1;
- color: #ff4b4b;
- font-size: 38rpx;
- padding-top: 30rpx;
- }
- .explain {
- flex: 2;
- }
- }
- .mark_list {
- .item {
- line-height: 50rpx;
- padding: 30rpx;
- background: white;
- margin-bottom: 10rpx;
- .text-info {
- color: #999999;
- margin-bottom: 10rpx;
- }
- .left {
- width: 100%;
- .state {
- height: 100rpx;
- .order {
- margin: auto 0;
- text-align: center;
- width: 50rpx;
- height: 50rpx;
- line-height: 50rpx;
- background: rgb(200, 153, 75);
- color: white;
- border-radius: 50%;
- }
- display: flex;
- image {
- margin-left: 30rpx;
- margin-right: 30rpx;
- width: 100rpx;
- height: 100rpx;
- border-radius: 50%;
- overflow: hidden;
- }
- .s-r {
- font-size: 34rpx;
- display: flex;
- flex-direction: column;
- }
- .op-area {
- display: flex;
- justify-content: flex-end;
- flex-grow: 1;
- /deep/ .u-button {
- height: 60rpx;
- width: 200rpx !important;
- margin: auto 0;
- font-size: 26rpx;
- }
- }
- }
- }
- .right {
- .num {
- height: 100rpx;
- }
- }
- }
- }
- }
- }
- </style>
|