瀏覽代碼

样式修改

twt 2 年之前
父節點
當前提交
70f5fa265c

+ 21 - 0
pages.json

@@ -430,6 +430,27 @@
 				"navigationBarTitleText": "客户转介绍",
 				 "enablePullDownRefresh": true
 			}
+		},
+		{
+			"path": "pages/referral/myConnections",
+			"style": {
+				"navigationBarTitleText": "我的人脉",
+				 "enablePullDownRefresh": true
+			}
+		},
+		{
+			"path": "pages/referral/rebateList",
+			"style": {
+				"navigationBarTitleText": "返利记录",
+				 "enablePullDownRefresh": true
+			}
+		},
+		{
+			"path": "pages/referral/extract",
+			"style": {
+				"navigationBarTitleText": "提现",
+				 "enablePullDownRefresh": false
+			}
 		}
     ],
 	"tabBar": {

+ 4 - 0
pages/index/index.vue

@@ -482,6 +482,10 @@
 						uni.navigateTo({
 							url:'../shop/goodsDetail?id='+item.bizId
 						})
+					}else if(item.bizType==16){ //积分商城
+						uni.navigateTo({
+							url:'../integral/integral'
+						})
 					}
 					
 					// uni.navigateTo({

+ 114 - 3
pages/index/vipCard.vue

@@ -219,6 +219,18 @@
 			
 		</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>
 
@@ -239,11 +251,27 @@
 				useComment: '',
 				dis: true,
 				disCz: true,
+				authorizShow:false,
+				userInfo:'',
+				ext:'',
+				wxOpenData:'',
 			}
 		},
 		onLoad() {
-			this.userInfo = uni.getStorageSync("userInfo")
-			this.myOrderCoupon();
+			//this.userInfo = uni.getStorageSync("userInfo");
+			this.userInfo=this.$store.state.userInfo;
+			this.ext=this.$common.getExtStoreId();
+			if(this.userInfo){
+				this.myOrderCoupon();
+			}else{
+				this.$common.automaticlogin().then(val => {
+					this.userInfo=this.$store.state.userInfo;
+					this.wxOpenData=this.$store.state.wxOpenData;
+					this.themeColor = uni.getStorageSync("themeColor");
+					this.myOrderCoupon();
+				})
+			}
+			
 		},
 
 		methods: {
@@ -311,7 +339,31 @@
 				uni.navigateTo({
 					url: url
 				})
-			}
+			},
+			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.loginInfo)
+							this.$store.commit('mutationsuserInfo', this.userInfo)
+						    this.myOrderCoupon()
+						}	
+					  })
+			},
 		},
 		
 		// 下拉刷新
@@ -610,4 +662,63 @@
 		color: #666666;
 		font-size: 26rpx;
 	}
+	.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>

+ 280 - 0
pages/referral/extract.vue

