Browse Source

积分商城

twt 2 years ago
parent
commit
e3cc8eaaf8
5 changed files with 466 additions and 137 deletions
  1. 7 1
      pages.json
  2. 105 18
      pages/integral/integral.vue
  3. 197 0
      pages/integral/integralConfirm.vue
  4. 156 117
      pages/integral/integralgoodsDetail.vue
  5. 1 1
      pages/user/user.vue

+ 7 - 1
pages.json

@@ -329,7 +329,7 @@
             "style" :                                                                                    
             {
                 "navigationBarTitleText": "积分商城",
-                "enablePullDownRefresh": false,
+                "enablePullDownRefresh": true,
 				"navigationBarBackgroundColor": "#38394E",
 				"navigationBarTextStyle": "white"
 				 // "navigationStyle": "custom"
@@ -342,6 +342,12 @@
 				"navigationBarTitleText": "商品详情",
 				 "enablePullDownRefresh": true
 			}
+		},
+		{
+			"path": "pages/integral/integralConfirm",
+			"style": {
+				"navigationBarTitleText": "订单确认"
+			}
 		}
     ],
 	"tabBar": {

+ 105 - 18
pages/integral/integral.vue

@@ -9,8 +9,8 @@
 				<view class="kyjf">
 					<view class="kyjfTitle">可用积分</view>
 					<view class="kyjfCont">
-						<view class="kyjfNum">79999</view>
-						<view class="kyjfDq">333积分即将过期</view>
+						<view class="kyjfNum">{{avaIntegral?avaIntegral:0}}</view>
+						<!-- <view class="kyjfDq">333积分即将过期</view> -->
 					</view>
 				</view>
 				
@@ -28,7 +28,7 @@
 			</view>
 		</view>
 		<!-- 热门兑换 -->
-		<view class="exchangeBox">
+		<view class="exchangeBox" v-if="hotlist.length>0">
 			<view class="exchangeTitleBox">
 				<view class="exchangeTitle">热门兑换</view>
 				<img src="../../static/timg/renhuo.png" alt="" class="rehuoimg">
@@ -36,10 +36,11 @@
 			<view class="exchangeCont">
 				<scroll-view scroll-x="true" >
 					<view class="exchange">
-						<view class="exchangeLine" v-for="(item,index) in 5" @click="goDetail()">
-							<img class="exchangeLineImg" src="http://dmsphoto.66km.com.cn/marketing/8C98CE06-BF97-4A8E-8639-70DF7CCBFC4B.jpg" alt="">
-						    <view class="exchangeName">德国马牌德国马牌国国国全新升全新升</view>
-							<view> <span class="jfspan1">759</span> <span class="jfspan2">积分</span></view>
+						<view class="exchangeLine" v-for="(item,index) in hotlist" @click="goDetail()">
+							<img class="exchangeLineImg" v-if="item.img" src="" alt="">
+						    <image v-else src="../../static/timg/noimg.png" mode="" class="exchangeLineImg"></image>
+							<view class="exchangeName">{{item.name}}</view>
+							<view> <span class="jfspan1">{{item.integral}}</span> <span class="jfspan2">积分</span></view>
 						</view>
 					</view>
 					
@@ -51,42 +52,127 @@
 			<scroll-view scroll-x="true" class="scroll-X" >
 				<view class="classificationBox">
 					<view  class="classification" v-for="(item,index) in categoryList" @click="topClick(index,item)">
-						<view class="classificationName" :class="{classificationNameActive:topIndex==index}">{{item.name}}</view>
+						<view class="classificationName" :class="{classificationNameActive:topIndex==index}">{{item.Name}}</view>
 						<view class="classificationHx" v-if="topIndex==index"></view>
 					</view>
 				</view>
 			</scroll-view>
 			<view class="goodsLineBOx">
-				<view class="exchangeLine2" v-for="(item,index) in 5" @click="goDetail()">
-					<img class="exchangeLineImg2" src="http://dmsphoto.66km.com.cn/marketing/8C98CE06-BF97-4A8E-8639-70DF7CCBFC4B.jpg" alt="">
-				    <view class="exchangeName2">德国马牌德国马牌国国国全新升全新升</view>
-					<view> <span class="jfspan1">759</span> <span class="jfspan2">积分</span></view>
+				<view class="exchangeLine2" v-for="(item,index) in list" @click="goDetail(item.ID)">
+					<img class="exchangeLineImg2" :src="item.url" alt="" v-if="item.url">
+					<image v-else src="../../static/timg/noimg.png" mode="" class="exchangeLineImg2"></image>
+				    <view class="exchangeName2">{{item.Name}}</view>
+					<view> <span class="jfspan1">{{item.Integral}}</span> <span class="jfspan2">积分</span></view>
 				</view>
 			</view>
+			
+			<nodata v-if="list.length==0"></nodata>
+			
 		</view>
 	</view>
 </template>
 
 <script>
+	import nodata from '../../components/nodata/nodata.vue'
 	export default {
+		components: {
+			nodata,
+		},
 		data() {
 			return {
-				categoryList:[{name:'全部'},{name:'分类名称一'},{name:'分类分类名称一分类名称一名称一'},
-				{name:'分类名称二'},{name:'分类名称7'}
-				],
+				page:1,
 				topIndex:0,
+				totalIntegral:'',
+				hotlist:'',
+				categoryList:'',
+				list:[],
+				categoryID:'',
+				avaIntegral:'',
 			}
 		},
+		onLoad(opt) {
+			this.totalIntegral=opt.totalIntegral;
+			this.getintegralInfo()
+			this.gethotExchange();
+			this.getcategoryList();
+			this.getintegralGoodsPage();
+		},
 		methods: {
+			getintegralInfo(){
+				
+				this.$http('openIntegralMall/integralInfo', {
+				}, 'GET').then(res => {
+					this.avaIntegral=res.data.avaIntegral
+					
+				})
+			},
+			gethotExchange(){
+				uni.showLoading({
+					title: '加载中'
+				})
+				this.$http('openIntegralMall/hotExchange', {
+				}, 'GET').then(res => {
+					uni.hideLoading();
+					this.hotlist=res.data;
+				})
+			},
+			getcategoryList(){
+				
+				this.$http('openIntegralMall/categoryList', {
+				}, 'GET').then(res => {
+					this.categoryList=res.data;
+					var obj={
+						Id:'',
+						Name:'全部'
+					}
+					this.categoryList.unshift(obj);
+					
+				})
+			},
+			getintegralGoodsPage(){
+				uni.showLoading({
+					title: '加载中'
+				})
+				this.$http('openIntegralMall/integralGoodsPage', {
+					categoryID:this.categoryID,
+					page:this.page,
+					limit:10
+				}, 'GET').then(res => {
+					uni.hideLoading();
+					var list=res.data.Items;
+					this.list=this.list.concat(list)
+				})
+			},
 			topClick(index,item){
 				this.topIndex=index;
-				
+				this.categoryID=item.ID;
+				if(item.ID==undefined){
+					this.categoryID=''
+				}
+				this.list=[];
+				this.page=1;
+				this.getintegralGoodsPage();
 			},
-			goDetail(){
+			goDetail(id){
 				uni.navigateTo({
-					url:'integralgoodsDetail'
+					url:'integralgoodsDetail?id='+id+'&avaIntegral='+this.avaIntegral
 				})
 			}
+		},
+		onReachBottom(){
+			this.page++;
+			this.getintegralGoodsPage();
+		},
+		onPullDownRefresh(){
+			this.list=[];
+			this.page=1;
+			this.getintegralInfo();
+			this.gethotExchange();
+			this.getcategoryList();
+			this.getintegralGoodsPage();
+			setTimeout(() => {
+					uni.stopPullDownRefresh(); // 关闭下拉刷新 
+			}, 2000);
 		}
 	}
 </script>
@@ -100,6 +186,7 @@
 	flex-wrap: wrap;
 	justify-content: space-between;
 	padding: 0 24rpx;
+	padding-bottom: env(safe-area-inset-bottom);
 }
 .exchangeLineImg2{
 	width: 341rpx;

+ 197 - 0
pages/integral/integralConfirm.vue

@@ -0,0 +1,197 @@
+<template>
+ <view class="box">
+	 <view class="topTis">
+		 <view class="tanhao">!</view>
+		 <view class="topTisTxt">提交申请后请到店兑换</view>
+	 </view>
+	 <view class="cont">
+		 <view class="contTitle">商品明细</view>
+		 <view class="goodsCont">
+			 <img :src="jfgoodsDetail.imgList[0].img" alt="" class="goodsImg" v-if="jfgoodsDetail.imgList.length>0">
+			  <image src="../../static/timg/noimg.png"  class="goodsImg" v-else></image>
+		     <view class="goodsRight">
+				 <view class="goodsName">{{jfgoodsDetail.name}}</view>
+				 <view class="goodsNumbox">
+					 <view class="Price">¥<span>{{jfgoodsDetail.salePrice}}</span> </view>
+					 <view class="goodsNum">x{{goodsnum}}</view>
+				 </view>
+			 </view>
+		 </view>
+	 </view>
+	 <view class="shopCont">
+		 <view class="shopLeft">服务门店</view>
+		 <view class="shopName">{{shopName}}</view>
+	 </view>
+	 <view class="buybtnBox">
+	 	<view class="ktyong"><view>合计 <span class="ktyong1">{{goodsnum*jfgoodsDetail.integral}}</span><span class="ktyong2">积分</span>   </view> 
+	 	   <view class="kyNum">可用积分:{{avaIntegral}}</view>
+	 	</view>
+	 	<view class="bottomBtn" @click="goBuy">提交订单</view>
+	 </view>
+ </view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				shopId:'',
+				shopName:'',
+				avaIntegral:'',
+				goodsnum:'',
+				jfgoodsDetail:'',
+			}
+		},
+		onLoad(opt) {
+			this.jfgoodsDetail=uni.getStorageSync("jfgoodsDetail");
+			this.shopName=opt.shopName;
+			this.shopId=opt.shopId;
+			this.avaIntegral=opt.avaIntegral;
+			this.goodsnum=opt.goodsnum;
+		},
+		methods: {
+			
+			goDetail(){
+				uni.navigateTo({
+					url:'integralgoodsDetail'
+				})
+			}
+		}
+	}
+</script>
+
+<style scoped>
+.box{
+	background: #F4F5F7;
+	min-height: 100vh;
+}
+ .tanhao{
+	 width: 30rpx;
+	 height: 30rpx;
+	 background: #F19D01;
+	 border-radius: 50%;
+	 text-align: center;
+	 line-height: 30rpx;
+	 color: #ffffff;
+	 font-size: 30rpx;
+ }
+.topTis{
+	padding: 20rpx 21rpx;
+	background: #FDF5E5;
+	display: flex;
+}
+.topTisTxt{
+	color: #F19D01;font-size: 26rpx;line-height: 30rpx;padding-left: 10rpx;
+}
+.cont{
+	width: 702rpx;
+	background: #FFFFFF;
+	border-radius: 10rpx;
+	margin-left: 24rpx;
+	margin-top: 20rpx;
+}
+.contTitle{
+	font-size: 30rpx;
+	font-family: PingFangSC-Medium, PingFang SC;
+	font-weight: 500;
+	color: #3C3C3C;
+	line-height: 42rpx;
+	padding: 26rpx 20rpx;
+	border-bottom: 1px solid #EEEEEE;
+}
+.goodsImg{
+	width: 120rpx;
+	height: 120rpx;
+}
+.goodsCont{
+	display: flex;
+	padding: 30rpx 20rpx;
+}
+.goodsRight{
+	width: 522rpx;
+	padding-left: 20rpx;
+	display: flex;
+	flex-direction: column;
+	justify-content: space-between;
+}
+.goodsName{
+	color: #3C3C3C;font-size: 26rpx;
+}
+.goodsNumbox{
+	display: flex;
+	justify-content: space-between;
+}
+.Price{
+	color: #3C3C3C;font-size: 22rpx;
+}
+.Price span{
+	font-weight: 500;
+	color: #3C3C3C;
+	font-size: 32rpx;
+}
+.goodsNum{
+	color: #999999;font-size: 24rpx;padding-top: 5rpx;
+}
+.buybtnBox{
+	width: 750rpx;
+	height: 120rpx;
+	background: #FFFFFF;
+	box-shadow: 0px -2px 10px 0px rgba(153,153,153,0.2000);
+	display: flex;
+	justify-content: space-between;
+	position: fixed;
+	left: 0;
+	bottom: 0;
+	padding-bottom: env(safe-area-inset-bottom);
+}
+.ktyong{
+		font-weight: 500;
+		color: #666666;
+		font-size: 24rpx;
+		padding-left: 30rpx;
+		padding-top: 18rpx;
+	}
    .ktyong1{
+		color: #FF0000;
+		font-size: 32rpx;
+	}
+	.ktyong2{
+		color: #FF0000;
+		font-size: 24rpx;
+	}
+	.kyNum{
+		color: #999999;
+		font-size: 24rpx;
+	}
+	.bottomBtn{
+		width: 204rpx;
+		height: 74rpx;
+		background: #D53533;
+		border-radius: 37rpx;
+		line-height: 74rpx;
+		text-align: center;
+		color: #FFFFFF;
+		font-size: 30rpx;
+		margin-top: 23rpx;
+		margin-left: 70rpx;
+		margin-right: 30rpx;
+	}
+.shopCont{
+	background: #FEFFFE;
+	border-radius: 10rpx;
+	width: 702rpx;
+	padding: 30rpx 0;
+	margin-top: 20rpx;
+	margin-left: 24rpx;
+	display: flex;
+	justify-content: space-between;
+}
+.shopLeft{
+	color: #666666;
+	font-size: 28rpx;
+	padding-left: 20rpx;
+}
+.shopName{
+	color: #333333;font-size: 28rpx;
+	padding-right: 20rpx;
+}
+</style>

