浏览代码

优惠券

twt 1 年之前
父节点
当前提交
d71ced77d3

+ 14 - 0
pages.json

@@ -501,6 +501,20 @@
 			"style": {
 				"navigationBarTitleText": "公司介绍"
 				
+			}
+		},
+		{
+			"path": "pages/index/receiveCoupon",
+			"style": {
+				"navigationBarTitleText": "领券中心"
+				
+			}
+		},
+		{
+			"path": "pages/index/couponShare",
+			"style": {
+				"navigationBarTitleText": "优惠券详情"
+				
 			}
 		}
     ],

+ 2 - 2
pages/activity/activity.vue

@@ -4,8 +4,8 @@
 		<view class="itemHistory" v-for="(item,index) in itemData" :key="index" @click="goDetail(item.id)">
 			<image :src="item.img" mode="" class="itemImg"></image>
 			<view class="timeBox">
-				<image v-if="item.state==2" src="../../static/img/bg_huangse.png" mode="" class="state"></image>
-				<image v-if="item.state==1" src="../../static/img/bg_hongse.png" mode="" class="state"></image>
+				<image v-if="item.state==2" src="http://dmsphoto.66km.com.cn/thFiles/85EAAA7F-01A6-41A6-B25B-72FAD3E451AC.png" mode="" class="state"></image>
+				<image v-if="item.state==1" src="http://dmsphoto.66km.com.cn/thFiles/EB46639B-85C9-4246-A3E3-EA87944DFC36.png" mode="" class="state"></image>
 				<view class="time" v-if="item.startTime">{{item.startTime.slice(0,10)}}-{{item.endTime.slice(0,10)}}</view>
 			</view>
 			<view class="name">{{item.activityName}}</view>

+ 299 - 0
pages/index/couponShare.vue

