Browse Source

no message

sys 1 year ago
parent
commit
5bef8ac907
5 changed files with 174 additions and 34 deletions
  1. 9 0
      api/my.js
  2. 38 0
      pages/my/set/blacklist.vue
  3. 66 16
      pages/wallet/bill.vue
  4. 27 4
      pages/wallet/model/income.vue
  5. 34 14
      pages/wallet/model/recharge.vue

+ 9 - 0
api/my.js

@@ -5,5 +5,14 @@ const goodsUrl = '/admin/'
 export const getMemberInfo = (data) => request(goodsUrl + 'myself', 'get', {  })
 export const getMyMoments = (data) => request(goodsUrl + 'myself/myMoments', 'get', data)
 export const getMyLikeMoments = (data) => request(goodsUrl + 'myself/moments', 'get', data)
+//获取充值金额
 export const getRechargePage = (data) => request(goodsUrl + 'myself/getRechargePage', 'get', data)
+//获取我的道具
+export const getPayChannel = (data) => request(goodsUrl + 'myself/payChannel', 'get', data)
+//J币流水
+export const getCashFlowHistoryPage = (data) => request(goodsUrl + 'myself/getCashFlowHistoryPage', 'get', data)
+//每日收益
+export const getDailyEarnings = (data) => request(goodsUrl + 'myself/getDailyEarnings', 'get', data)
+//黑名单列表
+export const getBlackList = (data) => request(goodsUrl + 'myself/blacklist', 'get', data)
 

+ 38 - 0
pages/my/set/blacklist.vue

@@ -25,17 +25,55 @@
 
 <script>
 import EnNav from "@/components/en-utils/en-nav/en-nav";
+import {getBlackList} from "@/api/my";
 export default {
   components: {EnNav},
   data() {
     return {
       navHeight:0,
+      list:[],
+      isAjax:false,
+      total:undefined,
+      page:1,
     }
   },
+  mounted() {
+    this.startList()
+  },
   methods: {
     setNavHeight(navHeight){
       this.navHeight=navHeight
     },
+    startList(){
+      if(this.userId<=0){
+        // return false
+      }
+      this.list=[]
+      this.isAjax=false
+      this.total=undefined
+      this.page=1
+      this.getBlackList()
+
+
+    },
+    getBlackList(){
+      if(this.isAjax){
+        return
+      }
+      this.isAjax=true
+      let that=this
+      getBlackList({'pageNo':this.page,'pageSize':20}).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
+        }
+      })
+    },
+
   }
 }
 </script>

+ 66 - 16
pages/wallet/bill.vue

@@ -17,21 +17,21 @@
 		</view>
 		<view v-if="false" class="no-view sys-size-40 sys-color-gray-9">暂无数据</view>
 		<scroll-view v-else scroll-y="true" class="box-sizing-border list-scroll">
-			<view class="list-box" v-for="(item,i) in 10" :key="i">
+			<view class="list-box" v-for="(item,i) in list" :key="i">
 				<image v-if="navIndex===0" src="@/static/img/wallet/j.png" mode=""></image>
 				<image v-else src="@/static/img/wallet/bb.png" mode=""></image>
 				<view class="box-right">
 					<view class="box-right-1 mb-4">
 						<view class="sys-size-32 sys-color-gray-3">收益</view>
-						<view class="sys-size-36 sys-color-4BC285 sys-weight-600">+100</view>
+						<view class="sys-size-36 sys-color-4BC285 sys-weight-600">{{item.side===1?'+':''}}{{item.amount}}</view>
 						<!-- <view class="sys-size-36 sys-color-gray-3 sys-weight-600">-100</view> -->
 					</view>
-					<view class="sys-size-24 sys-color-gray-9">4月23日 12:06</view>
+					<view class="sys-size-24 sys-color-gray-9">{{item.time}}</view>
 				</view>
 			</view>
 		</scroll-view>
-		
-		
+
+
 		<view class="pop-view" v-if="isPop">
 			<view class="pop-1"></view>
 			<view class="pop-title sys-size-32 sys-color-gray-3 sys-weight-600 sys-background-gray-f">
@@ -47,6 +47,7 @@
 
 <script>
 	import tools from "@/service/tools";
+  import {getCashFlowHistoryPage, getDailyEarnings, getMyLikeMoments} from "@/api/my";
 	export default {
 		data(){
 			return{
@@ -68,22 +69,71 @@
 			this.endTime = tools.getDateYM();
 			this.fromData.time = this.endTime;
 			this.dateList = tools.getCustomTimeList('2020-01',this.endTime,'y-m')
+      this.startList()
 		},
 		methods:{
+      startList(){
+        if(this.userId<=0){
+          // return false
+        }
+        this.list=[]
+        this.isAjax=false
+        this.total=undefined
+        this.page=1
+        if(this.navIndex===0){
+          this.getCashFlowHistoryPage()
+        }else {
+          this.getDailyEarnings()
+        }
+
+
+      },
+      getDailyEarnings(){
+        if(this.isAjax){
+          return
+        }
+        this.isAjax=true
+        let that=this
+        getDailyEarnings({'pageNo':this.page,'pageSize':20,'month':this.fromData.time}).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
+          }
+        })
+      },
+      getCashFlowHistoryPage(){
+        if(this.isAjax){
+          return
+        }
+        this.isAjax=true
+        let that=this
+        getCashFlowHistoryPage({'pageNo':this.page,'pageSize':20,'month':this.fromData.time}).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
+          }
+        })
+      },
 			selectTo(type,item,i){
 				if(type === 1){
-					if(this.navId != item.id){
+					if(this.navId !== item.id){
 						this.navId = item.id;
 						this.navIndex = i;
 						this.fromData.time = this.endTime;
-						this.page = 1;
-						this.list = [];
+						this.startList()
 					}
 				}else if(type === 2){
 					if(item){
 						this.fromData.time = item;
-						this.page = 1;
-						this.list = [];
+            this.startList()
 					}
 					this.isPop = !this.isPop;
 				}
@@ -100,7 +150,7 @@
 		.mb-4{
 			margin-bottom: 4rpx;
 		}
-		
+
 		.pop-view{
 			width: 100%;
 			height: 100vh;
@@ -137,7 +187,7 @@
 				}
 			}
 		}
