WIN-8NDK4S1KEGQ\Administrator 11 månader sedan
förälder
incheckning
1b687b16cb
4 ändrade filer med 110 tillägg och 58 borttagningar
  1. 1 1
      api/my.js
  2. 1 1
      pages/wallet/model/column-echarts.vue
  3. 91 52
      pages/wallet/model/income.vue
  4. 17 4
      pages/wallet/model/recharge.vue

+ 1 - 1
api/my.js

@@ -12,7 +12,7 @@ export const getPayChannel = (data) => request(goodsUrl + 'myself/payChannel', '
 //J币流水
 export const getCashFlowHistoryPage = (data) => request(goodsUrl + 'myself/getCashFlowHistoryPage', 'post', data)
 //每日收益
-export const getDailyEarnings = (data) => request(goodsUrl + 'myself/getDailyEarnings', 'get', data)
+export const getDailyEarnings = (data) => request(goodsUrl + 'myself/getDailyEarnings', 'post', data)
 //黑名单列表
 export const getBlackList = (data) => request(goodsUrl + 'myself/blacklist', 'post', data)
 export const delBlackItem = (data) => request(goodsUrl + 'myself/blacklist/'+data, 'delete', {})

+ 1 - 1
pages/wallet/model/column-echarts.vue

@@ -55,7 +55,7 @@ export default {
     };
   },
   mounted() {
-    this.getServerData();
+    // this.getServerData();
   },
   methods: {
     getServerData() {

+ 91 - 52
pages/wallet/model/income.vue

@@ -5,7 +5,7 @@
 			<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">138</view>
+					<view class="sys-size-52 sys-color-362100 sys-weight-600">{{currentIcoco}}</view>
 				</view>
 			</view>
 		</view>
@@ -21,8 +21,10 @@
 			</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 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>
@@ -30,45 +32,70 @@
 
 <script>
 	import ColumnEcharts from './column-echarts.vue';
-  import {getDailyEarnings} from "@/api/my";
-  import tools from "@/service/tools";
+	import {
+		getDailyEarnings
+	} from "@/api/my";
+	import tools from "@/service/tools";
 	export default {
-		components:{ColumnEcharts},
-		data(){
-			return{
-        date:''
+		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':20,'month':this.date}).then((res)=>{
-          this.isAjax=false
-          if(res.code===0){
-            res.data.data.forEach((item)=>{
-              that.list.push(item )
-            })
-            ++that.page
-            that.total=res.data.total
-          }
-        })
-      },
-			selectFun(type){
-				if(type === 1){
+		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'
+						url: '/pages/wallet/wave-point'
 					})
-				}else if(type === 2){
+				} else if (type === 2) {
 					// 兑换JM币
-				}else if(type === 3){
+				} else if (type === 3) {
 					// 提现
 				}
 			},
@@ -77,24 +104,27 @@
 </script>
 
 <style scoped lang="scss">
-	.index{
+	.index {
 		width: 100%;
 		height: 436rpx;
 		position: relative;
 
-		.index-bg{
+		.index-bg {
 			width: 100%;
 			height: 436rpx;
 		}
-		.head-money{
+
+		.head-money {
 			position: absolute;
 			left: 54rpx;
 			bottom: 76rpx;
-			.head-mongy-1{
+
+			.head-mongy-1 {
 				display: flex;
 				align-items: center;
 				margin-top: 26rpx;
-				image{
+
+				image {
 					width: 40rpx;
 					height: 40rpx;
 					border-radius: 50%;
@@ -103,46 +133,55 @@
 			}
 		}
 	}
-	.t-box{
+
+	.t-box {
 		height: 30rpx;
-		view{
+
+		view {
 			height: 30rpx;
 			border-radius: 30rpx 30rpx 0rpx 0rpx;
 		}
 	}
-	.box-card{
+
+	.box-card {
 		min-height: 100rpx;
 		padding: 0 32rpx 10rpx 32rpx;
-		.card-echrecs{
+
+		.card-echrecs {
 			width: 100%;
 			height: 516rpx;
 			border-radius: 20rpx;
-			box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0,0,0,0.1);
+			box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0, 0, 0, 0.1);
 			margin-bottom: 30rpx;
 			padding: 32rpx 36rpx;
-			.card-echrecs-box{
+
+			.card-echrecs-box {
 				width: 100%;
 				height: 400rpx;
 				margin-top: 20rpx;
 			}
 		}
-		.crad-f{
+
+		.crad-f {
 			width: 100%;
 			height: 160rpx;
 			border-radius: 20rpx;
-			box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0,0,0,0.1);
+			box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0, 0, 0, 0.1);
 		}
-		.card-b{
+
+		.card-b {
 			margin-top: 20rpx;
 			display: flex;
 			justify-content: space-between;
-			view{
+
+			view {
 				width: 332rpx;
 				height: 88rpx;
 				line-height: 88rpx;
 				text-align: center;
 			}
-			.tx-view{
+
+			.tx-view {
 				box-sizing: border-box;
 				border: 2rpx solid #FE6915;
 			}

+ 17 - 4
pages/wallet/model/recharge.vue

@@ -55,10 +55,12 @@
 				isOpen:false,
 				fromData:{
 					moneyId:1,
+					shell:'',
+					amount:'',
+					paymentMethod:'',
 				},
-				list:[
-
-				],
+				list:[],
+				pay:[],
 			}
 		},
     mounted() {
@@ -69,7 +71,7 @@
       getPayChannel(){
         getPayChannel().then((res)=>{
           if(res.code===0){
-            // this.list=res.data
+            this.pay=res.data
           }else {
             tools.error(res.msg)
           }
@@ -87,6 +89,8 @@
 			selectFun(type,item){
 				if(type === 1){
 					this.fromData.moneyId = item.id;
+					this.fromData.shell = item.shell;
+					this.fromData.amount = item.amount;
 				}else if(type === 2){
 					// 积且充值协议跳转
 				}else if(type === 3){
@@ -98,6 +102,15 @@
 					this.isOpen = true;
 				}
 			},
+			
+			payFun(type){
+				if(type === 3){
+					this.fromData.paymentMethod = "alipay";
+				}else{
+					this.fromData.paymentMethod = "wechat";
+				}
+			},
+			
 			close(e){
 				this.isOpen = false;
 			},