lyqu пре 4 година
родитељ
комит
28e1152dec

+ 18 - 2
common/http/http.api.js

@@ -16,11 +16,19 @@ let activityUrl = {
 }
 
 let userUrl = {
-	boostUrl: 'cyzh-activity/activity/getHitPersonDetail',
+	boostUrl: '/cyzh-activity/activity/getHitPersonDetail',
 	loginUrl: '/cyzh-loginUser/loginuser/login',
 	detailUrl: '/cyzh-loginUser/loginuser/detail',
 	submitUrl: '/cyzh-loginUser/loginuser/submit',
 }
+
+let pointsUrl = {
+	listUrl: '/cyzh-pointsDetail/pointsdetail/list',
+}
+
+let boostUrl = {
+	listUrl: '/cyzh-helpRecord/helprecord/list2'
+}
 // 此处第二个参数vm,就是我们在页面使用的this,你可以通过vm获取vuex等操作,更多内容详见uView对拦截器的介绍部分:
 // https://uviewui.com/js/http.html#%E4%BD%95%E8%B0%93%E8%AF%B7%E6%B1%82%E6%8B%A6%E6%88%AA%EF%BC%9F
 const install = (Vue, vm) => {
@@ -41,8 +49,16 @@ const install = (Vue, vm) => {
 		detail:(params = {}) => vm.$u.get(userUrl.detailUrl, params),
 		submit:(params = {}) => vm.$u.post(userUrl.submitUrl, params),
 	}
+	
+	let points = {
+		list:(params = {}) => vm.$u.get(pointsUrl.listUrl, params),
+	}
+	
+	let boost = {
+		list:(params = {}) => vm.$u.get(boostUrl.listUrl, params),
+	}
 	// 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
-	vm.$u.api = {wxInfo,uploadFile, activity, user};
+	vm.$u.api = {wxInfo,uploadFile, activity, user, points, boost};
 }
 
 export default {

+ 0 - 2
components/homeViews/activity-view.vue

@@ -118,14 +118,12 @@
 		methods: {
 			getActivityDetail() {
 				this.$u.api.activity.detail({id: this.activityId}).then(res => {
-					console.log(res);
 					this.activity = res;
 				})
 			},
 			getRankList() {
 				this.$u.api.activity.rankList({activityId: this.activityId}).then(res => {
 					this.rankList = res.records;
-					console.log(this.rankList);
 				})
 			},
 			navByIcon(path, index) {

+ 6 - 0
pages/activityList/activity/signUp.vue

@@ -70,6 +70,12 @@
 		methods: {
 			upload(index) {
 				console.log(index);
+				if (index == 0) {
+					
+				}
+				if (index == 1) {
+					
+				}
 				// this.$mpi.uploadFile().then(res => {
 				// 	let obj = JSON.parse(res);
 				// 	console.log(res.data);

+ 28 - 14
pages/activityList/mine/boostDetail.vue

@@ -4,17 +4,20 @@
 			<view class="flex align-center justify-between boder">
 				<view class="flex align-center" style="width: 50%;">
 					<view class="padding-sm">
-						<u-avatar :src="item.image" size="82"></u-avatar>
+						<u-avatar :src="item.avatar" size="82"></u-avatar>
 					</view>
 					<view>
-						<view class="name">{{item.name}}</view>
-						<view class="time padding-top-xs">{{item.time}}</view>
+						<view class="name">{{item.nickName}}</view>
+						<view class="time padding-top-xs">{{item.createTime}}</view>
 					</view>
 				</view>
 				<view class="text-sm" style="color: #757575;">{{item.type}}</view>
-				<view class="name padding-right flex justify-end" style="width: 180upx;">{{item.hotValue}}热力值</view>
+				<view class="name padding-right flex justify-end" style="width: 180upx;">{{item.totalHotValue}}热力值</view>
 			</view>
 		</block>
+		<view style="height: 80rpx;" v-if="status">
+			<u-divider bgColor="#f1f1f1;"  height="80">到底了</u-divider>
+		</view>
 	</view>
 </template>
 
@@ -22,19 +25,30 @@
 	export default {
 		data() {
 			return {
-				boostList: [
-					{image: '/static/avatar.png', name: '私自弟弟', time: '2021-6-7 10:28:46', type: '打榜', hotValue: '12'},
-					{image: '/static/avatar2.png', name: '安置若梦', time: '2021-6-7 10:28:46', type: '礼物', hotValue: '13'},
-					{image: '/static/avatar.png', name: '莫忘莫寻', time: '2021-6-7 10:28:46', type: '打榜', hotValue: '188'},
-					{image: '/static/avatar2.png', name: 'kris-Lee', time: '2021-6-7 10:28:46', type: '打榜', hotValue: '88'},
-					{image: '/static/avatar.png', name: 'RainBow维', time: '2021-6-7 10:28:46', type: '礼物', hotValue: '13'},
-					{image: '/static/avatar.png', name: 'Niconic', time: '2021-6-7 10:28:46', type: '转发', hotValue: '1'},
-					{image: '/static/avatar2.png', name: '晨光中。', time: '2021-6-7 10:28:46', type: '打榜', hotValue: '5'}
-				],
+				current: 1,
+				size: 30,
+				status: false,
+				boostList: [],
+			}
+		},
+		onLoad() {
+			this.userId = uni.getStorageSync("userId");
+			this.getBoostDetail();
+		},
+		onReachBottom() {
+			if (this.boostList.length < this.current * this.size) {
+				this.status = true;
+			} else {
+				this.current += 1;
+				this.getBoostDetail();
 			}
 		},
 		methods: {
-			
+			getBoostDetail() {
+				this.$u.api.boost.list({id: this.userId, current: this.current, size: this.size}).then(res => {
+					this.boostList = [...this.boostList,...res.records];
+				})
+			}
 		}
 	}
 </script>

+ 15 - 1
pages/activityList/mine/myGift.vue

@@ -58,7 +58,12 @@
 						</view>
 					</view>
 					<view class="flex justify-end padding" style="margin-top: -110upx;">
-						<view class="count" style="border: #d9d9d9 1upx solid;">x{{item.count}}</view>
+						<view class="count" style="border: #d9d9d9 1upx solid;" v-if="!item.selected">x{{item.count}}</view>
+						<view class="justify-center flex align-center" v-else>
+							<view class="" @click.stop="minus(index)"> <u-icon name="minus-circle-fill" color="#5a3ee8" size="36"></u-icon> </view>
+							<input type="number" class="text-center input" v-model="item.count" />
+							<view class="" @click.stop="plus(index)"> <u-icon name="plus-circle-fill" color="#5a3ee8" size="36"></u-icon> </view>
+						</view>
 					</view>
 				</view>
 			</block>
@@ -130,6 +135,7 @@
 				}],
 				current: 0,
 				selectAllShow: false,
+				clickShow: false,
 				giftList: [
 					{image: '/static/gift/commodity2.png', title: 'lilbetter化妆品旗舰', name: 'Lilbetter发泥男士定型自然', specification: '发泥+洁面乳 120ml', count: 1, selected: true, status: '已完成'},
 					{image: '/static/gift/commodity1.png', title: '轩城工艺沙发', name: '创意单人懒人沙发香蕉躺椅', specification: '黄色(皮质)', count: 3, selected: false, status: '待领取'},
@@ -222,6 +228,14 @@
 			justify-content: center;
 		}
 	}
+	.input {
+		width: 80upx;
+		background-color: #ffffff;
+		text-align: center;
+		border: none;
+		height: 60rpx;
+		min-height: 1.8rem;
+	}
 	.custom-style {
 		background-color: #5b3ee7;
 		width: 250upx;

+ 29 - 2
pages/activityList/mine/myWelfare.vue

@@ -11,7 +11,12 @@
 						<image :src="item.image" style="width: 200upx;height: 200upx;"></image>
 						<view :class="selectShow ? item.selected ? 'theme-color cuIcon-roundcheckfill': 'text-gray cuIcon-round' : 'text-white cuIcon-round'" style="position: relative;bottom: 230upx;left: 70upx;font-size: 50upx;"></view>
 					</view>
-					<view class="text-bold" style="margin-top: -50upx;">X{{item.count}}</view>
+					<view class="text-bold" style="margin-top: -50upx;" v-if="!selectShow">X{{item.count}}</view>
+					<view class="justify-center flex align-center" style="margin-top: -50upx;" v-else>
+						<view class="" @click.stop="minus(index)"> <u-icon name="minus-circle-fill" color="#5a3ee8" size="36"></u-icon> </view>
+						<input type="number" class="text-center input" v-model="item.count" />
+						<view class="" @click.stop="plus(index)"> <u-icon name="plus-circle-fill" color="#5a3ee8" size="36"></u-icon> </view>
+					</view>
 				</view>
 			</block>
 		</view>
@@ -107,7 +112,21 @@
 				} else {
 					this.dialogShow = true;
 				}
-			}
+			},
+			//礼物+
+			plus(count) {
+				let tmp = count;
+				if (count < tmp) {
+					count++
+				}
+			}, 
+			//礼物 -
+			minus(count) {
+				let tmp = count;
+				if (count < tmp && count > 1) {
+					count--
+				}
+			},
 		}
 	}
 </script>
