hwq 4 năm trước cách đây
mục cha
commit
7c2ca80c8c
3 tập tin đã thay đổi với 129 bổ sung110 xóa
  1. 0 1
      pages/index/index.vue
  2. 12 10
      pages/index/info.vue
  3. 117 99
      pages/user/upgrade.vue

+ 0 - 1
pages/index/index.vue

@@ -34,7 +34,6 @@ export default {
 	},
 	data() {
 		return {
-			price: 20000,
 			list: [],
 			revenueList: [
 				'5人x2000元=1万元',

+ 12 - 10
pages/index/info.vue

@@ -1,23 +1,23 @@
 <template>
 	<view class="center">
-		<view class="box">
-			<view class="title">上级用户收款信息(上级)</view>
+		<view class="box" v-for='(item,index) in list' key="index">
+			<view class="title">上级用户收款信息(上{{index+1}}级)</view>
 			<view class="main flex" style="border-bottom: 1px solid #F0F0F0;">
 				<view class="left flex">
-					<view class="avtor"><image src="" mode=""></image></view>
+					<view class="avtor"><image :src="item.checker.avatar" mode=""></image></view>
 					<view class="main-info">
-						<view class="name">111</view>
-						<view class="phone">111</view>
+						<view class="name">{{item.checker.nickname || 'null'}}</view>
+						<view class="phone">{{item.checker.mobile}}</view>
 					</view>
 				</view>
-				<view class="right">打款金额:¥2000</view>
+				<view class="right">打款金额:¥{{item.money*1}}</view>
 			</view>
 			<view class="main flex">
 				<view class="left flex">
 					<view class="bank"><image src="../../static/img/bank.png" mode=""></image></view>
 					<view class="main-info">
-						<view class="name">111</view>
-						<view class="name">111</view>
+						<view class="name">{{item.checker.bank_of_deposit||'暂无'}}</view>
+						<view class="name">{{item.checker.bank_card_no||'暂无'}}</view>
 					</view>
 				</view>
 				<view class="right"><view class="right-box" @click="nav('/pages/upload/upload')">上传凭证</view></view>
@@ -34,6 +34,7 @@ import { activity } from '@/api/active.js'
 export default {
 	data(){
 		return {
+			list:[],
 			id:'',
 		}
 	},
@@ -43,8 +44,9 @@ export default {
 	},
 	methods: {
 		loadData(){
-			activity({},this.id).then(e =>{
-				console.log(e)
+			activity({},this.id).then(({data}) =>{
+				console.log(data)
+				this.list = data.check
 			})
 		},
 		nav(url){

+ 117 - 99
pages/user/upgrade.vue

@@ -2,121 +2,139 @@
 	<view class="content">
 		<view class="user-info flex">
 			<image src="" mode="" class="user-img"></image>
-			<view class="user-name">
-				假猪套天下第一
-			</view>
-			<view class="tit">
-				尚未升级黑钻会员
-			</view>
+			<view class="user-name">{{ userInfo.nickname }}</view>
+			<!-- <view class="tit">尚未升级黑钻会员</view> -->
 		</view>
 		<view class="up-box">
-			<view class="up">
+			<view class="up" v-for="(item, index) in list">
 				<image src="../../static/img/upone.png" mode="" class="bg"></image>
 				<view class="up-price">
-					<text class="inconn">¥</text><text>10000</text>
-				</view>
-				<image src="../../static/img/uonow.png" mode="" class="uplevel" @click="navto('/pages/index/info')"></image>
-			</view>
-			<view class="up">
-				<image src="../../static/img/uptow.png" mode="" class="bg"></image>
-				<view class="up-price">
-					<text class="inconn">¥</text><text>60000</text>
+					<text class="inconn">¥</text>
+					<text>{{item.money}}</text>
 				</view>
-				<image src="../../static/img/uonow.png" mode="" class="uplevel" @click="navto('/pages/index/info')"></image>
+				<image src="../../static/img/uonow.png" mode="" class="uplevel" @click="navto(item.id)"></image>
 			</view>
 		</view>
-	</view>
-</template>
-
+	</view>
+</template>
+
 <script>
-	export default {
-		data() {
-			return {
-				
-			}
-		},
-		methods: {
-			navto(url) {
+import { activityList } from '@/api/active.js';
+import { mapState, mapMutations } from 'vuex';
+export default {
+	data() {
+		return {
+			list: ''
+		};
+	},
+	computed: {
+		...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
+	},
+	onShow() {
+		this.loadData();
+	},
+	methods: {
+		navto(id) {
+			if(!this.userInfo.bank_card_no && !this.userInfo.bank_of_deposit){
+				console.log(this.userInfo,"11111")
+				uni.showModal({
+				    title: '提示',
+				    content: '您当前未填写银行卡信息和所属银行是否前往填写',
+				    success: function (res) {
+				        if (res.confirm) {
+				           uni.navigateTo({
+								url:'/pages/set/userinfo'
+				           })
+				        } else if (res.cancel) {
+				            console.log('用户点击取消');
+				        }
+				    }
+				});
+			}else {
 				uni.navigateTo({
-					url
-				})
+					url:'/pages/index/info?id='+ id
+				});
 			}
+		},
+		loadData(){
+			activityList({}).then(({data}) =>{
+				this.list = data.list
+			})
 		}
-	}
-</script>
-
+	}
+};
+</script>
+
 <style lang="scss" scoped>
-	.user-info {
-		flex-direction: column;
-		align-items: center;
-		text-align: center;
-		padding-top: 20rpx;
-		.user-img {
-			width: 120rpx;
-			height: 120rpx;
-			border-radius: 50%;
-			background-color: #eee;
-		}
-		.user-name {
-			margin-top: 20rpx;
-			width: 240rpx;
-			font-size: 32rpx;
-			font-family: PingFang SC;
-			font-weight: bold;
-			color: #FFFFFF;
-			
-		}
-		.tit {
-			padding-top: 8rpx;
-			font-size: 24rpx;
-			font-family: PingFang SC;
-			font-weight: 400;
-			color: #999999;
-		}
+.user-info {
+	flex-direction: column;
+	align-items: center;
+	text-align: center;
+	padding-top: 20rpx;
+	.user-img {
+		width: 120rpx;
+		height: 120rpx;
+		border-radius: 50%;
+		background-color: #eee;
+	}
+	.user-name {
+		margin-top: 20rpx;
+		width: 240rpx;
+		font-size: 32rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #ffffff;
 	}
-	.up-box {
-		padding: 30rpx 0 100rpx 0;
-		.up {
+	.tit {
+		padding-top: 8rpx;
+		font-size: 24rpx;
+		font-family: PingFang SC;
+		font-weight: 400;
+		color: #999999;
+	}
+}
+.up-box {
+	padding: 30rpx 0 100rpx 0;
+	.up {
+		width: 690rpx;
+		height: 892rpx;
+		position: relative;
+		margin: 0 auto 34rpx;
+		.bg {
 			width: 690rpx;
 			height: 892rpx;
-			position: relative;
-			margin: 0 auto 34rpx;
-			.bg {
-				width: 690rpx;
-				height: 892rpx;
-				position: absolute;
-			}
-			.up-price {
-				font-size: 116rpx;
-				display: inline-block;
+			position: absolute;
+		}
+		.up-price {
+			font-size: 116rpx;
+			display: inline-block;
+			font-family: Source Han Sans CN;
+			font-weight: 800;
+			color: #c63535;
+			position: absolute;
+			top: 250rpx;
+			right: 0;
+			left: 0;
+			margin: auto;
+			display: flex;
+			justify-content: center;
+			.inconn {
+				font-size: 36rpx;
 				font-family: Source Han Sans CN;
-				font-weight: 800;
-				color: #C63535;
-				position: absolute;
-				top: 250rpx;
-				right: 0;
-				left: 0;
-				margin: auto;
-				display: flex;
-				justify-content: center;
-				.inconn {
-					font-size: 36rpx;
-					font-family: Source Han Sans CN;
-					font-weight: bold;
-					color: #C63535;
-					padding-top: 25rpx;
-				}
-			}
-			.uplevel {
-				width: 307rpx;
-				height: 80rpx;
-				position: absolute;
-				bottom: 118rpx;
-				right: 0;
-				left: 0;
-				margin: auto;
+				font-weight: bold;
+				color: #c63535;
+				padding-top: 25rpx;
 			}
 		}
-		
-	}
+		.uplevel {
+			width: 307rpx;
+			height: 80rpx;
+			position: absolute;
+			bottom: 118rpx;
+			right: 0;
+			left: 0;
+			margin: auto;
+		}
+	}
+}
 </style>