You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

517 lines
77 KiB

9 months ago
<template>
<view :style="viewColor">
<view class='integral-details'>
<view class='header'>
<!-- <view class='currentScore'>当前积分 <text @click="showProtocol=true" class="iconfont wenhao">?</text></view>
<view class="scoreNum">{{userInfo.integral ? userInfo.integral : 0}}</view>
<view class='line'></view> -->
<view class='nav acea-row'>
<view class='item'>
<view>当前福利积分</view>
9 months ago
<view class='num'>{{welfare || 0}}</view>
9 months ago
</view>
<view class='item'>
<view>冻结福利积分</view>
9 months ago
<view class='num'>{{welfare_frozen || 0}}</view>
9 months ago
</view>
<!-- <view class='item'>
<view class='num'>{{userInfo.totalGainIntegral || 0}}</view>
<view>累计积分</view>
</view>
<view class='item'>
<view class='num'>{{userInfo.deductionIntegral || 0}}</view>
<view>累计消费</view>
</view>
<view class='item'>
<view class='num'>{{userInfo.lockIntegral || 0}}</view>
<view>冻结积分</view>
</view> -->
</view>
</view>
<view class='wrapper'>
<!-- <view class='nav acea-row'>
<view class='item acea-row row-center-wrapper' :class='current==index?"on":""' v-for="(item,index) in navList" :key='index'
@click='nav(index)'><text class='iconfont' :class="item.icon"></text>{{item.name}}</view>
</view> -->
<view class="scoreTitle">
分值明细
</view>
9 months ago
<view class='list'>
9 months ago
<view class='tip' v-if="userInfo.clear && userInfo.clear.status && userInfo.clear.nextClearIntegral > 0"><text class='iconfont icon-shuoming'></text>
<text class="tip-text">提示您有部分积分将于{{userInfo.clear.nextClearDay}}过期请尽快使用</text>
</view>
<view class='item acea-row row-between-wrapper' v-for="(item,index) in integralList" :key="index">
<view>
9 months ago
<view class='state'>{{item.type}}</view>
9 months ago
<view>{{item.create_time}}</view>
</view>
9 months ago
<view class='num p-color' v-if="item.status==1">+{{item.count}}</view>
<view class='num' v-else>-{{item.count}}</view>
9 months ago
</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 v-if="integral_status" class='list2' :hidden='current!=1'>
<navigator class='item acea-row row-between-wrapper' open-type='switchTab' hover-class='none' url='/pages/index/index'>
<view class='pictrue'>
<image src='../../../static/images/score.png'></image>
</view>
<view class='name'>购买商品可获得积分奖励</view>
<view class='earn'>赚积分</view>
</navigator>
<navigator class='item acea-row row-between-wrapper' hover-class='none' url='/pages/users/user_sgin/index'>
<view class='pictrue'>
<image src='../../../static/images/score.png'></image>
</view>
<view class='name'>每日签到可获得积分奖励</view>
<view class='earn'>赚积分</view>
</navigator>
</view> -->
</view>
</view>
<view class="instructions" v-if="showProtocol">
<view class="setAgCount">
<i class="icon iconfont icon-cha" @click="showProtocol = false"></i>
<div class="title">积分说明</div>
<view class="content">
<jyf-parser :html="protocol" ref="article" :tag-style="tagStyle"></jyf-parser>
</view>
</view>
</view>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
</view>
</template>
<script>
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
9 months ago
import { getIntegralInfo, getassetsLog, getAgreementApi,getUserInfo } from '@/api/user.js';
9 months ago
import {
mapGetters
} from "vuex";
import authorize from '@/components/Authorize';
import emptyPage from '@/components/emptyPage.vue';
import parser from "@/components/jyf-parser/jyf-parser";
const app = getApp();
export default {
components: {
authorize,
emptyPage,
"jyf-parser": parser,
},
data() {
return {
9 months ago
// navList: [{
// 'name': '分值明细',
// 'icon': 'icon-mingxi'
// },
// {
// 'name': '分值提升',
// 'icon': 'icon-tishengfenzhi'
// }
// ],
9 months ago
current: 0,
page: 1,
limit: 10,
integralList: [],
userInfo:{},
loadend: false,
loading: false,
loadTitle: '加载更多',
isAuto: false, //没有授权的不会自动授权
isShowAuth: false,//是否隐藏授权
showProtocol: false,
protocol: '',
tagStyle: {
img: 'width:100%;display:block;',
video: 'width:100%;'
},
integral_status: true,
9 months ago
welfare:0,
welfare_frozen:0
9 months ago
};
},
computed: mapGetters(['isLogin','viewColor']),
onLoad() {
if (this.isLogin) {
this.getUserInfo();
} else {
this.isAuto = true;
this.isShowAuth = true
}
this.getAgreement();
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
this.getIntegralList();
},
methods: {
/**
* 授权回调
*/
onLoadFun: function() {
this.isShowAuth = false;
this.getUserInfo();
},
// 授权关闭
authColse: function(e) {
this.isShowAuth = e
},
getUserInfo: function() {
let that = this;
9 months ago
getUserInfo().then((res)=>{
this.welfare = res.data.assets.welfare
this.welfare_frozen = res.data.assets.welfare_frozen
getIntegralInfo().then(function(res) {
that.$set(that,'userInfo',res.data);
that.getIntegralList()
}).catch(res => {
this.integral_status = false
return that.$util.Tips({
title: res
});
9 months ago
});
9 months ago
})
9 months ago
},
/*获取积分说明*/
getAgreement() {
let that = this
getAgreementApi('sys_integral_rule').then(res => {
that.protocol = res.data.sys_integral_rule
})
},
/**
* 获取积分明细
*/
getIntegralList: function() {
let that = this;
if (that.loading) return;
if (that.loadend) return;
that.loading = true;
that.loadTitle = '';
9 months ago
getassetsLog({
9 months ago
page: that.page,
9 months ago
limit: that.limit,
asset_type:3
9 months ago
}).then(function(res) {
9 months ago
console.log(res,"---")
9 months ago
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 = '加载更多';
});
},
shareIntegral(){
uni.setStorageSync('isIntegral',true)
uni.switchTab({
url: '/pages/index/index'
});
},
nav: function(current) {
this.current = current;
}
}
}
</script>
<style scoped lang="scss">
page{
background-color: #fff;
}
.integral-details .header {
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAr4AAAEECAYAAADOPjf7AAAAAXNSR0IArs4c6QAAIABJREFUeF7svTuvbcmy55VjPtbar6o6da7TQoCBMO7tNjDxEcLiE2AhISScdsADpx10+2DgtAFGI7WFgQuNbh8QHwBMBDgICSGhFrqnTj32Y6015xwDRWREZkRmRI4x515Vu/auWPfuU2vNOUaOfEb+8j8iI6fU/Pz9//5fvf8Xj9O/slwO/9aSln8jpelfm6b0Fykt+/Za/nvxvoDP5/rl8Dq6DK9ZuTB/PemnNvesPWsZXNB91XwgijTMQ1stKpkt+aVrvKyWz/EXXR9eGYZpGV9enY7zAK/s5uVL2wV2WJW6vIN+1d3fXLtW96P71+rIbbMpWX3OKpNVJ1vv7frmoCxb+ufSjjNoh+YhVtt+TBnae7eWvbMLRtlX63sw5tp83Fruet9UOrU1zrp6MAzulvtKc4mLt+Qdr1EX2jZ3S1tveR4+bjS+vPy791F+B/dB+cz8N3OXNy1tKXt372ofc2z5qBxOHZRnb7B53rzW9wOjzroy1TJY93t1MkIJb862xrSLEWtzg3Fj38aDcSs5xsmENWa3sJRXj+Zj1tpbVPSIhcx8dQWY1pANO4w1VrbMQVaf8NNanlKa/r9lTv/7blr+p8d5/z+8ffm3/1f6R//no0xHjbC//u/+5W93dy/+7bTs//1lSn+VlvRVSul+LcfDAq0MVrPgKzWUv/504Otmb6VxLeM/7PADA9mD4JcMvrlsmw3cmnFbMwqfMfhaRtWd2Ef1UPpeM86MCdbq11cDwcBOXAdDIr8Bvu642dJm/UTbTHCrAOcsTq+4zxv3bf+y+8hHgu+m8dFPy8P+Kgrkj5FPA77evGYBlwdv9fPbwdfNh/PF5nmB6n5YzgBfc+0xYhdgsRVk+wXBN2d/WRYA3Z+mZfo/5mX+x8vx8b/94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8HcO5Jx5m5NoBZKL7GUizAlyolojpEVAcXBuLktut8dYVaYRgYH2AjnFlbXbfCPt6nEgtXB7m4Nt6KuyARiu/wZbDqZ67Qs6Z2rr3JowbbJiSN1NLw8dWtGa4Ow969YWGR7WwovqH4qp6UYcaawM3usubHtWYgR/ePIExkpr8swDfAVw3r7K7lLZRu2aTmTOwBvgOI+eg3IsaUd7ONYPUtXB0MfW1dVFmz6wG+VrWG4itrZSxt6/oLxTcUX+4R3msTrz+ZfSeOLO4M1K3QGEcWO7bKe23uKvbh6hBHFou+dEU/6Rbnq/cG+Ab4OhrimupdJuLtjBauDv24biUKe8Vgflph0GkLP61QfEPxDcVX1UCA71aADVeHcHVg8xnhzAp0r6mhz/CWTAN+xPHFXrim/jfXjNBn9Da8u2+tvSXrbXgVPxZCw9XBWaZs4ufaTwJ8A3wDfAN8ee08mjw65TbAN8A3wFcaDwuYLFDypt2t9wf41lq33ItcAdB7+9TQVICvUb+e6Dqu0zjAwqq3m1dPsblt3Q9rywo3XB26bhmKbyi+1mS6BWBW73NevfcTbWxuK71w1V3B6a/C/lmgmcf5p3N1mCbaTyEMToBva45jc5uukVB8Q/H1ViDtW48tryIGxlXx48hYNsvMa1b15puatTw5D/BelZiXB/gG+K68ivNhLhTfUHxD8b1G8V0Qcqe03+3xtst80W+bjInAWnABNMPnnJ6aegxDf9WcMAi75amr2+aWdZW2TyfAN8B3LQjDRhl/bZB0AzkOsGiiHEQcX6nGXAP4W1Sz0j83GnDLWN6s2jpGf1XJownLVJbWJrOywIkDLLy2tyZuX8UzJtiI6vBsC7yI47s9ju9umtJMNZ8hFbB3Svv9IV0ulzQv/C0vIPpJvu3n0zKladqlJS10
// background-color: var(--view-theme);
background-repeat: no-repeat;
background-size: 100% 100%;
// width: 100%;
height: 260rpx;
font-size: 72rpx;
color: #fff;
padding: 31rpx 0 45rpx 0;
box-sizing: border-box;
text-align: center;
margin: 21rpx 24rpx;
border-radius: 10px;
}
.integral-details .header .currentScore {
font-size: 26rpx;
color: rgba(255, 255, 255, 0.8);
text-align: center;
margin-bottom: 11rpx;
}
.currentScore .wenhao{
display: inline-block;
width: 32rpx;
height: 32rpx;
line-height: 32rpx;
text-align: center;
// font-size: 20rpx;
border-radius: 100%;
background-color: rgba(255,255,255,.8);
color: var(--view-theme);
margin-left: 4rpx;
}
.wenhao{
margin-top: -10rpx;
}
.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;
height: 100%;
display: flex;
align-items: center;
justify-content: space-around;
}
.integral-details .header .nav .item {
// width: 33.33%;
text-align: center;
font-size:24rpx;
color:#fff;
}
.integral-details .header .nav .item .num {
color: #fff;
margin-top: 20rpx;
font-weight: bold;
font-size: 60rpx;
color: #FFFFFF;
}
.integral-details .wrapper{
margin: 30rpx 24rpx;
.scoreTitle{
font-family: Alibaba PuHuiTi;
font-weight: 400;
font-size: 30rpx;
color: #333333;
}
}
.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;
}
.p-color {
color: var(--view-priceColor);
}
.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;
border-radius: 50rpx;
background-color: #fff5e2;
border: 1px solid #ffeac1;
color: #c8a86b;
padding: 10rpx 20rpx 10rpx 55rpx;
box-sizing: border-box;
margin-bottom: 24rpx;
position: relative;
}
.integral-details .wrapper .list .tip .iconfont {
font-size: 35rpx;
margin-right: 15rpx;
position: absolute;
top: 10rpx;
left: 16rpx;
}
.integral-details .wrapper .list .item {
// height: 130rpx;
padding: 30rpx 30rpx;
/* border-bottom: 1px solid #eee; */
font-size: 24rpx;
color: #999;
margin-top: 20rpx;
background: #FFF;
border-radius: 10px;
align-items: baseline;
}
.integral-details .wrapper .list .item .state {
margin-bottom: 24rpx;
font-size: 30rpx;
color: #333333;
}
.integral-details .wrapper .list .item .num {
font-size: 36rpx;
}
.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;
}
.instructions{
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
background: rgba(0, 0, 0, .5);
z-index: 10;
}
.instructions .setAgCount {
background: #fff;
width: 656rpx;
height: 458px;
position: absolute;
top: 50%;
left: 50%;
border-radius: 12rpx;
-webkit-border-radius: 12rpx;
padding: 52rpx;
-webkit-transform: translate(-50%, -50%);
-moz-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
overflow: hidden;
.content {
height: 900rpx;
overflow-y: scroll;
/deep/ p {
font-size: 13px;
line-height: 22px;
}
/deep/ img {
max-width: 100%;
}
}
}
.instructions .setAgCount .icon {
font-size: 42rpx;
color: #b4b1b4;
position: absolute;
top: 15rpx;
right: 15rpx;
}
.instructions .setAgCount .title {
color: #333;
font-size: 32rpx;
text-align: center;
font-weight: bold;
}
.instructions .setAgCount .content {
margin-top: 32rpx;
color: #333;
font-size: 26rpx;
line-height: 22px;
text-align: justify;
text-justify: distribute-all-lines;
height: 756rpx;
overflow-y: scroll;
}
</style>