<template>
  <view class="wallet_wrap">
    <z-nav-bar title="我的积分" bgColor="#5188e5" fontColor="#fff"></z-nav-bar>
    <view class="ACTable"><view>
        <view class="AC_con">
          <common-list
            :dataList="MoneyRecord"
            isCondition="true"
            isNoIcon="true"
            label="orderType"
          >
            <template slot="labelSlot" slot-scope="slotProps">
              <view class="label_content AC_List" @click="slotProps.row.relationId?goClick(slotProps.row.relationId):''">
				<view class="point_box">
					<view class="title"><view class="AC_time">{{slotProps.row.createTime}}</view></view>
					
					<view class="Hot">
						<text v-if="slotProps.row.changeAmount > 0">+</text>
						<text>{{slotProps.row.changeAmount}}</text> 
					</view>
				</view>
				<view class="AC_mark" v-if="slotProps.row.remark">{{slotProps.row.remark}}</view>
				
              </view>
            </template>
          </common-list>
        </view>
      </view>
    
      <view style="padding-bottom: 20rpx">
        <u-back-top
          :scroll-top="scrollTop"
          bottom="60"
          :customStyle="bgiStyle"
          :iconStyle="iconStyle"
        >
        </u-back-top>
      </view>
    </view>
  </view>
</template>

