2 次代码提交 8d8d693b91 ... b062247378

作者 SHA1 备注 提交日期
  gubai b062247378 项目日志:12.28 合并 2 年之前
  gubai d1ae1f6bea 项目日志:12.28 首页轮播图视频自动播放 2 年之前

+ 1 - 1
pages/goods/goods-detail/index.scss

xqd
@@ -50,7 +50,7 @@ $pageColor:#F9F9F9;
 		.btn {
 			margin-top: 40rpx;
 			width: 100%;
-			height: 110rpx;
+			height: 115rpx;
 			display: flex;
 			align-items: center;
 

+ 9 - 8
pages/index/active-detail/index.vue

xqd xqd xqd xqd xqd
@@ -18,7 +18,8 @@
 					<view class="vote-detail-top-main-text" style="display: inline-block; width: 230rpx;" v-if="activeDeatil.activity_status == 1">距活动开始</view>
 					<view class="vote-detail-top-main-text" style="display: inline-block; width: 230rpx;" v-else>距活动结束</view>
 					<view>
-						<text v-if="countdownh>0">{{countdownd}}</text>
+						<!-- <text v-if="countdownh>0">{{countdownd}}</text> -->
+						<text>{{countdownd}}</text>
 						<text>{{countdownh}}</text>
 						<text>{{countdownm}}</text>
 						<text>{{countdowns}}</text>
@@ -293,10 +294,10 @@
 				// 		lefttime / 1000 % 60); //计算秒数
 				
 				const lefttime = (endtime.getTime() - nowtime.getTime()) / 1000;
-				const leftd =  Math.floor(lefttime / (60 * 60 * 24));
-				const lefth = Math.floor((lefttime - leftd * 86400) / (60 * 60));
-				const leftm = Math.floor((lefttime - leftd * 86400 - lefth * 3600) / 60);
-				const lefts =  Math.floor(lefttime - leftd * 86400 - lefth * 3600 - leftm*60);
+				const leftd =  Math.floor(lefttime / (60 * 60 * 24))<10?"0"+Math.floor(lefttime / (60 * 60 * 24)):Math.floor(lefttime / (60 * 60 * 24));
+				const lefth = Math.floor((lefttime - leftd * 86400) / (60 * 60))<10?"0"+Math.floor((lefttime - leftd * 86400) / (60 * 60)) : Math.floor((lefttime - leftd * 86400) / (60 * 60));
+				const leftm = Math.floor((lefttime - leftd * 86400 - lefth * 3600) / 60)<10?"0"+Math.floor((lefttime - leftd * 86400 - lefth * 3600) / 60):Math.floor((lefttime - leftd * 86400 - lefth * 3600) / 60);
+				const lefts =  Math.floor(lefttime - leftd * 86400 - lefth * 3600 - leftm*60)<10?"0"+Math.floor(lefttime - leftd * 86400 - lefth * 3600 - leftm*60):Math.floor(lefttime - leftd * 86400 - lefth * 3600 - leftm*60);
 				
 				this.countdownd = leftd 
 				this.countdownh = lefth //返回倒计时的字符串
@@ -304,7 +305,7 @@
 				this.countdowns = lefts //返回倒计时的字符串
 				// 倒计时结束时,显示00:00:00
 				if (lefttime < 0) {
-					this.countdownh = this.countdownm = this.countdowns = "00"
+					this.countdownd = this.countdownh = this.countdownm = this.countdowns = "00"
 				}
 
 			},