@@ -0,0 +1,299 @@
+<template>
+	<view class="box">
+		<view style="width: 750rpx;height: 172rpx;" class="boxtop"  :style="{background:'#'+themeColor}"></view>
+
+		<view class="detailBg">
+			<view class="detailTop">
+				<view class="leftB">
+					<view class="use">¥<span class="use2">{{detail.actMoney}}</span></view>
+					<!-- <view class="used" v-else>¥<span class="used2">{{detail.actMoney}}</span></view> -->
+					<view class="tiaojian">{{detail.whereMoney!==0?'满'+detail.whereMoney+'元可用':'满任意金额可用'}}</view>
+				</view>
+				<view class="centerB">
+					<view class="name">{{detail.actName}}</view>
+					<view class="time" v-if="detail.startTime">
+						有效期:{{detail.startTime.slice(0,10)}}-{{detail.endTime.slice(0,10)}}</view>
+					<view class="time" v-else>有效期:</view>
+				</view>
+
+			</view>
+		</view>
+
+
+		<view class="comtentBox">
+			<view style="margin-bottom: 30rpx;">
+				<!-- <view class="titleBox">
+					
+					<image src="../../static/img/icon_youhui_red.png" mode="" class="redPoint"></image>
+					<view class="title">可用次数</view>
+				</view>
+				<view class="content">{{detail.avaQty}}次</view> -->
+
+			</view>
+			<view style="margin-bottom: 30rpx;">
+				<view class="titleBox">
+					<image src="../../static/img/icon_youhui_red.png" mode="" class="redPoint"></image>
+					<view class="title">适用门店</view>
+					</view>
+
+					<view v-for="(v,index) in detail.shopNames.split(',')">
+						<view class="content">{{v}}</view>
+					</view>
+
+				
+			</view>
+
+			<view>
+				<view class="titleBox">
+					<image src="../../static/img/icon_youhui_red.png" mode="" class="redPoint"></image>
+					<view class="title">使用说明</view>
+					</view>
+					<view v-if="detail.couContent" v-html="detail.couContent"></view>
+					<view v-else class="content">暂无</view>
+				</view>
+
+
+			</view>
+
+        <view class="bottomBtn" :style="{background:'#'+themeColor}" @click="receive">领取</view>
+
+		<!-- 手机号授权 -->
+		<view class="authorizBox" v-if="authorizShow" @click="authorizShow=false">
+			<view class="authorizCont" @click.stop="">
+				<view class="authorizName">{{wxOpenData.miniAppName}}</view>
+				<view class="authorizMs">您好,欢迎访问本店,授权手机号登录能获取我们最新的促销活动哦~</view>
+				<button class="authorizContbutton" type="default" open-type="getPhoneNumber" @getphonenumber="decryptPhoneNumber">授权</button>
+			</view>
+			<view style="text-align: center;padding-top: 56rpx;">
+				<image src="../../../static/timg/icon_guanbi@2x.png" mode="" class="authorizCloseImg"></image>
+			</view>
+		</view>
+		
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				id: '',
+				detail: {},
+				themeColor:'',
+				type:'',
+				authorizShow:false,
+				userInfo:'',
+				ext:'',
+				wxOpenData:'',
+			}
+		},
+		onLoad(opt) {
+			this.themeColor = uni.getStorageSync("themeColor");
+			this.id = opt.id;
+			this.type=opt.type;
+			this.userInfo=this.$store.state.userInfo;
+			this.ext=this.$common.getExtStoreId();
+			if(this.userInfo){
+				this.getData();
+			}else{
+				this.$common.automaticlogin().then(val => {
+					this.userInfo=this.$store.state.userInfo;
+					this.wxOpenData=this.$store.state.wxOpenData;
+					this.getData();
+					if(!this.userInfo){
+						this.authorizShow=true
+					}
+					
+				})
+			}
+			
+		},
+		methods: {
+			receive(id){
+				uni.showLoading({
+					title: '领取中'
+				})
+				this.$http('opencoupon/getCoupons', {
+				      id: this.id,
+				}, 'GET').then(res => {
+					uni.hideLoading();
+					uni.showToast({
+						 title: '领取成功',
+						 icon:'none',
+						 duration: 3000
+					});
+					this.getData();
+					
+				
+				})
+			},
+			getData() {
+				uni.showLoading({
+					title: '加载中'
+				});
+                if(this.type==2){
+					var url='opencoupon/detailsCouponDetails';
+					var params={
+						id: this.id,
+						custId:this.$store.state.wxOpenData.loginInfo.customerInfo.id
+					}
+				}else{
+					var url='opencoupon/detailsCoupon'
+					var params={
+						id: this.id,
+					}
+				}
+				this.$http(url, params, 'GET').then(res => {
+					uni.hideLoading();
+					this.detail = res.data;
+
+
+				})
+			},
+			decryptPhoneNumber: function(e) {
+			  console.log(e);
+			  this.code=e.detail.code
+			  this.wxPhoneLogin()
+			  this.authorizShow=false;
+			},
+			wxPhoneLogin(){
+					 var that=this;
+					 this.$http('miniApp2/sys/wxPhoneLogin', {
+					   appId:this.ext.appId,
+					   unionId:this.ext.unionId,
+					   code:this.code,
+					   openId:this.wxOpenData.openid
+					  },'POST').then(res => {
+						var data = res.data;
+						if(data.loginInfo){
+							this.userInfo=data.loginInfo.openUser;
+							this.wxOpenData=data.loginInfo;
+							this.$store.commit('mutationswxOpenData', data)
+							this.$store.commit('mutationsuserInfo', this.userInfo)
+						    this.getData()
+						}	
+					  })
+			},
+		}
+	}
+</script>
+
+<style scoped>
+	.bottomBtn{
+		width:704rpx;
+		line-height: 88rpx;
+		font-size: 30rpx;
+		font-weight: 500;
+		text-align: center;
+		color: #FFFFFF;
+		margin: 0 auto;
+		margin-top: 80rpx;
+		border-radius: 44rpx;
+	}
+	.boxtop{
+		background: #FF0000;
+	}
+	.box {
+		min-height: 100vh;
+		background: #F4F5F7;
+	}
+
+	.detailBg {
+		margin: -100rpx 24rpx 0rpx;
+		background-color: #FFFFFF;
+		border-radius: 10rpx;
+		padding: 40rpx 20rpx;
+	}
+
+	.detailTop {
+		display: flex;
+		justify-content: flex-start;
+		
+	}
+
+	.use {
+
+		font-size: 26rpx;
+		color: #FF0000;
+	}
+
+	.use2 {
+
+		font-size: 40rpx;
+		font-weight: 500;
+		color: #FF0000;
+		line-height: 56rpx;
+	}
+
+	.used {
+
+		font-size: 26rpx;
+		color: #666666;
+	}
+
+	.used2 {
+
+		font-size: 40rpx;
+		font-weight: 500;
+		color: #666666;
+		line-height: 56rpx;
+	}
+
+	.tiaojian {
+
+		font-size: 24rpx;
+
+		color: #666666;
+
+	}
+
+	.name {
+
+		font-size: 30rpx;
+
+		font-weight: 500;
+		color: #333333;
+		line-height: 56rpx;
+	}
+
+	.time {
+		font-size: 24rpx;
+
+		color: #666666;
+		
+	}
+
+	.leftB {
+		margin-right: 15rpx;
+	}
+
+	.comtentBox {
+		margin: 20rpx 24rpx;
+		background-color: #FFFFFF;
+		border-radius: 10rpx;
+		padding: 20rpx;
+	}
+
+	.titleBox {
+		display: flex;
+		align-items: center;
+	}
+
+	.redPoint {
+		width: 18rpx;
+		height: 18rpx;
+		margin-right: 10rpx;
+	}
+
+	.title {
+		font-size: 30rpx;
+		color: #333333;
+		font-weight: bold;
+	}
+
+	.content {
+		font-size: 26rpx;
+		color: #666666;
+		margin-top: 16rpx;
+		margin-left: 28rpx;
+	}
+</style>