@@ -130,4 +149,12 @@
 		width: 250upx;
 		color: #ffffff;
 	}
+	.input {
+		width: 80upx;
+		background-color: #ffffff;
+		text-align: center;
+		border: none;
+		height: 60rpx;
+		min-height: 1.8rem;
+	}
 </style>

+ 29 - 13
pages/activityList/mine/pointsDetail.vue

@@ -9,14 +9,17 @@
 		<block v-for="(item, index) in pointsList" :key="index">
 			<view class="flex justify-between align-center container">
 				<view class="padding">
-					<view class="type">{{item.type}}</view>
-					<view class="time">{{item.time}}</view>
+					<view class="type">{{item.note}}</view>
+					<view class="time">{{item.createTime}}</view>
 				</view>
 				<view class="padding">
-					<view class="points">{{item.points}} 积分</view>
+					<view class="points">{{item.pointsValue}} 积分</view>
 				</view>
 			</view>
 		</block>
+		<view style="height: 80rpx;" v-if="status">
+			<u-divider bgColor="#f1f1f1;"  height="80">到底了</u-divider>
+		</view>
 	</view>
 </template>
 
@@ -24,19 +27,32 @@
 	export default {
 		data() {
 			return {
-				pointsList: [
-					{type: '每日签到', time: '2021-05-18 9:39', points: '+1'},
-					{type: '立白助力礼包', time: '2021-05-18 9:39', points: '+168'},
-					{type: '积分消费', time: '2021-05-18 9:39', points: '-80'},
-					{type: '每日签到', time: '2021-05-18 9:39', points: '+1'},
-					{type: '每日签到', time: '2021-05-18 9:39', points: '+1'},
-					{type: '每日签到', time: '2021-05-18 9:39', points: '+1'},
-					{type: '每日签到', time: '2021-05-18 9:39', points: '+1'}
-				]
+				userId: '',
+				pointsList: [],
+				current: 1,
+				size: 30,
+				status: false,
+			}
+		},
+		onLoad(options) {
+			this.
+			this.userId = uni.getStorageSync("userId");
+			this.getPointsDetail();
+		},
+		onReachBottom() {
+			if (this.pointsList.length < this.current * this.size) {
+				this.status = true;
+			} else {
+				this.current += 1;
+				this.getPointsDetail();
 			}
 		},
 		methods: {
-			
+			getPointsDetail() {
+				this.$u.api.points.list({id: this.userId, current: this.current, size: this.size}).then(res => {
+					this.pointsList = [...this.pointsList,...res.records];
+				})
+			}
 		}
 	}
 </script>