123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322 |
- <template>
- <view class="integral-details" ref="container">
- <view class="header">
- <view class="currentScore">当前积分</view>
- <view>{{ data.integral }}</view>
- <view class="line"></view>
- <!--<view class="nav acea-row">-->
- <!--<view class="item">-->
- <!--<view class="num">{{ info.sum_integral }}</view>-->
- <!--<view>累计积分</view>-->
- <!--</view>-->
- <!--<view class="item">-->
- <!--<view class="num">{{ info.deduction_integral }}</view>-->
- <!--<view>累计消费</view>-->
- <!--</view>-->
- <!--<view class="item">-->
- <!--<view class="num">{{ info.today_integral }}</view>-->
- <!--<view>今日获得</view>-->
- <!--</view>-->
- <!--</view>-->
- </view>
- <view class="wrapper">
- <view class="nav acea-row">
- <view
- class="item acea-row row-center-wrapper"
- :class="current === navListIndex ? 'on' : ''"
- v-for="(item, navListIndex) in navList"
- :key="navListIndex"
- @click="nav(navListIndex)"
- >
- {{ item.name }}
- </view>
- </view>
- <view class="list" :hidden="current !== 0">
- <!--<view class="tip acea-row row-middle">-->
- <!--<text class="iconfont icon-shuoming"><text-->
- <!-->提示:积分数值的高低会直接影响您的会员等级-->
- <!--</view>-->
- <view
- class="item acea-row row-between-wrapper"
- v-for="(item, listIndex) in list"
- :key="listIndex"
- >
- <view>
- <text class="state">{{ item.title }}</text>
- <div>{{ item.createTime }}</div>
- </view>
- <text class="num" v-if="item.pm == 1">+{{ item.number }}</text>
- <text class="num font-color-red" v-if="item.pm == 0">-{{ item.number }}</text>
- </view>
- </view>
- <!--<view class="list2" :hidden="current !== 1">-->
- <!--<view class="item acea-row row-between-wrapper" @click="goHome()">-->
- <!--<view class="pictrue"><image :src="`${$VUE_APP_RESOURCES_URL}/images/score.png`" /></view>-->
- <!--<view class="name">购买商品可获得积分奖励</view>-->
- <!--<view class="earn">赚积分</view>-->
- <!--</view>-->
- <!--<view-->
- <!--class="item acea-row row-between-wrapper"-->
- <!--@click="goSignIn()"-->
- <!-->-->
- <!--<view class="pictrue"><image :src="`${$VUE_APP_RESOURCES_URL}/images/score.png`" /></view>-->
- <!--<view class="name">每日签到可获得积分奖励</view>-->
- <!--<view class="earn">赚积分</view>-->
- <!--</view>-->
- <!--</view>-->
- </view>
- </view>
- </template>
- <script>
- export default {
- name: "Integral",
- props: {},
- data: function() {
- return {
- navList: [
- { name: "分值明细"}
- // { name: "分值提升", icon: "icon-tishengfenzhi" }
- ],
- current: 0,
- where: {
- pageNum: 1,
- pageSize: 15
- },
- data: {
- sign: 1,
- integral: 1,
- all: 1
- },
- list: [],
- info: [],
- loaded: false,
- loading: false
- };
- },
- mounted: function() {
- this.getIntegral();
- this.getInfo();
- },
- onReachBottom() {
- !this.loading && this.getInfo();
- },
- methods: {
- nav: function(index) {
- this.current = index;
- },
- getInfo: function() {
- let that = this;
- uni.showLoading({
- title: '正在查询'
- })
- this.$api.request('get','app/userBill/list',that.where).then(
- res => {
- uni.hideLoading()
- that.loaded = res.total < that.where.pageSize;
- that.loadTitle = that.loaded ? "人家是有底线的" : "上拉加载更多";
- that.where.pageNum = that.where.pageNum + 1;
- that.list.push.apply(that.list, res.rows);
- },err => {
- uni.hideLoading()
- uni.showToast({
- title: err.msg || err.response.data.msg|| err.response.data.message,
- icon: 'none',
- duration: 2000
- });
- }
- );
- },
- getIntegral: function() {
- let that = this;
- this.$api.request('get', 'user/app/getUser').then(res => {
- that.data.integral = res.data.integral
- })
- }
- }
- };
- </script>
- <style lang="less">
- .list {
- }
- /*积分详情*/
- .integral-details .header {
- background-image: url('https://kxmalls.oss-cn-hangzhou.aliyuncs.com/bg/bg.png');
- background-repeat: no-repeat;
- background-size: 100% 100%;
- width: 100%;
- height: 3.6 * 100rpx;
- font-size: 0.72 * 100rpx;
- color: #fff;
- padding: 0.31 * 100rpx 0 0.45 * 100rpx 0;
- text-align: center;
- font-family: 'GuildfordProBook 5';
- }
- .integral-details .header .currentScore {
- font-size: 0.26 * 100rpx;
- color: rgba(255, 255, 255, 0.8);
- text-align: center;
- margin-bottom: 0.05 * 100rpx;
- }
- .integral-details .header .line {
- width: 0.6 * 100rpx;
- height: 0.03 * 100rpx;
- background-color: #fff;
- margin: 0.2 * 100rpx auto 0 auto;
- }
- .integral-details .header .nav {
- font-size: 0.22 * 100rpx;
- color: rgba(255, 255, 255, 0.8);
- flex: 1;
- -o-flex: 1;
- -ms-flex: 1;
- margin-top: 0.35 * 100rpx;
- }
- .integral-details .header .nav .item {
- width: 33.33%;
- text-align: center;
- }
- .integral-details .header .nav .item .num {
- color: #fff;
- font-size: 0.4 * 100rpx;
- }
- .integral-details .wrapper .nav {
- flex: 1;
- -o-flex: 1;
- -ms-flex: 1;
- width: 6.9 * 100rpx;
- border-radius: 0.2 * 100rpx 0.2 * 100rpx 0 0;
- margin: -0.96 * 100rpx auto 0 auto;
- background-color: #f7f7f7;
- height: 0.96 * 100rpx;
- font-size: 0.3 * 100rpx;
- color: #bbb;
- }
- .integral-details .wrapper .nav .item {
- text-align: center;
- width: 100%;
- }
- /*.integral-details .wrapper .nav .item{text-align:center;width:50%;}*/
- .integral-details .wrapper .nav .item.on {
- background-color: #fff;
- color: #eb3729;
- font-weight: bold;
- border-radius: 0.2 * 100rpx 0.2 * 100rpx 0 0;
- }
- .integral-details .wrapper .nav .item .iconfont {
- font-size: 0.38 * 100rpx;
- margin-right: 0.1 * 100rpx;
- }
- .integral-details .wrapper .list {
- background-color: #fff;
- padding: 0.24 * 100rpx 0.3 * 100rpx;
- }
- .integral-details .wrapper .list .tip {
- font-size: 0.25 * 100rpx;
- width: 6.9 * 100rpx;
- height: 0.6 * 100rpx;
- border-radius: 0.5 * 100rpx;
- background-color: #fff5e2;
- border: 1px solid #ffeac1;
- color: #c8a86b;
- padding: 0 0.2 * 100rpx;
- margin-bottom: 0.24 * 100rpx;
- }
- .integral-details .wrapper .list .tip .iconfont {
- font-size: 0.35 * 100rpx;
- margin-right: 0.15 * 100rpx;
- }
- .integral-details .wrapper .list .item {
- height: 1.24 * 100rpx;
- border-bottom: 1px solid #eee;
- font-size: 0.24 * 100rpx;
- color: #999;
- }
- .integral-details .wrapper .list .item .state {
- font-size: 0.28 * 100rpx;
- color: #282828;
- margin-bottom: 0.08 * 100rpx;
- }
- .integral-details .wrapper .list .item .num {
- font-size: 0.36 * 100rpx;
- font-family: 'GuildfordProBook 5';
- color: #16ac57;
- }
- .integral-details .wrapper .list2 {
- background-color: #fff;
- padding: 0.24 * 100rpx 0;
- }
- .integral-details .wrapper .list2 .item {
- background-image: linear-gradient(to right, #fff7e7 0%, #fffdf9 100%);
- background-image: -moz-linear-gradient(to right, #fff7e7 0%, #fffdf9 100%);
- width: 6.9 * 100rpx;
- height: 1.8 * 100rpx;
- position: relative;
- border-radius: 0.1 * 100rpx;
- margin: 0 auto 0.2 * 100rpx auto;
- padding: 0 0.25 * 100rpx 0 1.8 * 100rpx;
- }
- .integral-details .wrapper .list2 .item .pictrue {
- width: 0.9 * 100rpx;
- height: 1.5 * 100rpx;
- position: absolute;
- bottom: 0;
- left: 0.45 * 100rpx;
- }
- .integral-details .wrapper .list2 .item .pictrue image {
- width: 100%;
- height: 100%;
- }
- .integral-details .wrapper .list2 .item .name {
- width: 2.85 * 100rpx;
- font-size: 0.3 * 100rpx;
- font-weight: bold;
- color: #c8a86b;
- }
- .integral-details .wrapper .list2 .item .earn {
- font-size: 0.26 * 100rpx;
- color: #c8a86b;
- border: 0.02 * 100rpx solid #c8a86b;
- text-align: center;
- line-height: 0.52 * 100rpx;
- height: 0.52 * 100rpx;
- width: 1.6 * 100rpx;
- border-radius: 0.5 * 100rpx;
- }
- .acea-row.row-center-wrapper{
- align-items: center;
- justify-content: center;
- }
- .acea-row.row-between-wrapper {
- align-items: center;
- justify-content: space-between;
- }
- .acea-row {
- display: flex;
- flex-wrap: wrap /* 辅助类 */;
- }
- </style>
|