+ 2 - 2
pages/index/discountCard.vue

@@ -39,8 +39,8 @@
 				</view>
 
 				<view class="itemBottom">
-					<view v-if="tabIndex==1">可用次数:{{item.avaQty}}</view>
-					<view v-else>可分享次数:{{item.shareQty}}</view>
+					<!-- <view v-if="tabIndex==1">可用次数:{{item.avaQty}}</view>  v-else -->
+					<view >可分享次数:{{item.shareQty}}</view>
 					<view @click="goDetail(item.id)" class="rightJian">查看详情 
 					<image src="../../static/img/little_rightArrow.png" mode="" style="width: 24rpx;height: 24rpx;"></image>
 					</view>

+ 2 - 2
pages/index/discountCardDetail.vue

@@ -22,12 +22,12 @@
 
 		<view class="comtentBox">
 			<view style="margin-bottom: 30rpx;">
-				<view class="titleBox">
+				<!-- <view class="titleBox">
 					
 					<image src="../../static/img/icon_youhui_red.png" mode="" class="redPoint"></image>
 					<view class="title">可用次数</view>
 				</view>
-				<view class="content">{{detail.avaQty}}次</view>
+				<view class="content">{{detail.avaQty}}次</view> -->
 
 			</view>
 			<view style="margin-bottom: 30rpx;">

+ 5 - 0
pages/index/discountDlq.vue

