123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386 |
- <template>
-
- <view>
- <view class='integral-details' :style="colorStyle">
- <view class='header'>
- <view class='currentScore'>当前股权</view>
- <view class="scoreNum">{{userInfo.reward_share}}</view>
- <view class='line'></view>
- <view class='nav acea-row'>
- <view class='item'>
- {{userInfo.sum_integral}}
- <view></view>
- </view>
- <view class='item' @click="navto">
- {{userInfo.deduction_integral}}
- <view>立即提现</view>
- </view>
- <view class='item'>
- {{userInfo.today_integral}}
- <view></view>
- </view>
- </view>
- </view>
- <view class='wrapper'>
-
- {{item.name}}
- <view class='list' :hidden='current!=0'>
-
- <view class='item acea-row row-between-wrapper' v-for="(item,index) in integralList" :key="index">
- <view style="max-width: 550rpx;">
- <view class='state'>{{item.content}}</view>
- <view>{{item.create_time}}</view>
- </view>
- <view class='num font-color' v-if="item.pm">+{{item.reward_share}}</view>
- <view class='num' v-else>-{{item.reward_share}}</view>
- </view>
- <view class='loadingicon acea-row row-center-wrapper' v-if="integralList.length>0">
- <text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
- </view>
- <view v-if="integralList.length == 0">
- <emptyPage title="暂无股权记录哦~"></emptyPage>
- </view>
- </view>
- </view>
- </view>
- <home v-if="navigation"></home>
-
-
-
- </view>
- </template>
- <script>
- import home from '@/components/home';
- import {
- postSignUser,
- getrecordList
- } from '@/api/user.js';
- import dayjs from '@/plugin/dayjs/dayjs.min.js';
- import {
- toLogin
- } from '@/libs/login.js';
- import {
- mapGetters
- } from "vuex";
- import emptyPage from '@/components/emptyPage.vue';
- import colors from '@/mixins/color'
- export default {
- components: {
- emptyPage,
- home
- },
- filters: {
- dateFormat: function(value) {
- return dayjs(value * 1000).format('YYYY-MM-DD');
- }
- },
- mixins:[colors],
- data() {
- return {
- navList: [{
- 'name': '分值明细',
- 'icon': 'icon-mingxi'
- },
- {
- 'name': '分值提升',
- 'icon': 'icon-tishengfenzhi'
- }
- ],
- current: 0,
- page: 1,
- limit: 10,
- integralList: [],
- userInfo: {},
- loadend: false,
- loading: false,
- loadTitle: '加载更多',
- isAuto: false,
- isShowAuth: false,
- isTime: 0
- };
- },
- computed: mapGetters(['isLogin']),
- watch: {
- isLogin: {
- handler: function(newV, oldV) {
- if (newV) {
- this.getUserInfo();
-
- }
- },
- deep: true
- }
- },
- onLoad() {
- if (this.isLogin) {
- this.getUserInfo();
-
- } else {
- toLogin()
- }
- },
- onShow() {
- uni.removeStorageSync('form_type_cart');
- },
-
- onReachBottom: function() {
- this.getIntegralList();
- },
- methods: {
- navto() {
- uni.navigateTo({
- url: '/pages/users/user_payment/index?is_gq=2'
- })
- },
-
- onLoadFun: function() {
- this.getUserInfo();
- this.isShowAuth = false;
- },
-
- authColse: function(e) {
- this.isShowAuth = e
- },
- getUserInfo: function() {
- let that = this;
- postSignUser({
- sign: 1,
- integral: 1,
- all: 1
- }).then(function(res) {
- that.$set(that, 'userInfo', res.data);
- that.getIntegralList();
- let clearTime = res.data.clear_time;
- let showTime = clearTime-(86400*14);
- let timestamp = Date.parse(new Date())/1000;
- if(showTime < timestamp){
- that.isTime = 1
- }else{
- that.isTime = 0
- }
- });
- },
-
- getIntegralList: function() {
- let that = this;
- if (that.loading) return;
- if (that.loadend) return;
- that.loading = true;
- that.loadTitle = '';
- getrecordList({
- page: that.page,
- limit: that.limit,
- uid:that.userInfo.uid
- }).then(function(res) {
- let list = res.data.list,
- loadend = list.length < that.limit;
- that.integralList = that.$util.SplitArray(list, that.integralList);
- that.$set(that, 'integralList', that.integralList);
- that.page = that.page + 1;
- that.loading = false;
- that.loadend = loadend;
- that.loadTitle = loadend ? '没有更多内容啦~' : "加载更多";
- }, function(res) {
- this.loading = false;
- that.loadTitle = '加载更多';
- });
- },
- nav: function(current) {
- this.current = current;
- }
- }
- }
- </script>
- <style scoped lang="scss">
- .integral-details .header {
- background-repeat: no-repeat;
- background-size: 100% 100%;
- width: 100%;
- height: 300rpx;
- font-size: 72rpx;
- color: #fff;
- padding: 31rpx 0 45rpx 0;
- box-sizing: border-box;
- text-align: center;
- font-family: 'Guildford Pro';
- background-color: var(--view-theme);
- }
- .integral-details .header .currentScore {
- font-size: 26rpx;
- color: rgba(255, 255, 255, 0.8);
- text-align: center;
- margin-bottom: 11rpx;
- }
- .integral-details .header .scoreNum {
- font-family: "Guildford Pro";
- }
- .integral-details .header .line {
- width: 60rpx;
- height: 3rpx;
- background-color: #fff;
- margin: 20rpx auto 0 auto;
- }
- .integral-details .header .nav {
- font-size: 22rpx;
- color: rgba(255, 255, 255, 0.8);
- flex: 1;
- margin-top: 35rpx;
- }
- .integral-details .header .nav .item {
- width: 33.33%;
- text-align: center;
- }
- .integral-details .header .nav .item .num {
- color: #fff;
- font-size: 40rpx;
- margin-bottom: 5rpx;
- font-family: 'Guildford Pro';
- }
- .integral-details .wrapper .nav {
- flex: 1;
- width: 690rpx;
- border-radius: 20rpx 20rpx 0 0;
- margin: -96rpx auto 0 auto;
- background-color: #f7f7f7;
- height: 96rpx;
- font-size: 30rpx;
- color: #bbb;
- }
- .integral-details .wrapper .nav .item {
- text-align: center;
- width: 50%;
- }
- .integral-details .wrapper .nav .item.on {
- background-color: #fff;
- color: var( --view-theme);
- font-weight: bold;
- border-radius: 20rpx 0 0 0;
- }
- .integral-details .wrapper .nav .item:nth-of-type(2).on {
- border-radius: 0 20rpx 0 0;
- }
- .integral-details .wrapper .nav .item .iconfont {
- font-size: 38rpx;
- margin-right: 10rpx;
- }
- .integral-details .wrapper .list {
- background-color: #fff;
- padding: 24rpx 30rpx;
- }
- .integral-details .wrapper .list .tip {
- font-size: 25rpx;
- width: 690rpx;
- min-height: 60rpx;
- border-radius: 50rpx;
- background-color: #fff5e2;
- border: 1rpx solid #ffeac1;
- color: #c8a86b;
- padding: 0 20rpx;
- box-sizing: border-box;
- margin-bottom: 24rpx;
- }
-
- .integral-details .wrapper .list .tip .tipCon{
- width: 595rpx;
- }
- .integral-details .wrapper .list .tip .iconfont {
- font-size: 35rpx;
- margin-right: 15rpx;
- }
- .integral-details .wrapper .list .item {
- height: 124rpx;
- border-bottom: 1rpx solid #eee;
- font-size: 24rpx;
- color: #999;
- }
- .integral-details .wrapper .list .item .state {
- font-size: 28rpx;
- color: #282828;
- margin-bottom: 8rpx;
- }
- .integral-details .wrapper .list .item .num {
- font-size: 36rpx;
- font-family: 'Guildford Pro';
- color: #16AC57;
- }
-
- .integral-details .wrapper .list .item .num.font-color{
- color: #E93323!important;
- }
- .integral-details .wrapper .list2 {
- background-color: #fff;
- padding: 24rpx 0;
- }
- .integral-details .wrapper .list2 .item {
- background-image: linear-gradient(to right, #fff7e7 0%, #fffdf9 100%);
- width: 690rpx;
- height: 180rpx;
- position: relative;
- border-radius: 10rpx;
- margin: 0 auto 20rpx auto;
- padding: 0 25rpx 0 180rpx;
- box-sizing: border-box;
- }
- .integral-details .wrapper .list2 .item .pictrue {
- width: 90rpx;
- height: 150rpx;
- position: absolute;
- bottom: 0;
- left: 45rpx;
- }
- .integral-details .wrapper .list2 .item .pictrue image {
- width: 100%;
- height: 100%;
- }
- .integral-details .wrapper .list2 .item .name {
- width: 285rpx;
- font-size: 30rpx;
- font-weight: bold;
- color: #c8a86b;
- }
- .integral-details .wrapper .list2 .item .earn {
- font-size: 26rpx;
- color: #c8a86b;
- border: 2rpx solid #c8a86b;
- text-align: center;
- line-height: 52rpx;
- height: 52rpx;
- width: 160rpx;
- border-radius: 50rpx;
- }
- </style>
|