hrjy 4 years ago
parent
commit
1ccfd17977

+ 48 - 6
pages.json

@@ -44,11 +44,14 @@
 			"path": "pages/index/sign",
 			"style": {
 				"navigationBarTitleText": "每日签到",
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
+				"navigationBarBackgroundColor": "transparent",
+				"navigationBarTextStyle": "white",
+					"app-plus": {
+						"titleNView": {
+							"type": "float",
+							"titleText": "每日签到"
+						}
 					}
-				}
 			}
 		},{
 			"path": "pages/public/register",
@@ -344,9 +347,30 @@
 		{
 			"path": "pages/user/scoreAccumulate",
 			"style": {
-				"navigationBarTitleText": "积分明细"
+				"navigationBarTitleText": "我的积分",
+				"navigationBarBackgroundColor": "transparent",
+				"navigationBarTextStyle": "white",
+					"app-plus": {
+						"titleNView": {
+							"type": "float",
+							"titleText": "我的积分"
+						}
+					}
+			}
+		},
+		{
+			"path": "pages/user/integralTransforms",
+			"style": {
+				"navigationBarTitleText": "积分转账"
+			}
+		},
+		{
+			"path": "pages/user/exchangeIntegral",
+			"style": {
+				"navigationBarTitleText": "兑换购物积分"
 			}
 		},
+		
 		{
 			"path": "pages/order/order",
 			"style": {
@@ -424,7 +448,7 @@
 			}
 		},
 		{
-			"path": "pages/money/recharge",
+			"path": "pages/money/rechargeUSDT",
 			"style": {
 				"navigationBarTitleText": "充币"
 			}
@@ -442,6 +466,24 @@
 				"navigationBarTitleText": "USDT专区"
 			}
 		},