-		
+
 		.no-view{
 			text-align: center;
 			margin-top: 200rpx;
@@ -162,7 +212,7 @@
 						display: flex;
 						justify-content: space-between;
 					}
-					
+
 				}
 			}
 		}
@@ -187,11 +237,11 @@
 				}
 				.left-1{
 					left: 168rpx;
-					transition: all 0.5s;  
+					transition: all 0.5s;
 				}
 				.left-2{
 					left: 545rpx;
-					transition: all 0.5s;  
+					transition: all 0.5s;
 				}
 			}
 			.box-head-2{
@@ -210,4 +260,4 @@
 			}
 		}
 	}
-</style>
+</style>

+ 27 - 4
pages/wallet/model/income.vue

@@ -30,14 +30,37 @@
 
 <script>
 	import ColumnEcharts from './column-echarts.vue';
+  import {getDailyEarnings} from "@/api/my";
+  import tools from "@/service/tools";
 	export default {
 		components:{ColumnEcharts},
 		data(){
 			return{
-				
+        date:''
 			}
 		},
-		methods:{
+    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,'type':'OP_IN'}).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){
 					uni.navigateTo({
@@ -58,7 +81,7 @@
 		width: 100%;
 		height: 436rpx;
 		position: relative;
-		
+
 		.index-bg{
 			width: 100%;
 			height: 436rpx;
@@ -125,4 +148,4 @@
 			}
 		}
 	}
-</style>
+</style>

+ 34 - 14
pages/wallet/model/recharge.vue

@@ -15,15 +15,15 @@
 		</view>
 		<view class="box-sizing-border box-card">
 			<view class="card-list">
-				<view class="card-list-nav box-sizing-border" 
+				<view class="card-list-nav box-sizing-border"
 				:class="fromData.moneyId===item.id?'s-view':'n-view'"
 				@click="selectFun(1,item)"
 				v-for="(item,i) in list" :key="i">
 					<view class="list-top">
 						<image src="@/static/img/wallet/b.png" mode=""></image>
-						<view class="sys-size-40 sys-color-gray-3 sys-weight-600">{{item.b}}</view>
+						<view class="sys-size-40 sys-color-gray-3 sys-weight-600">{{item.shell}}</view>
 					</view>
-					<view class="sys-size-24 sys-color-gray-6">¥{{item.money}}</view>
+					<view class="sys-size-24 sys-color-gray-6">¥{{item.amount}}</view>
 				</view>
 				<view class="card-list-nav" v-if="list.length>3&&list.length%3!=0"></view>
 			</view>
@@ -34,18 +34,20 @@
 			<view class="card-button sys-background-6DCF06 sys-size-32 sys-color-white" @click="selectFun(4)">
 				<image src="@/static/img/wallet/wx-logo.png" mode="scaleToFill"></image>微信支付
 			</view>
-			
+
 			<view class="sys-size-32 sys-color-gray-3 sys-weight-600">我的道具</view>
 			<image class="crad-f" src="@/static/img/wallet/ad-2.png" mode="scaleToFill" @click="selectFun(5)"></image>
 		</view>
-		
+
 		<SmallPaper v-if="isOpen" @close='close'></SmallPaper>
 	</view>
 </template>
 
 <script>
 	import SmallPaper from './small-paper.vue';
-	
+  import {getPayChannel, getRechargePage} from "@/api/my";
+  import tools from "@/service/tools";
+
 	export default {
 		components:{SmallPaper},
 		data(){
@@ -55,15 +57,33 @@
 					moneyId:1,
 				},
 				list:[
-					{money:6,b:60,id:1,},
-					{money:16,b:160,id:2,},
-					{money:26,b:260,id:3,},
-					{money:36,b:360,id:4,},
-					{money:46,b:460,id:5,},
+
 				],
 			}
 		},
-		methods:{
+    mounted() {
+      this.getRechargePage()
+      this.getPayChannel()
+    },
+    methods:{
+      getPayChannel(){
+        getPayChannel().then((res)=>{
+          if(res.code===0){
+            // this.list=res.data
+          }else {
+            tools.error(res.msg)
+          }
+        })
+      },
+      getRechargePage(){
+        getRechargePage().then((res)=>{
+          if(res.code===0){
+            this.list=res.data
+          }else {
+            tools.error(res.msg)
+          }
+        })
+      },
 			selectFun(type,item){
 				if(type === 1){
 					this.fromData.moneyId = item.id;
@@ -93,7 +113,7 @@
 		width: 100%;
 		height: 436rpx;
 		position: relative;
-		
+
 		.index-bg{
 			width: 100%;
 			height: 436rpx;
@@ -177,4 +197,4 @@
 			box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0,0,0,0.1);
 		}
 	}
-</style>
+</style>