Browse Source

Merge branch 'master' of http://git.liuniu946.com/xuhaolan/lishang

hwq 4 years ago
parent
commit
9a4b1c563a

+ 47 - 0
pages.json

@@ -532,6 +532,15 @@
             }
             
         }
+		,{
+		    "path" : "pages/money/USDThuzhuan",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "USDT转账",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		}
         ,{
             "path" : "pages/usdt/recharge",
             "style" :                                                                                    
@@ -604,6 +613,44 @@
             }
             
         }
+        ,{
+            "path" : "pages/user/faquan",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "素材分享",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+       
+      
+        ,{
+            "path" : "pages/user/jifen",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "我的购物积分",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/user/yongjin",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "我的佣金",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/user/balance",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "我的余额",
+                "enablePullDownRefresh": false
+            }
+            
+        }
     ],
 	"subPackages": [
 		{

+ 12 - 18
pages/collection/collection.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="content">
 		<view class="collection-box">
-			<view class="collection-item">
+			<view class="collection-item" @click="navTo('/pages/collection/bank')">
 				<view class="left">
 					<view class="img">
 						<image src="../../static/user/bank.png" mode=""></image>
@@ -15,12 +15,12 @@
 						未添加
 					</view>
 					
-					<view class="img1" @click="nav('')">
+					<view class="img1" >
 						<image src="../../static/user/right.png" mode=""></image>
 					</view>
 				</view>
 			</view>
-			<view class="collection-item">
+			<view class="collection-item" @click="navTo('/pages/collection/zfb')">
 				<view class="left">
 					<view class="img">
 						<image src="../../static/user/zfb.png" mode=""></image>
@@ -38,7 +38,7 @@
 					</view>
 				</view>
 			</view>
-			<view class="collection-item">
+			<view class="collection-item" @click="navTo('/pages/collection/wx')">
 				<view class="left">
 					<view class="img">
 						<image src="../../static/user/wx.png" mode=""></image>
@@ -66,23 +66,17 @@
 			return {
 
 			};
+		},
+		methods:{
+			navTo(url){
+				console.log(url);
+				uni.navigateTo({
+					url
+				})
+			}
 		}
 	}
 </script>