@@ -931,7 +932,7 @@
 		.vote-detail-top-main-text{
 			position: relative;
 			top: 0;
-			left: 60rpx;
+			left: 40rpx;
 		}
 		
 		&::before,&::after{
@@ -942,7 +943,7 @@
 		}
 		
 		>view{
-			width: 250px;
+			width: 256px;
 			font-size: 30rpx;
 			display: flex;
 			align-items: center;

+ 3 - 3
pages/index/index.scss

xqd xqd
@@ -200,7 +200,7 @@
 	.home-banner {
 		height: 640rpx;
 		padding: 0 30rpx;
-		padding-top: 20rpx;
+		padding-top: 40rpx;
 		background-color: #f9f9f9;
 
 		.home-banner-img {
@@ -248,11 +248,11 @@
 
 	.home-attach {
 		background-color: #f9f9f9;
-		padding: 30rpx 30rpx 5rpx;
+		padding: 25rpx 30rpx 5rpx;
 	}
 
 	.home-hotel {
-		height: 124rpx;
+		height: 120rpx;
 		background-color: #f9f9f9;
 	}
 

+ 59 - 17
pages/index/index.vue

xqd xqd xqd xqd xqd xqd xqd
@@ -13,7 +13,7 @@
 							<image style="width: 100%;height:592rpx;" :src="item.img" mode="aspectFill"></image>
 						</view>
 						<view class="swiper-item" v-if="item.resource_type == 2">
-							<video id="swiperVideo" ref="swiperVideo" style="width: 100%; height: 592rpx;"
+							<video :id="`myVideo${index}`" ref="swiperVideo" style="width: 100%; height: 592rpx;"
 								:src="item.video_url" controls :enable-progress-gesture="false">
 							</video>
 						</view>
@@ -198,9 +198,9 @@
 		data() {
 			return {
 				//加入会员跳转
-				adviseVip:'',
-				jump_type_vip:'', 
-				jump_config_vip:{},
+				adviseVip: '',
+				jump_type_vip: '',
+				jump_config_vip: {},
 				//用户个人信息,判断是否登录
 				admin: '',
 				//获取token
@@ -312,10 +312,55 @@
 			this.getAllSet()
 			// this.isDevelopment = process.env.NODE_ENV === 'development';
 			this.isDevelopment = true;
+
+			this.playVideo(this.current1)
+
+		},
+		// 监听判断视频的播放与暂停
+		watch: {
+			current1: {
+				handler(newName, oldName) {
+					console.log(newName, oldName);
+					const id = `myVideo${oldName}`
+					this.currentVideo = uni.createVideoContext(id, this)
+					this.$nextTick(() => {
+						if (oldName != newName) {
+							this.stopVideo(oldName)
+						} else {
+							this.playVideo(newName)
+						}
+					})
+				},
+				immediate: true,
+				deep: true
+			}
 		},
+
 		methods: {
 			// **************** Data ***************//
-		
+			// 切换轮播图指示点
+			change1(e) {
+				this.current1 = e.detail.current;
+				this.playVideo(this.current1)
+			},
+			// 播放视频
+			playVideo(index) {
+				console.log(111);
+				this.$nextTick(() => {
+					const id = `myVideo${index}`
+					this.currentVideo = uni.createVideoContext(id, this)
+					this.currentVideo.play()
+				})
+			},
+			// 停止播放视频
+			stopVideo(index) {
+				this.$nextTick(() => {
+					const id = `myVideo${index}`
+					this.currentVideo = uni.createVideoContext(id, this)
+					this.currentVideo.stop()
+				})
+			},
+
 			//获取配置数据
 			getAllSet() {
 				this.$api.document.allSet().then(res => {
@@ -357,13 +402,13 @@
 					//加入vip跳转
 					this.adviseVip = this.$store.getters.allset.add_member
 					this.jump_type_vip = this.adviseVip.value.index_jump_type
-					if( this.jump_type_vip == 1){
+					if (this.jump_type_vip == 1) {
 						this.jump_config_vip = this.adviseVip.value.index_h5_url
-					}else if(this.jump_type_vip == 2){
+					} else if (this.jump_type_vip == 2) {
 						this.jump_config_vip.appid = this.adviseVip.value.index_appid
 						this.jump_config_vip.path = this.adviseVip.value.index_path
-					}else if(this.jump_type_vip == 3){
-						this.jump_config_vip =this.adviseVip.value.index_other_path
+					} else if (this.jump_type_vip == 3) {
+						this.jump_config_vip = this.adviseVip.value.index_other_path
 					}
 				})
 			},
@@ -695,10 +740,7 @@
 					url: '/pages/index/active-list/index'
 				})
 			},
-			// 切换轮播图指示点
-			change1(e) {
-				this.current1 = e.detail.current;
-			},
+
 			change2(e) {
 				this.current2 = e.detail.current;
 			},
@@ -729,7 +771,7 @@
 							}
 							console.log(params);
 							this.$api.my.myLogin(params).then(res => {
-								if(res.code == 0){
+								if (res.code == 0) {
 									let {
 										token
 									} = res.data
@@ -738,10 +780,10 @@
 									this.getList()
 									//用户访问
 									this.getUserVisits()
-								}else{
+								} else {
 									uni.showToast({
-										icon:'none',
-										title:res.msg
+										icon: 'none',
+										title: res.msg
 									})
 								}
 							})

+ 2 - 2
pages/index/vote-detail/index.vue

xqd xqd
@@ -125,7 +125,7 @@
 				</view>
 				<view class="textfont">
 					<text v-if="!isVoteNum && is_prize==0">今日投票数已用完
-						{{!isVoteNum&&is_vip ? '' : `点击 加入IHG会员 可享受额外${vipRewardTicketNum}票`}}</text>					
+						{{!isVoteNum&&is_vip ? '' : `点击 加入IHG会员 可享受额外${vipRewardTicketNum}票`}}</text>					
 					<text v-if="isVoteNum && is_prize==0 ">今日投票数还有 {{userCanVoteNum}} 次
 						点击再次投票可再次为本项目投票也可为其他项目投票</text>
 					<text v-if="is_prize==1">恭喜你中奖了!
@@ -363,7 +363,7 @@
 						this.video_url = res.data.video_url
 						//视频自动播放
 						this.openVideoPlay()
-						海报图片
+						//海报图片
 						this.posterData.mainImg = res.data.share_img
 						this.codeImg = res.data.qrcode_url
 

+ 12 - 4
pages/my/integral/integralOrder.vue

xqd xqd xqd xqd xqd xqd
@@ -41,7 +41,7 @@
 
 					</uni-forms-item>
 					<uni-forms-item name="region" v-if="formData.type=='门店自提'||isVerification==true">
-						<view class="selectType" @click="openShop">
+						<view class="selectType" @click="openShop" v-if="hotelList.length != 0 ">
 							<view class="uni-input">
 								<text v-if="formData.shop==''||formData.shop==null"
 									style="color: #999999 ; font-size: 30rpx; ">请选择门店</text>
@@ -52,6 +52,10 @@
 								style="width: 14rpx;height: 24rpx;position: absolute;top:31rpx;right: 30rpx;">
 							</image>
 						</view>
+						
+						<view class="selectTypeNone" v-if="hotelList.length == 0 ">
+							暂无门店,请选择其他配送方式
+						</view>
 					</uni-forms-item>
 				</uni-forms>
 			</view>
@@ -90,7 +94,7 @@
 			</view>
 		</view>
 		<!-- 配送方式-->
-		<uni-popup ref="Recipient" type="bottom" mask-background-color=" rgba(0,0,0,0.7);">
+	<!-- 	<uni-popup ref="Recipient" type="bottom" mask-background-color=" rgba(0,0,0,0.7);">
 			<view class="pop">
 				<view class="popuptitle">
 					<view @click="cancelBtn" style="width: 68rpx;color: #999;font-size: 32rpx;">
@@ -109,7 +113,7 @@
 					</view>
 				</view>
 			</view>
-		</uni-popup>
+		</uni-popup> -->
 		<!-- 门店选择-->
 		<uni-popup ref="shopSelected" type="bottom" mask-background-color=" rgba(0,0,0,0.7);">
 			<view class="pop">
@@ -307,7 +311,7 @@
 							this.goLocation()
 							setTimeout(() => {
 								this.getHotel(id)
-							}, 1000)
+							}, 500)
 						}else if(this.is_virtual == 0){
 							this.formData.type = '快递配送'
 							this.Data.express_type = 1
@@ -679,6 +683,10 @@
 			box-sizing: border-box;
 			position: relative;
 		}