+ 156 - 117
pages/integral/integralgoodsDetail.vue

@@ -2,10 +2,10 @@
 <view class="box">
 	<view class="spwBox">
 		<swiper class="swiper" circular  :autoplay="false" :indicator-dots="true" indicator-color="#CCCCCC" indicator-active-color="#D53533">
-			<swiper-item v-for="(item,index) in info.ImgList">
+			<swiper-item v-for="(item,index) in info.imgList">
 				<view class="swiper-item">
-					<img mode="aspectFit" :src="item.url" alt="" class="swiper-itemImg" v-if="item.bizType==1">
-					<video :src="item.url" v-if="item.bizType==2" show-fullscreen-btn controls style="width: 100%;height: 100%;"></video>
+					<img mode="aspectFit" :src="item.img" alt="" class="swiper-itemImg" v-if="item.imgType==1">
+					<video :src="item.url" v-if="item.imgType==2" show-fullscreen-btn controls style="width: 100%;height: 100%;"></video>
 				</view>
 			</swiper-item>
 			
@@ -13,9 +13,9 @@
 	</view>
 	<view class="shopCont">
 		<view class="goodsName">{{info.name}}</view>
-		<view class="jfNumBox">
-			<span class="jfspan1">759</span> <span class="jfspan2">积分</span>
-			<span class="marketvalue">市场价 ¥893</span>
+		<view class="jfNumBox" style="padding-left: 24rpx;">
+			<span class="jfspan1">{{info.integral}}</span> <span class="jfspan2">积分</span>
+			<span class="marketvalue">市场价 ¥{{info.salePrice}}</span>
 		</view>
 	
 		