<script>
import $http from "@/config/requestConfig.js";
import { mapState } from "vuex";
export default {
  data() {
    return {
      playData: {},
      platform: null,
      urlList: {
        list: "common/jfTransactionDetails/getJfTransactionDetailsList",
      },
      cardList: [],
      couponListTab: 0,
      MoneyRecord: [],
      userMes: {},
      RecordScreen: {
        userid: "",
        page: 1,
        limit: 5,
      },
      scrollTop: 0,
      status: 3,
      totalPage: 0,
      totalCount: 0,
      tab_muJian: 0,
      bgiStyle: {
        background: "#54a966",
      },
      iconStyle: {
        fontSize: "40rpx",
        fontWeight: "bold",
        color: "#54a966",
      },
    };
  },
  // 返回顶部
  onPageScroll(e) {
    this.scrollTop = e.scrollTop;
  },
  //第一次加载
  onLoad(e) {
	  
  },
  computed: {
    ...mapState(["userInfo"]),
  },
  //页面显示
  onShow() {
    this.getData();
  },
  //方法
  methods: {
	  //列表进入详情
	  goClick(id){
		uni.navigateTo({
			url: "/pages/order/infor?orderId=" + id
		});
	  },
    //获取数据
    getData() {
		var data = {
			userId: this.userInfo.id,
		};
		if (!this.iosHide) {
			this.tab_muJian = 1;
		}
		//用户详情
		if (this.userInfo.id != undefined) {
			this.$http.post("book/user/info/" + this.userInfo.id).then((res) => {
				this.userMes = res.user;
			});
		}
		uni.showLoading({
			title: '加载中'
		})
		$http.request({
			url: this.urlList.list,
			method: "POST",
			data,
			header: {
				"Content-Type": "application/json",
			},
		})
		.then((res) => {
			uni.hideLoading();
			this.MoneyRecord = res.transactionDetailsList;
		});
    },
  },
};
</script>
<style lang="scss" scoped>
@import "@/static/mixin.scss";
.wallet_wrap{
	background-color: #eff5f8;
	height: 100%;
	overflow: auto;
}
.ACTable {
	margin: 30rpx;
	border-radius: 15rpx;
	background: #fff;
	
  .AC_mes {
    width: 100%;
    height: 300rpx;
    padding: 40rpx 20rpx;
    box-shadow: 0 0px 10px 1px #d3d1d133;
    border-radius: 15rpx;
    margin-bottom: 10rpx;
    position: relative;
	
    .wallet_title {
      color: $themeColor;
      font-size: 40rpx;
      line-height: 60rpx;
      font-weight: 500 !important;

      margin-bottom: 20rpx;
    }
    .wallet_number {
      color: $themeColor;
      font-size: 80rpx;
      line-height: 80rpx;
      font-weight: bold;
    }
  }

  .AC_con {
    overflow: hidden;
    font-size: 30rpx;
    padding-bottom: 30rpx;

    .AC_jilu {
      font-size: 42rpx;
      text-align: left;
      color: #3d75bf;
      padding: 10rpx 20rpx 40rpx;
    }
    /deep/.list_item {
	  padding: 30rpx !important;
    }
  }

  .couponList {
    view {
      display: inline-block;
      padding: 0 0 25rpx 0;
      margin: 40rpx 0 40rpx 0;
      width: 33%;
      text-align: center;
      font-size: 30rpx;
    }

    .couStyle {
      border-bottom: 5rpx solid #54a966;
      color: #54a966;
      font-weight: bold;
    }
  }

  .card {
    width: 100%;
    overflow: hidden;
    margin-bottom: 30rpx;
    padding-left: 10rpx;
    position: relative;
  }

  .card > view {
    background: #fff;
    border-radius: 5rpx;
  }

  .card .dot-left,
  .card .dot-right {
    display: block;
    width: 12rpx;
    height: 12rpx;
    border-radius: 50%;
    background: #f5f5f5;
    position: absolute;
    z-index: 999;
  }

  .card .dot-left {
    bottom: -6rpx;
    left: -6rpx;
  }

  .card .dot-right {
    bottom: -6rpx;
    right: -6rpx;
  }

  .card .page-group {
    position: absolute;
    top: 10rpx;
    left: -2rpx;
    width: 100%;
    max-width: 200rpx;

    .fold-page {
      display: block;
      width: 10rpx;
      height: 8rpx;
      background: #54a966;
      transform: skewY(-40deg);
      position: absolute;
      top: -5rpx;
      left: -8rpx;
      z-index: 0;
    }

    .page {
      position: absolute;
      z-index: 1;
      display: block;
      padding: 5rpx 20rpx 3rpx 20rpx;
      height: 40rpx;
      line-height: 40rpx;
      background: linear-gradient(137deg, #54a966 0%, #0d5e1e 100%);
      border-radius: 0 20rpx 20rpx 0;
      color: #fff;
      text-align: center;
      font-size: 24rpx;
      overflow: hidden;
      left: -8rpx;
    }
  }

  .card .page-group.grey {
    .fold-page {
      background: #c6c6c6;
    }

    .page {
      background: linear-gradient(137deg, #c6c6c6 0%, #999595 100%);
    }
  }

  .card .content {
    width: 100%;
    height: 180rpx;
    border-bottom: 1rpx dotted #f5f5f5;
    position: relative;
    z-index: 2;
  }

  .card .content .coupon-detail {
    display: flex;
    padding: 0 15rpx 0 20rpx;
  }

  .card .content .coupon-detail > view {
    height: 130rpx;
    display: flex;
    align-items: center;
  }

  .card .content .coupon-detail > view:first-child {
    color: #54a966;
    padding-top: 100rpx;
    width: 30%;
  }

  .card .content .coupon-detail > view.grey {
    color: #c6c6c6;
  }

  .card .content .coupon-detail > view:first-child > span:first-child {
    font-size: 30rpx;
    margin: 0 10rpx 0 0;
  }

  .card .content .coupon-detail > view:first-child > span:last-child {
    font-size: 70rpx;
  }

  .card .content .coupon-detail > view:last-child > view {
    color: #54a966;
    border: 1rpx solid #54a966;
    border-radius: 50rpx;
    font-size: 12px;
    line-height: 25px;
    width: 150rpx;
    height: 50rpx;
    margin: 100rpx 0 0 5rpx;
    text-align: center;
  }

  .card .coupon-detail > view:nth-child(2) {
    flex-direction: column;
    padding-top: 60rpx;
    width: 40%;
  }

  .card .coupon-detail > view:nth-child(2) > view {
    width: 100%;
  }

  .card .coupon-detail > view:nth-child(2) > view:first-child {
    color: #333;
    font-weight: bold;
    font-size: 25rpx;
    margin: 0 0 10rpx 0;
  }

  .card .coupon-detail > view:nth-child(2) > view:last-child {
    font-size: 12px;
    color: #adadad;
    margin-top: 5rpx;
  }

  .card .coupon-detail > view:nth-child(2) > view:last-child > view {
    transform: scale(0.8);
    margin-left: -14rpx;
  }

  .card {
    .footer {
      color: #999;
      font-size: 12px;
      padding: 30rpx 15rpx 30rpx 30rpx;
    }

    .ribbon {
      width: 160rpx;
      height: 40rpx;
      background: #54a966;
      position: absolute;
      right: -40rpx;
      top: 25rpx;
      transform: rotateZ(45deg);
      text-align: center;
      color: #fff;
      font-size: 20rpx;
      line-height: 44rpx;
    }

    .ribbon.grey {
      background: #c6c6c6;
    }
  }
}
.Hot {
  color: $themeColor !important;
  font-size: 32rpx;
  font-weight: bold;
}
.AC_chong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-image: linear-gradient(90deg, #258feb 0%, #73ee9c 100%);
  color: #fff;
  border-top-left-radius: 15rpx;
  border-top-right-radius: 15rpx;
  padding: 20rpx 20rpx;
  font-size: 36rpx;
  font-weight: 800;
  text-align: right;
}
.rightArrow {
  width: 40rpx;
  height: 40rpx;
  float: right;
  margin-left: 10rpx;
}
.point_box{
	display: flex; 
	align-items: center; 
	justify-content: space-between;
	padding: 10rpx 0;
	color: #333;
}
.title{
	font-size: 32rpx;
	font-weight: bold;
}
.AC_mark {
	width: 100%;
	display: block;
	font-size: 28rpx;
	color: #343434;
  }

  .AC_time {
	color: #909090;
	font-size: 28rpx;
	padding-top: 10rpx;
  }
</style>