+		.selectTypeNone{
+			color: #df6220;
+			padding-left: 20rpx;
+		}
 	}
 
 	.msg {

+ 83 - 18
pages/my/my.vue

xqd xqd xqd xqd xqd xqd
@@ -52,32 +52,41 @@
 
 				<view class="content">
 					<view class="flexbox" @click="goMyorders(1)">
-						<view
-							style="width: 56rpx; height: 56rpx; display: flex;align-items: center;justify-content: center; ">
+						<view style="width: 56rpx; height: 56rpx; display: flex;align-items: center;justify-content: center; ">
 							<image style="width: 56rpx ;height: 42rpx;" src="../../static/icon/exchange.png"></image>
 						</view>
-						<text>待兑换</text>
+						<view class="flexbox-number">
+							<text>{{exchange}}</text>
+						</view>
+						<text class="flexbox-number-text">待兑换</text>
 					</view>
 					<view class="flexbox" @click="goMyorders(2)">
 						<view
 							style="width: 56rpx; height: 56rpx;display: flex;align-items: center;justify-content: center; ">
 							<image style="width: 54rpx ;height: 52rpx;" src="../../static/icon/shipments.png"></image>
+							
+						</view>
+						<view class="flexbox-number">
+							<text>{{shipped}}</text>
 						</view>
-						<text>待发货</text>
+						<text class="flexbox-number-text">待发货</text>
 					</view>
 					<view class="flexbox" @click="goMyorders(3)">
 						<view
 							style="width: 56rpx; height: 56rpx;display: flex;align-items: center;justify-content: center; ">
 							<image style="width: 56rpx ;height: 56rpx;" src="../../static/icon/Receipt.png"></image>
 						</view>
-						<text>待收货</text>
+						<view class="flexbox-number">
+							<text>{{receive}}</text>
+						</view>
+						<text class="flexbox-number-text">待收货</text>
 					</view>
 					<view class="flexbox" @click="goMyorders(4)">
 						<view
 							style="width: 56rpx; height: 56rpx;display: flex;align-items: center;justify-content: center; ">
 							<image style="width: 54rpx ;height: 54rpx;" src="../../static/icon/finish.png"></image>
 						</view>
-						<text>已完成</text>
+						<text class="flexbox-number-text">已完成</text>
 					</view>
 				</view>
 			</view>
@@ -122,6 +131,14 @@
 		},
 		data() {
 			return {
+				//待兑换
+				exchange:'',
+				//待发货
+				shipped:'',
+				//待收货
+				receive:'',
+				//已完成
+				finish:'',				
 				//跳转h5,小程序,其他页面
 				jump_type: '',
 				jump_config: {},
@@ -158,16 +175,22 @@
 
 
 		onLoad() {
-			this.advise = this.$store.getters.allset.add_member
-			this.jump_type = this.advise.value.me_jump_type
-			if (this.jump_type == 1) {
-				this.jump_config = this.advise.value.me_h5_url
-			} else if (this.jump_type == 2) {
-				this.jump_config.appid = this.advise.value.me_appid
-				this.jump_config.path = this.advise.value.me_path
-			} else if (this.jump_type == 3) {
-				this.jump_config = this.advise.value.me_other_path
+			if(this.$store.getters.allset){
+				this.advise = this.$store.getters.allset.add_member
+				this.jump_type = this.advise.value.me_jump_type
+				if (this.jump_type == 1) {
+					this.jump_config = this.advise.value.me_h5_url
+				} else if (this.jump_type == 2) {
+					this.jump_config.appid = this.advise.value.me_appid
+					this.jump_config.path = this.advise.value.me_path
+				} else if (this.jump_type == 3) {
+					this.jump_config = this.advise.value.me_other_path
+				}
 			}
+			this.getMyOrder(1)
+			this.getMyOrder(2)
+			this.getMyOrder(3)
+			this.getMyOrder(4)
 		},
 
 
@@ -289,6 +312,32 @@
 				}
 
 			},
+
+			// 获取订单列表
+			getMyOrder(type) {
+				this.$api.orders.getOrderList({
+					page: 0,
+					status: type || ''
+				}).then(res => {
+					if (res.code == 0) {
+						if(type == 1 ){						
+							this.exchange = res.data.total
+							console.log(this.exchange );
+						}else if(type== 2) {
+							this.shipped = res.data.total
+							console.log(this.shipped);
+						}else if(type== 3) {
+							this.receive = res.data.total
+							console.log(this.receive);
+						}else if(type== 4) {
+							this.finish = res.data.total
+							console.log(this.finish);
+						}
+					}
+				})
+			},
+
+
 			// 跳转订单页
 			goMyorders(index) {
 				if (this.admin == undefined) {
@@ -583,8 +632,8 @@
 
 			.content {
 				display: flex;
-				align-items: center;
 				justify-content: space-between;
+				align-items: center;
 				padding: 0 20rpx;
 				margin-top: 72rpx;
 
@@ -592,14 +641,30 @@
 					display: flex;
 					flex-direction: column;
 					align-items: center;
-
-					text {
+					position: relative;
+					.flexbox-number-text {
 						margin-top: 16rpx;
 						font-size: 28rpx;
 						font-family: PingFang-SC-Medium, PingFang-SC;
 						font-weight: 500;
 						color: #627885;
 					}
+					.flexbox-number{
+						position: absolute;
+						top: -30rpx;
+						right: -14rpx;
+						width: 46rpx;
+						height: 46rpx;
+						border-radius: 50%;
+						background-color: #ff6c0e;
+						font-size:26rpx;
+						color: #fff;
+						display: flex;
+						justify-content: center;
+						align-items: center;
+						
+						
+					}
 				}
 			}
 		}

+ 52 - 3
pages/my/myorders/orders.vue

xqd xqd xqd xqd xqd xqd xqd
@@ -23,6 +23,10 @@
 				</view>
 			</view>
 		</view>
+		
+		<!-- 占位 -->
+		<view style="width: 100%;height: 220rpx;"></view>
+		
 
 		<view class="msg-null" v-if="orderList.length == 0 ">
 			<image src="https://t9.9026.com/imgs/dataNull.png" style="width: 394rpx;height: 396rpx;" mode=""></image>
@@ -124,8 +128,7 @@
 				// 分段器标题
 				items: ['全部', '待兑换', '待发货', '待收货', '已完成'],
 				isActive: 0,
-				// 组件uni-load-more
-				status: 'noMore',
+				
 				contentText: {
 					contentdown: '查看更多',
 					contentrefresh: '加载中',
@@ -133,6 +136,13 @@
 				},
 				// 订单列表
 				orderList: [],
+				// 分页
+				page: 1,
+				pagesize: 15,
+				totalElements: '',
+				allListItem: '',
+				// 组件uni-load-more
+				status: 'loading',
 			}
 		},
 		onLoad(o) {
@@ -149,6 +159,38 @@
 			})
 			
 		},