-<view class="collection-item">
-	<view class="img">
-		<image src="../user/bank.png" mode=""></image>
-	</view>
-	<view class="bank">
-		银行卡
-	</view>
-	<view class="gg">
-		<view class="status">
-			未添加
-		</view>
-		<image src="../../static/icon/more.png" mode=""></image>
-	</view>
-</view>
 <style lang="scss">
 	page,
 	.content {

+ 1 - 35
pages/money/USDT.vue

@@ -8,7 +8,7 @@
 				</view>
 			</view>
 			<view class="header-right">
-				<view>USDT互转</view>
+				<view @click="navTo('/pages/money/USDThuzhuan')">USDT互转</view>
 				<view @click="navTo('/pages/money/conversionIntegral')">转换积分</view>
 			</view>
 		</view>
@@ -26,40 +26,6 @@
 				</view>
 			</scroll-view>
 		</view>
-		<!-- <view class="row-box">
-			<view class="title">充值金额</view>
-			<view class="row">
-				<text class="tit">¥</text>
-				<input class="input" type="number" v-model="money" placeholder="请输入充值金额" placeholder-class="placeholder" />
-			</view>
-		</view> -->
-
-		<!-- <view class="list"> -->
-			<!-- <radio-group @change="tabRadio"> -->
-				<!-- #ifdef APP-PLUS -->
-				<!-- <label>
-					<view class="box">
-						<view class="icon iconfont iconzhifubao"></view>
-						<view class="title-box">
-							<view class="title"><text>支付宝充值</text></view>
-						</view>
-						<view class="right"><radio value="alipay" color="#5dbc7c" :checked="type == 'alipay'" /></view>
-					</view>
-				</label>
-				<label>
-					<view class="box">
-						<view class="icon iconfont iconweixin1"></view>
-						<view class="title-box">
-							<view class="title"><text>微信充值</text></view>
-							<view class="node"><text>真实姓名(代勇明)</text></view>
-						</view>
-						<view class="right"><radio value="weixin" color=" #5dbc7c" :checked="type == 'weixin'" /></view>
-					</view>
-				</label> -->
-				<!-- #endif -->
-			<!-- </radio-group> -->
-		<!-- </view> -->
-		<!-- <button class="add-btn up" :class="{ 'active-bg': payLoding }" @click="!payLoding ? confirm() : ''">确认充值</button> -->
 		<view class="footer">
 			<view class="recharge" @click="navTo('/pages/money/recharge')">
 				充币

+ 125 - 0
pages/money/USDThuzhuan.vue

@@ -0,0 +1,125 @@
+<template>
+	<view class="integralTransforms">
+		<view class="header">
+			<text class="title">{{ integral || '0.00' }}</text><br>
+			<text>可转换USDT</text>
+		</view>
+		<view class="account">
+			<text class="title">收款人账户</text>
+			<input class="text" type="text" placeholder="请输入收款人账户" v-model="account"/>
+		</view>
+		<view class="num">
+			<text class="title">转账数量</text>
+				<view class="">
+					<text class="ti">¥</text>
+					<input class="text" type="number" v-model.number="num" placeholder="请输入转账数量" />
+				</view>
+		</view>
+		<view class="button" @click="submit">
+			提交申请
+		</view>
+		<view class="record">
+			收款记录
+		</view>
+	</view>
+</template>
+
+<script> 
+	export default {
+		data() {
+			return {
+				num: '',//转账数量
+				account: '',//收款人账户
+			}
+		},
+		methods: {
+			submit() {
+				const data = {
+					num: this.num,
+					account: this.account
+				}
+				console.log(data)
+			}
+		},
+		computed: {
+			//积分
+			integral() {
+				return this.$store.state.user.userInfo.integral
+			}
+		},
+		watch: {
+			num() {
+				if (this.num > this.integral) {
+					this.num = this.integral
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.integralTransforms {
+		.header,.account,.num {
+			background-color: #fff;
+			margin: 20rpx 0;
+			padding: 30rpx;
+			input {
+				margin-top: 10rpx;
+			}
+			.title {
+				font-size: 30rpx;
+				color: #333333;
+				font-family: PingFang-SC-Regular;
+			}
+			.text{
+				font-size: 28rpx;
+				font-family: PingFang SC;
+				font-weight: 400;
+				color: #999999;
+				
+			}
+		}
+		.header {
+			text-align: center;
+			text:nth-child(1) {
+				font-size: 45rpx;
+			}
+			text:nth-child(3) {
+				font-size: 30rpx;
+				color: #666666;
+			}
+		}
+		.num {
+			.ti {
+				float: left;
+			}
+		}
+		.button {
+			width: 630rpx;
+			margin: 120rpx auto 10rpx;
+			
+			line-height: 94rpx;
+			text-align: center;
+			border-radius: 10rpx;
+			background: linear-gradient(90deg, #438BED 0%,  #44BFEC 100%);
+			color: #fff;
+		}
+		.record{
+			width: 630rpx;
+			margin: 0 auto;
+			text-align: center;
+			border: 1rpx solid #44BFEC;
+			background: linear-gradient(90deg, #44BFEC, #438BED);
+			border-radius: 10rpx;
+			font-size: 36rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #FFFFFF;
+			line-height: 94rpx;
+			
+			background: linear-gradient(0deg, #44BFEC 0%, #438BED 100%);
+			-webkit-background-clip: text;
+			-webkit-text-fill-color: transparent;
+		}
+	}
+</style>

+ 35 - 0
pages/usdt/usdt.vue

@@ -69,6 +69,41 @@
 						status: '充币',
 						recordMoney: 7777
 					},
+					{
+						time: "2021-1-1 11:11:11",
+						status: '充币',
+						recordMoney: 7777
+					},
+					
+					{
+						time: "2021-1-1 11:11:11",
+						status: '充币',
+						recordMoney: 7777
+					},
+					
+					{
+						time: "2021-1-1 11:11:11",
+						status: '充币',
+						recordMoney: 7777
+					},
+					{
+						time: "2021-1-1 11:11:11",
+						status: '充币',
+						recordMoney: 7777
+					},
+					
+					{
+						time: "2021-1-1 11:11:11",
+						status: '充币',
+						recordMoney: 7777
+					},
+					
+					{
+						time: "2021-1-1 11:11:11",
+						status: '充币',
+						recordMoney: 7777
+					},
+					
 					{
 						time: "2021-1-1 11:11:11",
 						status: '充币',

+ 269 - 0
pages/user/balance.vue

@@ -0,0 +1,269 @@
+<template>
+	<view class="content">
+		<!-- <view class="navbar">
+			<view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
+		</view> -->
+		<view class="header">
+			<image src="../../static/user/yue.png" mode=""></image>
+			<view class="integral">
+				{{ integral || '0.00' }}
+			</view>
+			<!-- <navigator url="/pages/money/conversionIntegral"><view class="right">转换USDT</view></navigator> -->
+		</view>
+		<view class="navbar">
+			<view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
+		</view>
+		<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
+			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
+				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
+					<!-- 空白页 -->
+					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
+
+					<!-- 订单列表 -->
+					<view v-for="(item, index) in tabItem.orderList" :key="index" class="order-item flex">
+						<view class="title-box">
+							<view class="title">
+								<text>{{ item.mark }}</text>
+							</view>
+							<view class="time">
+								<text>{{ item.add_time }}</text>
+							</view>
+						</view>
+						<view class="money">
+							<text>{{ (item.pm == 0 ? '-' : '+') + item.number }}</text>
+						</view>
+					</view>
+					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
+				</scroll-view>
+			</swiper-item>
+		</swiper>
+		<!-- <view class="button">
+			<navigator url="/pages/user/integralTransforms" class="b-left">积分转账</navigator>
+			<navigator url="/pages/user/exchangeIntegral" class="b-right">转换购物积分</navigator>
+		</view> -->
+		<button type="default" class="button" @click="navto('/pages/money/recharge')">立即充值</button>
+	</view>
+</template>
+
+<script>
+	
+import { integrallist } from '@/api/functionalUnit.js';
+import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
+import empty from '@/components/empty';
+export default {
+	components: {
+		empty,
+		uniLoadMore
+	},
+	onReady() {
+		
+	},
+	data() {
+		return {
+			tabCurrentIndex: 0,
+			navList: [
+				{
+					state: 0,
+					text: '收入',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				},
+				{
+					state: 1,
+					text: '支出',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				},
+			],
+		};
+	},
+	onShow() {
+		// 载入积分数据
+		this.loadData();
+	},
+	methods: {
+		// 页面跳转
+		navto(e) {
+			uni.navigateTo({
+				url: e
+			});
+		},
+		//获取收入支出信息
+		async loadData(source) {
+			//这里是将订单挂载到tab列表下
+			let index = this.tabCurrentIndex;
+			let navItem = this.navList[index];
+			let state = navItem.state;
+			if (source === 'tabChange' && navItem.loaded === true) {
+				//tab切换只有第一次需要加载数据
+				return;
+			}
+			if (navItem.loadingType === 'loading') {
+				//防止重复加载
+				return;
+			}
+			// 修改当前对象状态为加载中
+			navItem.loadingType = 'loading';
+
+			integrallist(
+				{
+					page: navItem.page,
+					limit: navItem.limit
+				},
+				state
+			)
+				.then(({ data }) => {
+					if (data.length > 0) {
+						navItem.orderList = navItem.orderList.concat(data);
+						navItem.page++;
+					}
+					if (navItem.limit == data.length) {
+						//判断是否还有数据, 有改为 more, 没有改为noMore
+						navItem.loadingType = 'more';
+						return;
+					} else {
+						//判断是否还有数据, 有改为 more, 没有改为noMore
+						navItem.loadingType = 'noMore';
+					}
+					uni.hideLoading();
+					this.$set(navItem, 'loaded', true);
+				})
+				.catch(e => {
+					console.log(e);
+				});
+		},
+
+		//swiper 切换
+		changeTab(e) {
+			this.tabCurrentIndex = e.target.current;
+			this.loadData('tabChange');
+		},
+		//顶部tab点击
+		tabClick(index) {
+			this.tabCurrentIndex = index;
+		}
+	},
+	computed: {
+		//积分
+		integral() {
+			return this.$store.state.user.userInfo.integral
+		}
+	},
+};
+</script>
+
+<style lang="scss">
+page {
+	background: #ffffff;
+	height: 100%;
+}
+.header {
+	image {
+		width: 100%;
+		height: 400rpx;
+	}
+	.integral {
+		width: 100%;
+		text-align: center;
+		position: absolute;
+		top: 160rpx;
+		color: #fff;
+		font-size: 80rpx;
+		font-weight: bold;
+	}
+	.right {
+		position: absolute;
+		top: 120rpx;
+		right: 0;
+		background-color: #fff;
+		border-radius: 10rpx 0 0 10rpx;
+		color: #438BED;
+		padding: 5rpx 15rpx;
+		font-size: 28rpx;
+	}
+}
+.navbar {
+	display: flex;
+	
+	height: 40px;
+	padding: 0 5px;
+	background: #fff;
+	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
+	position: relative;
+	z-index: 10;
+	.nav-item {
+		flex: 1;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		height: 100%;
+		font-size: 15px;
+		color: $font-color-dark;
+		position: relative;
+		&.current {
+			color: #438BED;
+			&:after {
+				content: '';
+				position: absolute;
+				left: 50%;
+				bottom: 0;
+				transform: translateX(-50%);
+				width: 44px;
+				height: 0;
+				border-bottom: 2px solid #438BED;
+			}
+		}
+	}
+}
+// 列表
+
+.swiper-box {
+	height: calc(100% - 180rpx - 400rpx);
+	padding-top: 10rpx;
+	.order-item {
+		padding: 20rpx 30rpx;
+		line-height: 1.5;
+		.title-box {
+			.title {
+				font-size: $font-lg;
+				color: $font-color-base;
+			}
+			.time {
+				font-size: $font-base;
+				color: $font-color-light;
+			}
+		}
+		.money {
+			color: #EF3A55;
+			font-size: $font-lg;
+		}
+	}
+}
+.list-scroll-content {
+	height: 100%;
+}
+.content {
+	height: 100%;
+	.empty-content {
+		height: 100%;
+		background-color: #ffffff;
+	}
+}
+.button {
+	position: relative;
+	bottom: 0;
+	bottom: 50rpx;
+width: 674rpx;
+height: 88rpx;
+background: linear-gradient(90deg, #44BFEC, #438BED);
+border-radius: 44rpx;
+font-size: 36rpx;
+font-family: PingFang SC;
+font-weight: 500;
+color: #FFFFFF;
+}
+</style>

+ 251 - 0
pages/user/faquan.vue

@@ -0,0 +1,251 @@
+<template>
+	<view class="content">
+		<view class="title-box">
+			<view class="top">
+				<view class="title">
+					<view class="title-left">
+						<view class="img">
+							<image src="../../static/usdt/logo.png" mode=""></image>
+						</view>
+					</view>
+					<view class="title-right">
+						<view class="name">
+							好强儿
+						</view>
+						<view class="time">
+							1分钟前
+						</view>
+					</view>
+				</view>
+				<view class="share">
+					<view class="img">
+						<image src="../../static/user/share.png" mode=""></image>
+					</view>
+					<view class="ci">
+						985
+					</view>
+				</view>
+			</view>
+			<view class="text">
+				<text>
+					承包你大半年的洗衣液~【威露士】倍净洗衣液套装 消毒除异味,除螨除菌高达99%用心呵护一家子的 健康整整12斤,专享价【89】
+				</text>
+			</view>
+			<view class="share-img">
+				<view class="text-img" v-for="item in imgList">
+					<image :src="item.img" mode=""></image>
+				</view>
+			</view>
+			<view class="bottom">
+				<view class="pic">
+					下载图片
+				</view>
+				<view class="fuzhi">
+					复制文本
+				</view>
+			</view>
+		</view>
+		
+		<view class="title-box">
+			<view class="top">
+				<view class="title">
+					<view class="title-left">
+						<view class="img">
+							<image src="../../static/usdt/logo.png" mode=""></image>
+						</view>
+					</view>
+					<view class="title-right">
+						<view class="name">
+							好强儿
+						</view>
+						<view class="time">
+							1分钟前
+						</view>
+					</view>
+				</view>
+				<view class="share">
+					<view class="img">
+						<image src="../../static/user/share.png" mode=""></image>
+					</view>
+					<view class="ci">
+						985
+					</view>
+				</view>
+			</view>
+			<view class="text">
+				<text>
+					承包你大半年的洗衣液~【威露士】倍净洗衣液套装 消毒除异味,除螨除菌高达99%用心呵护一家子的 健康整整12斤,专享价【89】
+				</text>
+			</view>
+			<view class="share-img">
+				<view class="text-img" v-for="item in imgList">
+					<image :src="item.img" mode=""></image>
+				</view>
+			</view>
+			<view class="bottom">
+				<view class="pic">
+					下载图片
+				</view>
+				<view class="fuzhi">
+					复制文本
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				imgList:[
+					{img:"../../static/usdt/logo.png"},
+					{img:"../../static/usdt/logo.png"},
+					{img:"../../static/usdt/logo.png"},
+					{img:"../../static/usdt/logo.png"},
+					{img:"../../static/usdt/logo.png"},
+					{img:"../../static/usdt/logo.png"}
+				]
+			};
+		}
+	}
+</script>
+
+<style lang="scss">
+	page,
+	.content {
+		height: 100%;
+		padding: 0;
+		margin: 0;
+		background: #F8F8F8;
+	}
+
+	.title-box {
+		border-radius: 20px 20px 20px 20px;
+		background: #FFFFFF;
+		margin: 20rpx auto;
+		width: 700rpx;
+		
+		padding: 30rpx;
+		.top{
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+		}
+		.title {
+			display: flex;
+			.title-left {
+				display: flex;
+				height: 80rpx;
+				.img {
+					width: 80rpx;
+					height: 80rpx;
+					border-radius:50%;
+					
+					image {
+						height: 100%;
+						width: 100%;
+					}
+				}
+
+			}
+
+			.title-right {
+				margin-left: 16rpx;
+				display: flex;
+				flex-direction: column;
+				.name {
+					font-size: 32rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #444444;
+					
+				}
+
+				.time {
+					font-size: 24rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+					
+				}
+			}
+		}
+
+		.share {
+			padding: 10rpx;
+			display: flex;
+			justify-content: space-around;
+			align-items: center;
+			width: 120rpx;
+			height: 42rpx;
+			
+			background: #FAEBCF;
+			border-radius: 30rpx;
+			.img {
+				width: 33rpx;
+				height: 24rpx;
+				image {
+					width: 100%;
+					height: 100%;
+				}
+			}
+
+			.ci {
+				font-size: 28rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #80420A;
+				
+				
+			}
+		}
+	}
+
+
+.text{
+	margin: 10rpx 0;
+	text{
+		font-size: 28rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #666666;
+		line-height: 56rpx;
+	}
+}
+.share-img{
+	margin: 10rpx 0;
+	width: 100%;
+	display: flex;
+	justify-content: space-between;
+	flex-wrap: wrap;
+	
+	.text-img{
+		margin: 10rpx 0;
+		width: 200rpx;
+		height: 200rpx;
+		border-radius: 10rpx;
+		image{
+			width: 100%;
+			height: 100%;
+		}
+	}
+}
+.bottom{
+	display: flex;
+	.pic{
+		font-size: 28rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #536893;
+	}
+	.fuzhi{
+		margin-left: 33rpx;
+		font-size: 28rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #536893;
+	}
+}
+
+</style>

+ 277 - 0
pages/user/jifen.vue

@@ -0,0 +1,277 @@
+<template>
+	<view class="content">
+		<!-- <view class="navbar">
+			<view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
+		</view> -->
+		<view class="header">
+			<image src="../../static/user/shopping.png" mode=""></image>
+			<view class="integral">
+				{{ integral || '0.00' }}
+			</view>
+			<navigator url="/pages/money/conversionIntegral"><view class="right">转换USDT</view></navigator>
+		</view>
+		<view class="navbar">
+			<view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
+		</view>
+		<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
+			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
+				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
+					<!-- 空白页 -->
+					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
+
+					<!-- 订单列表 -->
+					<view v-for="(item, index) in tabItem.orderList" :key="index" class="order-item flex">
+						<view class="title-box">
+							<view class="title">
+								<text>{{ item.mark }}</text>
+							</view>
+							<view class="time">
+								<text>{{ item.add_time }}</text>
+							</view>
+						</view>
+						<view class="money">
+							<text>{{ (item.pm == 0 ? '-' : '+') + item.number }}</text>
+						</view>
+					</view>
+					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
+				</scroll-view>
+			</swiper-item>
+		</swiper>
+		<!-- <view class="button">
+			<navigator url="/pages/user/integralTransforms" class="b-left">积分转账</navigator>
+			<navigator url="/pages/user/exchangeIntegral" class="b-right">转换购物积分</navigator>
+		</view> -->
+	</view>
+</template>
+
+<script>
+	
+import { integrallist } from '@/api/functionalUnit.js';
+import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
+import empty from '@/components/empty';
+export default {
+	components: {
+		empty,
+		uniLoadMore
+	},
+	onReady() {
+		
+	},
+	data() {
+		return {
+			tabCurrentIndex: 0,
+			navList: [
+				{
+					state: 0,
+					text: '收入',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				},
+				{
+					state: 1,
+					text: '支出',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				},
+			],
+		};
+	},
+	onShow() {
+		// 载入积分数据
+		this.loadData();
+	},
+	methods: {
+		// 页面跳转
+		navto(e) {
+			uni.navigateTo({
+				url: e
+			});
+		},
+		//获取收入支出信息
+		async loadData(source) {
+			//这里是将订单挂载到tab列表下
+			let index = this.tabCurrentIndex;
+			let navItem = this.navList[index];
+			let state = navItem.state;
+			if (source === 'tabChange' && navItem.loaded === true) {
+				//tab切换只有第一次需要加载数据
+				return;
+			}
+			if (navItem.loadingType === 'loading') {
+				//防止重复加载
+				return;
+			}
+			// 修改当前对象状态为加载中
+			navItem.loadingType = 'loading';
+
+			integrallist(
+				{
+					page: navItem.page,
+					limit: navItem.limit
+				},
+				state
+			)
+				.then(({ data }) => {
+					if (data.length > 0) {
+						navItem.orderList = navItem.orderList.concat(data);
+						navItem.page++;
+					}
+					if (navItem.limit == data.length) {
+						//判断是否还有数据, 有改为 more, 没有改为noMore
+						navItem.loadingType = 'more';
+						return;
+					} else {
+						//判断是否还有数据, 有改为 more, 没有改为noMore
+						navItem.loadingType = 'noMore';
+					}
+					uni.hideLoading();
+					this.$set(navItem, 'loaded', true);
+				})
+				.catch(e => {
+					console.log(e);
+				});
+		},
+
+		//swiper 切换
+		changeTab(e) {
+			this.tabCurrentIndex = e.target.current;
+			this.loadData('tabChange');
+		},
+		//顶部tab点击
+		tabClick(index) {
+			this.tabCurrentIndex = index;
+		}
+	},
+	computed: {
+		//积分
+		integral() {
+			return this.$store.state.user.userInfo.integral
+		}
+	},
+};
+</script>
+
+<style lang="scss">
+page {
+	background: #ffffff;
+	height: 100%;
+}
+.header {
+	image {
+		width: 100%;
+		height: 400rpx;
+	}
+	.integral {
+		width: 100%;
+		text-align: center;
+		position: absolute;
+		top: 160rpx;
+		color: #fff;
+		font-size: 80rpx;
+		font-weight: bold;
+	}
+	.right {
+		position: absolute;
+		top: 120rpx;
+		right: 0;
+		background-color: #fff;
+		border-radius: 10rpx 0 0 10rpx;
+		color: #438BED;
+		padding: 5rpx 15rpx;
+		font-size: 28rpx;
+	}
+}
+.navbar {
+	display: flex;
+	height: 40px;
+	padding: 0 5px;
+	background: #fff;
+	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
+	position: relative;
+	z-index: 10;
+	.nav-item {
+		flex: 1;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		height: 100%;
+		font-size: 15px;
+		color: $font-color-dark;
+		position: relative;
+		&.current {
+			color: #438BED;
+			&:after {
+				content: '';
+				position: absolute;
+				left: 50%;
+				bottom: 0;
+				transform: translateX(-50%);
+				width: 44px;
+				height: 0;
+				border-bottom: 2px solid #438BED;
+			}
+		}
+	}
+}
+// 列表
+
+.swiper-box {
+	height: calc(100% - 180rpx - 400rpx);
+	padding-top: 10rpx;
+	.order-item {
+		padding: 20rpx 30rpx;
+		line-height: 1.5;
+		.title-box {
+			.title {
+				font-size: $font-lg;
+				color: $font-color-base;
+			}
+			.time {
+				font-size: $font-base;
+				color: $font-color-light;
+			}
+		}
+		.money {
+			color: #EF3A55;
+			font-size: $font-lg;
+		}
+	}
+}
+.list-scroll-content {
+	height: 100%;
+}
+.content {
+	height: 100%;
+	.empty-content {
+		background-color: #ffffff;
+	}
+}
+.button {
+	height: 180rpx;
+	width: 100%;
+	display: flex;
+	position: absolute;
+	padding: 40rpx 30rpx 60rpx 30rpx;
+	bottom: 0;
+	text-align: center;
+	.b-left,.b-right {
+		flex: 1;
+		height: 80rpx;
+		line-height: 80rpx;
+		margin: 0 30rpx;
+		border-radius: 50rpx;
+	}
+	.b-left {
+		color: #438BED;
+		border: solid 1rpx #438BED;
+	}
+	.b-right {
+		background: linear-gradient(90deg, #438BED 0%,  #44BFEC 100%);
+		color: #fff;
+	}
+}
+</style>

+ 9 - 9
pages/user/user.vue

@@ -87,28 +87,28 @@
 						<view class="title"><text>我的资产</text></view>
 					</view> -->
 					<view class="order-section">
-						<view class="order-item" @click="navTo('/pages/money/wallet')" hover-class="common-hover"
+						<view class="order-item" @click="navTo('/pages/user/balance')" hover-class="common-hover"
 							:hover-stay-time="50">
 							<view class="icon">
 								<image class="icon-img" src="/static/user/user09.png" mode="aspectFit"></image>
 							</view>
 							<text>我的余额</text>
 						</view>
-						<view class="order-item" @click="navTo('/pages/user/award')" hover-class="common-hover"
+						<view class="order-item" @click="navTo('/pages/user/yongjin')" hover-class="common-hover"
 							:hover-stay-time="50">
 							<view class="icon">
 								<image class="icon-img" src="/static/user/user06.png" mode="aspectFit"></image>
 							</view>
 							<text>我的佣金</text>
 						</view>
-						<view class="order-item" @click="navTo('/pages/user/award')" hover-class="common-hover"
+						<view class="order-item" @click="navTo('/pages/user/scoreAccumulate')" hover-class="common-hover"
 							:hover-stay-time="50">
 							<view class="icon">
 								<image class="icon-img" src="/static/user/user18.png" mode="aspectFit"></image>
 							</view>
 							<text>我的积分</text>
 						</view>
-						<view class="order-item" @click="navTo('/pages/order/order?state=4')" hover-class="common-hover"
+						<view class="order-item" @click="navTo('/pages/user/jifen')" hover-class="common-hover"
 							:hover-stay-time="50">
 							<view class="icon">
 								<image class="icon-img" src="/static/user/user07.png" mode="aspectFit"></image>
@@ -125,17 +125,17 @@
 					<uni-list>
 						<uni-list-item title="我的推广" @click="navTo('/pages/money/wallet')"
 							thumb="/static/user/user12.png"></uni-list-item>
-						<uni-list-item title="USDT专区" @click="navTo('/pages/user/coupon')"
+						<uni-list-item title="USDT专区" @click="navTo('/pages/money/USDT')"
 							thumb="/static/user/user16.png">
 						</uni-list-item>
-						<uni-list-item title="收款方式" @click="navTo('/pages/user/favorites')"
+						<uni-list-item title="收款方式" @click="navTo('/pages/collection/collection')"
 							thumb="/static/user/user15.png"></uni-list-item>
-						<uni-list-item title="邀请好友" @click="navTo('/pages/set/address')"
+						<uni-list-item title="邀请好友" @click="navTo('/pages/user/invite')"
 							thumb="/static/user/user11.png">
 						</uni-list-item>
-						<uni-list-item title="我的收藏" @click="navTo('/pages/user/shareQrCode')"
+						<uni-list-item title="我的收藏" @click="navTo('/pages/user/favorites')"
 							thumb="/static/user/user14.png"></uni-list-item>
-						<uni-list-item title="收货地址" @click="navTo('/pages/shareQrCode/index')"
+						<uni-list-item title="收货地址" @click="navTo('/pages/set/address')"
 							thumb="/static/user/user13.png"></uni-list-item>
 					</uni-list>
 				</view>

+ 269 - 0
pages/user/yongjin.vue

@@ -0,0 +1,269 @@
+<template>
+	<view class="content">
+		<!-- <view class="navbar">
+			<view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
+		</view> -->
+		<view class="header">
+			<image src="../../static/user/yongjin.png" mode=""></image>
+			<view class="integral">
+				{{ integral || '0.00' }}
+			</view>
+			<!-- <navigator url="/pages/money/conversionIntegral"><view class="right">转换USDT</view></navigator> -->
+		</view>
+		<view class="navbar">
+			<view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
+		</view>
+		<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
+			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
+				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
+					<!-- 空白页 -->
+					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
+
+					<!-- 订单列表 -->
+					<view v-for="(item, index) in tabItem.orderList" :key="index" class="order-item flex">
+						<view class="title-box">
+							<view class="title">
+								<text>{{ item.mark }}</text>
+							</view>
+							<view class="time">
+								<text>{{ item.add_time }}</text>
+							</view>
+						</view>
+						<view class="money">
+							<text>{{ (item.pm == 0 ? '-' : '+') + item.number }}</text>
+						</view>
+					</view>
+					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
+				</scroll-view>
+			</swiper-item>
+		</swiper>
+		<!-- <view class="button">
+			<navigator url="/pages/user/integralTransforms" class="b-left">积分转账</navigator>
+			<navigator url="/pages/user/exchangeIntegral" class="b-right">转换购物积分</navigator>
+		</view> -->
+		<button type="default" class="button">立即提现</button>
+	</view>
+</template>
+
+<script>
+	
+import { integrallist } from '@/api/functionalUnit.js';
+import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
+import empty from '@/components/empty';
+export default {
+	components: {
+		empty,
+		uniLoadMore
+	},
+	onReady() {
+		
+	},
+	data() {
+		return {
+			tabCurrentIndex: 0,
+			navList: [
+				{
+					state: 0,
+					text: '收入',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				},
+				{
+					state: 1,
+					text: '支出',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				},
+			],
+		};
+	},
+	onShow() {
+		// 载入积分数据
+		this.loadData();
+	},
+	methods: {
+		// 页面跳转
+		navto(e) {
+			uni.navigateTo({
+				url: e
+			});
+		},
+		//获取收入支出信息
+		async loadData(source) {
+			//这里是将订单挂载到tab列表下
+			let index = this.tabCurrentIndex;
+			let navItem = this.navList[index];
+			let state = navItem.state;
+			if (source === 'tabChange' && navItem.loaded === true) {
+				//tab切换只有第一次需要加载数据
+				return;
+			}
+			if (navItem.loadingType === 'loading') {
+				//防止重复加载
+				return;
+			}
+			// 修改当前对象状态为加载中
+			navItem.loadingType = 'loading';
+
+			integrallist(
+				{
+					page: navItem.page,
+					limit: navItem.limit
+				},
+				state
+			)
+				.then(({ data }) => {
+					if (data.length > 0) {
+						navItem.orderList = navItem.orderList.concat(data);
+						navItem.page++;
+					}
+					if (navItem.limit == data.length) {
+						//判断是否还有数据, 有改为 more, 没有改为noMore
+						navItem.loadingType = 'more';
+						return;
+					} else {
+						//判断是否还有数据, 有改为 more, 没有改为noMore
+						navItem.loadingType = 'noMore';
+					}
+					uni.hideLoading();
+					this.$set(navItem, 'loaded', true);
+				})
+				.catch(e => {
+					console.log(e);
+				});
+		},
+
+		//swiper 切换
+		changeTab(e) {
+			this.tabCurrentIndex = e.target.current;
+			this.loadData('tabChange');
+		},
+		//顶部tab点击
+		tabClick(index) {
+			this.tabCurrentIndex = index;
+		}
+	},
+	computed: {
+		//积分
+		integral() {
+			return this.$store.state.user.userInfo.integral
+		}
+	},
+};
+</script>
+
+<style lang="scss">
+page {
+	background: #ffffff;
+	height: 100%;
+}
+.header {
+	image {
+		width: 100%;
+		height: 400rpx;
+	}
+	.integral {
+		width: 100%;
+		text-align: center;
+		position: absolute;
+		top: 160rpx;
+		color: #fff;
+		font-size: 80rpx;
+		font-weight: bold;
+	}
+	.right {
+		position: absolute;
+		top: 120rpx;
+		right: 0;
+		background-color: #fff;
+		border-radius: 10rpx 0 0 10rpx;
+		color: #438BED;
+		padding: 5rpx 15rpx;
+		font-size: 28rpx;
+	}
+}
+.navbar {
+	display: flex;
+	
+	height: 40px;
+	padding: 0 5px;
+	background: #fff;
+	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
+	position: relative;
+	z-index: 10;
+	.nav-item {
+		flex: 1;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		height: 100%;
+		font-size: 15px;
+		color: $font-color-dark;
+		position: relative;
+		&.current {
+			color: #438BED;
+			&:after {
+				content: '';
+				position: absolute;
+				left: 50%;
+				bottom: 0;
+				transform: translateX(-50%);
+				width: 44px;
+				height: 0;
+				border-bottom: 2px solid #438BED;
+			}
+		}
+	}
+}
+// 列表
+
+.swiper-box {
+	height: calc(100% - 180rpx - 400rpx);
+	padding-top: 10rpx;
+	.order-item {
+		padding: 20rpx 30rpx;
+		line-height: 1.5;
+		.title-box {
+			.title {
+				font-size: $font-lg;
+				color: $font-color-base;
+			}
+			.time {
+				font-size: $font-base;
+				color: $font-color-light;
+			}
+		}
+		.money {
+			color: #EF3A55;
+			font-size: $font-lg;
+		}
+	}
+}
+.list-scroll-content {
+	height: 100%;
+}
+.content {
+	height: 100%;
+	.empty-content {
+		height: 100%;
+		background-color: #ffffff;
+	}
+}
+.button {
+	position: relative;
+	bottom: 0;
+	bottom: 50rpx;
+width: 674rpx;
+height: 88rpx;
+background: linear-gradient(90deg, #44BFEC, #438BED);
+border-radius: 44rpx;
+font-size: 36rpx;
+font-family: PingFang SC;
+font-weight: 500;
+color: #FFFFFF;
+}
+</style>

BIN
static/user/jifen.png


BIN
static/user/share.png


BIN
static/user/shopping.png


BIN
static/user/yongjin.png


BIN
static/user/yue.png