@@ -54,6 +54,11 @@
 		},
 		onShow() {
 			
+		},
+		filters:{
+			dateformat(val){
+				return val.slice(0,10)
+			}
 		},
 		methods: {
 			

+ 72 - 5
pages/index/index.vue

@@ -159,8 +159,8 @@
 					    <view class="hotlineTimebox">
 					    	<!-- <view class="hotlinestate1" v-if="item.state==2">进行中</view>
 							<view class="hotlinestate2" v-if="item.state==1">未开始</view> -->
-							<image class="jkStateImg" v-if="item.state==2" src="../../static/img/bg_huangse.png" mode="" ></image>
-							<image class="jkStateImg" v-if="item.state==1" src="../../static/img/bg_hongse.png" mode="" ></image>
+							<image class="jkStateImg" v-if="item.state==2" src="http://dmsphoto.66km.com.cn/thFiles/85EAAA7F-01A6-41A6-B25B-72FAD3E451AC.png" mode="" ></image>
+							<image class="jkStateImg" v-if="item.state==1" src="http://dmsphoto.66km.com.cn/thFiles/EB46639B-85C9-4246-A3E3-EA87944DFC36.png" mode="" ></image>
 							<view class="hotTime">{{item.startTime.slice(0,10)}}-{{item.endTime.slice(0,10)}}</view>
 					    </view>
 					</view>
@@ -170,7 +170,7 @@
 			</view>
 		</view>
 		
-		<!-- 热门车型 -->
+		<!-- 热门商品 -->
 		<view v-if="homeCardList.openMGoods">
 			<view class="" v-if="homeCardList.openMGoods.goodsList.length>0">
 				<view class="Hot" v-if="homeCardList.openMGoods.showType==1">
@@ -206,6 +206,28 @@
 						</view>
 					</view>
 					
+					<!-- 俩列的 -->
+					<div class="goodsTwo">
+						<div class="goodsTwoLine" v-for="(item,index) in homeCardList.openMGoods.goodsList" @click="goGoods(item)" v-if="index<homeCardList.openMGoods.showCount">
+							<div class="goodsTwoImg">
+								<image :src="item.url" mode="" class="hotGoodsLineImg"></image>
+							</div>
+							<div class="goodsTwoName">{{item.name}}</div>
+							<view class="Sold">
+								<view v-if="item.showLabel&&item.showLabel.indexOf('3')!=-1">
+									已售 {{item.saleQty>0?item.saleQty:0}}
+								</view>
+							</view>
+							<view class="goodsPrice">
+								<view class="goodsPrice1" >{{item.saleLabel}}</view><!-- :style="{color:'#'+themeColor}" -->
+								<view class="goodsPrice2" >¥</view>
+								<view class="goodsPrice3" >{{item.salePrice}}
+								  <span v-if="item.categoryIds=='7B97D114-C419-42B2-9C1E-0B4CA284CDA0'">万</span>
+								</view>
+								<view class="goodsPrice4" v-if="item.showLabel&&item.scribingPrice&&item.showLabel.indexOf('1')!=-1">¥{{item.scribingPrice}}</view>
+							</view>
+						</div>
+					</div>
 				</view>
 			</view>
 		</view>
@@ -484,9 +506,12 @@
 						});
 						
 					}else if(item.bizType==2){ //钣金喷漆
-						uni.navigateTo({
+						 uni.navigateTo({
 							url:'paint'
-						})
+						}) 
+						/* uni.navigateTo({
+							url:'receiveCoupon'
+						}) */
 					}else if(item.bizType==3){ //保养
 						uni.navigateTo({
 							url:'maintain'
@@ -557,6 +582,10 @@
 						uni.navigateTo({
 							url:'aboutUS?unionID='+this.userInfo.unionId
 						})
+					}else if(item.bizType==18){ //领券中心
+						uni.navigateTo({
+							url:'receiveCoupon'
+						})
 					}
 					
 					// uni.navigateTo({
@@ -1007,6 +1036,44 @@
 </script>
 
 <style scoped>
+	.goodsTwo{
+		display: flex;
+		justify-content: space-between;
+		flex-wrap: wrap;
+	}
+	.goodsTwoLine{
+		background: #FFFFFF;width: 341rpx;
+		margin-top: 20rpx;
+		padding-bottom: 20rpx;
+		border-radius: 16rpx 16rpx 0px 0px;
+	}
+	.goodsTwoImg .hotGoodsLineImg{
+		margin: 0 auto;
+	}
+	.goodsTwoLine .Sold{
+		padding-left: 20rpx;
+	}
+	.goodsTwoLine .goodsPrice{
+		padding-left: 20rpx;
+	}
+	.goodsTwoImg{
+		padding: 33rpx 0;
+	}
+	.goodsTwoName{
+		font-weight: 400;
+		color: #333333;
+		font-size: 26rpx;
+		line-height: 38rpx;
+		padding: 0 20rpx;
+		text-overflow: -o-ellipsis-lastline;
+		overflow: hidden;				
+		text-overflow: ellipsis;		
+		display: -webkit-box;		
+		-webkit-line-clamp: 2;	
+		line-clamp: 2;					
+		-webkit-box-orient: vertical;
+		
+	}
 	.bxBox{
 		display: flex;
 		flex-wrap: wrap;

+ 133 - 13
pages/index/onlineBooking.vue

@@ -145,7 +145,17 @@
 			</view>
 
 		</view>
-
+        <!-- 手机号授权 -->
+        <view class="authorizBox" v-if="authorizShow" @click="authorizShowno">
+        	<view class="authorizCont" @click.stop="">
+        		<view class="authorizName">{{wxOpenData.miniAppName}}</view>
+        		<view class="authorizMs">您好,欢迎访问本店,授权手机号登录能获取我们最新的促销活动哦~</view>
+        		<button class="authorizContbutton" type="default" open-type="getPhoneNumber" @getphonenumber="decryptPhoneNumber">授权</button>
+        	</view>
+        	<view style="text-align: center;padding-top: 56rpx;">
+        		<image src="../../static/timg/icon_guanbi@2x.png"  @click="authorizShowno" mode="" class="authorizCloseImg"></image>
+        	</view>
+        </view>
 	</view>
 </template>
 
@@ -177,6 +187,11 @@
 				themeColor: '',
 				data: {},
 				iStatusBarHeight:'',
+				ext:'',
+				shareId:'',
+				authorizShow:false,
+				wxOpenData:'',
+				code:'',
 			}
 		},
 		onLoad(opt) {
@@ -189,7 +204,20 @@
 			}
 			console.log(this.naShopId)
 			var that = this;
-			that.getInfo()
+			this.ext=this.$common.getExtStoreId();
+			if(this.userInfo){
+				 that.getInfo()
+			}else{
+				this.$common.automaticlogin().then(val => {
+					this.themeColor = uni.getStorageSync("themeColor");
+					this.userInfo=this.$store.state.userInfo;
+					this.wxOpenData=this.$store.state.wxOpenData;
+					
+					that.getInfo()
+					
+				})
+			}
+			
 			//this.listBigTags()
 		},
 		computed: {
@@ -200,6 +228,33 @@
 			}
 		},
 		methods: {
+			authorizShowno(){
+				this.authorizShow=false
+			},
+			decryptPhoneNumber: function(e) {
+						  console.log(e);
+						  this.code=e.detail.code
+						  this.wxPhoneLogin()
+						  this.authorizShow=false;
+						},
+			wxPhoneLogin(){
+					 var that=this;
+					 this.$http('miniApp2/sys/wxPhoneLogin', {
+					   appId:this.ext.appId,
+					   unionId:this.ext.unionId,
+					   code:this.code,
+					   openId:this.wxOpenData.openid
+					  },'POST').then(res => {
+						var data = res.data;
+						if(data.loginInfo){
+							this.userInfo=data.loginInfo.openUser;
+							this.wxOpenData=data.loginInfo;
+							this.$store.commit('mutationswxOpenData', data)
+							this.$store.commit('mutationsuserInfo', this.userInfo)
+						    this.getInfo()
+						}	
+					  })
+			},
 			goShopAppraiseList() {
 				uni.navigateTo({
 					url: '../user/ShopAppraiseList?shopID=' + this.data.shopInfo.id
@@ -323,18 +378,24 @@
 				this.selectedItems = []
 			},
 			yuyue() {
-				if (!this.selectedItems.length) {
-					uni.showToast({
-						title: '请选择预约项目',
-						icon: 'none',
-						duration: 3000
-					});
-				} else {
-					this.$store.commit('mutationsyuyueData', this.selectedItems)
-					uni.navigateTo({
-						url: 'confirmYuyue'
-					})
+				if(!this.userInfo){
+					this.authorizShow=true
+				}else{
+					if (!this.selectedItems.length) {
+						uni.showToast({
+							title: '请选择预约项目',
+							icon: 'none',
+							duration: 3000
+						});
+					} else {
+						this.$store.commit('mutationsyuyueData', this.selectedItems)
+						uni.navigateTo({
+							url: 'confirmYuyue'
+						})
+					}
 				}
+				
+				
 			}
 		}
 	}
@@ -791,4 +852,63 @@
 		height: 15rpx;
 		margin-left: 16rpx;
 	}
+	.authorizBox{
+		width: 100vw;
+		height: 100vh;
+		background: rgba(0, 0, 0, 0.5);
+		position: fixed;
+		top: 0;
+		left: 0;
+	}
+	.authorizCont{
+		margin-top: 30vh;
+		width: 564rpx;
+		height: 408rpx;
+		background: #FFFFFF;
+		border-radius: 24rpx;
+		margin-left: 93rpx;
+		position: relative;
+	}
+	.authorizCloseImg{
+		width: 62rpx;
+		height: 62rpx;
+	}
+	.sqLogoBox{
+		width: 180rpx;
+		height: 180rpx;
+		background: #FFFFFF;
+		border-radius: 90rpx;
+		text-align: center;
+		position: absolute;
+		top: -50rpx;
+		left: 192rpx;
+	}
+	.authorizName{
+		color: #333333;
+		line-height: 42rpx;
+		font-size: 30rpx;
+		text-align: center;
+		padding-top: 58rpx;
+	}
+	.authorizMs{
+		color: #999999;
+		line-height: 36rpx;
+		font-size: 26rpx;
+		width: 452rpx;
+		padding-top: 24rpx;
+		text-align: center;
+		margin-left: 56rpx;
+	}
+	.authorizContbutton{
+		width: 422rpx;
+		height: 88rpx;
+		background: #D53533;
+		border-radius: 44rpx;
+		line-height: 88rpx;
+		text-align: center;
+		font-size:30rpx;
+		color: #FFFFFF;
+		margin-top: 62rpx;
+		margin-left:71rpx;
+	}
 </style>

+ 288 - 0
pages/index/receiveCoupon.vue

@@ -0,0 +1,288 @@
+<template>
+	<view class="content">
+		<view class="top"></view>
+		<view class="lineBOx">
+			<view class="line" v-for="(item,index) in list">
+				<view class="lineLeft">
+					<view class="lineName">{{item.actName}}</view>
+					<view class="moneyBox">
+						<span class="moneyBs">¥</span>
+						<span class="moneyNum">{{item.actMoney}}</span>
+						<span class="mdsky">{{item.whereMoney!==0?'满'+item.whereMoney+'可用':'无限制'}}</span>
+					</view>
+					<view class="endOffsetDays">
+						<span v-if="item.endOffsetDays">领取后{{item.endOffsetDays}}天有效</span>
+						<span v-else>{{item.startTime|dateformat}} - {{item.endTime|dateformat}}</span>
+					</view>
+				</view>
+				<view class="lineRight">
+					<view class="receiveBtn" @click="receive(item.id)">领取</view>
+				</view>
+			</view>
+		</view>
+		<!-- 领取说明 -->
+		<view class="illustrateBox">
+			<view class="illustratex"></view>
+			<view class="illustrate">领取说明</view>
+			<view class="illustratex"></view>
+		</view>
+		<view class="comment" v-html="comment"> </view>
+		<!-- 一键领取 -->
+	<!-- 	<view class="oneClick">一键领取</view> -->
+		<!-- 手机号授权 -->
+		<view class="authorizBox" v-if="authorizShow" @click="authorizShow=false">
+			<view class="authorizCont" @click.stop="">
+				<view class="authorizName">{{wxOpenData.miniAppName}}</view>
+				<view class="authorizMs">您好,欢迎访问本店,授权手机号登录能获取我们最新的促销活动哦~</view>
+				<button class="authorizContbutton" type="default" open-type="getPhoneNumber" @getphonenumber="decryptPhoneNumber">授权</button>
+			</view>
+			<view style="text-align: center;padding-top: 56rpx;">
+				<image src="../../../static/timg/icon_guanbi@2x.png" mode="" class="authorizCloseImg"></image>
+			</view>
+		</view>
+	
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				list:[],
+				comment:'',
+				authorizShow:false,
+				userInfo:'',
+				ext:'',
+				wxOpenData:'',
+			}
+		},
+		onLoad(opt) {
+            this.userInfo=this.$store.state.userInfo;
+            this.ext=this.$common.getExtStoreId();
+			if(this.userInfo){
+				this.getCouponCenterList()
+			}else{
+				this.$common.automaticlogin().then(val => {
+					this.userInfo=this.$store.state.userInfo;
+					this.wxOpenData=this.$store.state.wxOpenData;
+					this.getCouponCenterList()
+					if(!this.userInfo){
+						this.authorizShow=true
+					}
+					
+				})
+			}
+		},
+		filters:{
+			dateformat(val){
+				return val.slice(0,10)
+			}
+		},
+		methods: {
+			receive(id){
+				uni.showLoading({
+					title: '领取中'
+				})
+				this.$http('opencoupon/getCoupons', {
+				      id: id,
+				}, 'GET').then(res => {
+					uni.hideLoading();
+					uni.showToast({
+						 title: '领取成功',
+						 icon:'none',
+						 duration: 3000
+					});
+					this.getCouponCenterList();
+					
+				
+				})
+			},
+			getCouponCenterList(){
+				var params={}
+				this.$http('opencoupon/getCouponCenterList', params, 'GET').then(res => {
+					uni.hideLoading();
+					this.list = res.data.list;
+					this.comment=res.data.comment;
+				
+				})
+			},
+             authorizShowno(){
+             	this.authorizShow=false
+             },
+             decryptPhoneNumber: function(e) {
+               console.log(e);
+               this.code=e.detail.code
+               this.wxPhoneLogin()
+               this.authorizShow=false;
+             },
+             wxPhoneLogin(){
+             		 var that=this;
+             		 this.$http('miniApp2/sys/wxPhoneLogin', {
+             		   appId:this.ext.appId,
+             		   unionId:this.ext.unionId,
+             		   code:this.code,
+             		   openId:this.wxOpenData.openid
+             		  },'POST').then(res => {
+             			var data = res.data;
+             			if(data.loginInfo){
+             				this.userInfo=data.loginInfo.openUser;
+             				this.wxOpenData=data.loginInfo;
+             				this.$store.commit('mutationswxOpenData', data)
+             				this.$store.commit('mutationsuserInfo', this.userInfo)
+             			    this.getCouponCenterList()
+             			}	
+             		  })
+             },
+		}
+	}
+</script>
+
+<style scoped>
+	.comment{
+		padding: 0 24rpx;
+		color: #FFFFFF;
+	}
+	.oneClick{
+		width: 368rpx;height: 82rpx;text-align: center;line-height: 82rpx;
+		background: url('http://dmsphoto.66km.com.cn/thFiles/D810AED4-98B9-49DB-87E6-42C015BAD016.png');
+		background-size: 100% 100%;font-weight: 500;
+        color: #FF0000;font-size: 30rpx;
+		margin: 0 auto;
+		margin-top: 80rpx;
+	}
+	.content{
+		min-height: 100vh;
+		background:#FD5300 ;
+	}
+	.top{
+		height: 272rpx;
+		background: url('http://dmsphoto.66km.com.cn/thFiles/8CE54BE7-E78E-4BC5-98B7-6320CE691301.png');
+		background-size: 100% 100%;
+	}
+	.line{
+		background: url('http://dmsphoto.66km.com.cn/thFiles/47158ED0-1F6C-4C6D-840B-D92AADFED33D.png');
+		background-size: 100% 100%;
+		margin-top: 20rpx;
+		height: 200rpx;display: flex;justify-content: space-between;
+	}
+	.lineBOx{
+		padding: 0 24rpx;
+	}
+	.lineLeft{
+		padding-left: 20rpx;padding-top: 24rpx;
+	}
+	.lineName{
+		font-weight: 500;font-size: 30rpx;
+		color: #333333;
+		line-height: 42rpx;
+	}
+	.moneyBox{
+	  padding-top: 8rpx;	
+	}
+	.moneyBs{
+		font-weight: 500;font-size: 28rpx;
+		color: #FF0000;
+	}
+	.moneyNum{
+		font-weight: 500;font-size: 48rpx;
+		color: #FF0000;
+	}
+	.mdsky{
+		font-weight: 400;font-size: 24rpx;
+		color: #666666;
+	}
+	.endOffsetDays{
+		font-weight: 400;font-size: 24rpx;
+		color: #666666;padding-top: 10rpx;
+	}
+	
+	.receiveBtn{
+		width: 150rpx;
+		height: 56rpx;
+		background: #FF502D;
+		border-radius: 36rpx;
+		text-align: center;
+		line-height: 56rpx;
+		font-weight: 500;
+		color: #FFFFFF;
+		font-size: 28rpx;
+	}
+	.lineRight{
+		display: flex;
+		align-items: center;
+		padding-right: 30rpx;
+	}
+	.illustrateBox{
+		display: flex;padding: 30rpx 0;
+		justify-content: center;
+	}
+	.illustratex{
+		width: 34rpx;height: 5rpx;background: #FFFFFF;margin-top: 15rpx;
+	}
+	.illustrate{
+		font-size: 28rpx;
+		font-family: PingFangSC-Medium, PingFang SC;
+		font-weight: 500;
+		color: #FFFFFF;padding: 0 16rpx;
+		line-height: 40rpx
+	}
+	.authorizBox{
+				width: 100vw;
+				height: 100vh;
+				background: rgba(0, 0, 0, 0.5);
+				position: fixed;
+				top: 0;
+				left: 0;
+			}
+			.authorizCont{
+				margin-top: 30vh;
+				width: 564rpx;
+				height: 408rpx;
+				background: #FFFFFF;
+				border-radius: 24rpx;
+				margin-left: 93rpx;
+				position: relative;
+			}
+			.authorizCloseImg{
+				width: 62rpx;
+				height: 62rpx;
+			}
+			.sqLogoBox{
+				width: 180rpx;
+				height: 180rpx;
+				background: #FFFFFF;
+				border-radius: 90rpx;
+				text-align: center;
+				position: absolute;
+				top: -50rpx;
+				left: 192rpx;
+			}
+			.authorizName{
+				color: #333333;
+				line-height: 42rpx;
+				font-size: 30rpx;
+				text-align: center;
+				padding-top: 58rpx;
+			}
+			.authorizMs{
+				color: #999999;
+				line-height: 36rpx;
+				font-size: 26rpx;
+				width: 452rpx;
+				padding-top: 24rpx;
+				text-align: center;
+				margin-left: 56rpx;
+			}
+			.authorizContbutton{
+				width: 422rpx;
+				height: 88rpx;
+				background: #D53533;
+				border-radius: 44rpx;
+				line-height: 88rpx;
+				text-align: center;
+				font-size:30rpx;
+				color: #FFFFFF;
+				margin-top: 62rpx;
+				margin-left:71rpx;
+			}
+</style>