+		
+		// 触底加载
+		onReachBottom() {
+			// 触底的时候请求数据,即为上拉加载更多
+			var allTotal = this.page * this.pagesize
+			console.log(allTotal,'----allTotal');
+			//this.page为加载次数,this.pagesize为每一次加载的数据条数
+			if (allTotal < this.totalElements) {
+				//this.totalElements为请求数据的总条数。只要现有条数小于总条数就就执行一下代码
+				this.allListItem = false;
+				this.page++;
+				//加载次数递加
+				this.status = "loading"
+				this.$api.orders.getOrderList({ //请求更多数据列表
+					page: this.page,
+					status:this.isActive,
+					keyword:this.search
+				}).then(res => {
+					let ret = [...this.orderList, ...res.data.data]
+					this.orderList = ret
+					console.log(ret)
+				})
+			} else {
+				this.allListItem = true;
+				console.log('已加载全部数据')
+				this.status = "noMore"
+			}
+		},
+		
+		
+		
+		
 		methods: {
 
 			//确定收货
@@ -187,12 +229,14 @@
 				}).then(res => {
 					if (res.code == 0) {
 						this.orderList = res.data.data
-						console.log(JSON.parse(this.orderList[0].attrs));
+						this.totalElements = res.data.total
+						this.pagesize = res.data.per_page
 					}
 				})
 			},
 			//菜单index切换
 			checked(index) {
+				this.page = 1
 				this.isActive = index
 				this.getMyOrder(index)
 			},
@@ -210,6 +254,8 @@
 					console.log(res, "搜索活动项目列表")
 					if (res.code == 0) {
 						this.orderList = res.data.data
+						this.totalElements = res.data.total
+						this.pagesize = res.data.per_page
 					}
 				})
 			},
