123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190 |
- <template>
- <view>
- <view class="index">
- <image class="index-bg" src="@/static/img/wallet/bg.png" mode="scaleToFill"></image>
- <view class="head-money">
- <view class="sys-color-794B06 sys-size-28">我的波点(个)</view>
- <view class="head-mongy-1">
- <view class="sys-size-52 sys-color-362100 sys-weight-600">{{currentIcoco}}</view>
- </view>
- </view>
- </view>
- <view class="t-box sys-background-FFDFC3">
- <view class="sys-background-gray-f"></view>
- </view>
- <view class="box-sizing-border box-card">
- <view class="card-echrecs box-sizing-border">
- <view class="sys-size-32 sys-color-gray-3 sys-weight-600">每日波点</view>
- <view class="card-echrecs-box">
- <ColumnEcharts ref="columnEcharts"></ColumnEcharts>
- </view>
- </view>
- <image class="crad-f" src="@/static/img/wallet/ad-1.png" mode="scaleToFill" @click="selectFun(1)"></image>
- <view class="card-b">
- <view class="sys-background-FE6915 sys-radius-16 sys-size-32 sys-color-white sys-weight-600"
- @click="selectFun(2)">兑换JM币</view>
- <view class="sys-radius-16 tx-view sys-size-32 sys-color-FE6915 sys-weight-600" @click="selectFun(3)">提现
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import ColumnEcharts from './column-echarts.vue';
- import {
- getDailyEarnings
- } from "@/api/my";
- import tools from "@/service/tools";
- export default {
- components: {
- ColumnEcharts
- },
- data() {
- return {
- date: '',
- currentIcoco:0,
- }
- },
- mounted() {
- this.date = tools.getDateYM();
- this.getDailyEarnings()
- },
- methods: {
- getDailyEarnings() {
- if (this.isAjax) {
- return
- }
- this.isAjax = true
- let that = this
- getDailyEarnings({
- 'pageNo': this.page,
- 'pageSize': 30,
- 'month': this.date
- }).then((res) => {
- this.isAjax = false
- if (res.code === 0) {
- that.currentIcoco = res.data.currentIcoco
-
- let categories = []
- let data = []
-
- res.data.datas.data.forEach((item)=>{
- categories.push(item.date)
- data.push(item.icoco)
- })
-
- let info = {
- categories: categories,
- series: [
- {
- name: "收益",
- data: data
- },
- ]
- };
-
- this.$refs.columnEcharts.chartData = JSON.parse(JSON.stringify(info));
- }
- })
- },
- selectFun(type) {
- if (type === 1) {
- uni.navigateTo({
- url: '/pages/wallet/wave-point'
- })
- } else if (type === 2) {
- // 兑换JM币
- } else if (type === 3) {
- // 提现
- }
- },
- },
- }
- </script>
- <style scoped lang="scss">
- .index {
- width: 100%;
- height: 436rpx;
- position: relative;
- .index-bg {
- width: 100%;
- height: 436rpx;
- }
- .head-money {
- position: absolute;
- left: 54rpx;
- bottom: 76rpx;
- .head-mongy-1 {
- display: flex;
- align-items: center;
- margin-top: 26rpx;
- image {
- width: 40rpx;
- height: 40rpx;
- border-radius: 50%;
- margin-right: 12rpx;
- }
- }
- }
- }
- .t-box {
- height: 30rpx;
- view {
- height: 30rpx;
- border-radius: 30rpx 30rpx 0rpx 0rpx;
- }
- }
- .box-card {
- min-height: 100rpx;
- padding: 0 32rpx 10rpx 32rpx;
- .card-echrecs {
- width: 100%;
- height: 516rpx;
- border-radius: 20rpx;
- box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0, 0, 0, 0.1);
- margin-bottom: 30rpx;
- padding: 32rpx 36rpx;
- .card-echrecs-box {
- width: 100%;
- height: 400rpx;
- margin-top: 20rpx;
- }
- }
- .crad-f {
- width: 100%;
- height: 160rpx;
- border-radius: 20rpx;
- box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0, 0, 0, 0.1);
- }
- .card-b {
- margin-top: 20rpx;
- display: flex;
- justify-content: space-between;
- view {
- width: 332rpx;
- height: 88rpx;
- line-height: 88rpx;
- text-align: center;
- }
- .tx-view {
- box-sizing: border-box;
- border: 2rpx solid #FE6915;
- }
- }
- }
- </style>
|