浏览代码

1.修改测试返回文档中的问题
2.绑定提现接口数据
3.绑定团队接口数据

zizhong.wang 5 年之前
父节点
当前提交
8690ea120d

+ 4 - 4
pages/index/detailPage/index.vue

@@ -3,8 +3,7 @@
 	<view class="content">
 		<image class="logo" :src="detailObj.picture"></image>
 		<view class="detail-title">
-			<text style="margin-left: 5%;
-			margin-right: 3%;">{{detailObj.desc}}</text>
+			<text style="margin-left: 5%;">{{detailObj.desc}}</text>
 		    <text class="price-style">¥{{detailObj.money}}</text> 
 		</view>
 		
@@ -115,13 +114,14 @@
 		display: flex;
 		flex-direction: column;
 		justify-content: space-around;
-		align-items: center;
+		/* align-items: center; */
 		background: #fff;
 		font-size: 30rpx;
 	}
 	
 	.price-style {
-		margin-right: 75%;
+		/* margin-right: 75%; */
+		margin-left: 4.5%;
         color: red; 
 	}
 	.share-box {

+ 8 - 3
pages/selfCenter/cashoutPage/index.vue

@@ -4,7 +4,7 @@
 		<view class="header-box"></view>
 		<view class="header-title">
 			<text style="margin-top: 4%;">已提现(元)</text>
-			<text style="margin-top: 2%;font-size: 36rpx;">165.25</text>
+			<text style="margin-top: 2%;font-size: 36rpx;">{{cashObj.totality || '0'}}</text>
 		    <view class="apply-cash-box" @click.stop="goApplyCash">
 				<text>申请提现</text>
 				<image src="/static/arrow-go2.png" mode=""></image>
@@ -18,7 +18,7 @@
 				提现明细
 			</view>
 			
-			<view class="leader-info" v-for="item in cashOutList" :key='item.id'>
+			<view class="leader-info" v-for="item in cashObj.list" :key='item.id'>
 				<view class="leader-column">
 					<view>
 						<text style="font-size: 30rpx;">{{item.time}}</text>
@@ -29,7 +29,7 @@
 						{{item.money}}
 					</view>
 					<view class="count-sum" style="color: #ccc;">
-						{{item.status}}
+						{{item.status === '1' ? '已到账' : '进行中'}}
 					</view>
 				</view>
 			</view>
@@ -46,6 +46,7 @@ export default {
 	data() {
 		return {
 			title: 'selfCenter',
+			cashObj:{},
 			cashOutList: [
 				{
 					money: '28.35',
@@ -75,6 +76,9 @@ export default {
 		};
 	},
 	onLoad() {
+		
+	},
+	onShow() {
 		this.getCashOutList()
 	},
 	methods: {
@@ -105,6 +109,7 @@ export default {
 				success: res => {
 					if (res.data.code === 200) {
 						console.log(res.data.msg)
+						that.cashObj = res.data.msg;
 						//that.cashOutList = res.data.msg
 					}
 				}

+ 32 - 27
pages/selfCenter/index.vue

@@ -16,11 +16,11 @@
 
 			<view class="self-content">
 				<view>
-					<text>{{userInfoObj.scorenumber || '0'}}</text>
+					<text style="font-size: 36rpx;">{{userInfoObj.scorenumber || '0'}}</text>
 					<text style="font-size: 28rpx;">我的积分</text>
 				</view>
 				<view>
-					<text>{{userInfoObj.num || '0'}}元</text>
+					<text style="font-size: 36rpx;">{{userInfoObj.num || '0'}}<text style="font-size: 28rpx;">元</text></text> 
 					<text style="font-size: 28rpx;">已提现</text>
 				</view>
 			</view>
@@ -28,7 +28,7 @@
 
 		<view class="function-box">
 			<view class="function-content" @click="goRecommend">
-				<image src="../../static/commend.png" mode=""></image>
+				<image src="../../static/commend.png" style="width: 90rpx;"  mode="aspectFit" ></image>
 				<text>推荐分销品</text>
 			</view>
 			<view class="function-content" style="background: #33b5fc;" @click="goAward">
@@ -72,7 +72,7 @@
 				<text class="uni-tip-content">您的申请需要后台审核,确定后请耐心等待结果。</text>
 				<view class="uni-tip-group-button">
 					<text class="uni-tip-button" @click="cancel()">取消</text>
-					<text class="uni-tip-button" @click="cancel()">确定</text>
+					<text class="uni-tip-button" @click="submitApply()">确定</text>
 				</view>
 			</view>
 		</uni-popup>
@@ -213,33 +213,38 @@ export default {
 	 applyPower(){
 		 let that = this;
 		 if(that.userStatus === '点击申请'){
-		 	uni.request({
-		 				url: getApp().globalData.shareUrl, //需要设置为全局
-		 				method: 'POST',
-		 				header: {
-		 					'content-type': 'application/x-www-form-urlencoded'
-		 				},
-		 				data: {
-		 					method: 'zigeapply',
-		 					timestamp: getApp().globalData.globalTimestamp, //Date.now()
-		 					uid:getApp().globalData.user_id,
-		 					sign: md5('zigeapply' + getApp().globalData.globalTimestamp)
-		 				},
-		 				success: res => {
-		 					if (res.data.code === 200) {
-		 						console.log(res.data.msg)
-		 						this.$refs.showtip.open()
-		 						//that.cashOutList = res.data.msg
-		 					}
-		 				}
-		 	});		 
+		 	 that.$refs.showtip.open()  
 		 }else{
-			 return false
+		 	 return false
 		 }
+	 },
+	 submitApply(){
+		 let that = this;
+		uni.request({
+				url: getApp().globalData.shareUrl, //需要设置为全局
+				method: 'POST',
+				header: {
+					'content-type': 'application/x-www-form-urlencoded'
+				},
+				data: {
+					method: 'zigeapply',
+					timestamp: getApp().globalData.globalTimestamp, //Date.now()
+					uid:getApp().globalData.user_id,
+					sign: md5('zigeapply' + getApp().globalData.globalTimestamp)
+				},
+				success: res => {
+					if (res.data.code === 200) {
+						console.log(res.data.msg)
+						that.$refs.showtip.close();
+						that.userStatus = '审核中'+'&nbsp;&nbsp;&nbsp;';
+						//that.cashOutList = res.data.msg
+					}
+				}
+	   });	
 		
 	 },
 	 cancel(type) {
-		this.userStatus = '审核中'+'&nbsp;&nbsp;&nbsp;'
+		// this.userStatus = '审核中'+'&nbsp;&nbsp;&nbsp;'
 	 	this.$refs.showtip.close()
 	 },
 	 change(e) {
@@ -323,7 +328,7 @@ export default {
 .self-auth view {
 	display: flex;
 	flex-direction: column;
-	align-items: center;
+	/* align-items: center; */
 }
 
 .self-content {

+ 17 - 17
pages/selfCenter/recommendTeam/index.vue

@@ -1,15 +1,15 @@
 <template>
 	<view>
 		<view class="leader-info">
-			<image src="/static/bed2-bg.png"></image>
+			<image :src="selfObj.headimg || '/static/bed2-bg.png' "></image>
 			<view class="leader-column">
 				<view>
 					<!-- <text>晚霞</text><text class="invite">我</text> -->
-					<text>{{ selfObj.name }}</text>
-					<text class="mySelf">我</text>
+					<text>{{ selfObj.name || '-' }}</text>
+					<text class="mySelf">{{ selfObj.role || '' }}</text>
 				</view>
 				<view>
-					<text style="color:#ccc">{{ selfObj.phone }}</text>
+					<text style="color:#ccc">{{ selfObj.phone || '-' }}</text>
 					<!-- <text style="color:#ccc;font-size: 28rpx;">188****2600</text> -->
 				</view>
 			</view>
@@ -17,27 +17,27 @@
 		<view v-for="(item, index) in teamList" :key="index" @click.stop="showChild(index)">
 			<view class="leader-info">
 				<image :src="!arrowFlagList[index] ? '/static/arrow-right3.png' : '/static/arrow-down.png'" class="arrow-style"></image>
-				<image src="/static/bed2-bg.png"></image>
+				<image :src="item.headimg || '/static/bed2-bg.png' "></image>
 				<view class="leader-column">
 					<view class="teamLevel-box">
-						<view style="white-space: nowrap;">{{ item.name }}</view>
+						<view style="white-space: nowrap;">{{ item.name || '-'}}</view>
 						<view class="invite">一级分销</view>
 					</view>
 					<view>
-						<text style="color:#ccc;font-size: 28rpx;">{{ item.phone }}</text>
+						<text style="color:#ccc;font-size: 28rpx;">{{ item.phone || '-' }}</text>
 					</view>
 				</view>
 			</view>
 			<view class="leader-info" v-show="arrowFlagList[index]" v-for="childItem in item.child" :key="childItem.id">
 				<image src="/static/arrow-right3.png" class="arrow-style" style="visibility: hidden;"></image>
-				<image src="/static/bed2-bg.png"></image>
+				<image :src="childItem.headimg || '/static/bed2-bg.png' "></image>
 				<view class="leader-column">
 					<view class="teamLevel-box">
-						<view style="white-space: nowrap;">{{ childItem.name }}</view>
+						<view style="white-space: nowrap;">{{ childItem.name || '-'}}</view>
 						<view class="invited">二级分销</view>
 					</view>
 					<view>
-						<text style="color:#ccc;font-size: 28rpx;">{{ childItem.phone }}</text>
+						<text style="color:#ccc;font-size: 28rpx;">{{ childItem.phone || '-'}}</text>
 					</view>
 				</view>
 			</view>
@@ -98,22 +98,22 @@ export default {
 		};
 	},
 	onLoad() {
-		this.filterSelf();
-		this.getTeamRequest()
+		this.getTeamRequest();
 	},
 	methods: {
-		filterSelf() {
+		filterSelf(arr) {
 			let that = this;
-			let obj = that.teamList.filter((item, index) => {
+			let obj = arr.filter((item, index) => {
 				return item.role === '我';
 			});
 			that.selfObj = obj[0];
-			that.teamList = that.teamList.filter((item, index) => {
+			arr = arr.filter((item, index) => {
 				return item.role !== '我';
 			});
-			for (let i = 0; i < that.teamList.length; i++) {
+			for (let i = 0; i < arr.length; i++) {
 				that.arrowFlagList.push(false);
 			}
+			return arr;
 		},
 		getTeamRequest(){
 			  let that = this;
@@ -132,7 +132,7 @@ export default {
 							success: res => {
 								if (res.data.code === 200) {
 									console.log(res.data.msg)
-									//that.cashOutList = res.data.msg
+									that.teamList = that.filterSelf(res.data.msg)
 								}
 							}
 						 });