@@ -362,6 +408,9 @@
 
 
 	.nav {
+		position: fixed;
+		top: 0;
+		z-index: 999;
 		height: 220rpx;
 		width: 750rpx;
 		background: $bgColor;

+ 142 - 45
pages/my/prize/exchangePrize.vue

xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -3,18 +3,14 @@
 		<!-- 表单 -->
 		<view class="form">
 			<uni-forms :modelValue="formData">
-				<uni-forms-item name="type" v-if="isPhy == 1">
-					<view class="selectType" @click="openSelect">
-						<view class="uni-input" @click="openSelect">
-							<text v-if="formData.type==''||formData.type==null"
-								style="color: #999999 ;font-size: 30rpx;">请选择配送方式</text>
-							<text v-if="formData.type!=''" style="font-size: 30rpx;">{{formData.type}}</text>
+				<view style="margin-bottom: 24rpx;" class="tab_nav" v-if="isPhy == 1">
+					<view class="navTitle" v-for="(item,index) in typeSelect" :key="index"
+						@click="checked(index,item.id)">
+						<view :class="{'active':isActive === index}">
+							{{item.name}}
 						</view>
-						<image src="/static/icon/right.png"
-							style="width: 14rpx;height: 24rpx;position: absolute;top:22rpx;right: 30rpx;">
-						</image>
 					</view>
-				</uni-forms-item>
+				</view>
 				<uni-forms-item name="name" v-if="formData.type!=''||isVerification==true">
 					<uni-easyinput type="text" v-model="Data.receiver" placeholder="联系人" />
 				</uni-forms-item>
@@ -42,8 +38,8 @@
 					<textarea placeholder-style="#999" class="text-area" type="text" placeholder="详细地址"
 						v-model="Data.address" />
 				</uni-forms-item>
-				<uni-forms-item name="region" v-if="formData.type=='店自提'||isVerification==true">
-					<view class="selectType" @click="openShop">
+				<uni-forms-item name="region" v-if="formData.type=='店自提'||isVerification==true">
+					<view class="selectType" @click="openShop" v-if="hotelList.length != 0 " >
 						<view class="uni-input">
 							<text v-if="formData.shop==''||formData.shop==null"
 								style="color: #999999 ; font-size: 30rpx; ">请选择门店</text>
@@ -54,6 +50,9 @@
 							style="width: 14rpx;height: 24rpx;position: absolute;top:22rpx;right: 30rpx;">
 						</image>
 					</view>
+					<view class="selectTypeNone" v-if="hotelList.length == 0 ">
+						暂无门店,请选择其他配送方式
+					</view>
 				</uni-forms-item>
 			</uni-forms>
 		</view>
@@ -74,6 +73,17 @@
 				<text>件数</text>
 				<text>1件</text>
 			</view>
+			<view style="width: 694rpx;height: 4rpx;border: 2rpx dashed #F2F2F2;margin-top: 38rpx;"></view>
+			<view class="shopRemark">
+				<view class="shopRemark-title">
+					<text>奖品说明</text>
+				</view>
+				<view class="shopRemark-content">
+					<u-parse :content="prizeDetail[0].details"></u-parse>
+				</view>
+			</view>
+			<!-- 占位 -->
+			<view style="height: 158rpx;"></view>
 		</view>
 
 		<!-- 兑换按钮 -->
@@ -85,7 +95,7 @@
 
 
 		<!-- 配送方式-->
-		<uni-popup ref="Recipient" type="bottom" mask-background-color=" rgba(0,0,0,0.7);">
+		<!-- <uni-popup ref="Recipient" type="bottom" mask-background-color=" rgba(0,0,0,0.7);">
 			<view class="pop">
 				<view class="popuptitle">
 					<view @click="cancelBtn" style="width: 68rpx;color: #999;font-size: 32rpx;">
@@ -104,7 +114,7 @@
 					</view>
 				</view>
 			</view>
-		</uni-popup>
+		</uni-popup> -->
 		<!-- 门店选择-->
 		<uni-popup ref="shopSelected" type="bottom" mask-background-color=" rgba(0,0,0,0.7);">
 			<view class="pop">
@@ -120,7 +130,8 @@
 				</view>
 				<view class="chooselag">
 					<view @click="companyedShop(item.name,item.id,item.distanceToMe,index)" class="language"
-						v-for="(item,index) in hotelList" :key="index" :class="[activeIndex2 === index?'sgActive': ''] ">
+						v-for="(item,index) in hotelList" :key="index"
+						:class="[activeIndex2 === index?'sgActive': ''] ">
 						<text>{{item.name}}</text>
 					</view>
 				</view>
@@ -158,18 +169,20 @@
 					shop: '',
 					distanceToMe: ''
 				},
+				//激活指定table菜单
+				isActive: 0,
 				// 配送方式
 				typeSelect: [{
 					name: '快递配送',
 				}, {
-					name: '店自提',
+					name: '店自提',
 				}],
 				// 选择门店
 				hotelList: [],
 				// 表单数据
 				Data: {
 					//奖品id
-					product_id:'',
+					product_id: '',
 					order_id: '', //订单id
 					// 快递类型(1.快递发货 2.到店自提也是线下核销)
 					express_type: '',
@@ -187,30 +200,50 @@
 			}
 		},
 