@@ -0,0 +1,280 @@
+<template>
+	<view class="box">
+		<view class="tixiancs">
+			<view class="tixiancsLeft">本月已提现2次</view>
+			<view class="tixiancsRight">提现明细</view>
+		</view>
+		<view class="header">
+			<view class="title">提现金额</view>
+			<view class="moneyView">
+				<text class="icon">¥</text>
+				<input type="digit" class="moneyInput" placeholder-style="color:#999999; font-size:30rpx"
+					placeholder="请输入提现金额" v-model="money" @input="inputValue" />
+				<view class="allBtn" @click="allBtn">全部提现</view>
+			</view>
+			<view class="zongMoney">可提现金额: <span style="color: #FF0000;">¥666</span>  (冻结金额:20.00) </view>
+
+			
+		</view>
+
+		<view class="tishi" style="padding: 20rpx 44rpx;">
+			
+		</view>
+
+		<view class="sureBtn" @click="sure">申请提现</view>
+
+		
+
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				okMoney: '',
+				money: '',
+				name: '',
+				account: '',
+				detailData: {},
+				couContent: '', //提现规则
+			}
+		},
+		onLoad() {
+			this.getDetailData()
+		},
+		methods: {
+			getDetailData() {
+				uni.showLoading({
+					title: '加载中'
+				})
+				let url = 'worldKeepCar/worldDistribution/queryDistributionIndexDetail',
+					params = {
+
+					}
+				this.$http(url, params, 'GET').then(res => {
+					uni.hideLoading();
+					var data = res.data
+
+
+					// 处理 undefined和null转为空白字符串
+
+					for (const key in data) {
+						data[key] = this.$praseStrEmpty(data[key])
+					}
+
+					this.detailData = data
+					this.okMoney = this.detailData.cantidatMoney
+					if (this.detailData.tSSetting.withdrawalRules) {
+						this.couContent = this.detailData.tSSetting.withdrawalRules.replace(/\<p/gi,
+							'<p style="display: inline-block"');
+					}
+
+
+
+				})
+			},
+			inputValue(event) {
+				if (event.detail.value < 0) {
+					setTimeout(() => {
+						this.money = 0; // 解决
+					}, 0)
+				} else {
+					this.money = event.detail.value;
+				}
+			},
+
+			allBtn() {
+
+				setTimeout(() => {
+					this.money = this.okMoney; // 解决
+				}, 0)
+
+
+				console.log('money,allmoney', this.money, this.okMoney);
+			},
+			sure() {
+				if (this.money > this.okMoney) {
+					uni.showToast({
+						title: '提现金额不能大于可提现金额',
+						icon: 'none',
+						duration: 3000,
+					});
+					return;
+				}
+				if (this.money <= 0) {
+					uni.showToast({
+						title: '提现金额不能为空',
+						icon: 'none',
+						duration: 3000,
+					});
+					return;
+				}
+				if (!this.name) {
+					uni.showToast({
+						title: '姓名不能为空',
+						icon: 'none',
+						duration: 3000,
+					});
+					return;
+				}
+				if (!this.account) {
+					uni.showToast({
+						title: '支付宝账户不能为空',
+						icon: 'none',
+						duration: 3000,
+					});
+					return;
+				}
+
+				this.postData();
+			},
+			postData() {
+				uni.showLoading({
+					title: '提现中'
+				})
+				let url = 'worldKeepCar/worldDistribution/applyWithdrawal',
+					params = {
+						money: this.money,
+						aliName: this.name,
+						aliPhone: this.account,
+					}
+				this.$http(url, params, 'POST').then(res => {
+					uni.hideLoading();
+					uni.showModal({
+						title: '提交成功',
+						content: '请耐心等待平台审核',
+						showCancel:false,
+						confirmText:'知道了',
+						success: function(res) {
+
+							uni.navigateBack({
+
+							})
+						}
+					});
+
+
+
+				})
+			},
+		}
+	}
+</script>
+
+<style>
+	.box {
+		min-height: 100vh;
+		background: #F4F5F7;
+		padding-top: 20rpx;
+	}
+.tixiancs{
+	display: flex;
+	justify-content: space-between;
+	font-size: 24rpx;
+	padding-left: 24rpx;
+	padding-right: 24rpx;
+	padding-bottom: 20rpx;
+}
+.tixiancsLeft{
+	color: #999999;
+}
+.tixiancsRight{
+	color: #1677FF;
+}
+	.header {
+		background-color: #FFFFFF;
+		margin: 0 24rpx;
+		border-radius: 10rpx;
+		padding: 30rpx 20rpx;
+		
+	}
+
+	.title {
+		font-size: 28rpx;
+		color: #3C3C3C;
+		font-weight: bold;
+	}
+
+	.moneyView {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		margin: 15rpx 0;
+	}
+
+	.icon {
+		font-size: 50rpx;
+		color: #222222;
+		font-weight: bold;
+	}
+
+	.moneyInput {
+		font-size: 70rpx;
+		color: #222222;
+		font-weight: bold;
+		/* flex-grow: 1; */
+		height: 98rpx;
+		width: 100%;
+	}
+
+	.allBtn {
+		font-size: 26rpx;
+		color: #FF0000;
+		width: 200rpx;
+		height: 50rpx;
+		line-height: 50rpx;
+		margin-left: 10rpx;
+		text-align: right;
+	}
+
+	.zongMoney {
+		font-size: 26rpx;
+		color: #999999;
+		
+	}
+
+	.line {
+
+		background-color: #EEEEEE;
+		height: 1rpx;
+	}
+
+	.name {
+		display: flex;
+		justify-content: flex-start;
+		padding: 28rpx 0;
+	}
+
+	.leftTitle {
+		font-size: 30rpx;
+		color: #3C3C3C;
+		margin-right: 90rpx;
+	}
+
+	.Input {
+		font-size: 30rpx;
+		color: #333333;
+
+	}
+
+	.tishi {
+		padding: 0 44rpx;
+		font-size: 26rpx;
+		color: #999999;
+		line-height: 1.5;
+	}
+
+	.sureBtn {
+		width: 690rpx;
+		margin: 20rpx 30rpx;
+		border-radius: 37rpx;
+		height: 74rpx;
+
+		background: linear-gradient(124deg, #FF8700 0%, #FF4F00 100%);
+		color: #FFFFFF;
+		font-size: 30rpx;
+		text-align: center;
+		line-height: 74rpx;
+	}
+</style>

+ 154 - 0
pages/referral/myConnections.vue

@@ -0,0 +1,154 @@
+<template>
+<view class="box">
+ <view class="tabBob">
+	 <view class="tabline" @click="tabcl(1)">
+		<view class="tabTxt" :class="{tabActive:tabindex==1}">一级人脉</view>	<view class="tabkk" v-if="tabindex==1"></view>
+	 </view>
+	 <view class="tabline" @click="tabcl(2)">
+	 	<view class="tabTxt" :class="{tabActive:tabindex==2}">二级人脉</view>	<view class="tabkk" v-if="tabindex==2"></view>
+	 </view>
+	 <view class="tabline" @click="tabcl(3)">
+	 	<view class="tabTxt" :class="{tabActive:tabindex==3}">三级人脉</view>	<view class="tabkk" v-if="tabindex==3"></view>
+	 </view>
+ </view>	
+
+
+ <view style="height: 100rpx;"></view>
+ <view class="line" v-for="(item,index) in 3">
+	 <view class="linetop">
+		 <view class="name">李瑞</view>
+		 <view class="nickNameBox">
+			 <view class="nickName">E三级人脉</view>
+		 </view>
+	 </view>
+	 <view class="lineCOnt">
+		 <view class="lineline">
+		 	<view class="lineContLeft">
+				 <image src="../../static/timg/icon_dianhua.png" mode="" class="lineContLeftImg"></image>
+				 <view class="lineContLeftMs">17891011123</view>
+		 	</view>
+			<view class="lineTIme">2020-09-20 12:13:23</view>
+		 </view>
+		
+	 </view>
+ </view>
+</view>
+</template>
+
+<script>
+	export default {
+		components: {
+			
+		},
+		
+		data() {
+			return {
+				tabindex:1,
+				themeColor:'',
+				userInfo:'',
+			}
+		},
+		onLoad(opt) {
+			this.themeColor = uni.getStorageSync("themeColor");
+			this.userInfo = uni.getStorageSync("userInfo");
+			
+		},
+		onShow() {
+			
+		},
+		methods: {
+			tabcl(num){
+				this.tabindex=num;
+			}
+			
+		}
+	}
+</script>
+
+<style scoped lang="less">
+.box {
+	width: 100vw;
+	min-height: 100vh;
+	background: #F4F5F7;
+}
+.tabBob{
+	display: flex;
+	justify-content: space-around;
+	background: #FFFFFF;
+	padding-bottom: 10rpx;
+	width: 100%;
+	position: fixed;
+	left: 0;
+	top: 0;
+}
+.nickNameBox{
+	display: flex;
+	font-size: 30rpx;
+	font-family: PingFangSC-Medium, PingFang SC;
+	font-weight: 500;
+	color: #FF0000;
+	line-height: 42rpx;
+	
+}
+.tabTxt{
+	padding-top: 23rpx;padding-bottom: 8rpx;
+}
+.tabActive{
+	color: #FF0000 !important;
+}
+.tabkk{
+	width: 40rpx;
+	height: 4rpx;
+	background: #FF0000;
+	margin: 0 auto;
+}
+.nickName{
+	font-weight: 400;
+	color: #999999;
+	font-size: 24rpx;
+	line-height: 30rpx;
+	padding-left: 10rpx;
+}
+.lineContLeftImg{
+	width: 30rpx;
+	height: 30rpx;
+	margin-right: 10rpx;
+}
+.line{
+	width: 702rpx;
+	background: #FFFFFF;
+	border-radius: 10rpx;
+	margin-bottom: 20rpx;
+	margin-left: 24rpx;
+}
+.linetop{
+	display: flex;
+	justify-content: space-between;
+	font-size: 30rpx;
+	padding: 20rpx;
+	padding-bottom: 0;
+}
+.lineline{
+	display: flex;
+	justify-content: space-between;
+	padding: 20rpx;
+	font-weight: 400;
+	color: #999999;
+	font-size: 24rpx;
+	line-height: 30rpx;
+}
+.lineContLeft{
+	display: flex;
+}
+.name{
+	font-weight: 500;
+	color: #3C3C3C;
+}
+.amount{
+	color: #FF0000;
+}
+.nickNameImg{
+	width: 30rpx;
+	height: 30rpx;
+}
+</style>

+ 138 - 0
pages/referral/rebateList.vue

@@ -0,0 +1,138 @@
+<template>
+<view class="box">
+	<view class="tabBob">
+		 <view class="tabline" @click="tabcl(1)">
+			<view class="tabTxt" :class="{tabActive:tabindex==1}">一级人脉</view>	<view class="tabkk" v-if="tabindex==1"></view>
+		 </view>
+		 <view class="tabline" @click="tabcl(2)">
+		 	<view class="tabTxt" :class="{tabActive:tabindex==2}">二级人脉</view>	<view class="tabkk" v-if="tabindex==2"></view>
+		 </view>
+		 <view class="tabline" @click="tabcl(3)">
+		 	<view class="tabTxt" :class="{tabActive:tabindex==3}">三级人脉</view>	<view class="tabkk" v-if="tabindex==3"></view>
+		 </view>
+	</view>	
+	
+	
+	<view style="height: 100rpx;"></view>
+ <view class="line" v-for="(item,index) in 3">
+	 <view class="linetop">
+		 <view class="name">李瑞</view>
+		 <view class="amount">¥999</view>
+	 </view>
+	 <view class="lineCOnt">
+		 <view class="lineline">
+		 	<view class="lineContLeft">
+				 <image src="../../static/timg/icon_dianhua.png" mode="" class="lineContLeftImg"></image>
+				 <view class="lineContLeftMs">17891011123</view>
+		 	</view>
+			<view class="lineTIme">一级人脉</view>
+		 </view>
+		<view class="lineline">
+			<view class="lineContLeft">
+				 <image src="../../static/timg/icon_danhao.png" mode="" class="lineContLeftImg"></image>
+				 <view class="lineContLeftMs">XS202009200001</view>
+			</view>
+			<view class="lineTIme">2020-09-20 12:13:23</view>
+		</view>
+	 </view>
+ </view>
+</view>
+</template>
+
+<script>
+	export default {
+		components: {
+			
+		},
+		
+		data() {
+			return {
+				tabindex:1,
+				themeColor:'',
+				userInfo:'',
+			}
+		},
+		onLoad(opt) {
+			this.themeColor = uni.getStorageSync("themeColor");
+			this.userInfo = uni.getStorageSync("userInfo");
+			
+		},
+		onShow() {
+			
+		},
+		methods: {
+			tabcl(num){
+				this.tabindex=num;
+			}
+			
+		}
+	}
+</script>
+
+<style scoped lang="less">
+.box {
+	width: 100vw;
+	min-height: 100vh;
+	background: #F4F5F7;
+}
+.tabBob{
+	display: flex;
+	justify-content: space-around;
+	background: #FFFFFF;
+	padding-bottom: 10rpx;
+	width: 100%;
+	position: fixed;
+	left: 0;
+	top: 0;
+}
+.tabTxt{
+	padding-top: 23rpx;padding-bottom: 8rpx;
+}
+.tabActive{
+	color: #FF0000 !important;
+}
+.tabkk{
+	width: 40rpx;
+	height: 4rpx;
+	background: #FF0000;
+	margin: 0 auto;
+}
+.lineContLeftImg{
+	width: 30rpx;
+	height: 30rpx;
+	margin-right: 10rpx;
+}
+.line{
+	width: 702rpx;
+	background: #FFFFFF;
+	border-radius: 10rpx;
+	margin-bottom: 20rpx;
+	margin-left: 24rpx;
+}
+.linetop{
+	display: flex;
+	justify-content: space-between;
+	font-size: 30rpx;
+	padding: 20rpx;
+	padding-bottom: 0;
+}
+.lineline{
+	display: flex;
+	justify-content: space-between;
+	padding: 20rpx;
+	font-weight: 400;
+	color: #999999;
+	font-size: 24rpx;
+	line-height: 30rpx;
+}
+.lineContLeft{
+	display: flex;
+}
+.name{
+	font-weight: 500;
+	color: #3C3C3C;
+}
+.amount{
+	color: #FF0000;
+}
+</style>

+ 4 - 4
pages/referral/referral.vue

@@ -6,9 +6,9 @@
 			<view class="topLeftTitle">未提现返利</view>
 			<view class="topLeftNum">839204.00</view>
 		</view>
-		<view class="topRight">提现</view>
+		<view class="topRight" @click="goRouter('extract')">提现</view>
 	</view>
-	<view class="xffl">
+	<view class="xffl" @click="goRouter('myConnections')">
 		<view class="xfflTitle">消费返利</view>
 		<view class="xfflLine">
 			<view class="xfflLineLeft">
@@ -44,7 +44,7 @@
 		</view>
 	</view>
 	
-	<view class="xffl">
+	<view class="xffl" @click="goRouter('rebateList')">
 		<view class="xfflTitle">扫码注册返利</view>
 		<view class="xfflLine">
 			<view class="xfflLineLeft">
@@ -57,7 +57,7 @@
 		
 	</view>
 	<view class="lineBox">
-		  <view class="line" @click="goRouter('myQr')">
+		  <view class="line" @click="goRouter('../partner/myQr')">
 			  <view class="lineLeft">
 			  	<image src="../../static/timg/icon_erweima.png" mode="" class="lineLeftImg"></image>
 			  	<view class="lineLeftTxt">生成二维码</view>

+ 112 - 6
pages/user/historyDetail.vue

@@ -95,6 +95,17 @@
 			</view>
 		</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>
@@ -108,22 +119,58 @@
 				id: '',
 				orderData: '',
 				 themeColor:'',
-
-
+                authorizShow:false,
+                userInfo:'',
+				ext:'',
+				wxOpenData:'',
 			}
 		},
 		onLoad(opt) {
 			
-			this.id = opt.id
+			 this.id = opt.id
 			 this.themeColor = uni.getStorageSync("themeColor");
-
-			this.getData()
+            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.themeColor = uni.getStorageSync("themeColor");
+					this.getData()
+				})
+			}
+			
 			
 
 		},
 		
 		methods: {
-			
+			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.loginInfo)
+							this.$store.commit('mutationsuserInfo', this.userInfo)
+						    this.getData()
+						}	
+					  })
+			},
 			map() {
 				console.log("打开地图")
 				var that = this;
@@ -703,4 +750,63 @@
 		justify-content: flex-start;
 		align-items: center;
 	}
