Procházet zdrojové kódy

项目日志:12.29 全局的优化

gubai před 2 roky
rodič
revize
3209af2c4f

+ 32 - 3
components/extra/navbarTransparent.vue

xqd xqd
@@ -1,8 +1,16 @@
 <template>
 	<view :class="{navbarTran: true, active: active}" :style="{height: `${placeholderHeight}px`}">
 		<view :style="{height: `${barHeight}px`, marginTop:`${barTop}px`}">
-			<uni-icons style="margin-left: 10px;" type="back" color="#000000" size="26" @click="back"></uni-icons>
-			<text style="margin-left: 10px;">{{title}}</text>
+			<view class="right-icon">
+				<view class="right-icon-left">
+					<uni-icons  type="back" color="#171715" size="24" @click="back"></uni-icons>
+				</view>
+				<view style="background-color:#7e7e7c; height: 36rpx;width:2rpx; "></view>
+				<view class="right-icon-right">
+					<text>{{title}}</text>
+				</view>
+			</view>
+			
 		</view>
 	</view>
 </template>
@@ -68,6 +76,27 @@
 		
 		&.active{
 			background-color: #fff;
-		}
+		}
+		
+		
+		.right-icon{
+			margin-left: 30rpx;
+			width: 174rpx;
+			height: 64rpx;
+			background: rgba(255,255,255,0.6);
+			border-radius: 50rpx;
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			padding: 10rpx 15rpx;
+			.right-icon-left{
+			
+			}
+			.right-icon-right{
+			
+			}
+		}
+		
+		
 	}
 </style>

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

xqd
@@ -368,6 +368,7 @@ $pageColor:#F9F9F9;
 			display: flex;
 			align-items: center;
 			justify-content: space-between;
+			border-radius: 12rpx;
 
 		}
 

+ 12 - 6
pages/goods/goods-detail/index.vue

xqd xqd xqd xqd
@@ -43,7 +43,6 @@
 					<image style="width: 12rpx;height: 20rpx;" src="/static/icon/right02.png" mode=""></image>
 				</view>
 				
-				
 				<!--规格-->
 				<view class="price-specs" @click="Recipientopen()">
 					<view class="price-specs-left">