@@ -30,7 +30,7 @@
 	<view style="height: 120rpx;padding-bottom: env(safe-area-inset-bottom)"></view>
 	
 	<view class="bottomBox">
-		<view class="ktyong">可用 <span class="ktyong1">759</span><span class="ktyong2">积分</span> </view>
+		<view class="ktyong">可用 <span class="ktyong1">{{avaIntegral}}</span><span class="ktyong2">积分</span> </view>
 		<view class="bottomBtn" @click="ljbuy">立即兑换</view>
 		
 	</view>
@@ -44,17 +44,17 @@
 			<view class="goodsBox">
 				<view class="hotGoodsLine" >
 					<view>
-						<image :src="info.ImgList[0].url" mode="" v-if="info.ImgList.length>0" class="hotGoodsLineImg"></image>
+						<image :src="info.imgList[0].img" mode="" v-if="info.imgList.length>0" class="hotGoodsLineImg"></image>
 					    <image src="../../static/timg/noimg.png"  class="hotGoodsLineImg" v-else></image>
 					</view>
 					<view class="hotGoodsLineRIght">
 						<view class="goodsName2">{{info.name}}</view>
 						<view class="goodsPriceTk">
 							<view class="jfNumBox">
-								<span class="jfspan1">759</span> <span class="jfspan2">积分</span>
-								<span class="marketvalue">市场价 ¥893</span>
+								<span class="jfspan1">{{info.integral}}</span> <span class="jfspan2">积分</span>
+								<span class="marketvalue">市场价 ¥{{info.salePrice}}</span>
 							</view>