-		onLoad(o) {
+		async onLoad(o) {
 			if (o.id) {
 				this.id = o.id
+				console.log(this.id,'---->订单id');
 				this.isPhy = o.isPhy
-				this.init()
-				console.log(this.id);
 				if (this.isPhy == 1) {
 					//实物奖品
-					this.getPrizeList(0)
+					await this.getPrizeList(0)
+					if(this.Data.product_id){
+						this.init(this.Data.product_id)
+					}
+
 				} else {
 					//虚拟奖品
-					this.getPrizeList(1)
+					await this.getPrizeList(1)
+					if(this.Data.product_id){
+						this.init(this.Data.product_id)
+					}
 				}
 			}
 		},
 
 		methods: {
-			
+
 			//初始化
-			async init() {
+			async init(id) {
 				await this.goLocation();
-				await this.getHotel();
+				await this.getHotel(id);
+			},
+
+			//菜单index切换
+			async checked(index, id) {
+				this.isActive = index
+				if (this.isActive == 0) {
+					this.formData.type = '快递配送'
+					this.Data.express_type = 1
+				} else {
+					this.formData.type = '门店自提'
+					this.Data.express_type = 2
+					await this.goLocation()
+					await this.getHotel(this.Data.product_id)
+
+				}
 			},
-			
 			space(lat1, lng1, lat2, lng2) {
 				var radLat1 = lat1 * Math.PI / 180.0;
 				var radLat2 = lat2 * Math.PI / 180.0;
@@ -218,7 +251,7 @@
 				var b = lng1 * Math.PI / 180.0 - lng2 * Math.PI / 180.0;
 				var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) +
 					Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)));
-			 s = s * 6378.137;
+				s = s * 6378.137;
 				s = Math.round(s * 10000) / 10000;
 				return s // 单位千米
 			},
@@ -229,14 +262,14 @@
 					type: 2,
 					latitude: this.latitude,
 					longitude: this.longitude,
-					product_id:id
+					product_id: id
 				}).then(res => {
-					this.hotelList = res.data.data
-					this.hotelList.map(item => {
+					this.hotelList = res.data.data.map(item => {
 						item.distanceToMe = this.space(this.latitude, this.longitude, item.latitude, item
 							.longitude).toFixed(1);
 						return item;
 					})
+					console.log(this.hotelList, '-------->this.hotelList');
 					//最近的酒店
 					this.formData.shop = this.hotelList[0].name
 					this.formData.distanceToMe = this.hotelList[0].distanceToMe
@@ -302,8 +335,8 @@
 					})
 					return
 				}
-				if(this.isPhy == 1){
-					if(this.Data.express_type == 1){
+				if (this.isPhy == 1) {
+					if (this.Data.express_type == 1) {
 						this.$api.product.orderExchange({
 							...this.Data
 						}).then(res => {
@@ -318,8 +351,8 @@
 								})
 							}
 						})
-					}else{
-						let obj ={}
+					} else {
+						let obj = {}
 						obj.express_type = this.Data.express_type
 						obj.order_id = this.Data.order_id
 						obj.receiver = this.Data.receiver
@@ -340,8 +373,8 @@
 							}
 						})
 					}
-				}else{
-					let obj ={}
+				} else {
+					let obj = {}
 					obj.express_type = this.Data.express_type
 					obj.order_id = this.Data.order_id
 					obj.receiver = this.Data.receiver
@@ -368,9 +401,9 @@
 			openShop() {
 				this.$refs.shopSelected.open('bottom')
 			},
-			companyedShop(i, id, distance,index) {
+			companyedShop(i, id, distance, index) {
 				this.typestatus2 = i
-				this.activeIndex2= index
+				this.activeIndex2 = index
 				this.distanceToMe1 = distance
 				this.Data.hotel_id = id
 			},
@@ -443,18 +476,21 @@
 					this.coverImg = this.prizeDetail[0].img_urls
 					this.Data.order_id = this.prizeDetail[0].order_id
 					this.Data.product_id = this.prizeDetail[0].product_id
-					this.product_id = this.Data.product_id 
-					console.log(this.product_id,'----->this.product_id');
-					
+					this.product_id = this.Data.product_id
+					console.log(this.product_id, '----->this.product_id');
+
 					if (this.isPhy == 2) {
 						this.isVerification = true
 						this.Data.express_type = 2
 						this.goLocation()
 						setTimeout(() => {
 							this.getHotel(this.product_id)
-						}, 1000)
+						}, 500)
+					}else if(this.isPhy == 1 ){
+						this.formData.type = '快递配送'
+						this.Data.express_type = 1
 					}
-					
+
 				})
 			},
 		}
@@ -497,7 +533,28 @@
 	::v-deep .is-input-border {
 		border: none;
 	}
-
+	
+	
+	//奖品备注
+	.shopRemark{
+		margin-top: 30rpx;
+		margin-bottom: 66rpx;
+		padding: 30rpx 24rpx 26rpx;
+		background: #F4F5F6;
+		border-radius: 12rpx;
+		.shopRemark-title{
+			font-size: 30rpx;
+			font-weight: bold;
+			color: #333333;
+		}
+		.shopRemark-content{
+			margin-top: 20rpx;
+			font-size: 24rpx;
+			font-weight: bold;
+			color: #666666;
+		}
+	}
+	
 	.form {
 		background: $pageColor;
 		width: 750rpx;
@@ -514,6 +571,10 @@
 			box-sizing: border-box;
 			position: relative;
 		}
+		.selectTypeNone{
+			color: #df6220;
+			padding-left: 20rpx;
+		}
 	}
 
 	.msg {
@@ -653,7 +714,8 @@
 				padding-top: 40rpx;
 				padding-bottom: 40rpx;
 			}
-			.sgActive{
+
+			.sgActive {
 				color: #FF6200 !important;
 				font-weight: bold !important;
 			}
@@ -685,4 +747,39 @@
 		color: #999 !important;
 		font-size: 30rpx !important;
 	}