@@ -224,7 +223,7 @@
 				mode: 'dot',
 				attr_groups: [],
 				page: {
-					title: '产品详情'
+					title: '详情'
 				},
 				sku: {
 					keys: [],
@@ -246,6 +245,11 @@
 			
 			//vip跳转
 			this.advise = this.$store.getters.allset.add_member
+			//产品购买vip图标
+			this.productVipImg= this.advise.value.product
+			//积分购买vip图标
+			this.integralVopImg = this.advise.value.integral
+			
 			this.jump_type_vip = this.advise.value.product_jump_type
 			if (this.jump_type_vip == 1) {
 				this.jump_config_vip = this.advise.value.product_h5_url
@@ -266,10 +270,12 @@
 				this.jump_config_integral = this.advise.value.integral_other_path
 			}
 			
-			
-			
-			
-			
+			if(this.produceType == 1){
+				this.backImageUrl = this.productVipImg
+			}else if(this.produceType == 2){
+				this.backImageUrl = this.integralVopImg
+			}
+
 		},
 		computed: {
 			showAttr: function() {

+ 6 - 3
pages/goods/goods-lucky/index.vue

xqd
@@ -35,9 +35,12 @@
 						<text style="margin: 0 8rpx;">活动规则</text>
 						<text class="introduce-top-rule2"></text>
 					</view>
-					<view class="introduce-text">
-						<view v-html="bigWheelConfig.big_wheel_rule"></view>
-					</view>
+					<view class="introduce-text">
+						<u-parse :content="bigWheelConfig.big_wheel_rule"></u-parse>
+					</view>
+					
+					
+					
 				</view>
 			</view>
 

+ 412 - 369
pages/goods/goods.vue

xqd
@@ -1,394 +1,437 @@
-<template>
-	<view class="goods">
-		<scroll-view class="scroll-y" @scroll="handleScroll" :scroll-into-view="topItem" scroll-with-animation
+<template>
+	<view class="goods">
+		<scroll-view class="scroll-y" @scroll="handleScroll" :scroll-into-view="topItem" scroll-with-animation
 			scroll-y="true">
-			<navbarTransparent title="产品活动列表"/>
-			<view id="top"></view>
-			<!-- 背景图 -->
-			<view class="goods-img">
-				<image v-if="bannerImg" style="width: 100vw; height: 82vw;" :src="bannerImg" mode="scaleToFill"></image>
-			</view>
-			<!-- 内容 -->
-			<view class="main">
-				<view class="search">
-					<u-input placeholderStyle='color:#999' id="search-input" placeholder="搜索" border='none'  v-model="search" @input="searchText">
-						<template slot="suffix" style='margin-right:40rpx;'>
-							<u-image :showLoading="true" :showError='true' src="/static/icon/search.png" width="40rpx"
-								height="32rpx"></u-image>
-						</template>
-					</u-input>
-				</view>
-				<view class="tab_nav">
-					<view class="navTitle" v-for="(item,index) in items" :key="index">
-						<view class="navTitle-item">
-							<view :class="{'active':isActive === index}" @click="checked(index,item.id)">
-								{{item.name}}
-							</view>
-						</view>
-					</view>
-				</view>
+			<navbarTransparent title="产品" />
+			<view id="top"></view>
+			<!-- 背景图 -->
+			<view class="goods-img">
+				<image v-if="bannerImg" style="width: 100vw; height: 82vw;" :src="bannerImg" mode="scaleToFill"></image>
 			</view>
-						
+			<!-- 内容 -->
+			<view class="main">
+				<view class="search">
+					<u-input placeholderStyle='color:#999' id="search-input" placeholder="搜索" border='none'
+						v-model="search" @input="searchText(isActive,items[isActive].id)">
+						<template slot="suffix" style='margin-right:40rpx;'>
+							<u-image :showLoading="true" :showError='true' src="/static/icon/search.png" width="40rpx"
+								height="32rpx"></u-image>
+						</template>
+					</u-input>
+				</view>
+				<view class="tab_nav">
+					<view class="navTitle" v-for="(item,index) in items" :key="index">
+						<view class="navTitle-item">
+							<view :class="{'active':isActive === index}" @click="checked(index,item.id)">
+								{{item.name}}
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+
 			<view class="msg-null" v-if="goodsList.length == 0 ">
-				<image src="https://t9.9026.com/imgs/dataNull.png" style="width: 394rpx;height: 396rpx;" mode=""></image>
+				<image src="https://t9.9026.com/imgs/dataNull.png" style="width: 394rpx;height: 396rpx;" mode="">
+				</image>
 				<view class="msg-null-text">
 					<text>暂无数据</text>
 				</view>
 			</view>
-			
-			<view class="content" v-if="goodsList.length > 0 ">
-				<view class="home-hotel-img-content">
+
+			<view class="content" v-if="goodsList.length > 0 ">
+				<view class="home-hotel-img-content">
 					<template v-for="(item,index) in goodsList">
-						<view v-if="item.status==1" @click="goGoodsDetail(item.id)" class="home-hotel-img-content-item" :key="index"
-							:style="{marginTop:item.marginTop || 0 }">
+						<view v-if="item.status==1" @click="goGoodsDetail(item.id)" class="home-hotel-img-content-item"
+							:key="index" :style="{marginTop:item.marginTop || 0 }">
 							<image class="home-hotel-img-content-item-img"
 								:class="item.short?'home-hotel-img-content-item-img': 'home-hotel-img-content-item-img-long' "
 								:src="item.cover_img" mode=""></image>
 							<view class="text">
 								<text class="text-top">{{item.name}}</text>
-								<text class="text-main">{{item.hotel.name}}</text>
+								<!-- <text class="text-main">{{item.hotel.name}}</text> -->
+								<text class="text-main"></text>
 							</view>
 						</view>
-					</template>
-				</view>
-				<!-- 触底 -->
-				<view class="home-bottom" v-if="goodsList.length > 0 ">
-					<uni-load-more :status="status" color="#CCCCCC" :content-text="contentText" />
-				</view>
-			</view>
-		</scroll-view>
-		<view class="return-btn" v-if="isShow" @click="handleBackTop">
-			<image style="width: 128rpx;height: 128rpx;" src="/static/icon/returntop.png" mode=""></image>
-		</view>
-	</view>
-</template>
-
-<script>
-	import util from '@/utils/util.js'
-	import navbarTransparent from "@/components/extra/navbarTransparent.vue"
-	export default {
-		components:{navbarTransparent},
-		data() {
-			return {
-				//搜索
-				search:'',
-				//背景图
-				bannerImg:'',
-				// 返回的按钮是否显示
-				isShow: false,
-				topItem: '', //返回顶部的标记点
-				goodsList: [{
-						img: 'http://t9.9026.com/imgs/goodsimg01.png',
-						text: '中秋佳节五仁月饼,惊喜特供,限时抢购',
-						title: '环球洲际',
-						short: '',
-					}],
-				status: 'noMore',
-				contentText: {
-					contentdown: '查看更多',
-					contentrefresh: '加载中',
-					contentnomore: '——  已经到底啦  ——'
-				},
-				//分段器
-				items: [],
-				//激活指定table菜单
-				isActive: 0,
-				//第三方产品分类categoryId
-				categoryId:'',
-			};
-		},
-		onLoad() {
-			this.shortLong()
-			this.getCategoryList()
-			
-			//获取产品活动列表背景图
-			this.bannerImg = this.$store.getters.allset.activity_page.value.bg_img
-			
-		},
-		methods: {
-			// 获取分类列表
-			getCategoryList(){
-				this.$api.category.getCategoryList({
-					page:1,
-					type:2
-				}).then(res=>{
-					if(res.code==0){
-						this.items=res.data.data
-						this.categoryId = this.items[0].id
-						console.log(this.categoryId,'--->this.categoryId');
-						this.getGoodsList(this.categoryId)
-					}
-				})
-			},
-			//菜单index切换
-			checked(index,id) {
-				this.isActive = index
-				this.getGoodsList(id)
-			},
-			
-			//产品列表type:1,第三方购买产品
-			getGoodsList(category_id) {
-				this.$api.product.getProducts({
-					type: 1,
-					page: 0,
-					keyword:'',
-					category_id:`${category_id}`
-				}).then(res => {
-					this.goodsList = res.data.data
-					this.shortLong()
-					console.log(this.goodsList,'------>产品图');
-				})
-			},
-
-			handleScroll(e) {
-				//只有scrollTop有用,先拿scrollTop
-				let {
-					scrollTop
-				} = e.detail
-				//滑动大于500让按钮显示
-				this.isShow = scrollTop > 500
-				//因为点第二次不行,这里记得重置清空一下
-				this.topItem = ''
-			},
-			handleBackTop() {
-				this.topItem = 'top'
-			},
-			shortLong() {
-				this.goodsList.forEach((item, index, arr) => {
-					if (index % 4 === 0) {
-						item.short = true
-					}
-					if (index % 4 === 1) {
-						item.long = true
-					}
-					if (index % 4 === 2) {
-						item.long = true
-						item.marginTop = -68 + "rpx"
-					}
-					if (index % 4 === 3) {
-						item.short = true
-					}
-				})
-				console.log(this.goodsList);
-			},
-			// //去大转盘
-			// goGoodsDetailImg() {
-			// 	uni.navigateTo({
-			// 		url: '/pages/goods/goods-lucky/index'
-			// 	})
-			// },
-
-			//去产品详情
-			goGoodsDetail(id) {
-				uni.navigateTo({
-					url:`/pages/goods/goods-detail/index?id=${id}&type=1`
-				})
-			},
-			// 搜索防抖
-			searchText:util.debounce(function(){
-				if(this.search !=''){
-					this.goSearch()
-				}else{
-					this.getGoodsList(this.categoryId)
-				}
-			},1000),
-			//搜索
-			goSearch(){
-				uni.showLoading({
-					title:'加载中'
-				})
-				this.$api.product.getProducts({
-					type: 1,
-					page: 0,
-					name:this.search,
-					category_id:''
-				}).then(res=>{
-					if(res.code==0){
-						uni.hideLoading()
-						this.goodsList=res.data.data
-					}
-				})
-			},
-			
-		}
-
-	}
-</script>
-
-<style lang="scss" scoped>
-	.goods {
-		height: 100%;
-	}
-
-	.tab_nav {
-		width: 100%;
-		height: 100rpx;
-		display: flex;
-		align-items: center;
-		font-family: PingFang-SC-Heavy, PingFang-SC;
-		overflow-x: scroll;
+					</template>
+				</view>
+				<!-- 触底 -->
+				<view class="home-bottom" v-if="goodsList.length > 0 ">
+					<uni-load-more :status="status" color="#CCCCCC" :content-text="contentText" />
+				</view>
+			</view>
+		</scroll-view>
+		<!-- <view class="return-btn" v-if="isShow" @click="handleBackTop">
+			<image style="width: 128rpx;height: 128rpx;" src="/static/icon/returntop.png" mode=""></image>
+		</view> -->
+		<view class="return-btn" @click="handleBackTop">
+			<image style="width: 128rpx;height: 128rpx;" src="/static/icon/returntop.png" mode=""></image>
+		</view>
+	</view>
+</template>
+
+<script>
+	import util from '@/utils/util.js'
+	import navbarTransparent from "@/components/extra/navbarTransparent.vue"
+	export default {
+		components: {
+			navbarTransparent
+		},
+		data() {
+			return {
+				//搜索
+				search: '',
+				//背景图
+				bannerImg: '',
+				// 返回的按钮是否显示
+				isShow: false,
+				topItem: '', //返回顶部的标记点
+				contentText: {
+					contentdown: '查看更多',
+					contentrefresh: '加载中',
+					contentnomore: '——  已经到底啦  ——'
+				},
+				//分段器
+				items: [],
+				//激活指定table菜单
+				isActive: 0,
+				//第三方产品分类categoryId
+				categoryId: '',
+				goodsList: [],
+				// 分页
+				page: 1,
+				pagesize: 15,
+				totalElements: '',
+				allListItem: '',
+				// 组件uni-load-more
+				status: 'noMore',
+			};
+		},
+		onLoad() {
+			this.shortLong()
+			this.getCategoryList()
+			//获取产品活动列表背景图
+			this.bannerImg = this.$store.getters.allset.activity_page.value.bg_img
+		},
+
+		// 触底加载
+		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.product.getProducts({ //请求更多数据列表
+					page: this.page,
+					category_id: this.categoryId,
+					keyword: this.search
+				}).then(res => {
+					let ret = [...this.goodsList, ...res.data.data]
+					this.goodsList = ret
+					console.log(ret)
+				})
+			} else {
+				this.allListItem = true;
+				console.log('已加载全部数据')
+				this.status = "noMore"
+			}
+		},
+
+		methods: {
+			// 获取分类列表
+			getCategoryList() {
+				this.$api.category.getCategoryList({
+					page: 1,
+					type: 2
+				}).then(res => {
+					if (res.code == 0) {
+						this.items = res.data.data
+						this.categoryId = this.items[0].id
+						console.log(this.categoryId, '--->this.categoryId');
+						this.getGoodsList(this.categoryId)
+					}
+				})
+			},
+			//菜单index切换
+			checked(index, id) {
+				this.page = 1
+				this.categoryId = id
+				this.isActive = index
+				this.getGoodsList(id)
+			},
+
+			//产品列表type:1,第三方购买产品
+			getGoodsList(category_id) {
+				this.$api.product.getProducts({
+					type: 1,
+					page: 0,
+					keyword: this.search || '',
+					category_id: `${category_id}`
+				}).then(res => {
+					this.goodsList = res.data.data
+					this.totalElements = res.data.total
+					this.pagesize = res.data.per_page
+					this.shortLong()
+					console.log(this.goodsList, '------>产品图');
+				})
+			},
+
+			handleScroll(e) {
+				//只有scrollTop有用,先拿scrollTop
+				let {
+					scrollTop
+				} = e.detail
+				//滑动大于500让按钮显示
+				this.isShow = scrollTop > 500
+				//因为点第二次不行,这里记得重置清空一下
+				this.topItem = ''
+			},
+			handleBackTop() {
+				// this.topItem = 'top'
+				uni.pageScrollTo({
+					scrollTop: 0
+				})
+			},
+			shortLong() {
+				this.goodsList.forEach((item, index, arr) => {
+					if (index % 4 === 0) {
+						item.short = true
+					}
+					if (index % 4 === 1) {
+						item.long = true
+					}
+					if (index % 4 === 2) {
+						item.long = true
+						item.marginTop = -68 + "rpx"
+					}
+					if (index % 4 === 3) {
+						item.short = true
+					}
+				})
+				console.log(this.goodsList, '1111111111111');
+			},
+			// //去大转盘
+			// goGoodsDetailImg() {
+			// 	uni.navigateTo({
+			// 		url: '/pages/goods/goods-lucky/index'
+			// 	})
+			// },
+
+			//去产品详情
+			goGoodsDetail(id) {
+				uni.navigateTo({
+					url: `/pages/goods/goods-detail/index?id=${id}&type=1`
+				})
+			},
+			// 搜索防抖
+			searchText: util.debounce(function(index, id) {
+				this.goSearch(index, id)
+			}, 1000),
+			//搜索
+			goSearch(index, id) {
+				uni.showLoading({
+					title: '加载中'
+				})
+				this.$api.product.getProducts({
+					type: 1,
+					page: 0,
+					name: this.search,
+					category_id: id
+				}).then(res => {
+					if (res.code == 0) {
+						uni.hideLoading()
+						this.isActive = index
+						this.goodsList = res.data.data
+						this.totalElements = res.data.total
+						this.pagesize = res.data.per_page
+					}
+				})
+			},
+
+		}
+
 	}
-	
-	.msg-null{
+</script>
+
+<style lang="scss" scoped>
+	.goods {
+		height: 100%;
+	}
+
+	.tab_nav {
+		width: 100%;
+		height: 100rpx;
+		display: flex;
+		align-items: center;
+		font-family: PingFang-SC-Heavy, PingFang-SC;
+		overflow-x: scroll;
+	}
+
+	.msg-null {
 		display: flex;
 		flex-direction: column;
 		align-items: center;
 		justify-content: center;
-		.msg-null-text{
+
+		.msg-null-text {
 			margin-top: 40rpx;
 			font-size: 28rpx;
 			color: #333;
 		}
-	}
-
-	.scroll-y {
-		height: 100vh;
-	}
-
-
-
-	.content {
-		background-color: #FFF;
-		padding: 20rpx 30rpx;
-
-		.home-hotel-img-content {
-			display: flex;
-			align-items: flex-start;
-			justify-content: space-between;
-			flex-wrap: wrap;
-
-			.home-hotel-img-content-item {
-				width: 332rpx;
-				background: #FFFFFF;
-				box-shadow: 0px 4rpx 8rpx 0px rgba(0, 0, 0, 0.04);
-				border-radius: 12rpx;
-				margin-bottom: 26rpx;
-				overflow: hidden;
-
-				.home-hotel-img-content-item-img {
-					width: 332rpx;
-					height: 332rpx;
-					object-fit: cover;
-					object-position: center;
-				}
-
-				.home-hotel-img-content-item-img-long {
-					width: 332rpx;
-					height: 400rpx;
-					object-fit: cover;
-					object-position: center;
-				}
-
-				.text {
-					display: flex;
-					flex-direction: column;
-					align-items: flex-start;
-					justify-content: center;
-					padding: 18rpx 22rpx 32rpx;
-
-					.text-top {
-						font-size: 28rpx;
-						font-weight: bold;
-						color: #333;
-					}
-
-					.text-main {
-						margin-top: 20rpx;
-						font-size: 24rpx;
-						color: #999999;
-					}
-				}
-			}
-		}
-	}
-
-	.return-btn {
-		position: fixed;
-		bottom: 140rpx;
-		right: 14rpx;
-
-	}
-
-
-
-	.home-bottom {
-		background-color: #FFF;
-		padding-bottom: 84rpx;
-	}
-
-	.tab_nav .navTitle {
-		width: 154rpx;
-		flex: none;
-		height: 28rpx;
-		font-size: 32rpx;
-		color: #666;
-		position: relative;
-		display: flex;
-		align-items: center;
-		justify-content: center;
-		margin-right: 16rpx;
-	}
-
-	.navTitle-item {
-		width: 154rpx;
-		flex: none;
-		height: 28rpx;
-		font-size: 32rpx;
-		color: #666;
-		position: relative;
-		display: flex;
-		align-items: center;
-		justify-content: center;
-	}
-
-	.active {
-		color: #D9A94D;
-		font-weight: bold;
-
-		&::after {
-			display: inline-block;
-			content: '';
-			width: 48rpx;
-			height: 12rpx;
-			background: linear-gradient(90deg, #F3D69F 0%, #D9A94D 100%);
-			border-radius: 6px;
-			position: absolute;
-			bottom: -26rpx;
-			left: 51rpx;
-		}
-	}
-
-	.search {
-		::v-deep .u-input {
-			width: 690rpx !important;
-			height: 68rpx !important;
-			background: #F1F1F1;
-			border-radius: 74rpx;
-		}
-
-		::v-deep .u-input__content__field-wrapper {
-			padding-left: 36rpx;
-		}
-
-		::v-deep .u-input__content__field-wrapper__field {
-			color: #999999 !important;
-			font-size: 28rpx !important;
-		}
-	}
-
-
-	.goods-img {
-		width: 100%;
-		height: 82vw;
-	}
-
-	.main {
-		position: relative;
-		top: -36rpx;
-		padding: 48rpx 30rpx 0;
-		border-radius: 16rpx 16rpx 0px 0px;
-		height: 238rpx;
-		background: #FFFFFF;
-		box-shadow: 0px 4rpx 8rpx 0px rgba(0, 0, 0, 0.04);
-	}
+	}
+
+	.scroll-y {
+		// height: 100vh;
+	}
+
+
+
+	.content {
+		background-color: #FFF;
+		padding: 20rpx 30rpx;
+
+		.home-hotel-img-content {
+			display: flex;
+			align-items: flex-start;
+			justify-content: space-between;
+			flex-wrap: wrap;
+
+			.home-hotel-img-content-item {
+				width: 332rpx;
+				background: #FFFFFF;
+				box-shadow: 0px 4rpx 8rpx 0px rgba(0, 0, 0, 0.04);
+				border-radius: 12rpx;
+				margin-bottom: 26rpx;
+				overflow: hidden;
+
+				.home-hotel-img-content-item-img {
+					width: 332rpx;
+					height: 332rpx;
+					object-fit: cover;
+					object-position: center;
+				}
+
+				.home-hotel-img-content-item-img-long {
+					width: 332rpx;
+					height: 400rpx;
+					object-fit: cover;
+					object-position: center;
+				}
+
+				.text {
+					display: flex;
+					flex-direction: column;
+					align-items: flex-start;
+					justify-content: center;
+					padding: 18rpx 22rpx 32rpx;
+
+					.text-top {
+						font-size: 28rpx;
+						font-weight: bold;
+						color: #333;
+					}
+
+					.text-main {
+						margin-top: 20rpx;
+						font-size: 24rpx;
+						color: #999999;
+					}
+				}
+			}
+		}
+	}
+
+	.return-btn {
+		position: fixed;
+		bottom: 140rpx;
+		right: 14rpx;
+
+	}
+
+
+
+	.home-bottom {
+		background-color: #FFF;
+		padding-bottom: 84rpx;
+	}
+
+	.tab_nav .navTitle {
+		width: 154rpx;
+		flex: none;
+		height: 28rpx;
+		font-size: 32rpx;
+		color: #666;
+		position: relative;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		margin-right: 16rpx;
+	}
+
+	.navTitle-item {
+		width: 154rpx;
+		flex: none;
+		height: 28rpx;
+		font-size: 32rpx;
+		color: #666;
+		position: relative;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+	}
+
+	.active {
+		color: #D9A94D;
+		font-weight: bold;
+
+		&::after {
+			display: inline-block;
+			content: '';
+			width: 48rpx;
+			height: 12rpx;
+			background: linear-gradient(90deg, #F3D69F 0%, #D9A94D 100%);
+			border-radius: 6px;
+			position: absolute;
+			bottom: -26rpx;
+			left: 51rpx;
+		}
+	}
+
+	.search {
+		::v-deep .u-input {
+			width: 690rpx !important;
+			height: 68rpx !important;
+			background: #F1F1F1;
+			border-radius: 74rpx;
+		}
+
+		::v-deep .u-input__content__field-wrapper {
+			padding-left: 36rpx;
+		}
+
+		::v-deep .u-input__content__field-wrapper__field {
+			color: #999999 !important;
+			font-size: 28rpx !important;
+		}
+	}
+
+
+	.goods-img {
+		width: 100%;
+		height: 82vw;
+	}
+
+	.main {
+		position: relative;
+		top: -36rpx;
+		padding: 48rpx 30rpx 0;
+		border-radius: 16rpx 16rpx 0px 0px;
+		height: 238rpx;
+		background: #FFFFFF;
+		box-shadow: 0px 4rpx 8rpx 0px rgba(0, 0, 0, 0.04);
+	}
 </style>

+ 4 - 4
pages/index/active-detail/index.vue

xqd xqd xqd
@@ -164,9 +164,9 @@
 				<text class="introduce-top-rule2"></text>
 			</view>
 			<view class="introduce-main">
-				<view v-html="activeDeatil.rule"></view>
+				<u-parse :content="activeDeatil.rule"></u-parse>
 			</view>
-
+		
 			<!-- 分割线 -->
 			<view
 				style="width: 94%; height: 2rpx; background-color:rgba(240, 240, 240, .7);margin: 64rpx auto 80rpx;  ">
@@ -177,7 +177,7 @@
 				<text class="introduce-top-rule2"></text>
 			</view>
 			<view class="introduce-btn-text">
-				<view v-html="activeDeatil.details"></view>
+				<u-parse :content="activeDeatil.details"></u-parse>
 			</view>
 			<!-- 分割线 -->
 			<view
@@ -190,7 +190,7 @@
 			</view>
 			<!-- 声明 -->
 			<view class="introduce-btn">
-				<view v-html="activeDeatil.statement"></view>
+				<u-parse :content="activeDeatil.statement"></u-parse>
 			</view>
 
 		</view>

+ 118 - 71
pages/index/active-list/index.vue

xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -4,7 +4,8 @@
 		<view class="active-list-search">
 			<!-- 搜索框 -->
 			<view class="search">
-				<u-input placeholderStyle='color:#999' placeholder="输入活动名称或参赛项目" border='none' v-model="search" @input="searchText">
+				<u-input placeholderStyle='color:#999' placeholder="输入活动名称或参赛项目" border='none' v-model="search"
+					@input="searchText(isActive,items[isActive].id)">
 					<template slot="suffix" style='margin-right:40rpx;'>
 						<u-image :showLoading="true" :showError='true' src="/static/icon/search.png" width="40rpx"
 							height="32rpx"></u-image>
@@ -19,18 +20,19 @@
 				</view>
 			</view>
 		</view>
-		
+
 		<view class="msg-null" v-if="List.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>
 			</view>
 		</view>
-				
+
 		<view class="List" v-if="List.length > 0">
-			<template v-for="(item,index) in List" >
-				<view class="ListItem" v-if="item.show_status" :key="index"  @click="activeDetail(item.id)">
-					<image :src="item.banners?item.cover_img:'http://t9.9026.com/imgs/Kudosbg.png'" style="width: 640rpx;height:420rpx;border-radius: 12rpx;"></image>
+			<template v-for="(item,index) in List">
+				<view class="ListItem" v-if="item.show_status" :key="index" @click="activeDetail(item.id)">
+					<image :src="item.banners?item.cover_img:'http://t9.9026.com/imgs/Kudosbg.png'"
+						style="width: 640rpx;height:420rpx;border-radius: 12rpx;"></image>
 					<view class="kudosicon" @click.stop="kudosActive(item.id,index)">
 						<image src="/static/icon/Kudos.png" v-if="item.is_like==0"></image>
 						<image src="/static/icon/Kudos(1).png" v-if="item.is_like==1"></image>
@@ -55,7 +57,7 @@
 
 		<!-- 触底 -->
 		<view class="home-bottom" v-if="List.length > 0">
-			<uni-load-more :status="status" color="#CCCCCC" :content-text="contentText"/>
+			<uni-load-more :status="status" color="#CCCCCC" :content-text="contentText" />
 		</view>
 	</view>
 </template>
@@ -66,9 +68,9 @@
 		data() {
 			return {
 				//活动分类categoryId
-				categoryId:'',
+				categoryId: '',
 				// 搜索
-				search:'',
+				search: '',
 				//分段器
 				items: [{
 						name: '热门活动'
@@ -84,101 +86,140 @@
 				],
 				//激活指定table菜单
 				isActive: 0,
-				status: 'noMore',
 				contentText: {
 					contentdown: '查看更多',
 					contentrefresh: '加载中',
 					contentnomore: '——  已经到底啦  ——'
 				},
 				// 活动列表
-				List:[],
+				List: [],
+				// 分页
+				page: 1,
+				pagesize: 15,
+				totalElements: '',
+				allListItem: '',
+				// 组件uni-load-more
+				status: 'noMore',
 			}
 		},
 		onLoad() {
 			// this.getList()
 			this.getCategoryList()
-			console.log(util,"until")
+			console.log(util, "until")
+		},
+
+		// 触底加载
+		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.active.getActiveList({ //请求更多数据列表
+					page: this.page,
+					category_id: this.categoryId,
+					keyword: this.search
+				}).then(res => {
+					let ret = [...this.List, ...res.data.data]
+					this.List = ret
+					console.log(ret)
+				})
+			} else {
+				this.allListItem = true;
+				console.log('已加载全部数据')
+				this.status = "noMore"
+			}
 		},
+
 		methods: {
 			// 获取活动列表
-			getList(category_id){
+			getList(category_id) {
 				this.$api.active.getActiveList({
-					page:0,
-					keyword:'',
-					category_id:`${category_id}`
-				}).then(res=>{
-					console.log(res,'活动列表')
-					if(res.code==0){
-						this.List=res.data.data
-						console.log(this.List,'--->this.List');
+					page: 0,
+					keyword: '',
+					category_id: `${category_id}`
+				}).then(res => {
+					console.log(res, '活动列表')
+					if (res.code == 0) {
+						this.List = res.data.data
+						this.totalElements = res.data.total
+						this.pagesize = res.data.per_page
+						console.log(this.List, '--->this.List');
 					}
 				})
 			},
 			// 获取分类列表
-			getCategoryList(){
+			getCategoryList() {
 				this.$api.category.getCategoryList({
-					page:1,
-					type:1
-				}).then(res=>{
-					console.log(res,"活动分类列表")
-					if(res.code==0){
-						this.items=res.data.data
+					page: 1,
+					type: 1
+				}).then(res => {
+					console.log(res, "活动分类列表")
+					if (res.code == 0) {
+						this.items = res.data.data
 						this.categoryId = this.items[0].id
-						console.log(this.categoryId,'--->this.categoryId');
+						console.log(this.categoryId, '--->this.categoryId');
 						this.getList(this.categoryId)
 					}
 				})
 			},
 			// 点赞活动
-			kudosActive(id,index){
-				let beforeLike=this.List[index].is_like
+			kudosActive(id, index) {
+				let beforeLike = this.List[index].is_like
 				this.$api.active.kudos({
-					activity_id:id
-				}).then(res=>{
-					console.log(res,'点赞')
-					if(res.code==0){
-						if(beforeLike==1){
-							this.List[index].is_like=0
-						}else{
-							this.List[index].is_like=1
+					activity_id: id
+				}).then(res => {
+					console.log(res, '点赞')
+					if (res.code == 0) {
+						if (beforeLike == 1) {
+							this.List[index].is_like = 0
+						} else {
+							this.List[index].is_like = 1
 						}
 					}
 				})
 			},
 			//菜单index切换
-			checked(index,id) {
+			checked(index, id) {
+				this.page = 1
 				this.isActive = index
+				this.categoryId = id
 				this.getList(id)
-				console.log(this.isActive,'---->this.isActive');
+				console.log(this.isActive, '---->this.isActive');
 			},
 			// 活动详情页
-			activeDetail(id){
+			activeDetail(id) {
 				uni.navigateTo({
-					url:'/pages/index/active-detail/index?id='+id
+					url: '/pages/index/active-detail/index?id=' + id
 				})
 			},
 			// 搜索防抖
-			searchText:util.debounce(function(){
-				if(this.search !=''){
-					this.goSearch()
-				}else{
-					this.getList(this.categoryId)
-				}
-			},1000),
+			searchText: util.debounce(function(index, id) {
+				this.goSearch(index, id)
+				console.log(id, '---->id');
+			}, 1000),
 			//搜索
-			goSearch(){
+			goSearch(index, id) {
 				uni.showLoading({
-					title:'加载中'
+					title: '加载中'
 				})
 				this.$api.active.getActiveList({
-					page:1,
-					keyword:this.search,
-					category_id:''
-				}).then(res=>{
-					if(res.code==0){
+					page: 1,
+					keyword: this.search,
+					category_id: id
+				}).then(res => {
+					if (res.code == 0) {
 						uni.hideLoading()
-						this.List=res.data.data
-						console.log(this.List,'--->this.list');
+						this.isActive = index
+						this.List = res.data.data
+						this.totalElements = res.data.total
+						this.pagesize = res.data.per_page
+						console.log(this.List, '--->this.list');
 					}
 				})
 			},
@@ -200,22 +241,23 @@
 		height: 100%;
 		background: #F9F9F9;
 	}
-	
-	.msg-null{
+
+	.msg-null {
 		margin-top: 224rpx;
 		display: flex;
 		flex-direction: column;
 		align-items: center;
 		justify-content: center;
 		padding-top: 60rpx;
-		.msg-null-text{
+
+		.msg-null-text {
 			margin-top: 40rpx;
 			font-size: 28rpx;
 			color: #333;
 		}
 	}
-	
-	
+
+
 	.home-bottom {
 		background-color: #f9f9f9;
 		padding-bottom: 84rpx;
@@ -242,8 +284,9 @@
 			::v-deep .u-input__content__field-wrapper {
 				padding-left: 36rpx;
 			}
-			::v-deep .u-input__content__field-wrapper__field{
-				color:#999999 !important;
+
+			::v-deep .u-input__content__field-wrapper__field {
+				color: #999999 !important;
 				font-size: 28rpx !important;
 			}
 		}
@@ -256,7 +299,7 @@
 			justify-content: space-between;
 			align-items: center;
 			font-family: PingFang-SC-Heavy, PingFang-SC;
-			
+
 		}
 
 		.tab_nav .navTitle {
@@ -267,9 +310,11 @@
 			color: #666;
 			position: relative;
 		}
+
 		.active {
 			color: #D9A94D;
 			font-weight: bold;
+
 			&::after {
 				display: inline-block;
 				content: '';
@@ -278,8 +323,8 @@
 				background: linear-gradient(90deg, #F3D69F 0%, #D9A94D 100%);
 				border-radius: 6px;
 				position: absolute;
-				bottom:-36rpx;
-				left:40rpx;
+				bottom: -36rpx;
+				left: 40rpx;
 			}
 		}
 
@@ -289,9 +334,9 @@
 		padding: 0 30rpx;
 		box-sizing: border-box;
 		padding-top: 20rpx;
-		padding-bottom:88rpx ;
+		padding-bottom: 88rpx;
 		background-color: #F9F9F9;
-		margin-top: 222rpx; 
+		margin-top: 222rpx;
 
 		.ListItem {
 			position: relative;
@@ -302,6 +347,7 @@
 			box-shadow: 0rpx 12rpx 40rpx 0rpx rgba(220, 222, 229, 0.4);
 			border-radius: 24rpx;
 			padding: 20rpx 26rpx 26rpx 24rpx;
+
 			.kudosicon {
 				width: 48rpx;
 				height: 48rpx;
@@ -311,6 +357,7 @@
 				border-radius: 50%;
 				background: #FFFFFF;
 				opacity: 0.84;
+
 				@include flexlayout() image {
 					width: 32rpx;
 					height: 28rpx;

+ 6 - 3
pages/index/index.vue

xqd xqd
@@ -98,7 +98,7 @@
 		<movable-area class="movableArea">
 			<movable-view class="movableView" direction="all" x="630rpx" y="700rpx">
 				<view class="img-IHg" @click="goJoin()">
-					<image style="width: 64rpx; height: 58rpx;border-radius: 50%;" :src="indexVipImg" mode=""></image>
+					<image style="width: 84rpx; height: 84rpx;border-radius: 50%;" :src="indexVipImg" mode=""></image>
 				</view>
 			</movable-view>
 		</movable-area>
@@ -315,9 +315,12 @@
 			this.getAllSet()
 			// this.isDevelopment = process.env.NODE_ENV === 'development';
 			this.isDevelopment = true;
-
 			this.playVideo(this.current1)
-
+			
+			uni.$on('refreshActivityList',()=>{
+				this.getList()
+			})
+			
 		},
 		// 监听判断视频的播放与暂停
 		watch: {

+ 12 - 3
pages/index/vote-detail/index.vue

xqd xqd xqd xqd xqd xqd
@@ -82,7 +82,7 @@
 			<movable-area class="movableArea">
 				<movable-view class="movableView" direction="all" x="630rpx" y="700rpx">
 					<view class="img-IHg" @click="goJoin">
-						<image style="width: 64rpx; height: 58rpx; " src="/static/icon/vip.png" mode=""></image>
+						<image style="width: 84rpx; height: 84rpx;border-radius: 50%; " :src="indexVipImg" mode=""></image>
 					</view>
 				</movable-view>
 			</movable-area>
@@ -95,7 +95,10 @@
 				<view class="introduce-title">
 					<text>参赛介绍</text>
 				</view>
-				<view class="introduce-text" v-html="voteDetail.intro"></view>
+				<view class="introduce-text">
+					<u-parse :content="voteDetail.intro"></u-parse>
+				</view>
+				
 			</view>
 
 			<!-- 预约 -->
@@ -106,7 +109,7 @@
 					<text>预约</text>
 				</view>
 				<view class="reserve-right" @click="goJoinActivity">
-					<image style="width: 60rpx;height: 56rpx; margin-right: 4rpx; " src="/static/icon/reserve01.png"
+					<image style="width: 44rpx;height: 44rpx; margin-right: 10rpx;border-radius: 50%; " :src="voteVipImg"
 						mode=""></image>
 					<text>加入IHG会员</text>
 				</view>
@@ -176,6 +179,9 @@
 		components:{Poster},
 		data() {
 			return {
+				//vip图标
+				indexVipImg:'',
+				voteVipImg:'',
 				//活动加入vip跳转
 				jump_type_vip_Activity: '',
 				jump_config_vip_Activity: {},
@@ -255,6 +261,8 @@
 			this.getDetail(op.id)
 			this.admin = this.$store.getters.userInfo
 			this.advise = this.$store.getters.allset.add_member
+			//vip图标
+			this.indexVipImg = this.advise.value.index_page
 			this.jump_type_vip = this.advise.value.index_jump_type
 			if( this.jump_type_vip == 1){
 				this.jump_config_vip = this.advise.value.index_h5_url
@@ -265,6 +273,7 @@
 				this.jump_config_vip =this.advise.value.index_other_path
 			}
 			//活动投票跳转vip
+			this.voteVipImg =  this.advise.value.vote_activity
 			this.jump_type_vip_Activity =  this.advise.value.vote_activity_jump_type
 			if( this.jump_type_vip_Activity == 1){
 				this.jump_config_vip_Activity = this.advise.value.vote_activity_h5_url

+ 2 - 0
pages/login/login.vue

xqd
@@ -314,6 +314,8 @@
 		}
 
 		.logintype {
+			position: relative;
+			top: -8rpx;
 			text {
 				font-size: 28rpx;
 				font-family: PingFang-SC-Medium, PingFang-SC;

+ 12 - 3
pages/login/youyue.vue

xqd xqd xqd xqd xqd xqd
@@ -1,6 +1,9 @@
 <template>
 	<view class="youyue">
-		<view class="nav">
+		<view class="">
+			<u-parse :content="memberInfo"></u-parse>
+		</view>
+		<!-- <view class="nav">
 			<image src="http://t9.9026.com/imgs/logo@2x.png"></image>
 		</view>
 		<view class="title">
@@ -35,7 +38,8 @@
 
 		<view class="item"><text class="itemtitle">畅享网络</text></view>
 
-		<view class="itemLast">我们所有酒店均提供免费WIFI,让您始终顺畅连通</view>
+		<view class="itemLast">我们所有酒店均提供免费WIFI,让您始终顺畅连通</view> -->
+		
 
 		<view class="btn" @click="goOther">
 			<text>立即加入会员</text>
@@ -99,6 +103,8 @@
 	export default {
 		data() {
 			return {
+				//页面信息
+				memberInfo:'',
 				//跳转h5,小程序,其他页面
 				jump_type: '',
 				jump_config: {},
@@ -121,6 +127,7 @@
 		onLoad() {
 			this.isLoginOff = this.$store.getters.userInfo
 			this.advise = this.$store.getters.allset.add_member
+			this.memberInfo = this.advise.value.member_info
 			if(this.advise){
 				this.jump_type = this.advise.value.member_info_jump_type
 				if( this.jump_type == 1){
@@ -340,7 +347,7 @@
 	.youyue {
 		height: 100%;
 		background: $bgColor;
-		padding: 192rpx 30rpx 140rpx 30rpx;
+		padding: 0rpx 30rpx 140rpx 30rpx;
 		position: relative;
 	}
 
@@ -470,6 +477,8 @@
 		}
 
 		.logintype {
+			position: relative;
+			top: -8rpx;
 			text {
 				font-size: 28rpx;
 				font-family: PingFang-SC-Medium, PingFang-SC;

+ 5 - 1
pages/map/hotel-book/index.vue

xqd
@@ -38,7 +38,11 @@
 					<text class="introduce-top-rule2"></text>
 				</view>
 				<view class="introduce-btn-text introduce-btn">
-					<view v-html="hotelDetail.details"></view>
+					<view>
+						<u-parse :content="hotelDetail.details"></u-parse>
+					</view>
+					
+					
 				</view>
 			</view>
 

+ 9 - 4
pages/map/map.vue

xqd xqd xqd
@@ -29,8 +29,10 @@
 							mode="">
 						</image>
 					</view>
-				</view>
-				<image @click="goJoin"  style=" flex: none; width: 56rpx;height: 50rpx;" src="/static/icon/vip.png" mode=""></image>
+				</view>
+				
+				<image @click="goJoin"  style=" flex: none; width: 52rpx;height: 52rpx;border-radius: 50%;" :src="indexVipImg" mode=""></image>
+				
 			</view>
 			<view class="search-detail search-detail-input"    style="z-index:9" v-if="search.openId==-2">
 				<u-input placeholderStyle='color:#999' placeholder="输入酒店/城市名称搜索酒店" border='none' :value="search.text" @input="syncSearchInput">
@@ -197,7 +199,9 @@
 			dialogPanel
 		},
 		data() {
-			return {
+			return {
+				//vip图标
+				indexVipImg:'',
 				//跳转h5,小程序,其他页面
 				jump_type: '',
 				jump_config: {},
@@ -279,7 +283,8 @@
 			this.getHotelCategory()
 			
 			//vip跳转
-			this.advise = this.$store.getters.allset.add_member
+			this.advise = this.$store.getters.allset.add_member
+			this.indexVipImg =  this.advise.value.map
 			this.jump_type = this.advise.value.map_jump_type
 			if (this.jump_type == 1) {
 				this.jump_config = this.advise.value.map_h5_url

+ 49 - 12
pages/msg/msg.vue

xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -2,8 +2,8 @@
 
 	<view class="msg">
 		<MyNav title="消息" bgColor="" :backIcon="false"></MyNav>
-		<!-- <!自定义导航栏
-		 <u-navbar title='消息' fixed safeAreaInsetTop :placeholder='true' :bgColor="bgColor" >
+		<!-- 自定义导航栏 -->
+		<!-- <u-navbar title='消息' fixed safeAreaInsetTop :placeholder='true' :bgColor="bgColor" >
 		 </u-navbar> -->
 		<!-- 搜索框 -->
 		<view class="search">
@@ -15,6 +15,8 @@
 			</u-input>
 		</view>
 		
+		<view style="width: 100%;height: 124rpx;"></view>
+		
 		<view class="msg-null" v-if="messageList.length == 0">
 			<image src="https://t9.9026.com/imgs/dataNull.png" style="width: 394rpx;height: 396rpx;" mode=""></image>
 			<view class="msg-null-text">
@@ -45,12 +47,12 @@
 		</view>
 
 		<!-- 触底 -->
-		<view class="home-bottom"  v-if="messageList.length > 0">
+		<view class="home-bottom"   style="padding-bottom: 20rpx;" v-if="messageList.length > 0">
 			<uni-load-more :status="status" color="#CCCCCC" :content-text="contentText" />
 		</view>
 
 		<!-- 底部导航栏 -->
-		<view style="height: 140rpx; width: 100%;"></view>
+		<view style="height: 140rpx; width: 100%; background-color: #f9f9f9; "></view>
 		<tab-bar checked="msg"></tab-bar>
 
 	</view>
@@ -82,14 +84,21 @@
 						backgroundColor: '#dd524d'
 					}
 				}],
-				//消息列表
-				messageList: '',
-				status: 'noMore',
+				
 				contentText: {
 					contentdown: '查看更多',
 					contentrefresh: '加载中',
 					contentnomore: '——  已经到底啦  ——'
 				},
+				//消息列表
+				messageList: [],
+				// 分页
+				page: 1,
+				pagesize: 15,
+				totalElements: '',
+				allListItem: '',
+				// 组件uni-load-more
+				status: 'noMore',
 			};
 		},
 		
@@ -98,8 +107,34 @@
 			await this.isLogin()
 			
 		},
+		
+		// 触底加载
+		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.my.messageList({ //请求更多数据列表
+					page: this.page,
+				}).then(res => {
+					let ret = [...this.messageList, ...res.data.data]
+					this.messageList = ret
+					console.log(ret)
+				})
+			} else {
+				this.allListItem = true;
+				console.log('已加载全部数据')
+				this.status = "noMore"
+			}
+		},
+		
 		methods: {
-			
 			isLogin(){
 				//获取消息列表
 				if(this.admin != undefined ){
@@ -109,13 +144,11 @@
 				}
 			},
 			
-			
 			//打开或关闭是触发
 			change(){
 				this.isOpenMsg = !this.isOpenMsg
 			},
 			
-			
 			//删除消息
 			deleteImg(id){
 				this.$api.my.delMessage({
@@ -183,6 +216,8 @@
 					if(res.code==0){
 						uni.hideLoading()
 						this.messageList = res.data.data
+						this.totalElements = res.data.total
+						this.pagesize = res.data.per_page
 					}
 				})
 			},
@@ -192,6 +227,8 @@
 					page: 0
 				}).then(res => {
 					this.messageList = res.data.data
+					this.totalElements = res.data.total
+					this.pagesize = res.data.per_page
 					console.log(this.messageList, '------>this.messageList');
 				})
 			},
@@ -218,7 +255,6 @@
 
 	.home-bottom {
 		background-color: #f9f9f9;
-		padding-top: 120rpx;
 	}
 	
 	.msg-null{
@@ -236,7 +272,8 @@
 
 	// 搜索
 	.search {
-		// position: fixed;
+		position: fixed;
+		z-index: 99;
 		// top: 0;
 		// width: 100%;
 		padding: 0 30rpx;

+ 60 - 5
pages/my/Kudos/Kudos.vue

xqd xqd xqd xqd xqd xqd xqd
@@ -9,7 +9,7 @@
 			</view>
 		</view>
 		
-		<view class="List" v-if="List.length > 0">
+		<view class="List" style="background-color: #f9f9f9a;" v-if="List.length > 0">
 			<view class="ListItem" v-for="(item,index) in List" :key="index" @click="goVoteDetail(item.id)">
 				<image :src="item.cover_img" style="width: 640rpx;height:420rpx;border-radius: 12rpx;"></image>
 				<view class="kudosicon">
@@ -33,7 +33,12 @@
 			</view>
 		</view>
 		<!-- 已经到底啦 -->
-		<uni-load-more v-if="List.length > 0" :status="status" color="#CCCCCC" :content-text="contentText"/>
+		<!-- 触底 -->
+		<view class="home-bottom"  style="padding-bottom: 60rpx;" v-if="List.length > 0">
+			<uni-load-more  :status="status" color="#CCCCCC" :content-text="contentText"/>
+		</view>
+		
+		
 	</view>
 </template>
 
@@ -41,8 +46,6 @@
 	export default{
 		data(){
 			return{
-				//组件uni-load-more
-				status: 'noMore',
 				contentText: {
 					contentdown: '查看更多',
 					contentrefresh: '加载中',
@@ -50,11 +53,51 @@
 				},
 				// 点赞列表
 				List:[],
+				// 分页
+				page: 1,
+				pagesize: 15,
+				totalElements: '',
+				allListItem: '',
+				// 组件uni-load-more
+				status: 'noMore',
 			}
 		},
 		onLoad() {
 			this.getList()
 		},
+		
+		onUnload() {
+			uni.$emit('refreshActivityList')
+		},
+		
+		// 触底加载
+		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.active.getActiveList({ //请求更多数据列表
+					page: this.page,
+					is_my_like:1
+				}).then(res => {
+					let ret = [...this.List, ...res.data.data]
+					this.List = ret
+					console.log(ret)
+				})
+			} else {
+				this.allListItem = true;
+				console.log('已加载全部数据')
+				this.status = "noMore"
+			}
+		},
+		
+		
 		methods:{
 			// 获取点赞列表
 			getList(){
@@ -65,6 +108,8 @@
 					console.log(res,"点赞列表")
 					if(res.code==0){
 						this.List=res.data.data
+						this.totalElements = res.data.total
+						this.pagesize = res.data.per_page
 					}else{
 						uni.showToast({
 							title:res.msg,
@@ -88,7 +133,13 @@
 					if(res.code==0){
 						if(beforeLike==1){
 							this.List[index].is_like=0
-							this.getList()
+							uni.showToast({
+								icon: 'none',
+								title: '取消点赞'
+							})
+							setTimeout(()=>{
+								this.getList()
+							},500)
 						}else{
 							this.List[index].is_like=1
 						}
@@ -113,6 +164,10 @@
 		height: 100%;
 		background: $pageColor;
 	}
+	.home-bottom {
+		// background-color: #f9f9f9;
+		padding-top: 120rpx;
+	}
 	
 	
 	.msg-null{

+ 40 - 3
pages/my/integral/integral.vue

xqd xqd xqd xqd xqd
@@ -71,8 +71,6 @@
 			return{
 				// 用户积分
 				userIntegral:0,
-				// 组件uni-load-more	
-				status: 'noMore',
 				contentText: {
 					contentdown: '查看更多',
 					contentrefresh: '加载中',
@@ -81,6 +79,13 @@
 				// 积分产品列表
 				integralList:[],	
 				arr:[],
+				// 分页
+				page: 1,
+				pagesize: 15,
+				totalElements: '',
+				allListItem: '',
+				// 组件uni-load-more
+				status: 'noMore',
 			}
 		},
 		onLoad() {
@@ -90,6 +95,37 @@
 				this.getInfo()
 			})
 		},
+		onUnload() {
+			uni.$emit('refreshOrderNum')
+		},
+		
+		// 触底加载
+		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.product.getProducts({ //请求更多数据列表
+					page: this.page,
+					type:2,
+				}).then(res => {
+					let ret = [...this.integralList, ...res.data.data]
+					this.integralList = ret
+					console.log(ret)
+				})
+			} else {
+				this.allListItem = true;
+				console.log('已加载全部数据')
+				this.status = "noMore"
+			}
+		},
+		
 		methods:{	
 			//用户信息
 			getInfo(){
@@ -99,7 +135,6 @@
 				})
 			},
 			
-			
 			// 获取积分产品列表
 			getProductList(){
 				this.$api.product.getProducts({
@@ -109,6 +144,8 @@
 					console.log(res,"积分产品")
 					if(res.code==0){
 						this.integralList=res.data.data
+						this.totalElements = res.data.total
+						this.pagesize = res.data.per_page
 						this.shortLong()
 					}
 				})

+ 0 - 754
pages/my/integral/integralOrder - 副本.vue

xqd
@@ -1,754 +0,0 @@
-<template>
-	<view class="exchangePrize">
-		<!-- 表单 -->
-		<view class="form">
-			<view class="">
-				<uni-forms :modelValue="formData">
-					<uni-forms-item name="type" v-if="is_virtual == 0 ">
-						<view class="selectType" @click="openSelect">
-							<view class="uni-input">
-								<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>
-							<image src="/static/icon/right.png"
-								style="width: 14rpx;height: 24rpx;position: absolute;top:31rpx;right: 30rpx;">
-							</image>
-						</view>
-					</uni-forms-item>
-					<uni-forms-item name="name" v-if="formData.type!=''||isVerification==true">
-						<uni-easyinput type="text" v-model="Data.receiver" placeholder="填写联系人" />
-					</uni-forms-item>
-					<uni-forms-item name="phone" v-if="formData.type!=''||isVerification==true">
-						<uni-easyinput type="number" v-model="Data.phone" placeholder="填写联系电话" maxlength=11 />
-					</uni-forms-item>
-					<uni-forms-item name="region" v-if="formData.type=='快递配送'">
-
-						<pickerAddress @change="change">
-							<!-- <uni-easyinput type="text" v-model="formData.region" placeholder="所在地区" /> -->
-							<view class="selectType">
-								<view class="uni-input">
-									<text v-if="formData.region==''||formData.region==null"
-										style="color: #999999 ; font-size: 30rpx; ">所在地区</text>
-									<text style="font-size: 30rpx;"
-										v-if="formData.region!=''">{{formData.region}}</text>
-								</view>
-								<image src="/static/icon/right.png"
-									style="width: 14rpx;height: 24rpx;position: absolute;top:31rpx;right: 30rpx;">
-								</image>
-							</view>
-
-						</pickerAddress>
-					</uni-forms-item>
-					<uni-forms-item name="region" v-if="formData.type=='快递配送'">
-						<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">
-							<view class="uni-input">
-								<text v-if="formData.shop==''||formData.shop==null"
-									style="color: #999999 ; font-size: 30rpx; ">请选择门店</text>
-								<text style="font-size: 30rpx;" v-if="formData.shop!=''">{{formData.shop}}</text>
-								<text class="distance" v-if="formData.shop!=''">{{formData.distanceToMe}}km</text>
-							</view>
-							<image src="/static/icon/right.png"
-								style="width: 14rpx;height: 24rpx;position: absolute;top:31rpx;right: 30rpx;">
-							</image>
-						</view>
-					</uni-forms-item>
-				</uni-forms>
-			</view>
-		</view>
-		<!-- 产品信息 -->
-		<view class="msg">
-			<view class="title">
-				<text>产品信息</text>
-			</view>
-			<view class="shopCard">
-				<image :src="productDetail.cover_img">
-				</image>
-				<view style="margin-left: 24rpx;">
-					<text class="name">{{productDetail.name}}</text>
-					<text class="tag" v-if="attrArry[0]">{{attrArry[0].attr_group_name == '包装'?attrArry[1].attr_group_name.slice(0,2)+'装':'' }} {{integral}}积分</text>
-				</view>
-			</view>
-			<view class="shopNumber">
-				<text>件数</text>
-				<text>1件</text>
-			</view>
-			<view class="shopNumber">
-				<text>积分</text>
-				<text>{{integral}}积分</text>
-			</view>
-			<view style="width: 694rpx;height: 4rpx;border: 2rpx dashed #F2F2F2;margin-top: 38rpx;"></view>
-			<view class="shopNumber" style="margin-top: 38rpx;">
-				<text>合计</text>
-				<text>{{integral}}积分</text>
-			</view>
-		</view>
-		<!-- 兑换按钮 -->
-		<view class="bottombtn" @click="goExchange">
-			<view class="btnitem">
-				<text>确认兑换</text>
-			</view>
-		</view>
-		<!-- 配送方式-->
-		<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;">
-						<text>取消</text>
-					</view>
-					<view>
-						<text style="font-weight: bold; font-size: 32rpx; color: #080F18; ">配送方式</text>
-					</view>
-					<view @click="sureBtn" style="width: 68rpx;"><text
-							style="font-size: 32rpx; color: #FF6200;line-height: 34rpx">确定</text></view>
-				</view>
-				<view class="chooselag">
-					<view @click="companyed(item.name,index)" class="language" v-for="(item,index) in typeSelect "
-						:key="index" :class="[activeIndex === index?'sgActive': ''] ">
-						<text>{{item.name}}</text>
-					</view>
-				</view>
-			</view>
-		</uni-popup>
-		<!-- 门店选择-->
-		<uni-popup ref="shopSelected" type="bottom" mask-background-color=" rgba(0,0,0,0.7);">
-			<view class="pop">
-				<view class="popuptitle">
-					<view @click="cancelShopBtn" style="width: 68rpx;color: #999;font-size: 32rpx;">
-						<text>取消</text>
-					</view>
-					<view>
-						<text style="font-weight: bold; font-size: 32rpx; color: #080F18; ">配送方式</text>
-					</view>
-					<view @click="sureShopBtn" style="width: 68rpx;"><text
-							style="font-size: 32rpx; color: #FF6200;line-height: 34rpx">确定</text></view>
-				</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': ''] ">
-						<text>{{item.name}}</text>
-				</view>
-			</view>
-	</view>
-	</uni-popup>
-
-
-	</view>
-</template>
-
-<script>
-	import pickerAddress from '@/uni_modules/hu-pickerAddress/hu-pickerAddress.vue'
-	export default {
-		components: {
-			pickerAddress
-		},
-		data() {
-			return {
-				//产品规格数组
-				attrArry:[],
-				//产品规格
-				attrName:'',
-				//积分
-				integral: '',
-				//选中激活样式
-				activeIndex: '',
-				activeIndex2: '',
-				//经纬度
-				latitude: '',
-				longitude: '',
-				//实物奖品0,虚拟奖品1
-				is_virtual: '',
-				// activeIndex: null,
-				// 是否核销
-				isVerification: false,
-				// 产品信息
-				productDetail: '',
-				// 表单数据
-				formData: {
-					// 表单数据
-					type: '',
-					region: '',
-					shop: '',
-					distanceToMe: ''
-				},
-				Data: {
-					// 快递类型(1.快递发货 2.到店自提也是线下核销)
-					express_type: '',
-					// 收货人
-					receiver: "",
-					// 联系电话
-					phone: '',
-					// 地址ID,最小行政单位地区ID,express_type=1时必传
-					area_id: '',
-					// 详细地址,express_type=1时必传
-					address: '',
-					//门店ID,express_type=2时必传
-					hotel_id: 0,
-					// 产品ID
-					product_id: '',
-					// 产品规格ID
-					attr: '',
-				},
-				// 配送方式
-				typeSelect: [{
-					name: '快递配送',
-				}, {
-					name: '到店自提',
-				}],
-				// 是否显示配送方式
-				istype: true,
-				// 选择门店
-				hotelList: []
-			}
-		},
-		onLoad(op) {
-			console.log(op, "产品id")
-			this.Data.product_id = op.product_id
-			this.Data.attr = op.attr
-			this.integral = op.integral
-			this.attrName= op.attrName
-			this.attrArry= this.attrName.split("-").map(item=>{
-				return {
-					attr_group_name: item
-				}
-			})
-			console.log(this.attrArry[1].attr_group_name.split(','),1111111111111)
-			this.getProductDetail(op.product_id)
-			this.init()
-		},
-		methods: {
-			//初始化
-			async init() {
-				await this.goLocation();
-				await this.getHotel();
-			},
-			
-			
-			space(lat1, lng1, lat2, lng2) {
-				var radLat1 = lat1 * Math.PI / 180.0;
-				var radLat2 = lat2 * Math.PI / 180.0;
-				var a = radLat1 - radLat2;
-				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 = Math.round(s * 10000) / 10000;
-				return s // 单位千米
-			},
-			//门店列表
-			getHotel(id) {
-				this.$api.hotel.getHotelList({
-					page: 1,
-					type: 2,
-					latitude: this.latitude,
-					longitude: this.longitude,
-					product_id: id
-				}).then(res => {
-					this.hotelList = res.data.data
-					this.hotelList.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
-					this.Data.hotel_id = this.hotelList[0].id
-
-
-				})
-			},
-			//获取定位
-			goLocation() {
-				let _this = this
-				uni.getLocation({
-					type: "gcj02", //返回可以用于wx.openLocation的经纬度
-					success: function(res) {
-						_this.latitude = res.latitude
-						_this.longitude = res.longitude
-					},
-					fail: function(res) {
-						console.log(res)
-					}
-				})
-			},
-			// 获取产品信息
-			getProductDetail(id) {
-				this.$loading()
-				this.$api.product.getProductDetail({
-					product_id: id
-				}).then(res => {
-					console.log(res, "产品信息")
-					this.$hideLoading()
-					if (res.code == 0) {
-						this.productDetail = res.data
-						this.is_virtual = res.data.is_virtual
-						if (this.is_virtual == 1) {
-							this.isVerification = true
-							this.Data.express_type = 2
-							this.goLocation()
-							setTimeout(() => {
-								this.getHotel(id)
-							}, 1000)
-						}
-					} else {
-						uni.showToast({
-							title: res.msg,
-							icon: 'none'
-						})
-					}
-				})
-			},
-
-			//订单兑换
-			goExchange() {
-				if (this.formData.type == '' && this.is_virtual == 0) {
-					uni.showToast({
-						icon: 'none',
-						title: '请选择配送方式'
-					})
-					return
-				}
-				if (this.Data.receiver == '') {
-					uni.showToast({
-						icon: 'none',
-						title: '请填写联系人'
-					})
-					return
-				}
-				if (this.Data.phone == '') {
-					uni.showToast({
-						icon: 'none',
-						title: '请填写联系电话'
-					})
-					return
-				}
-				if (this.formData.region == '' && this.Data.express_type == 1) {
-					uni.showToast({
-						icon: 'none',
-						title: '请填写所在地区'
-					})
-					return
-				}
-				if (this.Data.address == '' && this.Data.express_type == 1) {
-					uni.showToast({
-						icon: 'none',
-						title: '请填写详细地址'
-					})
-					return
-				}
-				if (this.Data.hotel_id == '' && this.Data.express_type == 2) {
-					uni.showToast({
-						icon: 'none',
-						title: '请选择门店'
-					})
-					return
-				}
-				if (this.is_virtual == 0) {
-					let _this = this
-					uni.showModal({
-						title: '提示',
-						content: '确认使用积分兑换',
-						success: function(res) {
-							if (res.confirm) {
-								if (_this.Data.express_type == 1) {
-									_this.$api.product.integralExchange({
-										..._this.Data
-									}).then(res => {
-										if (res.code == 0) {
-											uni.navigateTo({
-												url: `/pages/my/prize/exchangeDetail?productType=1&integral=${_this.integral}`
-											})
-										} else {
-											uni.showToast({
-												icon: 'none',
-												title: res.msg
-											})
-										}
-									})
-								} else {
-									let obj = {}
-									obj.express_type = _this.Data.express_type
-									obj.product_id = _this.Data.product_id
-									obj.receiver = _this.Data.receiver
-									obj.phone = _this.Data.phone
-									obj.hotel_id = _this.Data.hotel_id
-									obj.attr = _this.Data.attr
-									_this.$api.product.integralExchange({
-										...obj
-									}).then(res => {
-										if (res.code == 0) {
-											uni.navigateTo({
-												url: `/pages/my/prize/exchangeDetail?productType=1&integral=${_this.integral}`
-											})
-										} else {
-											uni.showToast({
-												icon: 'none',
-												title: res.msg
-											})
-										}
-									})
-								}
-							} else if (res.cancel) {
-								console.log('用户点击取消');
-							}
-						}
-					});
-				} else {
-					let _this = this
-					uni.showModal({
-						title: '提示',
-						content: '确认使用积分兑换',
-						success: function(res) {
-							if (res.confirm) {
-								let obj = {}
-								obj.express_type = _this.Data.express_type
-								obj.product_id = _this.Data.product_id
-								obj.receiver = _this.Data.receiver
-								obj.phone = _this.Data.phone
-								obj.hotel_id = _this.Data.hotel_id
-								obj.attr = _this.Data.attr
-								_this.$api.product.integralExchange({
-									...obj
-								}).then(res => {
-									if (res.code == 0) {
-										uni.navigateTo({
-											url: `/pages/my/prize/exchangeDetail?productType=1&integral=${_this.integral}`
-										})
-									} else {
-										uni.showToast({
-											icon: 'none',
-											title: res.msg
-										})
-									}
-								})
-							} else if (res.cancel) {
-								console.log('用户点击取消');
-							}
-						}
-					});
-				}
-			},
-
-			change(ret) {
-				this.formData.region = ret.data.join('-')
-				this.Data.area_id = ret.code[2]
-			},
-			//打开门店弹框
-			openShop() {
-				this.$refs.shopSelected.open('bottom')
-			},
-			companyedShop(i, id, distance, index) {
-				this.typestatus2 = i
-				this.distanceToMe1 = distance
-				this.activeIndex2 = index
-				this.Data.hotel_id = id
-			},
-			//确定按钮
-			sureShopBtn() {
-				if (this.typestatus2 == undefined) {
-					uni.showToast({
-						icon: "none",
-						title: '请选择门店'
-					})
-				} else {
-					this.formData.shop = this.typestatus2
-					this.formData.distanceToMe = this.distanceToMe1
-					this.$refs.shopSelected.close()
-				}
-			},
-			//取消按钮
-			cancelShopBtn() {
-				this.$refs.shopSelected.close()
-			},
-
-			// 打开配送弹框
-			openSelect() {
-				this.$refs.Recipient.open('bottom')
-			},
-			//选择配送方式
-			companyed(i, index) {
-				this.typestatus1 = i
-				this.activeIndex = index
-				if (index == 0) {
-					this.Data.express_type = 1
-				} else if (index == 1) {
-					this.Data.express_type = 2
-					this.goLocation()
-					setTimeout(() => {
-						this.getHotel(this.Data.product_id)
-					}, 1000)
-				}
-			},
-			//确定按钮
-			sureBtn() {
-				if (this.typestatus1 == undefined) {
-					uni.showToast({
-						icon: "none",
-						title: '请选择配送方式'
-					})
-				} else {
-					this.formData.type = this.typestatus1
-					this.$refs.Recipient.close()
-				}
-			},
-			//取消按钮
-			cancelBtn() {
-				this.$refs.Recipient.close()
-			},
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	$pageColor:#F9F9F9;
-	$bgColor:#FFFFFF;
-
-	@mixin flexlayout {
-		display: flex;
-		align-items: center;
-		justify-content: center;
-	}
-
-	.exchangePrize {
-		height: 100%;
-		// background: #f9f9f9;
-	}
-
-	.distance {
-		position: absolute;
-		right: 60rpx;
-		top: 23rpx;
-	}
-
-	.uni-input-area {
-		width: 100%;
-		height: 98rpx;
-		padding: 34rpx 20rpx;
-		background: #FFFFFF;
-		border-radius: 8rpx;
-		border: 2rpx solid #EAEAEA;
-		font-size: 30rpx;
-		color: #000;
-		line-height: 30rpx;
-	}
-
-	//底部弹框样式
-	.pop {
-		width: 100%;
-		height: 616rpx;
-		background: #FFFFFF;
-		border-radius: 16rpx 16rpx 0 0;
-		overflow: scroll;
-
-		.popuptitle {
-			position: fixed;
-			top: 0;
-			display: flex;
-			width: 100%;
-			padding: 0 30rpx;
-			height: 122rpx;
-			background: #fff;
-			display: flex;
-			align-items: center;
-			justify-content: space-between;
-
-			image {
-				display: inline-block;
-				width: 33rpx;
-				height: 33rpx;
-				border-radius: 1rpx;
-			}
-		}
-
-		.chooselag {
-
-			flex-direction: column;
-			justify-content: center;
-			align-items: center;
-			background: #FFFFFF;
-			padding: 0 30rpx;
-			overflow-y: scroll;
-			margin-top: 122rpx;
-
-			.language {
-				width: 100%;
-				font-size: 32rpx;
-				font-weight: 400;
-				color: #777777;
-				border-bottom: 1rpx #E2E4EA solid;
-				display: flex;
-				align-items: center;
-				justify-content: center;
-				padding-top: 40rpx;
-				padding-bottom: 40rpx;
-			}
-
-			.sgActive {
-				color: #FF6200 !important;
-				font-weight: bold !important;
-			}
-		}
-	}
-
-
-
-	.text-area {
-		width: 100%;
-		height: 130rpx;
-		padding: 34rpx 20rpx;
-		background: #FFFFFF;
-		border-radius: 8rpx;
-		border: 2rpx solid #EAEAEA;
-		font-size: 30rpx;
-		color: #000;
-		line-height: 30rpx;
-	}
-
-
-
-	::v-deep .uni-forms-item {
-		// height: 98rpx;
-		margin-bottom: 0;
-		margin-top: 24rpx;
-		font-size: 30rpx !important;
-
-		&:first-child {
-			margin-top: 0;
-		}
-	}
-
-	::v-deep .is-input-border {
-		background-color: #ffffff !important;
-		border: 2rpx solid #EAEAEA !important;
-		height: 98rpx;
-
-	}
-
-	::v-deep .uni-icons {
-		color: #c0c4cc !important;
-	}
-
-	::v-deep .uni-easyinput__placeholder-class {
-		font-size: 30rpx !important;
-		color: #999 !important;
-	}
-
-	::v-deep .uni-easyinput__content-input {
-		font-size: 30rpx !important;
-		color: #000 !important;
-	}
-
-
-	.form {
-		background: $pageColor;
-		width: 750rpx;
-		padding: 24rpx 30rpx;
-		box-sizing: border-box;
-
-		.selectType {
-			width: 690rpx;
-			height: 98rpx;
-			background: #FFFFFF;
-			border-radius: 8rpx;
-			border: 2rpx solid #EAEAEA;
-			display: flex;
-			align-items: center;
-			padding-left: 20rpx;
-			box-sizing: border-box;
-			position: relative;
-		}
-	}
-
-	.msg {
-		width: 750rpx;
-		height: 700rpx;
-		background: $bgColor;
-		border-radius: 12rpx 12rpx 0px 0px;
-		padding: 32rpx 30rpx;
-
-		.title {
-			margin-bottom: 24rpx;
-
-			text {
-				font-size: 32rpx;
-				font-family: PingFang-SC-Bold, PingFang-SC;
-				font-weight: bold;
-				color: #080F18;
-			}
-		}
-
-		.shopCard {
-			margin-top: 28rpx;
-			width: 694rpx;
-			height: 164rpx;
-			background: #F4F5F6;
-			border-radius: 10rpx;
-			display: flex;
-			align-items: center;
-
-			image {
-				width: 132rpx;
-				height: 132rpx;
-				margin-left: 16rpx;
-				display: inline-block;
-				border-radius: 10rpx;
-			}
-
-			.name {
-				font-size: 28rpx;
-				font-family: PingFangSC-Medium, PingFang SC;
-				font-weight: 500;
-				color: #080F18;
-				display: block;
-			}
-
-			.tag {
-				font-size: 24rpx;
-				font-family: PingFang-SC-Medium, PingFang-SC;
-				font-weight: 500;
-				color: #666666;
-			}
-		}
-
-		.shopNumber {
-			display: flex;
-			justify-content: space-between;
-			align-items: center;
-			margin-top: 25rpx;
-
-			text {
-				font-size: 26rpx;
-				font-family: PingFang-SC-Medium, PingFang-SC;
-				font-weight: 500;
-				color: #000000;
-			}
-		}
-	}
-
-	.bottombtn {
-		width: 690rpx;
-		height: 92rpx;
-		background: linear-gradient(270deg, #FF6200 0%, #FF9342 100%);
-		border-radius: 12rpx;
-		margin-left: 30rpx;
-		position: fixed;
-		bottom: 72rpx;
-
-		@include flexlayout() .btnitem {
-			@include flexlayout() text {
-				font-size: 30rpx;
-				font-family: PingFang-SC-Bold, PingFang-SC;
-				font-weight: bold;
-				color: $bgColor;
-			}
-		}
-	}
-</style>

+ 8 - 28
pages/my/integral/integralOrder.vue

xqd xqd xqd
@@ -70,7 +70,7 @@
 				</image>
 				<view style="margin-left: 24rpx;">
 					<text class="name">{{productDetail.name}}</text>
-					<text class="tag" v-if="attrArry[0]">{{attrArry[0].attr_group_name == '包装'?attrArry[1].attr_group_name.slice(0,2)+'装':'' }} {{integral}}积分</text>
+					<text class="tag" v-if="attrArry[0]"> {{integral}}积分</text>
 				</view>
 			</view>
 			<view class="shopNumber">
@@ -93,27 +93,6 @@
 				<text>确认兑换</text>
 			</view>
 		</view>
-		<!-- 配送方式-->
-	<!-- 	<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;">
-						<text>取消</text>
-					</view>
-					<view>
-						<text style="font-weight: bold; font-size: 32rpx; color: #080F18; ">配送方式</text>
-					</view>
-					<view @click="sureBtn" style="width: 68rpx;"><text
-							style="font-size: 32rpx; color: #FF6200;line-height: 34rpx">确定</text></view>
-				</view>
-				<view class="chooselag">
-					<view @click="companyed(item.name,index)" class="language" v-for="(item,index) in typeSelect "
-						:key="index" :class="[activeIndex === index?'sgActive': ''] ">
-						<text>{{item.name}}</text>
-					</view>
-				</view>
-			</view>
-		</uni-popup> -->
 		<!-- 门店选择-->
 		<uni-popup ref="shopSelected" type="bottom" mask-background-color=" rgba(0,0,0,0.7);">
 			<view class="pop">
@@ -214,12 +193,13 @@
 			this.Data.attr = op.attr
 			this.integral = op.integral
 			this.attrName= op.attrName
-			this.attrArry= this.attrName.split("-").map(item=>{
-				return {
-					attr_group_name: item
-				}
-			})
-			console.log(this.attrArry[1].attr_group_name.split(','),1111111111111)
+			// this.attrArry= this.attrName.split("-").map(item=>{
+			// 	return {
+			// 		attr_group_name: item
+			// 	}
+			// })
+			console.log(this.attrName,'--->this.attrName');
+			
 			await this.getProductDetail(op.product_id)
 			await this.init()
 		},

+ 71 - 3
pages/my/integral/integralRecord.vue

xqd xqd xqd xqd xqd xqd xqd
@@ -10,6 +10,10 @@
 					</view>
 				</view>
 		</view>
+		
+		<!-- 占位 -->
+		<view style="width: 100%; height: 112rpx; "></view>
+		
 		<view class="msg-null" v-if="incomeList.length == 0 && isActive == 0 ">
 			<image src="https://t9.9026.com/imgs/dataNull.png" style="width: 394rpx;height: 396rpx;" mode=""></image>
 			<view class="msg-null-text">
@@ -65,8 +69,6 @@
 				isActive: 0,
 				// list高度
 				ListHeight: 800,
-				// 组件uni-load-more
-				status: 'noMore',
 				contentText: {
 					contentdown: '查看更多',
 					contentrefresh: '加载中',
@@ -76,6 +78,13 @@
 				incomeList:[],
 				// 支出列表
 				spendingList:[],
+				// 分页
+				page: 1,
+				pagesize: 15,
+				totalElements: '',
+				allListItem: '',
+				// 组件uni-load-more
+				status: 'noMore',
 			}
 		},
 		onLoad() {
@@ -84,10 +93,62 @@
 			// 支出
 			this.getIntegralList(2)
 		},
+		
+		// 触底加载
+		onReachBottom() {
+			// 触底的时候请求数据,即为上拉加载更多
+			var allTotal = this.page * this.pagesize
+			console.log(allTotal, '----allTotal');
+			//this.page为加载次数,this.pagesize为每一次加载的数据条数
+			if(this.isActive + 1 == 1){
+				if (allTotal < this.totalElements) {
+					//this.totalElements为请求数据的总条数。只要现有条数小于总条数就就执行一下代码
+					this.allListItem = false;
+					this.page++;
+					//加载次数递加
+					this.status = "loading"
+					this.$api.integral.getIntegralLog({ //请求更多数据列表
+						page: this.page,
+						type:this.isActive + 1
+					}).then(res => {
+						let ret = [...this.incomeList, ...res.data.data]
+						this.incomeList = ret
+						console.log(ret)
+					})
+				} else {
+					this.allListItem = true;
+					console.log('已加载全部数据')
+					this.status = "noMore"
+				}
+			}else if(this.isActive + 1 == 2){
+				if (allTotal < this.totalElements) {
+					//this.totalElements为请求数据的总条数。只要现有条数小于总条数就就执行一下代码
+					this.allListItem = false;
+					this.page++;
+					//加载次数递加
+					this.status = "loading"
+					this.$api.integral.getIntegralLog({ //请求更多数据列表
+						page: this.page,
+						type:this.isActive + 1
+					}).then(res => {
+						let ret = [...this.spendingList, ...res.data.data]
+						this.spendingList = ret
+						console.log(ret)
+					})
+				} else {
+					this.allListItem = true;
+					console.log('已加载全部数据')
+					this.status = "noMore"
+				}
+			}
+		},
+		
 		methods:{
 			//菜单index切换
 			checked(index) {
 				this.isActive = index
+				this.page = 1
+				this.getIntegralList(this.isActive + 1)
 			},
 			// 获取积分日志
 			getIntegralList(type){
@@ -99,6 +160,8 @@
 						console.log(res,'收入积分日志')
 						if(res.code==0){
 							this.incomeList=res.data.data
+							this.totalElements = res.data.total
+							this.pagesize = res.data.per_page
 						}
 					})
 				} else if (type==2){
@@ -109,6 +172,8 @@
 						console.log(res,'支出积分日志')
 						if(res.code==0){
 							this.spendingList=res.data.data
+							this.totalElements = res.data.total
+							this.pagesize = res.data.per_page
 						}
 					})
 				}else{
@@ -151,8 +216,11 @@
 	
 	
 	.segmented{
+		position: fixed;
+		top: 0;
+		z-index: 99;
 		height: 112rpx;
-		width: 750rpx;
+		width: 100%;
 		background: $bgColor;
 		box-shadow: 0px 4rpx 8rpx 0px rgba(0,0,0,0.04);
 		border-radius: 0px 0px 16rpx 16rpx;

+ 4 - 1
pages/my/integral/integralRule.vue

xqd
@@ -1,6 +1,9 @@
 <template>
 	<view class="UserAgreement">
-		<view v-html="integralRule"></view>
+		<view>
+			<u-parse :content="integralRule"></u-parse>
+		</view>
+		
 	</view>
 </template>
 

+ 17 - 5
pages/my/my.vue

xqd xqd xqd xqd xqd
@@ -31,7 +31,7 @@
 			<view class="membership" @click="goJoin">
 				<view class="flex">
 					<view style="display: flex;align-items: center;">
-						<image style="width: 68rpx ;height: 62rpx;" src="../../static/icon/vip.png"></image>
+						<image style="width: 52rpx ;height: 52rpx;border-radius: 50%;" :src="indexVipImg"></image>
 						<text class="join">加入会员</text>
 					</view>
 
@@ -134,6 +134,9 @@
 		},
 		data() {
 			return {
+				
+				//vip图标
+				indexVipImg:'',
 				//待兑换
 				exchange: '',
 				//待发货
@@ -176,6 +179,9 @@
 			this.admin = this.$store.getters.userInfo
 			if (this.$store.getters.allset) {
 				this.advise = this.$store.getters.allset.add_member
+				//vip图标
+				this.indexVipImg = this.advise.value.me
+				console.log(this.indexVipImg,'------------>index');
 				this.jump_type = this.advise.value.me_jump_type
 				if (this.jump_type == 1) {
 					this.jump_config = this.advise.value.me_h5_url
@@ -514,6 +520,12 @@
 		width: 176rpx;
 		height: 176rpx;
 		border-radius: 50%;
+		border: 0;
+		background: transparent;
+		
+		&::after {
+			border: none;
+		}
 	}
 
 
@@ -685,16 +697,16 @@
 						position: absolute;
 						top: -30rpx;
 						right: -14rpx;
-						width: 46rpx;
-						height: 46rpx;
+						width: 40rpx;
+						height: 40rpx;
 						border-radius: 50%;
 						background-color: #ff6c0e;
-						font-size: 26rpx;
+						font-size: 24rpx;
 						color: #fff;
 						display: flex;
 						justify-content: center;
 						align-items: center;
-
+						
 
 					}
 				}

+ 6 - 7
pages/my/myorders/orderDetail.vue

xqd xqd xqd xqd xqd xqd
@@ -64,7 +64,7 @@
 						<image src="/static/icon/position.png"></image>
 						<text>收货地址</text>
 					</view>
-					<view class="deliverytext" v-if="goodsDet.express_type ==1">
+					<view class="deliverytext" style="margin-bottom: 24rpx;" v-if="goodsDet.express_type ==1">
 						<text>{{goodsDet.area_text}} {{goodsDet.address}} </text>
 					</view>
 
@@ -84,7 +84,7 @@
 						<image src="/static/icon/phone.png"></image>
 						<text>门店联系方式</text>
 					</view>
-					<view class="deliverytext" v-if="goodsDet.express_type ==2">
+					<view class="deliverytext"  style="margin-bottom: 24rpx;" v-if="goodsDet.express_type ==2">
 						<text>{{hotelDet.phone}}</text>
 					</view>
 				</view>
@@ -127,7 +127,7 @@
 				<view style="margin-left: 24rpx;">
 					<text class="name">{{goodsDet.product_name}}</text>
 					<!-- <text class="tag" v-if="source_type == 3">{{goodsDet.integral}}积分</text> -->
-					<text class="tag" v-if="source_type == 3">{{JSON.parse(goodsDet.attrs)[0].attr_group_name == '包装'?JSON.parse(goodsDet.attrs)[0].attr_name+'装' : '' }} {{goodsDet.integral}}积分</text>
+					<text class="tag" v-if="source_type == 3">{{goodsDet.attr_text}} {{goodsDet.integral}}积分</text>
 				</view>
 			</view>
 			<view class="shopNumber">
@@ -138,7 +138,7 @@
 				<text>积分</text>
 				<text>{{integral}}积分</text>
 			</view>
-			<view style="width: 694rpx;height: 4rpx;border: 2rpx solid #F2F2F2;margin-top: 38rpx;"></view>
+			<view style="width: 694rpx;height: 4rpx;border: 2rpx dashed #F2F2F2;margin-top: 38rpx;"></view>
 			<view class="shopNumber" v-if="source_type == 3">
 				<text>合计</text>
 				<text>{{integral}}积分</text>
@@ -277,11 +277,11 @@
 	}
 
 	.nav {
-		width: 750rpx;
+		width: 100%;
 		// height: 108rpx;
 		background: $bgColor;
 		border-radius: 0px 0px 16rpx 16rpx;
-		padding: 32rpx 0 0 28rpx;
+		padding: 32rpx 0 36rpx 28rpx;
 		box-sizing: border-box;
 
 		.orderStatus {
@@ -298,7 +298,6 @@
 		color: #333333;
 		font-size: 40rpx;
 		margin-top: 32rpx;
-		padding-bottom: 36rpx;
 	}
 
 

+ 6 - 10
pages/my/myorders/orders.vue

xqd xqd xqd xqd xqd xqd
@@ -56,10 +56,7 @@
 
 					<view style="margin-left: 24rpx;">
 						<text class="name">{{item.product_name}}</text>
-						<text class="tag" v-if="item.source_type == 3">{{JSON.parse(item.attrs)[0].attr_group_name == '包装'?JSON.parse(item.attrs)[0].attr_name+'装' : '' }} {{item.integral}}积分</text>
-						<!-- <text class="tag" v-if="item.source_type == 3" >礼盒装 2000积分</text> -->
-						
-						
+						<text class="tag" v-if="item.source_type == 3">{{item.attr_text}}  {{item.integral}}积分</text>						
 					</view>
 				</view>
 				<view class="points">
@@ -94,7 +91,7 @@
 			</view>
 		</view>
 		<!-- 已经到底啦 -->
-		<view class="home-bottom" v-if="orderList.length > 0 ">
+		<view style="margin-top: 88rpx;padding-bottom: 60rpx;" v-if="orderList.length > 0 ">
 			<uni-load-more :status="status" color="#CCCCCC" :content-text="contentText" />
 		</view>
 
@@ -165,7 +162,6 @@
 			uni.$emit('refreshOrderNum');
 		},
 		
-		
 		// 触底加载
 		onReachBottom() {
 			// 触底的时候请求数据,即为上拉加载更多
@@ -194,9 +190,6 @@
 			}
 		},
 		
-		
-		
-		
 		methods: {
 			
 			//确定收货
@@ -246,7 +239,7 @@
 					if (res.code == 0) {
 						this.orderList = res.data.data
 						this.totalElements = res.data.total
-						this.pagesize = res.data.per_page
+						this.pagesize = res.data.per_page		
 					}
 				})
 			},
@@ -320,6 +313,9 @@
 			// 关闭弹出层
 			closeVFcode() {
 				this.$refs.popup.close()
+				this.getMyOrder(this.isActive )
+				
+				
 			},
 			// 保存图片
 			handleDownImg() {

+ 5 - 3
pages/my/prize/exchangePrize.vue

xqd xqd
@@ -208,15 +208,17 @@
 				if (this.isPhy == 1) {
 					//实物奖品
 					await this.getPrizeList(0)
-					if(this.Data.product_id){
+					if(this.product_id){
 						this.init(this.Data.product_id)
+						console.log(1111);
 					}
 
 				} else {
 					//虚拟奖品
 					await this.getPrizeList(1)
-					if(this.Data.product_id){
+					if(this.product_id){
 						this.init(this.Data.product_id)
+						console.log(222);
 					}
 				}
 			}
@@ -478,7 +480,7 @@
 					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.init(this.product_id)
 					if (this.isPhy == 2) {
 						this.isVerification = true
 						this.Data.express_type = 2

+ 5 - 0
pages/my/prize/prize.vue

xqd
@@ -154,6 +154,11 @@
 				this.getPrizeList(1)
 			})
 		},
+		
+		onUnload() {
+			uni.$emit('refreshOrderNum')
+		},
+		
 		onReachBottom() {
 			// 触底的时候请求数据,即为上拉加载更多
 			var allTotal = this.page * this.pagesize

+ 3 - 1
pages/my/protocol/PrivacyPolicy.vue

xqd
@@ -1,6 +1,8 @@
 <template>
 	<view class="Privacy">
-		<view class="content" v-html="content"></view>
+		<view class="content">
+			<u-parse :content="content"></u-parse>
+		</view>
 	</view>
 </template>
 

+ 2 - 2
pages/my/protocol/UserAgreement.vue

xqd
@@ -1,8 +1,8 @@
 <template>
 	<view class="UserAgreement">
 		<!-- <view class="title"><text>用户协议</text></view> -->
-		<view class="content" v-html="content">
-			
+		<view class="content">
+			<u-parse :content="content"></u-parse>
 		</view>
 	</view>
 </template>

+ 10 - 3
pages/my/verification/verification.vue

xqd xqd xqd
@@ -53,7 +53,7 @@
 					<view style="margin-left: 24rpx;">
 						<text class="name">{{item.product_name}}</text>
 						<!-- <text class="tag" v-if="item.source_type == 3" >{{item.integral}}积分</text> -->
-						<text class="tag" v-if="item.source_type == 3">{{JSON.parse(item.attrs)[0].attr_group_name == '包装'?JSON.parse(item.attrs)[0].attr_name+'装' : '' }} {{item.integral}}积分</text>
+						<text class="tag" v-if="item.source_type == 3">{{item.attr_text}}   {{item.integral}}积分</text>
 					</view>
 				</view>
 				<view class="points" v-if="item.source_type == 3" >
@@ -67,7 +67,7 @@
 		</view>
 
 		<!-- 已经到底啦 -->
-		<view class="home-bottom"  v-if="orderList.length > 0 ">
+		<view style="margin-top: 88rpx;padding-bottom: 60rpx;"  v-if="orderList.length > 0 ">
 			<uni-load-more :status="status" color="#CCCCCC" :content-text="contentText"/>
 		</view>
 	</view>
@@ -196,16 +196,23 @@
 			// 扫码
 			scanCode(){
 				uni.scanCode({
+					scanType: ['qrCode'],
 					success: function (res) {
 						console.log(res,'res');
 						if(res.scanType == 'QR_CODE'){
-							uni.navigateTo({
+							uni.redirectTo({
 								url:'/pages/my/verification/orderVerification?order_no='+res.result
 							})
 						}
 						// console.log(res);
 						// console.log('条码类型:' + res.scanType);
 						// console.log('条码内容:' + res.result);
+					},
+					fail:function(res){
+						uni.showToast({
+							icon:'none',
+							title:'扫码识别失败'
+						})
 					}
 				});
 			}