+ 124 - 4
pages/integral/integral.vue

@@ -71,6 +71,17 @@
 			
 		</view>
 		<img src="../../static/timg/btn_top@2x.png" alt="" class="btn_top" @click="btnTop">
+		<!-- 手机号授权 -->
+			<view class="authorizBox" v-if="authorizShow" @click="authorizShow=false">
+				<view class="authorizCont" @click.stop="">
+					<view class="authorizName">{{wxOpenData.miniAppName}}</view>
+					<view class="authorizMs">您好,欢迎访问本店,授权手机号登录能获取我们最新的促销活动哦~</view>
+					<button class="authorizContbutton" type="default" open-type="getPhoneNumber" @getphonenumber="decryptPhoneNumber">授权</button>
+				</view>
+				<view style="text-align: center;padding-top: 56rpx;">
+					<image src="../../../static/timg/icon_guanbi@2x.png" mode="" class="authorizCloseImg"></image>
+				</view>
+			</view>
 	</view>
 </template>
 
@@ -90,16 +101,66 @@
 				list:[],
 				categoryID:'',
 				avaIntegral:'',
+				authorizShow:false,
+				userInfo:'',
+				ext:'',
+				wxOpenData:'',
 			}
 		},
 		onLoad(opt) {
+			
 			this.totalIntegral=opt.totalIntegral;
-			this.getintegralInfo()
-			this.gethotExchange();
-			this.getcategoryList();
-			this.getintegralGoodsPage();
+			this.userInfo=this.$store.state.userInfo;
+			this.ext=this.$common.getExtStoreId();
+			if(this.userInfo){
+				this.getintegralInfo()
+				this.gethotExchange();
+				this.getcategoryList();
+				this.getintegralGoodsPage();
+			}else{
+				this.$common.automaticlogin().then(val => {
+					this.userInfo=this.$store.state.userInfo;
+					this.wxOpenData=this.$store.state.wxOpenData;
+					
+					if(!this.userInfo){
+						this.authorizShow=true
+					}
+					this.getintegralInfo()
+					this.gethotExchange();
+					this.getcategoryList();
+					this.getintegralGoodsPage();
+				})
+			}
+			
 		},
 		methods: {
+			authorizShowno(){
+				this.authorizShow=false
+			},
+			decryptPhoneNumber: function(e) {
+			  console.log(e);
+			  this.code=e.detail.code
+			  this.wxPhoneLogin()
+			  this.authorizShow=false;
+			},
+			wxPhoneLogin(){
+					 var that=this;
+					 this.$http('miniApp2/sys/wxPhoneLogin', {
+					   appId:this.ext.appId,
+					   unionId:this.ext.unionId,
+					   code:this.code,
+					   openId:this.wxOpenData.openid
+					  },'POST').then(res => {
+						var data = res.data;
+						if(data.loginInfo){
+							this.userInfo=data.loginInfo.openUser;
+							this.wxOpenData=data.loginInfo;
+							this.$store.commit('mutationswxOpenData', data)
+							this.$store.commit('mutationsuserInfo', this.userInfo)
+						    this.myOrderCoupon()
+						}	
+					  })
+			},
 			btnTop(){
 			//滚动回到顶部
 			uni.pageScrollTo({
@@ -443,4 +504,63 @@
 	    width: 100%;
 		padding-bottom: 20rpx;
 }
+.authorizBox{
+			width: 100vw;
+			height: 100vh;
+			background: rgba(0, 0, 0, 0.5);
+			position: fixed;
+			top: 0;
+			left: 0;
+		}
+		.authorizCont{
+			margin-top: 30vh;
+			width: 564rpx;
+			height: 408rpx;
+			background: #FFFFFF;
+			border-radius: 24rpx;
+			margin-left: 93rpx;
+			position: relative;
+		}
+		.authorizCloseImg{
+			width: 62rpx;
+			height: 62rpx;
+		}
+		.sqLogoBox{
+			width: 180rpx;
+			height: 180rpx;
+			background: #FFFFFF;
+			border-radius: 90rpx;
+			text-align: center;
+			position: absolute;
+			top: -50rpx;
+			left: 192rpx;
+		}
+		.authorizName{
+			color: #333333;
+			line-height: 42rpx;
+			font-size: 30rpx;
+			text-align: center;
+			padding-top: 58rpx;
+		}
+		.authorizMs{
+			color: #999999;
+			line-height: 36rpx;
+			font-size: 26rpx;
+			width: 452rpx;
+			padding-top: 24rpx;
+			text-align: center;
+			margin-left: 56rpx;
+		}
+		.authorizContbutton{
+			width: 422rpx;
+			height: 88rpx;
+			background: #D53533;
+			border-radius: 44rpx;
+			line-height: 88rpx;
+			text-align: center;
+			font-size:30rpx;
+			color: #FFFFFF;
+			margin-top: 62rpx;
+			margin-left:71rpx;
+		}
 </style>

+ 0 - 1
pages/shop/goodsDetail.vue

@@ -238,7 +238,6 @@
 				authorizShow:false,
 				code:'',
 				wxOpenData:'',
-				ext:'',
 				categoryIds:'',
 				thenShow:false,
 				activityEnd:true,

二进制
static/img/bg_hongse.png


二进制
static/img/bg_huangse.png