+	
+	//菜单切换
+	.tab_nav {
+		width: 100%;
+		display: flex;
+		justify-content: space-between;
+		align-items: center;	
+	}
+	
+	.tab_nav .navTitle {
+		flex: none;
+		width: 336rpx;
+		height: 88rpx;
+		font-size: 30rpx;
+		background: #E8E8E8;
+		color: #333;
+		border-radius: 12rpx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		
+	}
+	.active {
+		width: 336rpx;
+		height: 88rpx;
+		border-radius: 12rpx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		background: linear-gradient(90deg, #FF9342 0%, #FF6200 100%);
+		color: #fff;
+	}
+	
+	
+	
 </style>

+ 103 - 21
pages/my/prize/prize.vue

xqd xqd xqd xqd xqd xqd xqd xqd
@@ -10,6 +10,8 @@
 				</view>
 			</view>
 		</view>
+		<!-- 占位 -->
+		<view style="width: 100%;height: 112rpx;"></view>
 
 		<view class="msg-null" v-if="isActive == 0 && PhysicalPrizes.length == 0 ">
 			<image src="https://t9.9026.com/imgs/dataNull.png" style="width: 394rpx;height: 396rpx;" mode=""></image>
@@ -24,7 +26,7 @@
 				<text>暂无数据</text>
 			</view>
 		</view>
-		<view class="msg-null" v-if="isActive == 2 && VirtualPrizes.length == 0 ">
+		<view class="msg-null" v-if="isActive == 2 && prizeRecord.length == 0 ">
 			<image src="https://t9.9026.com/imgs/dataNull.png" style="width: 394rpx;height: 396rpx;" mode=""></image>
 			<view class="msg-null-text">
 				<text>暂无数据</text>
@@ -102,12 +104,10 @@
 		data() {
 			return {
 				// 分段器标题
-				items: ['实物奖品', '线下奖品', '中奖记录'],
+				items: ['实物奖品', '虚拟奖品', '中奖记录'],
 				isActive: 0,
 				// 列表高度
 				ListHeight: 800,
-				// 组件uni-load-more
-				status: 'noMore',
 				contentText: {
 					contentdown: '查看更多',
 					contentrefresh: '加载中',
@@ -118,29 +118,27 @@
 				// 虚拟奖品列表
 				VirtualPrizes: [],
 				// 中奖记录
-				prizeRecord: []
+				prizeRecord: [],
+				// 分页
+				page: 1,
+				pagesize: 15,
+				totalElements: '',
+				allListItem: '',
+				// 组件uni-load-more
+				status: 'noMore',
+				totalElementsPhy: '',
+				totalElementsVir: '',
 			}
 		},
 		onLoad(o) {
 			if (o.product_type == 2) {
 				//分段器标题切换
 				this.checked(o.product_type - 1)
-				// 中奖记录
-				this.getPrizeRecord()
-				//实物奖品
-				this.getPrizeList(0)
-				//虚拟奖品
-				this.getPrizeList(1)
 			} else {
-				// 中奖记录
-				this.getPrizeRecord()
 				//实物奖品
 				this.getPrizeList(0)
-				//虚拟奖品
-				this.getPrizeList(1)
 			}
-			
-			uni.$on('refreshPrizeData',()=>{
+			uni.$on('refreshPrizeData', () => {
 				// 中奖记录
 				this.getPrizeRecord()
 				//实物奖品
@@ -148,10 +146,75 @@
 				//虚拟奖品
 				this.getPrizeList(1)
 			})
-
-
-
 		},
+		onReachBottom() {
+			// 触底的时候请求数据,即为上拉加载更多
+			var allTotal = this.page * this.pagesize
+			//this.page为加载次数,this.pagesize为每一次加载的数据条数
+			if (this.isActive == 1) {
+				console.log('虚拟')
+				if (allTotal < this.totalElementsVir) {
+					//this.totalElements为请求数据的总条数。只要现有条数小于总条数就就执行一下代码
+					this.allListItem = false;
+					this.page++;
+					//加载次数递加
+					this.status = "loading"
+					this.$api.lottery.getDrawRecord({ //请求更多数据列表
+						page: this.page,
+						is_virtual: this.isActive,
+					}).then(res => {
+						let ret = [...this.VirtualPrizes, ...res.data.data]
+						this.VirtualPrizes = ret
+						console.log(ret)
+					})
+				} else {
+					this.allListItem = true;
+					console.log('已加载全部数据')
+					this.status = "noMore"
+				}
+			} else if (this.isActive == 2) {
+				if (allTotal < this.totalElements) {
+					//this.totalElements为请求数据的总条数。只要现有条数小于总条数就就执行一下代码
+					this.allListItem = false;
+					this.page++;
+					//加载次数递加
+					this.status = "loading"
+					this.$api.lottery.getDrawRecord({ //请求更多数据列表
+						page: this.page,
+					}).then(res => {
+						let ret = [...this.prizeRecord, ...res.data.data]
+						this.prizeRecord = ret
+						console.log(ret)
+					})
+				} else {
+					this.allListItem = true;
+					console.log('已加载全部数据')
+					this.status = "noMore"
+				}
+			}else if(this.isActive ==0) {
+				console.log(allTotal,'实物');
+				if (allTotal < this.totalElementsPhy) {
+					//this.totalElements为请求数据的总条数。只要现有条数小于总条数就就执行一下代码
+					this.allListItem = false;
+					this.page++;
+					//加载次数递加
+					this.status = "loading"
+					this.$api.lottery.getDrawRecord({ //请求更多数据列表
+						page: this.page,
+						is_virtual: this.isActive,
+					}).then(res => {
+						let ret = [...this.PhysicalPrizes, ...res.data.data]
+						this.PhysicalPrizes = ret
+						console.log(ret)
+					})
+				} else {
+					this.allListItem = true;
+					console.log('已加载全部数据')
+					this.status = "noMore"
+				}
+			} 
+		},
+
 		methods: {
 			// 获取奖品列表
 			getPrizeList(type) {
@@ -162,8 +225,13 @@
 					//实物奖品
 					if (type == 0) {
 						this.PhysicalPrizes = res.data.data
+						this.totalElementsPhy = res.data.total
+						this.pagesize = res.data.per_page
 					} else {
 						this.VirtualPrizes = res.data.data
+						this.totalElementsVir = res.data.total
+						this.pagesize = res.data.per_page
+						console.log(this.totalElementsVir,'虚拟');
 					}
 				})
 			},
@@ -175,12 +243,23 @@
 					console.log(res, "中奖记录")
 					if (res.code == 0) {
 						this.prizeRecord = res.data.data
+						this.totalElements = res.data.total
+						this.pagesize = res.data.per_page
 					}
 				})
 			},
 			//分段器标题切换
 			checked(index) {
-				this.isActive = index
+				if (index <= 1) {
+					this.page = 1
+					this.isActive = index
+					console.log(this.isActive,'------->this.isActive');
+					this.getPrizeList(index)
+				} else {
+					this.page = 1
+					this.isActive = index
+					this.getPrizeRecord()
+				}
 			},
 			// 实物立即兑换
 			goExchangePhy(id) {
@@ -229,6 +308,9 @@
 	}
 
 	.segmented {
+		position: fixed;
+		top: 0;
+		z-index: 999;
 		width: 750rpx;
 		height: 112rpx;
 		background: $bgColor;

+ 53 - 5
pages/my/verification/verification.vue

xqd xqd xqd xqd xqd xqd
@@ -27,6 +27,10 @@
 			</view>
 		</view>
 		
+		<!-- 占位 -->
+		<view style="width: 100%;height: 216rpx;"></view>
+		
+		
 		<view class="msg-null" v-if="orderList.length == 0 ">
 			<image src="https://t9.9026.com/imgs/dataNull.png" style="width: 394rpx;height: 396rpx;" mode=""></image>
 			<view class="msg-null-text">
@@ -80,8 +84,6 @@
 				// 分段器标题
 				items: ['未核销', '已核销', '我的'],
 				isActive: 0,
-				// 组件uni-load-more
-				status: 'noMore',
 				contentText: {
 					contentdown: '查看更多',
 					contentrefresh: '加载中',
@@ -89,17 +91,56 @@
 				},
 				// 订单列表
 				orderList:[],
+				// 分页
+				page: 1,
+				pagesize: 15,
+				totalElements: '',
+				allListItem: '',
+				// 组件uni-load-more
+				status: 'loading',
+				//当前页条数
+				allTotal:'',
 			}
 		},
 		onLoad(o) {
 			if(o.type == 2){
-				this.checked(o.type)
+				let type =  parseInt(o.type)
+				this.checked(type)
 			}else{
 				this.getMyOrder(1)
 			}
 		},
