hrjy 3 vuotta sitten
vanhempi
commit
056b98ec59

+ 2 - 0
api/market.js

@@ -28,6 +28,7 @@ export function miningDateils(data,id) {
 		data
 	});
 }
+// 兑换记录
 export function getSp(data,id) {
 	return request({
 		url: '/api/lala/sp_exchange/'+id,
@@ -35,6 +36,7 @@ export function getSp(data,id) {
 		data
 	});
 }
+// 特别兑换
 export function spExchange(data,id) {
 	return request({
 		url: '/api/lala/sp_exchange/'+id,

+ 2 - 2
api/user.js

@@ -1,10 +1,10 @@
 import request from '@/utils/request'
-import { upFilse} from '@/utils/request';
+import { upFilse } from '@/utils/request';
 
 // 获取用户信息
 export function getUserInfo(data) {
 	return request({
-		url: '/api/userinfo',
+		url: '/api/user',
 		method: 'get',
 		data
 	});

+ 19 - 1
api/wallet.js

@@ -121,4 +121,22 @@ export function lalaprice(data) {
 		method: 'get',
 		data
 	});
-}
+}
+
+// 钱包流水
+export function USDT(data) {
+	return request({
+		url: '/api/money/log/USDT',
+		method: 'get',
+		data
+	});
+}
+
+// 个人钱包
+export function getWallet(data) {
+	return request({
+		url: '/api/wallet',
+		method: 'get',
+		data
+	});
+}

+ 50 - 9
pages.json

@@ -348,12 +348,23 @@
 		//糖果
 		{
 			"path": "pages/money/award",
+			
 			"style": {
-				"navigationBarTitleText": "奖励明细",
+				"navigationBarBackgroundColor": "transparent",
+				"navigationBarTextStyle": "white",
 				"app-plus": {
-					"titleNView": false
+					"titleNView": {
+						"type": "float",
+						"titleText": "我的糖果"
+					}
 				}
-			}
+				}
+			// "style": {
+			// 	"navigationBarTitleText": "奖励明细",
+			// 	"app-plus": {
+			// 		"titleNView": false
+			// 	}
+			// }
 		},
 		{
 			"path": "pages/money/pay",
@@ -413,31 +424,61 @@
 		{
 			"path": "pages/money/wallet",
 			"style": {
-				"navigationBarTitleText": "我的佣金",
+				"navigationBarBackgroundColor": "transparent",
+				"navigationBarTextStyle": "white",
 				"app-plus": {
-					"titleNView": false
+					"titleNView": {
+						"type": "float",
+						"titleText": "我的佣金"
+					}
 				}
 			}
+			// "style": {
+			// 	"navigationBarTitleText": "我的佣金",
+			// 	"app-plus": {
+			// 		"titleNView": false
+			// 	}
+			// }
 		},
 		// 拼团积分
 		{
 			"path": "pages/money/integralP",
 			"style": {
-				"navigationBarTitleText": "我的拼团积分",
+				"navigationBarBackgroundColor": "transparent",
+				"navigationBarTextStyle": "white",
 				"app-plus": {
-					"titleNView": false
+					"titleNView": {
+						"type": "float",
+						"titleText": "我的拼团积分"
+					}
 				}
 			}
+			// "style": {
+			// 	"navigationBarTitleText": "我的拼团积分",
+			// 	"app-plus": {
+			// 		"titleNView": false
+			// 	}
+			// }
 		},
 		// 购物积分
 		{
 			"path": "pages/money/integralShopping",
 			"style": {
-				"navigationBarTitleText": "我的购物积分",
+				"navigationBarBackgroundColor": "transparent",
+				"navigationBarTextStyle": "white",
 				"app-plus": {
-					"titleNView": false
+					"titleNView": {
+						"type": "float",
+						"titleText": "我的购物积分"
+					}
 				}
 			}
+			// "style": {
+			// 	"navigationBarTitleText": "我的购物积分",
+			// 	"app-plus": {
+			// 		"titleNView": false
+			// 	}
+			// }
 		},
 		// 兑换糖果
 		{

+ 23 - 4
pages/conversion/candy.vue

@@ -3,12 +3,14 @@
 		<view class="content-money">
 			<view class="buttom">
 				<text class="text">可兑换积分</text>
-				<view class="icon"><text>¥</text>{{ money }}</view>
+				<view class="icon"><text>¥</text>{{ integral }}</view>
 			</view>
 			<view class="interval"></view>
 			<view class="buttom">
 				<text class="text">申请兑换糖果</text>
-				<view class=" icon"><input class="input" type="number" v-model="withdrawal" placeholder="申请兑换糖果数量" placeholder-class="placeholder" /></view>
+				<view class=" icon">
+				<input class="input" type="number" v-model="withdrawal > integral ? integral : withdrawal" 
+				placeholder="申请兑换糖果数量" placeholder-class="placeholder" /></view>
 			</view>
 			<view class="interval"></view>
 			<view class="tip">
@@ -18,19 +20,36 @@
 		<view class="code">
 			
 		</view>
-		<view class="btn">
+		<view class="btn" @click="submit">
 			提交申请
 		</view>
 	</view>
 </template>
 
 <script>
+import { exchange } from '@/api/market.js';
 export default {
 	data(){
 		return{
-			money: 1000,
+			// money: 1000,
 			withdrawal:'',
 		}
+	},
+	computed: {
+		//可兑换积分
+		integral() {
+			return this.$store.state.user.userInfo.integral
+		}
+	},
+	methods: {
+		//全部转换
+		all() {
+			this.withdrawal = this.integral
+		},
+		//提交申请兑换
+		submit() {
+			
+		}
 	}
 }
 </script>

+ 9 - 4
pages/conversion/transfers.vue

@@ -6,11 +6,11 @@
 		</view>
 		<view class="main">
 			<view class="main-font">收款人账户</view>
-			<input class="main-input" type="text" value="" v-model="uid" placeholder="请输入收款人账户" placeholder-class="main-input" />
+			<input class="main-input" type="text" v-model="uid" placeholder="请输入收款人账户" placeholder-class="main-input" />
 		</view>
 		<view class="main">
 			<view class="main-font">转账数量</view>
-			<input class="main-input" type="text" value="" v-model="num" placeholder="请输入转账数量" placeholder-class="main-input" />
+			<input class="main-input" type="number" v-model="num > jf ? jf :num" placeholder="请输入转账数量" placeholder-class="main-input" />
 		</view>
 		<view class="btn">
 			提交申请
@@ -22,11 +22,16 @@
 export default {
 	data() {
 		return {
-			jf: 360, //可转账购物积分
+			// jf: 360, //可转账购物积分
 			uid: '', //收款人账户
 			num: '' //转账数量
 		};
-	}
+	},
+	computed: {
+		jf() {
+			return this.$store.state.user.userInfo.integral
+		}
+	},
 };
 </script>
 

+ 114 - 1
pages/message/message.vue

@@ -1,8 +1,121 @@
 <template>
+	<view class="message">
+		<view class="item" v-for="l in list">
+			<view class="img">
+				<image :src="l.img" mode=""></image>
+			</view>
+			<view class="right">
+				<view class="top">
+					<view class="title">{{ l.title }}</view><view class="time">{{ l.time }}</view>
+				</view>
+				<view class="bottom">
+					<view class="concent clamp2">{{ l.concent }}</view><view class="icon" v-show="l.lookAll"></view>
+				</view>
+			</view>
+		</view>
+		
+	</view>
 </template>
 
 <script>
+	export default {
+		data() {
+			return {
+				list: [
+					{
+						img: require('../../static/icon/message1.png'),
+						title: "系统消息",
+						time: "2018-12-09 12:00:00",
+						concent: "恭喜你,你已从营长升级至团长!",
+						lookAll: true
+					},
+					{
+						img: require('../../static/icon/message2.png'),
+						title: "新增下线",
+						time: "2018-12-09 12:00:00",
+						concent: "恭喜你,[下线昵称]在[时间]成为你的下线!",
+						lookAll: false
+					},
+					{
+						img: require('../../static/icon/message3.png'),
+						title: "佣金通知",
+						time: "2018-12-09 12:00:00",
+						concent: "[下线昵称]在[时间]成功支付,恭喜你获得0.3元佣金!",
+						lookAll: false
+					},
+					{
+						img: require('../../static/icon/message4.png'),
+						title: "发货通知",
+						time: "2018-12-09 12:00:00",
+						concent: "您购买的[商品名称]在[时间]已成功发货!!",
+						lookAll: false
+					},
+					{
+						img: require('../../static/icon/message5.png'),
+						title: "开团通知",
+						time: "2018-12-09 12:00:00",
+						concent: "您于[时间]成功发起[商品名称]的拼购活动,快去邀请好友一起拼团吧!快去邀请好友一起拼团吧",
+						lookAll: true
+					}
+				]
+			}
+		}
+	}
 </script>
 
-<style>
+<style lang="scss" scoped>
+	.message {
+		margin-top: 20rpx;
+		font-family: PingFangSC-Medium;
+		background-color: #fff;
+		.item {
+			display: flex;
+			padding: 30rpx 0;
+			margin: 0 30rpx;
+			border-bottom: solid 1rpx #f8f8f8;
+			.img {
+				margin: auto 0;
+				width: 110rpx;
+				margin-left: 0rpx;
+				image {
+					width: 80rpx;
+					height: 80rpx;
+				}
+			}
+			.right {
+				width: calc(100% - 110rpx);
+				display: grid;
+				align-content: space-between;
+				.top {
+					display: flex;
+					justify-content: space-between;
+					.title {
+						color: #000;
+						font-size: 30rpx;
+					}
+					.time {
+						color: #999999;
+						font-size: 25rpx;
+					}
+				}
+				.bottom {
+					display: flex;
+					justify-content: space-between;
+					.concent {
+						width: calc(100% - 30rpx);
+						color: #999999;
+						font-size: 26rpx;
+					}
+					.icon {
+						margin: auto 0;
+						width: 10rpx;
+						height: 10rpx;
+						background-color: #FB555C;
+						border-radius: 50%;
+					}
+				}
+				
+			}
+		}
+	}
 </style>

+ 6 - 5
pages/money/award.vue

@@ -2,13 +2,13 @@
 	<view class="content">
 		<view class="status_bar"><!-- 这里是状态栏 --></view>
 		<view class="content-money">
-			<view class="body-title">
+			<!-- <view class="body-title">
 				<view class="goback-box" @click="toBack"><image class="goback" src="../../static/icon/fanhui.png" mode=""></image></view>
 				<view class="header">我的糖果</view>
-			</view>
+			</view> -->
 			<view class="content-bg"><image src="../../static/img/user-award.png" mode=""></image></view>
 			<view class="money-box">
-				<view class="money">100</view>
+				<view class="money">{{ money }}</view>
 			</view>
 		</view>
 		<view class="navbar">
@@ -99,7 +99,8 @@ export default {
 		this.loadData();
 		//获取用户余额
 		userBalance({}).then(({ data }) => {
-			this.money = data.commissionCount;
+			console.log(data)
+			this.money = data.now_money;
 		});
 	},
 	methods: {
@@ -236,7 +237,7 @@ page {
 .money-box {
 	position: relative;
 	z-index: 100;
-	padding-top: 100rpx;
+	padding-top: 150rpx;
 	color: #ffffff;
 	text-align: center;
 	.money {

+ 12 - 5
pages/money/integralP.vue

@@ -2,12 +2,12 @@
 	<view class="content">
 		<view class="status_bar"><!-- 这里是状态栏 --></view>
 		<view class="content-money">
-			<view class="body-title">
+			<!-- <view class="body-title">
 				<view class="goback-box" @click="toBack"><image class="goback" src="../../static/icon/fanhui.png" mode=""></image></view>
 				<view class="header">我的拼团积分</view>
-			</view>
+			</view> -->
 			<view class="content-bg"><image src="../../static/img/user-integralP.png" mode=""></image></view>
-			<view class="money-box"><view class="money">100</view></view>
+			<view class="money-box"><view class="money">{{ integral }}</view></view>
 			<view class="rule" @click="open()">转赠规则</view>
 		</view>
 		<view class="btn flex">
@@ -117,8 +117,15 @@ export default {
 		this.loadData();
 		//获取用户余额
 		userBalance({}).then(({ data }) => {
-			this.money = data.commissionCount;
+			console.log(data)
+			this.money = data.now_money;
 		});
+		console.log(this.jf)
+	},
+	computed: {
+		integral() {
+			return this.$store.state.user.userInfo.integral
+		}
 	},
 	methods: {
 		navto(e) {
@@ -296,7 +303,7 @@ page {
 .money-box {
 	position: relative;
 	z-index: 10;
-	padding-top: 100rpx;
+	padding-top: 150rpx;
 	color: #ffffff;
 	text-align: center;
 	.money {

+ 13 - 4
pages/money/integralShopping.vue

@@ -2,12 +2,12 @@
 	<view class="content">
 		<view class="status_bar"><!-- 这里是状态栏 --></view>
 		<view class="content-money">
-			<view class="body-title">
+			<!-- <view class="body-title">
 				<view class="goback-box" @click="toBack"><image class="goback" src="../../static/icon/fanhui.png" mode=""></image></view>
 				<view class="header">我的拼团积分</view>
-			</view>
+			</view> -->
 			<view class="content-bg"><image src="../../static/img/user-integralP.png" mode=""></image></view>
-			<view class="money-box"><view class="money">100</view></view>
+			<view class="money-box"><view class="money">{{ integral }}</view></view>
 			<view class="rule" @click="open()">转赠规则</view>
 		</view>
 		<view class="btn flex">
@@ -62,6 +62,7 @@
 
 <script>
 import { spreadCommission, userBalance } from '@/api/wallet.js';
+import { getSp } from '@/api/market.js';
 import { mapState, mapMutations } from 'vuex';
 import uniLoadMore from '@/uview-ui/components/u-loadmore/u-loadmore.vue';
 import empty from '@/uview-ui/components/u-empty/u-empty.vue';
@@ -85,6 +86,14 @@ export default {
 			},
 			fail: res => {}
 		});
+		getSp({}).then(({ data }) => {
+			console.log(data)
+		});
+	},
+	computed: {
+		integral() {
+			return this.$store.state.user.userInfo.integral
+		}
 	},
 	data() {
 		return {
@@ -296,7 +305,7 @@ page {
 .money-box {
 	position: relative;
 	z-index: 10;
-	padding-top: 100rpx;
+	padding-top: 150rpx;
 	color: #ffffff;
 	text-align: center;
 	.money {

+ 6 - 2
pages/money/recharge.vue

@@ -2,7 +2,7 @@
 	<view class="content">
 		<view class="row-box">
 			<view class="money-box">
-				<view class="money">{{ myMoney }}</view>
+				<view class="money">{{ now_money }}</view>
 				<view class="money-text">我的糖果数量</view>
 			</view>
 			<view class="chong">充值记录</view>
@@ -73,8 +73,12 @@ export default {
 	onLoad(options) {},
 	computed: {
 		// #ifdef H5
-		...mapState(['weichatObj'])
+		...mapState(['weichatObj']),
 		// #endif
+		//我的糖果数
+		now_money() {
+			return this.$store.state.user.userInfo.now_money
+		}
 	},
 	methods: {
 		// 跳转

+ 12 - 4
pages/money/wallet.vue

@@ -2,13 +2,13 @@
 	<view class="content">
 		<view class="status_bar"><!-- 这里是状态栏 --></view>
 		<view class="content-money">
-			<view class="body-title">
+			<!-- <view class="body-title">
 				<view class="goback-box" @click="toBack"><image class="goback" src="../../static/icon/fanhui.png" mode=""></image></view>
 				<view class="header">我的佣金</view>
-			</view>
+			</view> -->
 			<view class="content-bg"><image src="../../static/img/user-award.png" mode=""></image></view>
 			<view class="money-box">
-				<view class="money"><text>¥</text>100</view>
+				<view class="money"><text>¥</text>{{ brokerage_price }}</view>
 			</view>
 		</view>
 		<view class="navbar">
@@ -71,6 +71,12 @@ export default {
 			fail: res => {}
 		});
 	},
+	computed: {
+		//佣金
+		brokerage_price() {
+			return this.$store.state.user.userInfo.brokerage_price
+		}
+	},
 	data() {
 		return {
 			// 头部图高度
@@ -104,6 +110,8 @@ export default {
 		userBalance({}).then(({ data }) => {
 			this.money = data.now_money;
 		});
+		
+		
 	},
 	methods: {
 		// 页面跳转
@@ -243,7 +251,7 @@ page {
 .money-box {
 	position: relative;
 	z-index: 100;
-	padding-top: 100rpx;
+	padding-top: 150rpx;
 	color: #ffffff;
 	text-align: center;
 	.money {

+ 2 - 1
pages/money/withdrawal.vue

@@ -115,7 +115,8 @@ export default {
 		// 加载余额信息
 		async loadData() {
 			extractBank({}).then(({ data }) => {
-				// this.money = data.moneyCount; //可提现余额
+				console.log(data)
+				this.money = data.brokerage_price; //可提现余额
 				this.minPrice = data.minPrice; //最小提现
 				this.freeze = data.inmoneyCount; //提现中的余额
 			});

+ 1 - 0
pages/product/product.vue

@@ -353,6 +353,7 @@ export default {
 				obj.reply = data.reply; //保存评论列表
 				obj.imgList = goods.slider_image; //保存轮播图
 				obj.specList = data.productAttr; //保存分类列表
+				console.log(data.productAttr)
 				obj.productValue = data.productValue; //保存分类查询数据
 				obj.actionPrice = goods.price; //保存默认选中商品价格
 				obj.actionImage = goods.image_base; //保存默认选中商品价格

+ 4 - 4
pages/user/user.vue

@@ -20,22 +20,22 @@
 		<view class="box">
 			<view class="sweets-box">
 				<view class="sweets" @click="nav('/pages/money/award')">
-					<view class="limit">111</view>
+					<view class="limit">{{ userInfo.now_money }}</view>
 					<view class="sweets-name">糖果</view>
 				</view>
 				<view class="jiange"></view>
 				<view class="sweets" @click="nav('/pages/money/integralP')">
-					<view class="limit">111</view>
+					<view class="limit">{{ userInfo.integral }}</view>
 					<view class="sweets-name">拼团积分</view>
 				</view>
 				<view class="jiange"></view>
 				<view class="sweets" @click="nav('/pages/money/integralShopping')">
-					<view class="limit">111</view>
+					<view class="limit">{{ userInfo.integral }}</view>
 					<view class="sweets-name">购物积分</view>
 				</view>
 				<view class="jiange"></view>
 				<view class="sweets" @click="nav('/pages/money/wallet')">
-					<view class="limit">111</view>
+					<view class="limit">{{ userInfo.broken_commission }}</view>
 					<view class="sweets-name">佣金</view>
 				</view>
 			</view>

BIN
static/icon/message1.png


BIN
static/icon/message2.png


BIN
static/icon/message3.png


BIN
static/icon/message4.png


BIN
static/icon/message5.png