-							<view class="surplus">剩余999个</view>
+							<view class="surplus">剩余{{shopInfo.qty}}个</view>
 						</view>
 					</view>
 				</view>
@@ -63,7 +63,7 @@
 				<view class="bugNUm">
 					<view class="bugNUmLeft">
 						<view class="buySl">数量</view>
-						<view class="buyXg" v-if="info.oneQty">限购{{info.oneQty}}件</view>
+						<!-- <view class="buyXg" v-if="info.oneQty">限购{{info.oneQty}}件</view> -->
 					</view>
 					<view class="numJsbox">
 						<view class="numJj" @click="calculation(1)">-</view>
@@ -73,18 +73,27 @@
 						<view class="numJj" @click="calculation(2)">+</view>
 					</view>
 				</view>
-				<view class="buySHop" @click="ckShop">
+				<view class="buySHop" @click="ckShop" style="border-bottom: 1px solid #EEEEEE;">
 					<view>服务门店</view>
 					<view class="buyShopRight" >
 						<view v-if="shopInfo.shopId">{{shopInfo.shopName}}</view>
 						<view v-else>请选择</view>
 						<image src="../../static/timg/icon_arrow_right.png" mode="" class="buyShopRightJt"></image>
 					</view>
+				</view>
+				<view class="buySHop">
+					<view>兑换限制</view>
+					<view class="buyShopRight" >
+						每人限兑{{info.oneCount}}个,每天限兑{{info.dayCount}}个
+					</view>
 				</view>
 			</view>
 			