+		
+		
+		// 触底加载
+		onReachBottom() {
+			// 触底的时候请求数据,即为上拉加载更多
+			this.allTotal = this.page * this.pagesize
+			console.log(this.allTotal,'----allTotal');
+			//this.page为加载次数,this.pagesize为每一次加载的数据条数
+			if (this.allTotal < this.totalElements) {
+				//this.totalElements为请求数据的总条数。只要现有条数小于总条数就就执行一下代码
+				this.allListItem = false;
+				this.page++;
+				//加载次数递加
+				this.status = "loading"
+				this.$api.orders.getOrderList({ //请求更多数据列表
+					page: this.page,
+					confirm_status:this.isActive+1,
+					keyword:this.search
+				}).then(res => {
+					let ret = [...this.orderList, ...res.data.data]
+					this.orderList = ret
+					console.log(ret)
+				})
+			} else {
+				this.allListItem = true;
+				console.log('已加载全部数据')
+				this.status = "noMore"
+			}
+		},
+		
 		methods:{
-			
 			// 跳转订单详情
 			goOrderDetail(order_no) {
 				uni.navigateTo({
@@ -116,12 +157,14 @@
 					console.log(res,type,"订单列表")
 					if(res.code==0){
 						this.orderList=res.data.data
+						this.totalElements = res.data.total
+						this.pagesize = res.data.per_page
 					}
 				})
 			},
 			//菜单index切换
 			checked(index) {
-				console.log(index)
+				this.page = 1
 				this.isActive = index
 				this.getMyOrder(index+1)
 			},
@@ -139,6 +182,8 @@
 					console.log(res,"搜索活动项目列表")
 					if(res.code==0){
 						this.orderList=res.data.data
+						this.totalElements = res.data.total
+						this.pagesize = res.data.per_page
 					}
 				})
 			},
@@ -197,6 +242,9 @@
 	}
 		
 	.nav {
+		position: fixed;
+		top: 0;
+		z-index: 999;
 		height: 216rpx;
 		width: 750rpx;
 		background: $bgColor;