+		{
+			"path": "pages/money/submitSuccess",
+			"style": {
+				"navigationBarTitleText": "提交成功"
+			}
+		},
+		{
+			"path": "pages/money/record",
+			"style": {
+				"navigationBarTitleText": "收款记录"
+			}
+		},
+		{
+			"path": "pages/money/recharge",
+			"style": {
+				"navigationBarTitleText": "充值"
+			}
+		},
 		{
 			"path": "pages/category/category",
 			"style": {

+ 45 - 9
pages/cart/cart.vue

@@ -22,7 +22,8 @@
 				</view>
 			</view>
 			<!-- 列表 -->
-			<view class="cart-list">
+			<scroll-view scroll-y="true" class="scrollBox">
+				<view class="cart-list">
 				<block v-for="(item, index) in cartList" :key="item.id">
 					<view class="cart-item" :class="{ 'b-b': index !== cartList.length - 1 }">
 						<view class="iconfont iconroundcheckfill checkbox" 
@@ -53,9 +54,9 @@
 										-
 									</view>
 									<view class="number">
-										<!-- <input type="number"
-										v-model="item.cart_num > item.productInfo.stock ? item.productInfo.stock : item.cart_num"/> -->
-										{{ item.cart_num > item.productInfo.stock ? item.productInfo.stock : item.cart_num }}
+										<input type="number" @input = "inputChangeNum($event,index,item)"
+										v-model="item.cart_num > item.productInfo.stock ? item.productInfo.stock : item.cart_num"/>
+										<!-- {{ item.cart_num > item.productInfo.stock ? item.productInfo.stock : item.cart_num }} -->
 									</view>
 									<view class="add" @click="changeNum('add',index,item)">
 										+
@@ -78,6 +79,8 @@
 					</view>
 				</block>
 			</view>
+			</scroll-view>
+			
 			<!-- 底部菜单栏 -->
 			<view class="action-section">
 				<view class="checkbox">
@@ -199,11 +202,31 @@ export default {
 			}
 			this.calcTotal(type);
 		},
+		//数量输入变化
+		inputChangeNum(e,index,item) {
+			const cartList = this.cartList[index]
+			let num = e.detail.value
+			if(num < cartList.trueStock ) {
+				cartList.cart_num = num
+			}else {
+				cartList.cart_num = cartList.trueStock
+			}
+			const data = {
+				number: num,
+				id: item.id
+			}
+			this.numberChange(data)
+		},
+		//数量加减变化
 		changeNum(type,index,item) {
 			const cartList = this.cartList[index]
 			if(type == "add") {
-				cartList.cart_num >= cartList.productInfo.stock || cartList.cart_num++
+				cartList.cart_num >= cartList.trueStock || cartList.cart_num++
 			}else if(type == "del") {
+				if(cartList.cart_num <=1) {
+					this.deleteCartItem(index)
+					// this.cartList.splice(index, 1);
+				}
 				cartList.cart_num <= 1 || cartList.cart_num--
 			}
 			const data = {
@@ -296,10 +319,14 @@ export default {
 </script>
 
 <style lang="scss">
+	page {
+		// height: 100%;
+	}
 	.header {
-		// position: absolute;
-		// top: 0;
-		// width: 100%;
+		height: 140rpx;
+		position: absolute;
+		top: 0;
+		width: 100%;
 		display: flex;
 		justify-content: space-between;
 		background-color: #fff;
@@ -324,8 +351,16 @@ export default {
 		}
 	}
 .container {
+	height: 100%;
 	padding-bottom: 134rpx;
 	background-color: $page-color-base;
+	
+	.scrollBox {
+		position: absolute;
+		top: 140rpx;
+		// margin-top: 120rpx;
+		height: calc(100% - 300rpx);
+	}
 	/* 空白页 */
 	.empty {
 		position: fixed;
@@ -349,7 +384,7 @@ export default {
 			font-size: $font-sm + 2rpx;
 			color: $font-color-disabled;
 			.navigator {
-				color: $uni-color-primary;
+				color: #438BED;
 				margin-left: 16rpx;
 			}
 		}
@@ -357,6 +392,7 @@ export default {
 }
 /* 购物车列表项 */
 .cart-item {
+	height: 100%;
 	display: flex;
 	position: relative;
 	margin: 15rpx;

+ 1 - 1
pages/index/child/hotGoods.vue

@@ -42,7 +42,7 @@
 	export default {
 		data() {
 			return {
-				errImg: require('@/static/error/errorImage.jpg')
+				errImg: require('@/static/error/errorImage.jpg'),
 			}
 		},
 		props: ["goodsList"],

+ 3 - 2
pages/index/child/recommend.vue

@@ -16,8 +16,9 @@
 						</view>
 						<view class="item-price">
 							<view class="">
-								<text class="ot-price">¥{{b.ot_price}}</text><image src="../../../static/icon/decline.png"></image>
-								<text>直降{{b.ot_price - b.price}}元</text><br>
+								<text class="ot-price">¥{{b.ot_price}}</text>
+								<image src="../../../static/icon/decline.png" v-if="b.ot_price - b.price > 0"></image>
+								<text v-if="b.ot_price - b.price > 0">直降{{b.ot_price - b.price}}元</text><br>
 								<text class="price">¥{{b.price}}</text>
 							</view>
 							<view class="button" @click="navToDetailPage(b)">立即购买</view>

+ 1 - 1
pages/index/index.vue

@@ -47,7 +47,7 @@
 					<text>热销专区</text>
 				</view>
 			</navigator>
-			<navigator url="/pages/money/USDT">
+			<navigator url="/pages/money/recharge">
 				<view class="cate-item">
 					<image src="/static/icon/in3.png"></image>
 					<text>充值送积分</text>

+ 84 - 18
pages/index/sign.vue

@@ -1,20 +1,34 @@
 <template>
 	<view>
 		<view class="title-box">
-			<view class=" title-conetnt  position-relative">
-				<view class="title-img"><image src="/static/img/img08.png" mode="aspectFit"></image></view>
+			<view class="bg">
+				<image src="/static/img/sign-bg.png">
+			</view>
+			<view class=" title-conetnt  position-relative" @click="signTrue?'':integral()">
+				<view class="title-img"><image src="/static/img/sign-btn.png" mode="aspectFit"></image></view>
 				<view class="title-content-box">
-					<view class="title-text">已连续签到</view>
+					<view class="title-text">签到</view>
 					<view class="title-day-text">
-						<text class="title-day">{{actionDay}}</text>
-						<text>天</text>
+						今日签到可得10购物积分
+						<!-- <text class="title-day">签到</text> -->
+						<!-- <text>天</text> -->
 					</view>
-					<view class="title-button" :class="{'signAction':signTrue}" @click="signTrue?'':integral()">{{signTrue?'已签到':'立即签到'}}</view>
+					<!-- <view class="title-button" :class="{'signAction':signTrue}" @click="signTrue?'':integral()">{{signTrue?'已签到':'立即签到'}}</view> -->
 				</view>
 			</view>
-			<view class="title-tip"><text>共获得{{sum_integral}}积分,总签到{{allSign}}天</text></view>
+			<!-- <view class="title-tip"><text>共获得{{sum_integral}}积分,总签到{{allSign}}天</text></view> -->
+		</view>
+		<view class="conenter">
+			<view class="money"><text>{{sum_integral}}</text><br>获得金额
+			</view>
+			<view class="l"></view>
+			<view class="day"><text>{{allSign}}</text><br>签到天数</view>
 		</view>
-		<calendar class="sign-date-box" :checks="signList" checksClass="" :checkTextShow="true" checksIcon="/static/img/img07.png"></calendar>
+		<view class="explain">
+			签到说明
+			<image src="../../static/img/img74.png"></image>
+		</view>
+		<!-- <calendar class="sign-date-box" :checks="signList" checksClass="" :checkTextShow="true" checksIcon="/static/img/img07.png"></calendar> -->
 	</view>
 </template>
 
@@ -121,14 +135,23 @@ page {
 	padding-top: 120rpx;
 	color: #ffffff;
 	height: 590rpx;
+	.bg {
+		position: absolute;
+		width: 100%;
+		top: 0;
+		image {
+			width: 100%;
+			height: 590rpx;
+		}
+		
+	}
 	.title-conetnt {
-		height: 350rpx;
-		width: 350rpx;
+		height: 240rpx;
 		margin: 0 auto;
 		text-align: center;
 		.title-img {
 			position: absolute;
-			top: 0;
+			top: 60rpx;
 			left: 0;
 			height: 100%;
 			width: 100%;
@@ -140,16 +163,18 @@ page {
 		.title-content-box {
 			position: absolute;
 			width: 100%;
+			text-align: center;
 			.title-day-text {
-				padding: 20rpx;
-				font-size: $font-base - 2rpx;
-				.title-day {
-					font-size: 60rpx;
-				}
+				// margin: auto 0 ;
+				// width: 150%;
+				padding-top: 100rpx;
+				// margin-right: 75%;
+				// padding: -50rpx;
+				font-size: $font-base + 2rpx;
 			}
 			.title-text {
-				font-size: 26rpx;
-				padding-top: 100rpx;
+				font-size: 50rpx;
+				padding-top: 140rpx;
 			}
 			.title-button {
 				background-color: #fe7e51;
@@ -174,4 +199,45 @@ page {
 	text-align: center;
 	margin-top: -40rpx;
 }
+.conenter {
+	background-color: #fff;
+	display: flex;
+	padding: 60rpx 0;
+	margin: 0 30rpx;
+	border-radius: 10rpx;
+	position: relative;
+	top: -80rpx;
+	
+	.l {
+		width: 2rpx;
+		background-color: #EFEFEF;
+	}
+	.money,.day {
+		width: 50%;
+		text-align: center;
+		color: #7e7e7e;
+		font-family: PingFang-SC-Bold;
+		text {
+			font-size: 50rpx;
+			font-weight: bold;
+		}
+	}
+}
+.explain {
+	font-family: PingFang-SC-Bold;
+	font-size: 30rpx;
+	color: #333333;
+	position: relative;
+	top: -60rpx;
+	background-color: #fff;
+	padding: 30rpx;
+	margin: 0 30rpx;
+	border-radius: 10rpx;
+	image {
+		float: right;
+		width: 14rpx;
+		height: 30rpx;
+		margin-top: 6rpx;
+	}
+}
 </style>

+ 16 - 0
pages/money/conversionIntegral.vue

@@ -39,6 +39,9 @@
 				</view>
 			</view>
 		</view>
+		<view class="button">
+			确定兑换
+		</view>
 	</view>
 </template>
 
@@ -133,5 +136,18 @@
 				}
 			}
 		}
+		
+		.button {
+			text-align: center;
+			margin: 0 auto;
+			width: 90%;
+			background: linear-gradient(90deg, #438BED 0%,  #44BFEC 100%);
+			height: 70rpx;
+			line-height: 70rpx;
+			border-radius: 50rpx;
+			color: #fff;
+			font-size: 32rpx;
+			margin-top: 80rpx ;
+		}
 	}
 </style>

+ 36 - 29
pages/money/paySuccess.vue

@@ -1,10 +1,11 @@
 <template>
 	<view class="content">
-		<text class="success-icon iconfont iconroundcheck"></text>
+		<image src="../../static/img/pays.png" class="headerImg"></image>
+		<!-- <text class="success-icon iconfont iconroundcheck"></text> -->
 		<text class="tit">支付成功</text>
 		<view class="btn-group">
-			<navigator :url="'/pages/order/orderDetail?id='+orderId" open-type="redirect" class="mix-btn">查看订单</navigator>
-			<navigator url="/pages/index/index" open-type="switchTab" class="mix-btn hollow">返回首页</navigator>
+			<navigator :url="'/pages/order/orderDetail?id='+orderId"><view class="lookorder">查看订单</view></navigator>
+			<view class="btntoindex" @click="tabTo('/pages/index/index')">返回首页</view>
 		</view>
 	</view>
 </template>
@@ -21,45 +22,51 @@
 			this.orderId = opt.orderid;
 		},
 		methods: {
-			
+			//跳转
+			tabTo(url) {
+				uni.switchTab({
+					url: url
+				})
+			},
 		}
 	}
 </script>
 
-<style lang='scss'>
+<style lang='scss' scoped>
+	page {
+		background-color: #fff;
+		height: 100%;
+	}
+	.headerImg {
+		margin-top: 70rpx;
+		width: 280rpx;
+		height: 280rpx;
+	}
 	.content{
 		display: flex;
 		flex-direction: column;
 		justify-content: center;
 		align-items: center;
 	}
-	.success-icon{
-		font-size: 160upx;
-		color: #5dbc7c;
-		margin-top: 100upx;
+	.btn-group {
+		display: flex;
+		margin-top: 80rpx;
+		view {
+			padding: 15rpx 80rpx;
+			margin: 30rpx;
+			border-radius: 15rpx;
+			border: solid 2rpx #438BED;
+		}
+		.lookorder {
+			background: linear-gradient(90deg, #438BED 0%,  #44BFEC 100%);
+			color: #fff;
+		}
+		.btntoindex {
+			color: #438BED;
+		}
 	}
 	.tit{
 		font-size: 38upx;
 		color: #303133;
 	}
-	.btn-group{
-		padding-top: 100upx;
-	}
-	.mix-btn {
-		margin-top: 30upx;
-		display: flex;
-		align-items: center;
-		justify-content: center;
-		width: 600upx;
-		height: 80upx;
-		font-size: $font-lg;
-		color: #fff;
-		background-color: $base-color;
-		border-radius: 10upx;
-		&.hollow{
-			background: #fff;
-			color: #303133;
-			border: 1px solid #ccc;
-		}
-	}
 </style>

+ 205 - 62
pages/money/recharge.vue

@@ -1,90 +1,233 @@
 <template>
 	<view class="recharge">
-		<view class="title">
-			<view class="title-t">
-				充币二维码
-			</view>
+		<view class="header">
+			<text>{{ integral || '0.00' }}</text><br>
+			<text>我的当前积分</text>
 		</view>
-		
-		<view class="content">
-			请转入USDT<br>
-			<image src="../../static/error/errorImage.jpg" mode=""></image>
-			<view class="button" @click="downLoad">保存二维码</view>
+		<view class="footer">
+			<view class="item" v-for="l in list" @click="confirm(l)">
+				<image :src="l.img" class="border"></image>
+				<image :src="l.icon" class="i"></image>
+				<view class="rechargetext">{{l.recharge}}<text>积分</text></view>
+				<view class="pay">充{{l.pay}}</view>
+				<view class="song" :style="{color: l.color}">送</view>
+				<view class="button">充值{{l.pay}}元</view>
+			</view>
 		</view>
 	</view>
 </template>
 
 <script>
+// #ifdef H5
+import { rechargeWechat } from '@/api/wallet.js';
+// #endif
+// #ifdef MP
+import { rechargeRoutine } from '@/api/wallet.js';
+// #endif
 	export default {
 		data() {
 			return {
-				url: ''
+				type: 'weixin',
+				list: 
+					[{
+						pay: 1000,
+						recharge: 100,
+						img: require('@/static/img/i1.png'),
+						icon: require('@/static/img/ic1.png'),
+						color: "#FF6000",
+					},
+					{
+						pay: 500,
+						recharge: 50,
+						img: require('@/static/img/i2.png'),
+						icon: require('@/static/img/ic2.png'),
+						color: "#FF3115",
+					},
+					{
+						pay: 200,
+						recharge: 20,
+						img: require('@/static/img/i3.png'),
+						icon: require('@/static/img/ic3.png'),
+						color: "#FF2C4F",
+					},
+					{
+						pay: 100,
+						recharge: 10,
+						img: require('@/static/img/i4.png'),
+						icon: require('@/static/img/ic3.png'),
+						color: "#9525FE ",
+					}]
 			}
 		},
 		methods: {
-			//下载
-			downLoad() {
-				// const obj = this
-				// uni.downloadFile({
-				// 	url: url,
-				// 	success(res) {
-				// 		if (res.errMsg == 'downloadFile:ok') {
-				// 			obj.src = res.tempFilePath;
-				// 			// 生成画布
-				// 			obj.loadImg(obj.src);
-				// 			uni.hideLoading();
-				// 		}
-				// 		console.log(res);
-				// 	},
-				// 	fail(e) {
-				// 		console.log(e);
-				// 	}
-				// })
+			//充值
+			confirm(item) {
+				let obj = this
+				uni.showModal({
+					// title: "是否确认充值",
+					content: "确认充值?",
+					success:function(res){
+						if(res.confirm) {
+							obj.submit(item.pay)
+						}else {
+							console.log("xu")
+						}
+					}
+				})
+			},
+			// 提交
+			submit(money) {
+				let obj = this;
+				// obj.payLoding = true;
+				// #ifdef H5
+				rechargeWechat({ price: money, from: this.type })
+					.then(e => {
+						let da = e.data.data;
+						obj.weichatObj.chooseWXPay({
+							timestamp: da.timestamp,
+							nonceStr: da.nonceStr,
+							package: da.package,
+							signType: da.signType,
+							paySign: da.paySign,
+							success: function(res) {
+								uni.showToast({
+									title: '充值成功',
+									duration: 2000,
+									position: 'top'
+								});
+							}
+						});
+						obj.payLoding = false;
+					})
+					.catch(e => {
+						obj.payLoding = false;
+						console.log(e);
+					});
+				// #endif
+				// #ifdef MP
+				rechargeRoutine({ price: money})
+					.then(e => {
+						let da = e.data;
+							wx.requestPayment({
+									timeStamp: da.timestamp,
+									nonceStr: da.nonceStr,
+									package: da.package,
+									signType: da.signType,
+									paySign: da.paySign,
+									success: function(res) {
+										uni.redirectTo({
+											url: '/pages/money/paySuccess'
+										});
+									},
+									
+								})
+						
+						obj.payLoding = false;
+					})
+					.catch(e => {
+						obj.payLoding = false;
+						console.log(e);
+					});
+				// #endif
 			}
-		}
+		},
+		computed: {
+			//积分
+			integral() {
+				return this.$store.state.user.userInfo.integral
+			}
+		},
 	}
 </script>
 
 <style lang="scss" scoped>
+	page {
+		height: 100%;
+		background-color: #fff;
+	}
 	.recharge {
-		font-family: PingFang-SC-Bold;
-		.title {
-			background-color: #fff;
-			padding: 30rpx;
-			margin-bottom: 1rpx;
-			.title-t {
-				// margin: 30rpx;
-				padding: 0 15rpx;
-				color: #333333;
+		background-color: #EBF3FF;
+	}
+	.header {
+		padding: 80rpx;
+		padding-top: 100rpx;
+		color: #438BED;
+		text-align: center;
+		text:nth-child(1) {
+			font-size: 80rpx;
+		}
+	}
+	.footer {
+		border-radius: 50rpx 50rpx 0 0;
+		height: 70%;
+		display: flex;
+		flex-wrap: wrap;
+		justify-content: space-between;
+		background-color: #fff;
+		width: 100%;
+		padding: 30rpx;
+		.item {
+			margin: 10rpx;
+			width: 320rpx;
+			height: 180rpx;
+			margin-bottom: 30rpx;
+			.border {
+				position: absolute;
+				width: 320rpx;
+				height: 190rpx;
+			}
+			.i {
+				width: 100rpx;
+				height: 100rpx;
+				position: relative;
+				left: 30rpx;
+				top: 20rpx;
+			}
+			view {
+				position: relative;
+			}
+			.rechargetext {
 				font-weight: bold;
-				border-left: solid 2rpx #75EFFA;
+				color: #fff;
+				position: relative;
+				left: calc(10% + 120rpx);
+				font-size: 50rpx;
+				bottom: 55rpx;
+				text {
+					font-weight: 500;
+					margin-left: 5rpx;
+					font-size: 28rpx;
+				}
 			}
-		}
-		.content {
-			padding: 50rpx;
-			background-color: #fff;
-			text-align: center;
-			color: #333333;
-			font-weight: bold;
-			image {
-				margin-top: 20rpx;
-				width: 200rpx;
-				height: 200rpx;
+			.pay {
+				text-align: center;
+				width: 150rpx;
+				bottom: 162rpx;
+				left: calc(50% - 75rpx);
+				color: #fff;
+				font-size: 28rpx;
+			}
+			.song {
+				height: 20rpx;
+				bottom: 156.8rpx;
+				left: 64rpx;
+				font-weight: bold;
+				color: #FF6000;
+				font-size: 36rpx;
 			}
 			.button {
-				margin: 0 auto;
-				width: 450rpx;
-				background: linear-gradient(90deg, #438BED 0%,  #44BFEC 100%);
-				background-color: #438BED;
-				height: 60rpx;
-				line-height: 60rpx;
-				border-radius: 50rpx;
-				color: #fff;
-				font-size: 30rpx;
-				margin-top: 20rpx;
-				font-weight: 500;
+				background-color: #FFF583;
+				width: 200rpx;
+				height: 50rpx;
+				bottom: 95rpx;
+				line-height: 50rpx;
+				text-align: center;
+				border-radius: 10rpx;
+				color: #722E18;
+				left: calc(50% - 100rpx);
+				font-size: 26rpx;
+				box-shadow: 0px 3px 8px #aaa,
 			}
 		}
-		
 	}
 </style>

+ 88 - 0
pages/money/rechargeUSDT.vue

@@ -0,0 +1,88 @@
+<template>
+	<view class="recharge">
+		<view class="title">
+			<view class="title-t">
+				充币二维码
+			</view>
+		</view>
+		<view class="content">
+			请转入USDT<br>
+			<image src="../../static/error/errorImage.jpg" mode=""></image>
+			<view class="button" @click="downLoad">保存二维码</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				url: ''
+			}
+		},
+		methods: {
+			//下载保存二维码
+			downLoad() {
+				// const obj = this
+				// uni.downloadFile({
+				// 	url: url,
+				// 	success(res) {
+				// 		if (res.errMsg == 'downloadFile:ok') {
+				// 			obj.src = res.tempFilePath;
+				// 			// 生成画布
+				// 			obj.loadImg(obj.src);
+				// 			uni.hideLoading();
+				// 		}
+				// 		console.log(res);
+				// 	},
+				// 	fail(e) {
+				// 		console.log(e);
+				// 	}
+				// })
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.recharge {
+		font-family: PingFang-SC-Bold;
+		.title {
+			background-color: #fff;
+			padding: 30rpx;
+			margin-bottom: 1rpx;
+			.title-t {
+				// margin: 30rpx;
+				padding: 0 15rpx;
+				color: #333333;
+				font-weight: bold;
+				border-left: solid 2rpx #75EFFA;
+			}
+		}
+		.content {
+			padding: 50rpx;
+			background-color: #fff;
+			text-align: center;
+			color: #333333;
+			font-weight: bold;
+			image {
+				margin-top: 20rpx;
+				width: 200rpx;
+				height: 200rpx;
+			}
+			.button {
+				margin: 0 auto;
+				width: 450rpx;
+				background: linear-gradient(90deg, #438BED 0%,  #44BFEC 100%);
+				background-color: #438BED;
+				height: 60rpx;
+				line-height: 60rpx;
+				border-radius: 50rpx;
+				color: #fff;
+				font-size: 30rpx;
+				margin-top: 20rpx;
+				font-weight: 500;
+			}
+		}
+	}
+</style>

+ 76 - 0
pages/money/record.vue

@@ -0,0 +1,76 @@
+<template>
+	<view class="record">
+		<view class=" item" v-for="l in list">
+			<view class="name">
+				<image src="../../static/error/missing-face.png" mode=""></image>
+				<view class="name-right">
+					<view class="nickname">{{l.name}}</view>
+					<view class="time">{{l.time}}</view>
+				</view>
+			</view>
+			<view class="u">
+				{{l.money}}
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				list: [{
+					name: "御风",
+					time: "2019-12-02 12:00:00",
+					money: "5000U"
+				},
+				{
+					name: "茶荷酒",
+					time: "2008-10-02 12:00:00",
+					money: "1000U"
+				}]
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+.record {
+	margin-top: 20rpx;
+	background-color: #fff;
+	.item {
+		padding: 30rpx;
+		margin: 20rpx;
+		margin-bottom: 0;
+		display: flex;
+		justify-content: space-between;
+		border-bottom: solid 1rpx #f8f8f8;
+		.name {
+			display: flex;
+			image {
+				height: 100rpx;
+				width: 100rpx;
+				margin-right: 30rpx;
+			}
+			.name-right {
+				display: grid;
+				align-content: space-between;
+				.nickname {
+					color: #3F454B;
+					font-size: 32rpx;
+				}
+				.time {
+					color: #999999;
+					font-size: 28rpx;
+				}
+			}
+		}
+		.u {
+			color: #EF3A55;
+			margin: auto 0;
+			font-weight: bold;
+			font-size: 35rpx;
+		}
+	}
+}
+</style>

+ 56 - 0
pages/money/submitSuccess.vue

@@ -0,0 +1,56 @@
+<template>
+	<view class="success">
+		<view class="header">
+			<image src="../../static/img/submitsuccess.png" mode=""></image><br>
+			<text>提交成功</text>
+		</view>
+		<view class="button" @click="tabTo('/pages/index/index')" >返回首页</view>
+		<!-- <navigator url="@/pages/index/index"><view class="btntoindex">返回首页</view></navigator> -->
+		<!-- <navigator url="/pages/index/index"><view class="btntoindex">返回首页</view></navigator> -->
+	</view>
+</template>
+
+<script>
+	export default {
+		methods: {
+			//跳转
+			tabTo(url) {
+				uni.switchTab({
+					url: url
+				})
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	page {
+		height: 100%;
+		background-color: #fff;
+	}
+	.success {
+		.header {
+			margin-top: 200rpx;
+			text-align: center;
+			image {
+				width: 400rpx;
+				height: 300rpx;
+			}
+			text {
+				position: relative;
+				top: -40rpx;
+				font-size: 38rpx;
+				color: #333333;
+			}
+		}
+		.button {
+			margin: 50rpx auto;
+			border-radius: 10rpx;
+			padding: 15rpx;
+			text-align: center;
+			width: 320rpx;
+			border: solid 1rpx #438BED;
+			color: #438BED;
+		}
+	}
+</style>

+ 91 - 0
pages/user/exchangeIntegral.vue

@@ -0,0 +1,91 @@
+<template>
+	<view class="exchangeIntegral">
+		<view class="integral">
+			<view class="">
+				可兑换积分
+			</view>
+			<view class="num">
+				{{integral}}
+			</view>
+		</view>
+		<view class="applyIntegral">
+			<view class="">
+				申请兑换购物积分
+			</view>
+			<input type="number" class="num" v-model="num"/>
+		</view>
+		<view class="all" @click="all"><text>全部转换</text></view>
+		<view class="button" @click="submit">提交申请</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				integral: 1000,
+				num: ''
+			}
+		},
+		methods: {
+			all() {
+				this.num = this.integral
+			},
+			submit() {
+				if(this.integral < this.num) {
+					this.all()
+				}
+			}
+		},
+		watch: {
+			num() {
+				if(this.integral < this.num) {
+					this.all()
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.exchangeIntegral {
+		.integral,.applyIntegral{
+			display: flex;
+			justify-content: space-between;
+			padding: 30rpx;
+			background-color: #fff;
+			margin-bottom: 5rpx;
+			font-size: 30rpx;
+			.num {
+				font-size: 40rpx;
+				text-align: right;
+				max-width: 400rpx;
+			}
+		}
+		.all {
+			width: 100%;
+			height: 80rpx;
+			line-height: 80rpx;
+			margin-top: 2rpx;
+			background-color: #fff;
+			padding: 0 30rpx;
+			margin-bottom: 380rpx;
+			text {
+				margin:auto 0 ;
+				float: right;
+				font-size: 28rpx;
+				color: #EF3A55;
+			}
+		}
+		.button {
+			background: linear-gradient(90deg, #438BED 0%,  #44BFEC 100%);
+			color: #fff;
+			width: 70%;
+			padding: 20rpx;
+			font-size: 30rpx;
+			border-radius: 10rpx;
+			text-align: center;
+			margin: 0 auto;
+		}
+	}
+</style>

+ 97 - 0
pages/user/integralTransforms.vue

@@ -0,0 +1,97 @@
+<template>
+	<view class="integralTransforms">
+		<view class="header">
+			<text class="title">{{ integral || '0.00' }}</text><br>
+			<text>可转换积分</text>
+		</view>
+		<view class="account">
+			<text class="title">收款人账户</text>
+			<input type="text" placeholder="请输入收款人账户" v-model="account"/>
+		</view>
+		<view class="num">
+			<text class="title">转账数量</text>
+				<view class="">
+					<text class="ti">¥</text>
+					<input type="number" v-model.number="num" placeholder="请输入转账数量" />
+				</view>
+		</view>
+		<view class="button" @click="submit">
+			提交申请
+		</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;
+			}
+		}
+		.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: 520rpx;
+			margin: 60rpx auto;
+			padding: 20rpx;
+			text-align: center;
+			border-radius: 10rpx;
+			background: linear-gradient(90deg, #438BED 0%,  #44BFEC 100%);
+			color: #fff;
+		}
+	}
+</style>

+ 83 - 6
pages/user/scoreAccumulate.vue

@@ -3,6 +3,16 @@
 		<!-- <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/img/i-bg.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">
@@ -27,6 +37,10 @@
 				</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>
 
@@ -49,7 +63,15 @@ export default {
 			navList: [
 				{
 					state: 0,
-					text: '全部',
+					text: '收入',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				},
+				{
+					state: 1,
+					text: '支出',
 					loadingType: 'more',
 					orderList: [],
 					page: 1, //当前页数
@@ -123,7 +145,13 @@ export default {
 		tabClick(index) {
 			this.tabCurrentIndex = index;
 		}
-	}
+	},
+	computed: {
+		//积分
+		integral() {
+			return this.$store.state.user.userInfo.integral
+		}
+	},
 };
 </script>
 
@@ -132,6 +160,31 @@ 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;
@@ -150,7 +203,7 @@ page {
 		color: $font-color-dark;
 		position: relative;
 		&.current {
-			color: $base-color;
+			color: #438BED;
 			&:after {
 				content: '';
 				position: absolute;
@@ -159,7 +212,7 @@ page {
 				transform: translateX(-50%);
 				width: 44px;
 				height: 0;
-				border-bottom: 2px solid $base-color;
+				border-bottom: 2px solid #438BED;
 			}
 		}
 	}
@@ -167,7 +220,7 @@ page {
 // 列表
 
 .swiper-box {
-	height: calc(100% - 44px);
+	height: calc(100% - 180rpx - 400rpx);
 	padding-top: 10rpx;
 	.order-item {
 		padding: 20rpx 30rpx;
@@ -183,7 +236,7 @@ page {
 			}
 		}
 		.money {
-			color: #fd5b23;
+			color: #EF3A55;
 			font-size: $font-lg;
 		}
 	}
@@ -197,4 +250,28 @@ page {
 		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>

BIN
static/img/i-bg.png


BIN
static/img/i1.png


BIN
static/img/i2.png


BIN
static/img/i3.png


BIN
static/img/i4.png


BIN
static/img/ic1.png


BIN
static/img/ic2.png


BIN
static/img/ic3.png


BIN
static/img/ic4.png


BIN
static/img/pays.png


BIN
static/img/sign-bg.png


BIN
static/img/sign-btn.png


BIN
static/img/submitsuccess.png