-			<view class="buybtnBox">
-				<view class="buyBtn" @click="goBuy">立即购买</view>
+			<view class="buybtnBox">
+				<view class="ktyong"><view>合计 <span class="ktyong1">{{totalIntegral}}</span><span class="ktyong2">积分</span>   </view> 
+				   <view class="kyNum">可用积分:{{avaIntegral}}</view>
+				</view>
+				<view class="bottomBtn" @click="goBuy">立即兑换</view>
 			</view>
 			
 		</view>
@@ -101,7 +110,24 @@
 			<image src="../../static/timg/icon_guanbi@2x.png" mode="" class="authorizCloseImg"></image>
 		</view>
 	</view>
-<!-- 	<view :style="{color:colorX}">asdfas</view> -->
+<!-- 	<view :style="{color:colorX}">asdfas</view> -->
+   <!-- 门店弹框 -->
+   <view class="baomingBox ckshopBox" v-if="ckshopShow">
+   	<view class="baomingCont">
+   		<view class="bmTop">
+   			<view class="bmTitle">选择门店</view>
+   			<img src="../../static/timg/chahao.png" alt="" class="bmChimg" @click="noShowShop">
+   		</view>
+   		<view style="padding: 0 24rpx; height: 45vh;overflow-y: scroll;">
+   			<view class="ckshopLine" v-for="(item,index) in info.shopList" @click="ckshop2(item)">
+				<view class="shopName"> {{item.shopName}}</view>
+   			    <view class="surplus" style="padding-top: 2rpx;">剩余{{item.qty?item.qty:0}}个</view>
+   			</view>
+   		</view>
+   		
+   		
+   	</view>
+   </view>
 </view>
 </template>
 