+	.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>

+ 115 - 6
pages/user/myOrder/activityOrderDetail.vue

@@ -197,6 +197,17 @@
 			</view>
 		</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>
@@ -234,24 +245,63 @@
 				isShowMa: false,
 				quanMaList:[],
 				 themeColor:'',
-
+                authorizShow:false,
+                userInfo:'',
+                ext:'',
+                wxOpenData:'',
 			}
 		},
 		onLoad(opt) {
 			 this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
 			this.id = opt.id
 			this.themeColor = uni.getStorageSync("themeColor");
-
-			if (this.id) {
-				this.getData()
-			}
+            this.userInfo=this.$store.state.userInfo;
+            this.ext=this.$common.getExtStoreId();
+            if(this.userInfo){
+            	if (this.id) {
+            		this.getData()
+            	}
+            }else{
+            	this.$common.automaticlogin().then(val => {
+            		this.userInfo=this.$store.state.userInfo;
+            		this.wxOpenData=this.$store.state.wxOpenData;
+            		this.themeColor = uni.getStorageSync("themeColor");
+            		if (this.id) {
+            			this.getData()
+            		}
+            	})
+            }
+			
 			
 
 		},
 		
 
 		methods: {
-			
+			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.loginInfo)
+							this.$store.commit('mutationsuserInfo', this.userInfo)
+						    this.getData()
+						}	
+					  })
+			},
 			goDetail(id) {
 				console.log('id--',id);
 				uni.navigateTo({
@@ -955,4 +1005,63 @@
 		height: 400rpx;
 		margin-left: 86rpx;
 	}
+	.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>

+ 114 - 6
pages/user/myOrder/paintOrderDetail.vue

@@ -204,6 +204,17 @@
 			
 			</view>
 		</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>
@@ -242,7 +253,10 @@
 				isShowMa: false,
 				quanMaList:[],
 				 themeColor:'',
-
+                authorizShow:false,
+                userInfo:'',
+                ext:'',
+                wxOpenData:'',
 			}
 		},
 		onLoad(opt) {
@@ -250,17 +264,52 @@
 			this.id = opt.id
 			
 			 this.themeColor = uni.getStorageSync("themeColor");
-
-			if (this.id) {
-				this.getData()
-			}
+             this.userInfo=this.$store.state.userInfo;
+            this.ext=this.$common.getExtStoreId();
+            if(this.userInfo){
+            	if (this.id) {
+            		this.getData()
+            	}
+            }else{
+            	this.$common.automaticlogin().then(val => {
+            		this.userInfo=this.$store.state.userInfo;
+            		this.wxOpenData=this.$store.state.wxOpenData;
+            		this.themeColor = uni.getStorageSync("themeColor");
+            		if (this.id) {
+            			this.getData()
+            		}
+            	})
+            }
 			
 
 		},
 		
 
 		methods: {
-			
+			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.loginInfo)
+							this.$store.commit('mutationsuserInfo', this.userInfo)
+						    this.getData()
+						}	
+					  })
+			},
 			pay(){
 				this.$http('openMallOrder/unifiedPay', {
 					sheetId:this.id
@@ -946,4 +995,63 @@
 		height: 400rpx;
 		margin-left: 86rpx;
 	}
+	.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>