cmy 2 gadi atpakaļ
vecāks
revīzija
8e57fd022c

+ 11 - 10
App.vue

@@ -265,16 +265,17 @@ uni-rich-text img {
 }
 // 基础按钮
 .base-buttom {
-	background-color: $color-green;
-	font-size: 32rpx;
-	padding: 30rpx;
-	color: #FFFFFF;
-	margin: 0 50rpx;
-	border-radius: 100rpx;
-	margin-top: 100rpx;
-	text-align: center;
-	z-index: 95;
-}
+		width: 686rpx;
+		height: 86rpx;
+		background: $bg-base-gradual;
+		border-radius: 15rpx;
+		margin: 113rpx auto 0;
+		font-size: 36rpx;
+		font-weight: 500;
+		color: #FFFFFF;
+		text-align: center;
+		line-height: 86rpx;
+	}
 // 修改默认背景颜色
 uni-page-wrapper {
 	background-color: $page-color-base;

+ 10 - 11
pages.json

@@ -119,21 +119,20 @@
 				{
 					"path": "award/award",
 					"style": {
-						"navigationBarTitleText": "佣金",
-						"navigationBarBackgroundColor": "#f6ab0b",
-						"navigationBarTextStyle": "white"
+						"navigationStyle": "custom",
+						"navigationBarTitleText": "佣金"
 					}
 				},
 				{
-					"path": "award/awardList",
+					"path": "award/withdrawal",
 					"style": {
-						"navigationBarTitleText": "佣金明细"
+						"navigationBarTitleText": "提现"
 					}
 				},
 				{
-					"path": "award/withdrawal",
+					"path": "award/changeWallet",
 					"style": {
-						"navigationBarTitleText": "提现"
+						"navigationBarTitleText": "卡券转换"
 					}
 				},
 				{
@@ -153,15 +152,15 @@
 				{
 					"path": "money/wallet",
 					"style": {
-						"navigationBarTitleText": "我的钱包",
-						"navigationBarBackgroundColor": "#0BBB62",
+						"navigationBarTitleText": "我的卡券",
+						"navigationBarBackgroundColor": "#6DD6B8",
 						"navigationBarTextStyle": "white"
 					}
 				},
 				{
 					"path": "money/walletList",
 					"style": {
-						"navigationBarTitleText": "余额明细"
+						"navigationBarTitleText": "卡券明细"
 					}
 				},
 				{
@@ -174,7 +173,7 @@
 					"path": "money/recharge",
 					"style": {
 						"navigationBarTitleText": "充值",
-						"navigationBarBackgroundColor": "#0BBB62",
+						"navigationBarBackgroundColor": "#6DD6B8",
 						"navigationBarTextStyle": "white"
 					}
 				},

+ 10 - 94
pages/mall/mall.vue

@@ -34,13 +34,12 @@
 		mapState,
 		mapMutations
 	} from 'vuex';
+	import {
+		loadIndexs
+	} from '@/api/index.js';
 	import {
 		share
 	} from '@/api/wx';
-	// import {
-	// 	getBannerList,
-	// 	getShowTemplateList
-	// } from '@/api/model.js';
 	export default {
 		data() {
 			return {
@@ -83,7 +82,7 @@
 			this.share()
 		},
 		onShow() {
-			// this.loadIndexs();
+			this.loadIndexs();
 		},
 		onReady() {},
 		// 滚动到底部
@@ -92,33 +91,13 @@
 		},
 		// #ifdef MP
 		onShareAppMessage(options) {
+			// 获取缓存的用户id
+			const user = uni.getStorageSync('userInfo')
 			// 设置菜单中的转发按钮触发转发事件时的转发内容
-			let pages = getCurrentPages(); //获取加载的页面
-			let currentPage = pages[pages.length - 1]; //获取当前页面的对象
-			let url = currentPage.route; //当前页面url
-			let item = currentPage.options; //如果要获取url中所带的参数可以查看options
 			let shareObj = {
-				title: "母婴界严选", // 默认是小程序的名称(可以写slogan等)
-				path: url, // 默认是当前页面,必须是以‘/’开头的完整路径
-				imageUrl: this.shareData.img,
-				desc: this.shareData.synopsis,
-				success: function(res) {
-					// 转发成功之后的回调
-					if (res.errMsg == 'shareAppMessage:ok') {}
-				},
-				fail: function() {
-					// 转发失败之后的回调
-					if (res.errMsg == 'shareAppMessage:fail cancel') {
-						// 用户取消转发
-					} else if (res.errMsg == 'shareAppMessage:fail') {
-						// 转发失败,其中 detail message 为详细失败信息
-					}
-				}
+				title:  this.shareData.title, // 默认是小程序的名称(可以写slogan等)
+				path: '/pages/index/index?scene=' + user.uid, // 默认是当前页面,必须是以‘/’开头的完整路径
 			};
-			// 判断是否可以邀请
-			if (this.userInfo.uid) {
-				shareObj.path += '&spread=' + this.userInfo.uid;
-			}
 			return shareObj;
 		},
 		// #endif
@@ -139,80 +118,17 @@
 			loadIndexs() {
 				const that = this;
 				// 轮播图
-				getBannerList().then(
-					(res) => {
-						that.imagelist = res.data.list
-						console.log(res);
-					}
-				).catch(
-					(res) => {
-						console.log(res);
-					}
-				)
-				// 获取热门
-				getShowTemplateList({
-					is_hot: 1,
-					pageSize: 3
-				}).then(
+				loadIndexs().then(
 					(res) => {
-						that.rmList = res.data.list
-						console.log(res);
+						console.log(res,'index');
 					}
 				).catch(
 					(res) => {
 						console.log(res);
 					}
 				)
-				that.getShowTemplateList();
 			},
 			// 获取模板列表
-			getShowTemplateList(source) {
-				//这里是将订单挂载到tab列表下
-				let navItem = this.navList;
-				let state = navItem.state;
-				if (source === 'tabChange' && navItem.loaded === true) {
-					//tab切换只有第一次需要加载数据
-					return;
-				}
-				if (navItem.loadingType === 'loading') {
-					//防止重复加载
-					return;
-				}
-				if (navItem.loadingType === 'noMore') {
-					//防止重复加载
-					return;
-				}
-				// 修改当前对象状态为加载中
-				navItem.loadingType = 'loading';
-				getShowTemplateList({
-						is_recommend: 1,
-						page: navItem.page,
-						pageSize: navItem.limit
-					})
-					.then(({
-						data
-					}) => {
-						let arr = data.list.map(e => {
-							return e;
-						});
-						navItem.orderList = navItem.orderList.concat(arr);
-						navItem.page++;
-						if (navItem.limit == arr.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);
-					});
-
-			},
 			navTo(url) {
 				if (url) {
 					if (url.indexOf('http') > -1) {

+ 9 - 9
pages/order/order.vue

@@ -100,17 +100,17 @@
 						page: 1, //当前页数
 						limit: 10 //每次信息条数
 					},
-					{
-						state: 1,
-						text: '待发货',
-						loadingType: 'more',
-						orderList: [],
-						page: 1, //当前页数
-						limit: 10 //每次信息条数
-					},
+					// {
+					// 	state: 1,
+					// 	text: '待发货',
+					// 	loadingType: 'more',
+					// 	orderList: [],
+					// 	page: 1, //当前页数
+					// 	limit: 10 //每次信息条数
+					// },
 					{
 						state: 2,
-						text: '待收货',
+						text: '待核销',
 						loadingType: 'more',
 						orderList: [],
 						page: 1, //当前页数

+ 3 - 16
pages/shop/attestation.vue

@@ -64,7 +64,7 @@
 				<input type="text" class="sr-inp" placeholder="请输入绑定邀请码(非必填)">
 			</view>
 		</view>
-		<view class="btm-btn">
+		<view class="base-buttom">
 			提交认证
 		</view>
 	</view>
@@ -279,11 +279,11 @@
 
 		.sr-inp {
 			flex-grow: 1;
-
+			
 		}
 
 		.sr-btn {
-			color: #52C696;
+			color: $uni-color-primary;
 		}
 	}
 
@@ -304,17 +304,4 @@
 			color: #5C5C5C;
 		}
 	}
-
-	.btm-btn {
-		width: 686rpx;
-		height: 86rpx;
-		background: linear-gradient(-38deg, #6CDBC3, #6DD6B8);
-		border-radius: 15rpx;
-		margin: 113rpx auto 0;
-		font-size: 36rpx;
-		font-weight: 500;
-		color: #FFFFFF;
-		text-align: center;
-		line-height: 86rpx;
-	}
 </style>

+ 8 - 22
pages/user/user.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="container">
-		<scroll-view class="content-box" scroll-y="true">
+		<view class="content-box" >
 			<view class="user-section">
 				<view class="avatar" @click="navTo('/pages/set/userinfo')">
 					<image class="image" :src="user.avatar|| urlFile+`/static/error/missing-face.png`" mode="scaleToFill"></image>
@@ -15,13 +15,9 @@
 						<text class="num">{{ user.brokerage_price || '0.00' }}</text>
 						<text>我的佣金</text>
 					</view>
-					<!-- <view class="tj-item" @click="navTo('/pages/user/award/award')">
-						<text class="num">{{ user.brokerage_price || '0.00' }}</text>
-						<text>我的推广</text>
-					</view> -->
 					<view class="tj-item" @click="navTo('/pages/user_home/money/wallet')">
 						<text class="num">{{user.now_money || '0.00' }}</text>
-						<text>我的余额</text>
+						<text>我的卡券</text>
 					</view>
 				</view>
 			</view>
@@ -71,7 +67,7 @@
 				</view>
 				<view class="listBox">
 					<view class="list">
-						<view class="flex listItem" @click="navTo('/pages/user/model/mymodellist')">
+						<view class="flex listItem" @click="navTo('/pages/shop/attestation')">
 							<view class="flex titleBox">
 								<image class="listIconImg" src="../../static/icon/userreal.png" mode="widthFix"></image>
 								<text class="title">实名认证</text>
@@ -114,7 +110,7 @@
 					</view>
 				</view>
 			</view>
-		</scroll-view>
+		</view>
 	</view>
 </template>
 <script>
@@ -254,11 +250,6 @@
 		justify-content: center;
 		align-items: center;
 	}
-	
-	page {
-		height: 100%;
-	}
-
 	.listBox {
 		margin-top: 20rpx;
 		overflow: hidden;
@@ -298,24 +289,19 @@
 	}
 
 	.container {
-		height: 100%;
 		background-color: $page-color-base;
 		background-image: url('../../static/image/userbg.png') ;
 		background-repeat: no-repeat;
 		background-size: 100% auto;
 		padding-top: 100rpx;
-	}
-
-	.content-box {
-		height: 100%;
+		padding-bottom: 50rpx;
 	}
 
 	.user-section {
 		background-color: #FFF;
 		border-radius: 20rpx;
 		margin: 0 $page-row-spacing;
-		padding: 20rpx 0;
-		padding-top: 50rpx;
+		padding: 40rpx 0;
 		.avatar{
 			width: 130rpx;
 			height: 130rpx;
@@ -330,7 +316,7 @@
 		}
 		.phone{
 			height:1rem;
-			margin-bottom: 50rpx;
+			margin-bottom: 30rpx;
 		}
 	}
 
@@ -351,7 +337,7 @@
 		}
 	
 		.num {
-			font-size: $font-base;
+			font-size: $font-lg + 4rpx;
 			color: $font-color-dark;
 			margin-bottom: 8rpx;
 			font-weight: bold;

+ 345 - 203
pages/user_home/award/award.vue

@@ -1,87 +1,90 @@
 <template>
 	<view class="content">
-		<view class="bg">
-		</view>
 		<view class="content-money">
-			<view class="conetnt-box">
-				<view class="money-box">
-					<view class="text">可用佣金(元)</view>
-					<view class="money">{{ money | getMoneyStyle }}</view>
+			<view class="status_bar">
+				<!-- 这里是状态栏 -->
+			</view>
+			<view class="body-title flex-center">
+				<view class="goback-box flex-center" @click="toBack">
+					<image class="goback" src="../../../static/icon/next2.png" mode="scaleToFill"></image>
 				</view>
-
-				<view class="detailBox flex">
-					<view class="item">
-						<view class="nametype">
-							提现中
-						</view>
-						<view class="moneyNum font-color-red">
-							{{addMoney||0}}
-						</view>
-					</view>
-					<view class="item">
-						<view class="nametype">
-							即将到账
-						</view>
-						<view class="moneyNum ">
-							{{timeMoney||0}}
-						</view>
-					</view>
-					<view class="item">
-						<view class="nametype">
-							累计收益
-						</view>
-						<view class="moneyNum ">
-							{{allMoney||0}}
-						</view>
+				<view class="header flex-center">我的佣金</view>
+			</view>
+			<view class="content-bg">
+				<image src="../../../static/image/awardbg.png" mode="scaleToFill"></image>
+			</view>
+			<view class="money-box">
+				<view class="money">{{ bankData.brokerage_price || 0 }}</view>
+				<view>我的佣金</view>
+			</view>
+			<view class="moneybtn-box flex">
+				<view class="money-btn flex" @click="navto('/pages/user_home/award/changeWallet')">
+					<image src="../../../static/icon/award1.png" mode="widthFix" class="tip"></image>
+					<view>
+						卡券转换
 					</view>
 				</view>
-				<view class="flex buttom-box">
-					<view class="buttom geMoney" @click="navto('./withdrawal')">
-						<text>提现</text>
+				<view class="money-btn flex" @click="navto('/pages/user_home/award/withdrawal')">
+					<image src="../../../static/icon/award2.png" mode="widthFix" class="tip"></image>
+					<view>
+						佣金提现
 					</view>
 				</view>
 			</view>
 		</view>
-		<view class="listbox">
-			<view class="navbar flex">
-				<view class="title">
-					佣金变动明细
-				</view>
-				<view class="alllist" @click="navto('./awardList')">
-					全部
-				</view>
+		<view class="info-box flex">
+			<view class="info-item">
+				<view class="info-font">累计收入</view>
+				<view class="info-num">{{bankData.total_brokerage || '0.00'}}</view>
 			</view>
-			<view class="conetntList">
-				<view class="listItem flex" v-for="(item, tabIndex) in navList[0].orderList">
-					<view class="itemLeft">
-						<view class="itemTitle flex">
-							<text>{{item.title}}</text>
-							<text class="font-size-sm font-color-red" v-if="item.status==0">(未到账)</text>
-						</view>
-						<view class="itemBottom">
-							{{item.add_time}}
-						</view>
-					</view>
-					<view class="itemRight">
-						<view class="itemTitle">
-							{{(item.pm == 0 ? '-' : '+')+item.number}}
-						</view>
-						<!-- <view class="itemBottom">
-								余额{{item.yue}}
-							</view> -->
-					</view>
-				</view>
-				<uni-load-more :status="navList[0].loadingType"></uni-load-more>
+			<view class="shu"></view>
+			<view class="info-item">
+				<view class="info-font">累计支出</view>
+				<view class="info-num">{{bankData.ext_broerage || '0.00'}}</view>
 			</view>
 		</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" :style="{ height: height }" class="swiper-box" duration="300"
+			@change="changeTab">
+			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
+				<scroll-view scroll-y="true" class="list-scroll-content" @scrolltolower="loadData">
+					<!-- 空白页 -->
+					<!-- #ifdef H5 -->
+					<empty src="../../../static/error/emptyOrder.png"
+						v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
+					<!-- #endif -->
+					<!-- #ifndef H5 -->
+					<empty src="../../static/error/emptyOrder.png"
+						v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
+					<!-- #endif -->
+					<!-- 订单列表 -->
+					<view>
+						<view class="order-item flex" v-for="(item, index) in tabItem.orderList" :key="index">
+							<view class="title-box">
+								<view class="title">
+									<text>{{ item.mark }}</text>
+								</view>
+								<view class="time">
+									<text>{{ item.create_time }}</text>
+								</view>
+							</view>
+							<view class="money">
+								<view>{{ (item.pm == 0 ? '-' : '+') + item.number }}</view>
+							</view>
+						</view>
+					</view>
+					<uni-load-more :status="tabItem.loadingType"
+						v-if="!(tabItem.orderList.length == 0 && tabItem.loaded)"></uni-load-more>
+				</scroll-view>
+			</swiper-item>
+		</swiper>
 	</view>
 </template>
 
 <script>
-	import {
-		spreadCommission,
-		extractBank
-	} from '@/api/wallet.js';
 	import {
 		mapState,
 		mapMutations
@@ -89,61 +92,106 @@
 	import {
 		getMoneyStyle
 	} from '@/utils/rocessor.js';
-	// import empty from '@/components/empty';
+	import {
+		mapGetters
+	} from 'vuex';
+	import {
+		extractBank,
+		spreadCommission
+	} from '@/api/wallet.js'
 	export default {
 		filters: {
 			getMoneyStyle
 		},
-		// components: {
-		// 	empty,
-		// },
+		computed: {
+			...mapState('user', ['userInfo'])
+		},
+		onReady(res) {
+			var _this = this;
+			console.log(_this.userInfo)
+			uni.getSystemInfo({
+				success: resu => {
+					const query = uni.createSelectorQuery();
+					query.select('.swiper-box').boundingClientRect();
+					query.exec(function(res) {
+						_this.height = resu.windowHeight - res[0].top + 'px';
+						console.log('打印页面的剩余高度', _this.height);
+					});
+				},
+				fail: res => {}
+			});
+		},
 		data() {
 			return {
+				height: '',
+				// 头部图高度
+				maxheight: '',
 				tabCurrentIndex: 0,
-				navList: [{
-					state: 3,
-					text: '收入',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页面
-					limit: 10 //每次信息条数
-				}],
-				money: 0, //可提现佣金
-				addMoney: 200, //提现中到账
-				timeMoney: 200, //即将到账
-				allMoney: 1000, //累计收益
-
+				orderStatusSum: 0,
+				recharge: 0,
+				navList: [
+					// {
+					// 	state: 0,
+					// 	text: '全部',
+					// 	loadingType: 'more',
+					// 	orderList: [],
+					// 	page: 1, //当前页数
+					// 	limit: 10 //每次信息条数
+					// },
+					{
+						state: 3,
+						text: '收入',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10 //每次信息条数
+					},
+					{
+						state: 4,
+						text: '支出',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10 //每次信息条数
+					}
+				],
+				money: '',
+				bankData:{
+					brokerage_price:'0.00',
+					ext_broerage:'0.00',//累计支出
+					total_brokerage:'0.00',//累计收入
+				}
 			};
 		},
-		onLoad(options) {
-			this.loadData();
-		},
+		onLoad(options) {},
 		onShow() {
-			//获取用户余额
-			extractBank({}).then(({
-				data
-			}) => {
-				this.money = data.commissionCount;
-				this.addMoney = data.ext_broerage;
-				this.timeMoney = data.not_broerage;
-				this.allMoney = data.total_brokerage;
-			});
-		},
-		// 页面到底部后加载数据
-		onReachBottom() {
+			this.extractBank()
 			this.loadData();
 		},
 		methods: {
+			extractBank() {
+				extractBank().then(res => {
+					this.bankData = res.data
+				})
+			},
+			toBack() {
+				uni.switchTab({
+					url: '/pages/user/user'
+				});
+			},
+			// 页面跳转
 			navto(e) {
 				uni.navigateTo({
 					url: e
 				});
 			},
+			//获取收入支出信息
 			async loadData(source) {
-				//这里时将订单挂载到tab列表下
+				let obj = this;
+				//这里是将订单挂载到tab列表下
 				let index = this.tabCurrentIndex;
 				let navItem = this.navList[index];
-				let state = navItem.state ;
+				let state = navItem.state;
 				if (source === 'tabChange' && navItem.loaded === true) {
 					//tab切换只有第一次需要加载数据
 					return;
@@ -152,29 +200,22 @@
 					//防止重复加载
 					return;
 				}
-				//修改当前对象状态为加载中
+				// 修改当前对象状态为加载中
 				navItem.loadingType = 'loading';
 
 				spreadCommission({
-							page: navItem.page,
-							limit: navItem.limit
-						},
-						state
-					)
+						page: navItem.page,
+						limit: navItem.limit,
+					},state)
 					.then(({
 						data
 					}) => {
-						if (data.length > 0) {
-							navItem.orderList = navItem.orderList.concat(data[0].list);
-							console.log(navItem.orderList);
-							navItem.page++;
-						}
-						//判断是否还有数据, 有改为more, 没有改为noMore
+						navItem.orderList = navItem.orderList.concat(data)
+						navItem.page++
 						if (navItem.limit == data.length) {
 							navItem.loadingType = 'more';
-							return;
 						} else {
-							navItem.loadingType = 'noMore';
+							navItem.loadingType = 'noMore'
 						}
 						uni.hideLoading();
 						this.$set(navItem, 'loaded', true);
@@ -184,144 +225,245 @@
 					});
 			},
 
+			//swiper 切换
+			changeTab(e) {
+				this.tabCurrentIndex = e.target.current;
+				this.loadData('tabChange');
+			},
+			//顶部tab点击
+			tabClick(index) {
+				this.tabCurrentIndex = index;
+			}
 		}
-	}
+	};
 </script>
 
 <style lang="scss">
 	page {
+		background: #f1f1f1;
 		height: 100%;
 	}
 
+
 	.content-money {
 		position: relative;
-		padding: 20rpx;
-		z-index: 1;
+		height: 480rpx;
+		color: #ffffff;
 
-		.conetnt-box {
-			border-radius: 20rpx;
-			background-color: #ffffff;
-			padding-bottom: 50rpx;
+		.content-bg {
+			position: absolute;
+			top: 0;
+			left: 0;
+			right: 0;
+			height: 480rpx;
 
-			// height: 400rpx;
-			.detailBox {
-				justify-content: space-around;
-				padding-top: 30rpx;
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
 
-				.item {
-					text-align: center;
-					color: $font-color-light;
+		.money-box {
+			position: relative;
+			z-index: 2;
+			padding-top: 130rpx;
+			text-align: center;
+			padding-bottom: 50rpx;
 
-					.nametype {
-						color: $font-color-disabled;
-						font-size: 24rpx;
-					}
+			.money {
+				font-size: 72rpx;
+				font-weight: bold;
+			}
 
-					.moneyNum {
-						margin-top: 20rpx;
-						font-size: 28rpx;
-						font-weight: bold;
-					}
-				}
+			.text {
+				font-size: $font-lg;
 			}
 		}
 
-		.buttom-box {
+		.body-title {
+			height: 80rpx;
 			text-align: center;
-			margin: 0 30rpx;
-			margin-top: 50rpx;
+			font-size: 35rpx;
+			z-index: 999;
+			font-weight: bold;
+			position: fixed;
+			left: 0;
+			top: 0;
+			width: 100%;
 
-			.buttom {
-				flex-grow: 1;
-				border-radius: 100rpx;
-				font-size: $font-lg;
-				width: 300rpx;
-				height: 80rpx;
-				line-height: 80rpx;
-				background-color: $color-green;
-				color: #FFFFFF;
-
-				&.geMoney {
-					border: 1px solid $font-color-disabled;
-					color: $font-color-disabled;
-					background-color: #FFFFFF;
+			.header {}
+
+			.goback-box {
+				position: absolute;
+				left: 18rpx;
+				bottom: 0;
+				top: 0;
+
+				.goback {
+					width: 34rpx;
+					height: 34rpx;
+					transform: rotate(180deg);
 				}
 			}
+
 		}
 	}
 
-	.money-box {
-		text-align: center;
-		color: $font-color-dark;
-		font-weight: bold;
+	.info-box {
+		width: 670rpx;
+		height: 186rpx;
+		background: #ffffff;
+		box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
+		border-radius: 20rpx;
+		margin: -100rpx auto 0;
+		position: relative;
+		z-index: 2;
+
+		.info-item {
+			width: 50%;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			line-height: 1;
+
+			.info-font {
+				font-size: 30rpx;
+				font-weight: bold;
+				color: #999999;
+			}
 
-		.text {
-			padding-top: 85rpx;
-			font-size: 24rpx;
-			margin-bottom: 20rpx;
+			.info-num {
+				margin-top: 30rpx;
+				font-size: 30rpx;
+				font-weight: bold;
+				color: #181818;
+			}
 		}
 
-		.money {
-			font-size: 60rpx;
+		.shu {
+			width: 2rpx;
+			height: 74rpx;
+			background: #dcdfe6;
 		}
 	}
 
-	.listbox {
-		margin: 0 20rpx;
-		border-radius: 20rpx;
+
+
+	.moneybtn-box {
 		position: relative;
+		padding: 0rpx 50rpx;
+		font-size: 30rpx;
+		font-weight: bold;
+		.money-btn{
+			font-size: $font-lg;
+			.tip{
+				width: 40rpx;
+				height:40rpx;
+				margin-right: 10rpx;
+			}
+		}
 	}
 
 	.navbar {
+		margin-top: 20rpx;
+		display: flex;
+		height: 88rpx;
+		padding: 0 5px;
 		background: #fff;
-		padding: 30rpx;
-		border-bottom: 1px solid $page-color-light;
-		border-top-left-radius: 20rpx;
-		border-top-right-radius: 20rpx;
+		box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
+		position: relative;
+		z-index: 10;
 
-		.title {
-			font-size: 32rpx;
-			font-weight: bold;
-		}
+		.nav-item {
+			flex: 1;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			height: 100%;
+			font-size: 15px;
+			color: #999999;
+			position: relative;
 
-		.alllist {
-			font-size: 28rpx;
+			&.current {
+				color: #000;
 
+				&:after {
+					content: '';
+					position: absolute;
+					left: 50%;
+					bottom: 0;
+					transform: translateX(-50%);
+					width: 44px;
+					height: 0;
+					border-bottom: 2px solid #fe5b38;
+				}
+			}
 		}
 	}
 
+	//列表
+	.swiper-box {
+		.order-item:last-child {
+			margin-bottom: 60rpx;
+		}
 
-	.content {
-		height: 100%;
+		.order-item {
+			padding: 20rpx 30rpx;
+			line-height: 1.5;
 
-		.bg {
-			background-color: #f6ab0b;
-			width: 950rpx;
-			position: absolute;
-			left: -100rpx;
-			border-bottom-left-radius: 1000rpx;
-			border-bottom-right-radius: 1000rpx;
-			top: 0rpx;
-			height: 300rpx;
+			.title-box {
+				.title {
+					font-size: $font-lg;
+					color: $font-color-base;
+				}
+
+				.time {
+					font-size: $font-base;
+					color: $font-color-light;
+				}
+			}
+
+			.money {
+				color: #fd5b23;
+				font-size: $font-lg;
+				text-align: right;
+
+				.status {
+					color: $font-color-light;
+				}
+			}
 		}
+	}
 
+	.list-scroll-content {
+		background: #ffffff;
+		height: 100%;
 	}
 
-	.conetntList {
-		padding: 30rpx;
-		background-color: #FFFFFF;
-		border-bottom-left-radius: 20rpx;
-		border-bottom-right-radius: 20rpx;
+	.content {
+		height: 100%;
 
-		.listItem {
-			font-size: 30rpx;
-			color: $font-color-dark;
-			align-items: flex-start;
+		.empty-content {
+			background-color: #ffffff;
 		}
 
-		.itemBottom {
-			font-size: 24rpx;
-			color: $font-color-disabled;
-		}
+	}
+
+	.btn-box {
+		width: 674rpx;
+		height: 88rpx;
+		background: linear-gradient(0deg, #2e58ff, #32c6ff);
+		border-radius: 44rpx;
+		font-size: 36rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #ffffff;
+		text-align: center;
+		line-height: 88rpx;
+		position: fixed;
+		bottom: 48rpx;
+		left: 0;
+		right: 0;
+		margin: 0 auto;
 	}
 </style>

+ 0 - 199
pages/user_home/award/awardList.vue

@@ -1,199 +0,0 @@
-<template>
-	<view class="content">
-		<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
-			<!-- 空白页 -->
-			<empty v-if="navList[0].loaded === true && navList[0].orderList.length === 0"></empty>
-			<!-- 订单列表 -->
-			<view class="momBox" v-for="(list, index) in navList[0].orderList" :key="index">
-				<view class="topMon">
-					<view>
-						<text class="mon">{{list.time}}</text>
-						<!-- <text class="font-size-sm margin-l-10">月</text> -->
-						<image class="iconRight margin-l-10" src="../../../static/icon/dom.png" mode="widthFix"></image>
-					</view>
-					<!-- <view class="textSm font-color-gray">
-						<text>支出:{{list.out}}</text>
-						<text class="margin-l-20">支出:{{list.get}}</text>
-					</view> -->
-				</view>
-				<view v-for="(item,index) in list.list" class="order-item flex">
-					<view class="title-box">
-						<view class="title">
-							<text>{{ item.title }}</text>
-						</view>
-						<view class="time">
-							<text>{{ item.add_time }}</text>
-						</view>
-					</view>
-					<view class="money">
-						<text>{{ (item.pm == 0 ? '-' : '+') + item.number }}</text>
-					</view>
-				</view>
-			</view>
-			<uni-load-more :status="navList[0].loadingType"></uni-load-more>
-		</scroll-view>
-	</view>
-</template>
-
-<script>
-	import {
-		spreadCommission,
-	} from '@/api/wallet.js';
-	import {
-		getMoneyStyle
-	} from '@/utils/rocessor.js';
-	export default {
-		filters: {
-			getMoneyStyle
-		},
-		data() {
-			return {
-				// 头部图高度
-				maxheight: '',
-				tabCurrentIndex: 0,
-				navList: [{
-					state: 3,
-					text: '全部',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				}, ],
-				money: ''
-			};
-		},
-		onLoad(options) {},
-		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';
-
-				spreadCommission({
-							page: navItem.page,
-							limit: navItem.limit
-						},
-						state
-					)
-					.then(({
-						data
-					}) => {
-						if (data.length > 0) {
-							navItem.orderList = navItem.orderList.concat(data);
-							console.log(navItem.orderList);
-							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);
-					});
-			}
-		}
-	};
-</script>
-
-<style lang="scss">
-	page {
-		height: 100%;
-	}
-
-	.money-box {
-		padding-top: var(--status-bar-height);
-		text-align: center;
-		color: $font-color-dark;
-		font-weight: bold;
-
-		.text {
-			padding-top: 85rpx;
-			font-size: 24rpx;
-		}
-
-		.money {
-			font-size: 60rpx;
-		}
-	}
-
-
-	// 列表
-	.order-item {
-		padding: 20rpx 30rpx;
-		line-height: 1.5;
-		border-bottom: 1px solid $page-color-light;
-		margin-left: 20rpx;
-		.title-box {
-			.title {
-				font-size: $font-lg;
-				color: $font-color-base;
-			}
-			.time {
-				font-size: $font-base;
-				color: $font-color-light;
-			}
-		}
-		.money {
-			font-size: $font-lg;
-		}
-	}
-
-	.list-scroll-content {
-		height: 100%;
-		padding-top: 30rpx;
-		.momBox{
-			background-color: #FFFFFF;
-			margin: $page-row-spacing;
-			margin-top: 0rpx;
-			border-radius: 20rpx;
-			overflow: hidden;
-			.topMon{
-				padding: 30rpx 20rpx;
-				border-bottom: 1px solid $page-color-light;
-				.iconRight{
-					width: 22rpx;
-				}
-				.mon{
-					font-size: 36rpx;
-					font-weight: 400;
-				}
-				.textSm{
-					color: $font-color-light;
-					font-size: 22rpx;
-				}
-			}
-		}
-	}
-
-	.content {
-		height: 100%;
-	}
-</style>

+ 180 - 0
pages/user_home/award/changeWallet.vue

@@ -0,0 +1,180 @@
+<template>
+	<view class="content">
+		<view class="listBox">
+			<view class="list">
+				<view class="flex listItem" @click="navTo('/pages/set/userinfo')">
+					<view class="flex titleBox">
+						<text class="title">可兑换金额</text>
+					</view>
+					<view class="right flex">
+						<text>{{ userInfo.brokerage_price | getMoneyStyle}}</text>
+						<!-- <image class="img" src="../../static/icon/next1.png" mode="widthFix"></image> -->
+					</view>
+				</view>
+				<view class="flex listItem">
+					<view class="flex titleBox">
+						<text class="title">申请转换金额</text>
+					</view>
+					<view class="right flex">
+						<input class="input" type="text" v-model="withdrawal" placeholder="请输入金额" placeholder-class="placeholder" />
+					</view>
+				</view>
+				<view class="all" @click="withdrawal=userInfo.brokerage_price">
+					全部转换
+				</view>
+			</view>
+		</view>
+		<button class="base-buttom" :class="{ action: loding }" @click="!loding ? confirm() : ''">提交申请</button>
+	</view>
+</template>
+
+<script>
+	import {
+		getMoneyStyle
+	} from '@/utils/rocessor.js';
+	import {
+		getUserInfo,
+	} from '@/api/user.js';
+	import {
+		rechargeWechat
+	} from '@/api/wallet.js'
+	import {
+		mapMutations,
+		mapState
+	} from 'vuex';
+	export default {
+		filters: {
+			getMoneyStyle
+		},
+		data() {
+			return {
+				money: '0.00', //可提现金额
+				withdrawal: '', //提现金额
+				// #ifdef H5
+				weichatBsrowser: false,
+				// #endif
+				loding: false,
+				type: 0
+			};
+		},
+		onLoad(options) {
+			// #ifdef H5
+			this.weichatBsrowser = uni.getStorageSync('weichatBrowser');
+			// #endif
+			this.dataUp();
+			if (options.type) {
+				this.type = options.type;
+
+			}
+		},
+		computed: {
+			...mapState('user', ['userInfo'])
+		},
+		methods: {
+			...mapMutations('user', ['setUserInfo', 'login']),
+			// 更新数据
+			dataUp() {
+				let obj = this;
+				getUserInfo({})
+					.then(e => {
+						obj.login();
+						// 保存返回用户数据
+						obj.setUserInfo(e.data);
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+			// 切换选中对象
+			tabRadio(e) {
+				this.type = e.detail.value;
+			},
+			// 提交
+			confirm() {
+				let obj = this;
+				obj.loding = true;
+				if (obj.withdrawal == 0) {
+					obj.loding = false;
+					uni.showModal({
+						title: '提示',
+						content: '转换金额不要为0'
+					});
+					return;
+				}
+
+				let data = {
+					from: 'weixinh5', //
+					price: obj.withdrawal, //金额
+					type: 1 //0佣金1余额
+				};
+				rechargeWechat(data)
+					.then(e => {
+						// 允许按钮点击
+						obj.loding = false;
+						// 初始化提现金额
+						obj.withdrawal = '';
+						uni.showToast({
+							title: '转换成功',
+							duration: 2000,
+							position: 'top'
+						});
+						obj.dataUp();
+					})
+					.catch(e => {
+						obj.$api.msg(e.msg);
+						obj.loding = false;
+						console.log();
+					});
+			},
+		}
+	};
+</script>
+
+<style lang="scss">
+	page {
+		height: 100%;
+	}
+	.listBox {
+		overflow: hidden;
+		background-color: #FFFFFF;
+	}
+	.list {
+		.all{
+			text-align: right;
+			padding: 20rpx 30rpx;
+			font-size: $font-base;
+			color: $uni-color-primary;
+		}
+		.listItem {
+			padding: 35rpx 40rpx;
+			border-bottom: 1px solid $page-color-light;
+		}
+	
+		.listIconImg {
+			width: 36rpx;
+		}
+	
+		.right {
+			color: $font-color-light;
+			font-size: $font-base;
+			flex-grow: 1;
+			justify-content: flex-end;
+			.img {
+				width: 26rpx;
+			}
+		}
+		.input {
+			flex-grow: 1;
+			text-align: right;
+			font-size: $font-base;
+			color: $color-gray;
+		}
+		
+		.titleBox {
+			.title {
+				color: $font-color-base;
+				font-size: $font-base;
+			}
+		}
+	}
+</style>

+ 7 - 1
pages/user_home/money/recharge.vue

@@ -90,7 +90,12 @@
 		data() {
 			return {
 				actionIndex: 0, //当前选中的充值金额对象
+				// #ifdef APP-PLUS
 				type: 'alipay',
+				// #endif
+				// #ifndef APP-PLUS
+				type: 'wxpay',
+				// #endif
 				money: '', //充值金额
 				payLoding: false, //是否加载中
 				moneyList: [],
@@ -98,6 +103,7 @@
 			};
 		},
 		onLoad(options) {
+			
 			this.rechargeIndex();
 			this.extractBank();
 			console.log("s");
@@ -467,7 +473,7 @@
 	}
 
 	.bg {
-		background-color: $color-green;
+		background-color: $base-color;
 		width: 950rpx;
 		position: absolute;
 		left: -100rpx;

+ 4 - 4
pages/user_home/money/wallet.vue

@@ -5,7 +5,7 @@
 		<view class="content-money">
 			<view class="conetnt-box">
 				<view class="money-box">
-					<view class="text">可用金额(元)</view>
+					<view class="text">可用卡券</view>
 					<view class="money">{{ money | getMoneyStyle }}</view>
 				</view>
 				<view class="flex buttom-box">
@@ -18,7 +18,7 @@
 		<view class="listbox">
 			<view class="navbar flex">
 				<view class="title">
-					余额变动明细
+					卡券变动明细
 				</view>
 				<view class="alllist" @click="navto('./walletList')">
 					全部
@@ -180,7 +180,7 @@
 				width: 300rpx;
 				height: 80rpx;
 				line-height: 80rpx;
-				background-color: $color-green;
+				background-color: $base-color;
 				color: #FFFFFF;
 
 				&.geMoney {
@@ -236,7 +236,7 @@
 		height: 100%;
 
 		.bg {
-			background-color: $color-green;
+			background-color: $base-color;
 			width: 950rpx;
 			position: absolute;
 			left: -100rpx;

BIN
static/icon/award1.png


BIN
static/icon/award2.png


BIN
static/image/awardbg.png


+ 2 - 2
uni.scss

@@ -35,7 +35,7 @@ $color-red: #FF4241;
 /* 图片加载中颜色 */
 $image-bg-color: #eee;
 /* 行为相关颜色 */
-$uni-color-primary: #5dbc7c;
+$uni-color-primary: #52C696;
 $uni-color-success: #0BBB62;
 $uni-color-warning: #FFA836;
 $uni-color-error: #FF4241;
@@ -44,4 +44,4 @@ $box-shadow: 0rpx 0rpx 10rpx 10rpx #f3f3f3;
 // 圆角
 $border-radius-sm: 15rpx;
 // 渐变背景颜色
-$bg-green-gradual: linear-gradient(#5dbc7c, #71d094);
+$bg-base-gradual: linear-gradient(-38deg, #6CDBC3, #6DD6B8);