@@ -114,7 +140,7 @@
 			return {
 				userInfo:'',
 				goodsnum:1,
-				buyShow:true,
+				buyShow:false,
 				id:'',
 				info:'',
 				shopInfo:{
@@ -131,12 +157,16 @@
 				shengyuD:1,
 				shengyuH:12,
 				shengyuM:21,
+				totalIntegral:'',
+				avaIntegral:'',
+				ckshopShow:true,
 				//snapup:
 			}
 		},
 		onLoad(opt) {
 			this.id=opt.id;
-			this.id='F58D6DEA-726A-4E28-93FA-EE6E5D6E3BDF'
+			this.avaIntegral=opt.avaIntegral;
+			//this.id='F58D6DEA-726A-4E28-93FA-EE6E5D6E3BDF'
 			//this.userInfo = uni.getStorageSync("userInfo");
 			this.userInfo=this.$store.state.userInfo;
 			this.ext=this.$common.getExtStoreId();
@@ -156,7 +186,7 @@
 			
 		},
 		onShow() {
-			this.shopInfo=this.$store.state.ckshopInfo;
+			//this.shopInfo=this.$store.state.ckshopInfo;
 			
 			//console.log(this.shopInfo)
 		},
@@ -169,71 +199,32 @@
 		methods: {
 			sharewx(){
 				
+			},
+			noShowShop(){
+				this.ckshopShow=false;
 			},
 			ckShop(){
-				uni.navigateTo({
-					url:'ckshopList?goodsId='+this.id
-				})
+				this.ckshopShow=true;
+			},
+			ckshop2(item){
+				this.ckshopShow=false;
 			},
 			openGoodsDetailById(){
-				this.$http('openMall/openGoodsDetailById', {
-				  id:this.id,
-				  GoodsID:this.id,
+				this.$http('openIntegralMall/integralGoodsDetailById', {
+				  id:this.id,
 				 },'GET').then(res => {
 						this.info=res.data;
 						if(this.info.details){
 							this.info.details = this.info.details.replace(/\<img/gi, '<img style="max-width:100%;height:auto" ');
 						}
-						this.shopInfo='';
-						this.$store.commit('mutationsckshopInfo', '')
-						this.szShop()
-						if(this.info.goodsDownTime){
-							if (Number(new Date().getTime()) > (Number(new Date(this.info.goodsDownTime.replace(/-/g, '/')).getTime()) || 0)) {
-							  console.log("现在时间大于结束时间")
-							   this.activityEnd = true
-							} else {
-								this.activityEnd=false;
-								//this.info.goodsDownTime="2022-08-18 11:57:00"
-								this.clock()
-							 
-							}
-							
-						}
+						this.shopInfo=res.data.shopList[0];
+						this.totalIntegral=this.goodsnum*this.info.integral
+						//this.$store.commit('mutationsckshopInfo', '')
+						//this.szShop()
 						
 				 })
 			},
-			clock(){
-				
-				let _this = this
-				let today = new Date() // 当前时间
-				let h = today.getHours()
-				let m = today.getMinutes()
-				let s = today.getSeconds()
-				let stopTime = new Date(_this.info.goodsDownTime.replace(/-/g, '/')) // 结束时间
-				if (Number(new Date().getTime()) >(Number(new Date(this.info.goodsDownTime.replace(/-/g, '/')).getTime()) || 0) ) {
-				  this.activityEnd = true
-				  return false;
-				}
-							
-				let stopH = stopTime.getHours()
-				let stopM = stopTime.getMinutes()
-				let stopS = stopTime.getSeconds()
-				let shenyu = stopTime.getTime() - today.getTime() // 倒计时毫秒数
-				let shengyuD = parseInt(shenyu / (60 * 60 * 24 * 1000)) // 转换为天
-				let D = parseInt(shenyu) - parseInt(shengyuD * 60 * 60 * 24 * 1000)// 除去天的毫秒数
-				let shengyuH = parseInt(D / (60 * 60 * 1000)) // 除去天的毫秒数转换成小时
-				let H = D - shengyuH * 60 * 60 * 1000 // 除去天、小时的毫秒数
-				let shengyuM = parseInt(H / (60 * 1000)) // 除去天的毫秒数转换成分钟
-				let M = H - shengyuM * 60 * 1000// 除去天、小时、分的毫秒数
-				let S = parseInt((shenyu - shengyuD * 60 * 60 * 24 * 1000 - shengyuH * 60 * 60 * 1000 - shengyuM * 60 * 1000) / 1000)// 除去天、小时、分的毫秒数转化为秒
-							
-				this.daojishi = '报名倒计时:' + shengyuD + '天' + shengyuH + '小时' + shengyuM + '分' + S + '秒'
-				// setTimeout("clock()",500);
-				this.shengyuM=shengyuM;
-				this.shengyuD=shengyuD;
-				this.shengyuH=shengyuH;
-				setTimeout(_this.clock, 500)
-			},
+		
 			ljbuy(){
 				if(!this.userInfo){
 					this.authorizShow=true
@@ -242,30 +233,7 @@
 				}
 			
 			},
-			szShop(){
-				if(this.userInfo){
-					this.$http('openMall/openStoreList', {
-					    goodsId:this.id,
-						// lat: '',
-						// lng: '',
-					}, 'GET').then(res => {
-						
-						var queryShopList = res.data
-						//console.log('list+=', this.queryShopList);
-					   queryShopList.forEach(item=>{
-						   if(item.shopId==this.info.shopId){
-							   var item={
-							   	shopId:this.info.shopId,
-							   	shopName:this.info.shopName
-							   }
-							   this.shopInfo=item
-							   this.$store.commit('mutationsckshopInfo', item)
-						   }
-					   })
-					})
-				}
-				
-			},
+			
 			goINdex(){
 				uni.switchTab({
 					url:'../index/index'
@@ -281,15 +249,16 @@
 					return false;
 				}
 				var that=this;
-				uni.setStorage({
-					key: 'goodsDetail',
-					data: that.info,
-					 success: function () {
+				
+				 uni.setStorage({
+				 	key: 'jfgoodsDetail',
+				 	data: that.info,
+				 	 success: function () {
 					   uni.navigateTo({
-					   	url:'confirm?itemQty='+that.goodsnum+'&shopID='+that.shopInfo.shopId+'&shopName='+that.shopInfo.shopName
-					   })
-					 }
-				}); 
+				 	   	url:'integralConfirm?shopID='+that.shopInfo.shopId+'&shopName='+that.shopInfo.shopName+'&goodsnum='+that.goodsnum+'&avaIntegral='+that.avaIntegral
+				 	   })
+				 	 }
+				 }); 
 				
 			},
 			calculation(type){
@@ -298,16 +267,26 @@
 						this.goodsnum--
 					}
 				}else{
-					console.log("+++")
-					if(this.info.oneQty!=null){
-						if(this.info.oneQty>this.goodsnum){
+					//console.log("+++")
+					if(this.goodsnum<this.info.dayCount){
+						if(this.goodsnum<this.shopInfo.qty){
 							this.goodsnum++
+						}else{
+							uni.showToast({
+								title:'剩余个数不足',
+								icon:'none',
+							})
 						}
+						
 					}else{
-						this.goodsnum++
+						uni.showToast({
+							title:'超过兑换限制',
+							icon:'none',
+						})
 					}
 					
-				}
+				}
+				this.totalIntegral=this.goodsnum*this.info.integral
 			},
 			decryptPhoneNumber: function(e) {
 			  console.log(e);
@@ -363,15 +342,70 @@
 </script>
 
 <style scoped lang="less">
+	.ckshopLine{
+		display: flex;
+		justify-content: space-between;
+		padding: 20rpx 0;
+		border-bottom: 1px solid #EEEEEE;
+	}
+	.shopName{
+		font-size: 28rpx;
+		color: #333333;
+		width: 500rpx;
+	}
+	.ckshopBox{
+		width: 750rpx;
+		height: 100vh;
+		background: rgba(0, 0, 0, 0.4);
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 111 !important;
+	}
+	.baomingCont{
+		position: absolute;
+		width: 750rpx;
+		/* height:850rpx; */
+		/* padding-bottom: constant(safe-area-inset-bottom);
+		padding-bottom: env(safe-area-inset-bottom); */
+		left: 0;
+		bottom: 0;
+		background: #ffffff;
+		border-radius: 24rpx 24rpx 0px 0px;
+	}
+	.bmTop{
+		display: flex;
+		justify-content: space-between;
+		padding: 40rpx 24rpx 10rpx 24rpx;
+	}
+	.bmTitle{
+		font-weight: 500;
+		color: #3C3C3C;
+		font-size: 30rpx;
+		line-height: 36rpx;
+	}
+	.bmChimg{
+		width: 36rpx;
+		height: 36rpx;
+	}
+	.kyNum{
+		color: #999999;
+		font-size: 24rpx;
+	}
+	.goodsPriceTk{
+		display: flex;
+		justify-content: space-between;
+		width: 460rpx;
+	}
 	.surplus{
-		color: #FF0000;font-size: 24rpx;
+		color: #FF0000;font-size: 24rpx;padding-top: 6rpx;
 	}
 	.ktyong{
-		line-height: 45px;
 		font-weight: 500;
 		color: #666666;
 		font-size: 24rpx;
 		padding-left: 30rpx;
+		padding-top: 18rpx;
 	}
    .ktyong1{
 		color: #FF0000;
 		font-size: 32rpx;
@@ -385,7 +419,7 @@
 		color: #FF0000;
 		font-size:32rpx;
 		line-height: 45rpx;
-		padding-left: 20rpx;
+		
 	}
 	.jfspan2{
 		font-weight: 400;
@@ -456,14 +490,16 @@
 	justify-content: space-between;
 	font-size:28rpx ;
 	color: #666666;
-	padding-top: 30rpx;
+	padding-top: 30rpx;
+	padding-bottom: 30rpx;
 }
 .buybtnBox{
 	width: 750rpx;
 	height: 120rpx;
 	background: #FFFFFF;
 	box-shadow: 0px -2px 10px 0px rgba(153,153,153,0.2000);
-	padding-top: 20rpx;
+	display: flex;
+	justify-content: space-between;
 }
 .buyBox{
 	width: 750rpx;
@@ -556,14 +592,14 @@
 	left: 0;
 	bottom: 0;
 	width: 750rpx;
-	height: 688rpx;
+	/* height: 688rpx; */
 	background: #FFFFFF;
 	border-radius: 26rpx 26rpx 0px 0px;
 }
 .buyNumBox{
 	padding: 30rpx;
     padding-top: 10rpx;
-	padding-bottom: 70rpx;
+	
 }
 .buyContCh{
 	position: absolute;
@@ -603,7 +639,10 @@
 		width: 370rpx;
 	}
 	.hotGoodsLineRIght{
-		padding-left: 24rpx;
+		padding-left: 24rpx;
+		    display: flex;
+		    flex-direction: column;
+		    justify-content: space-between;
 	}
 	.goodsPrice{
 		display: flex;

+ 1 - 1
pages/user/user.vue

@@ -19,7 +19,7 @@
 					<view class="numStr">{{numList.count?numList.count:0}}</view>
 					<view class="nameStr">优惠券</view>
 				</view>
-				<view class="quan" @click="gonavigateTo('../integral/integral')">
+				<view class="quan" @click="gonavigateTo('../integral/integral?totalIntegral='+numList.totalIntegral)">
 					<view class="numStr">{{numList.totalIntegral?numList.totalIntegral:0}}</view>
 					<view class="nameStr">积分</view>
 				</view>