twt 2 lat temu
rodzic
commit
165885f9c1

+ 12 - 8
components/timeSelect/timeSelect.vue

@@ -9,7 +9,9 @@
 				  </view>
 				  <view class="time-select-popup-body">
 				    <view class="time-select-popup-body-left">
-				      <view  class="time-select-popup-body-left-item" v-for="(timeItem,index) in timeList" :class="{'selected':selectedDate===timeItem.date}" @click="selectTimeList(timeItem)">{{timeItem.date.substring(5)}}</view>
+				      <view  class="time-select-popup-body-left-item" v-for="(timeItem,index) in timeList" :class="{'selected':selectedDate===timeItem.date}" @click="selectTimeList(timeItem)">
+					   <view style="width: 6rpx;height: 30rpx;background:#D53533;position: absolute;left: 0; top: 32rpx;" v-if="selectedDate===timeItem.date" :style="{background:'#'+themeColor}"></view>  {{timeItem.date.substring(5)}}
+					  </view>
 				    </view>
 				    <view class="time-select-popup-body-time">
 				      <view class="time-select-popup-body-time-list">
@@ -26,7 +28,7 @@
 					  <view style="height: 120rpx;"></view>
 				    </view>
 				  </view>
-				  <view  class="time-select-popup-body-button fenxiang newcsbtn" style="width: 100%" @click="handleSelect">完成</view>
+				  <view  class="time-select-popup-body-button fenxiang newcsbtn" style="width: 100%" :style="{background:'#'+themeColor}" @click="handleSelect">完成</view>
 				</view>
 			</view>
 			
@@ -36,7 +38,7 @@
 
 <script>
 export default {
-	props:['timedata'],
+	props:['timedata','themeColor'],
 	data() {
 		return {
 			show: false,
@@ -44,14 +46,16 @@ export default {
 			timeList: [],
 			timeItemList: [],
 			selectedTime: '',
-			selectedDate: ''
+			selectedDate: '',
+			themeColor:'',
 		}
 	},
 	onLoad(opt) {
-      
+     
 	},
 	onShow() {
-		
+		//this.themeColor = uni.getStorageSync("themeColor");
+		//console.log("444"+this.themeColor)
 	},
 	methods: {
 		handleSelect(){
@@ -163,14 +167,14 @@ export default {
 	    color:rgba(51,51,51,1);
 	    background:rgba(255,255,255,1);
 	    &:before{
-	      display: block;
+	      /* display: block;
 	      content: '';
 	      width: 6rpx;
 	      height: 30rpx;
 	      background:#D53533;
 	      position: absolute;
 	      left: 0;
-	      top: 32rpx;
+	      top: 32rpx; */
 	    }
 	  }
 	}

+ 1 - 3
manifest.json

@@ -60,9 +60,7 @@
                 "desc" : "获取商家距离"
             }
         },
-		"requiredPrivateInfos":[
-		"getLocation"
-		]
+        "requiredPrivateInfos" : [ "getLocation" ]
     },
     "mp-alipay" : {
         "usingComponents" : true

+ 107 - 7
pages/activity/jkDetail.vue

@@ -45,7 +45,7 @@
 				<view class="signupLine" v-for="(item,index) in info.signUserList">
 					<view class="signupLineL">
 						<img :src="item.headImg" alt="" class="signupLineLImg">
-						<view class="signupLineLName">{{item.nickName}}</view>
+						<view class="signupLineLName">{{item.nickName?item.nickName:'微信昵称'}}</view>
 					</view>
 					<view class="signupLineM">{{item.plateNumber?item.plateNumber:''}}</view>
 					<view class="signupLineR">{{item.createTime}}</view>
@@ -223,7 +223,17 @@
 				 </view>
 			 </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>
 
@@ -269,6 +279,9 @@
 				 shareId:'',
 				 scene:'',
 				 themeColor:'',
+				 authorizShow:false,
+				 wxOpenData:'',
+				 ext:'',
 			}
 		},
 		onLoad(opt) {
@@ -276,9 +289,12 @@
 		   if(opt.shareId){
 			   this.shareId=opt.shareId
 		   }
-		   this.userInfo=this.$store.state.userInfo;
+		  
+		   this.ext=this.$common.getExtStoreId();
 		  // opt.scene='10002'
 		   if(this.userInfo){
+			   this.userInfo=this.$store.state.userInfo;
+			   this.wxOpenData=this.$store.state.wxOpenData;
 			   this.themeColor = uni.getStorageSync("themeColor");
 			this.queryGoodsLook()
 			if(opt.scene&&opt.scene!='undefined'){
@@ -295,7 +311,7 @@
 		   	this.$common.automaticlogin().then(val => {
 				this.themeColor = uni.getStorageSync("themeColor");
 		   		this.userInfo=this.$store.state.userInfo;
-		   		
+		   		this.wxOpenData=this.$store.state.wxOpenData;
 		   		if(opt.scene&&opt.scene!='undefined'){
 		   			this.scene=opt.scene;
 		   			this.getShareParams()
@@ -331,6 +347,9 @@
 			this.bgmMusic.stop()
 		},
 		methods: {
+			authorizShowno(){
+				this.authorizShow=false
+			},
 			getShareParams(){
 				this.$http('openMall/getShareParams', {
 				  scene:this.scene,
@@ -788,8 +807,31 @@
 			  this.shengyuD=shengyuD;
 			  this.shengyuH=shengyuH;
 			  setTimeout(_this.clock2, 500)
-			}
-		   
+			},
+			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.getInfo()
+		   			}	
+		   		  })
+		   },
 		},
 		onShareAppMessage(res) {
 			console.log(this.userInfo)
@@ -1352,5 +1394,63 @@
 		
 		height: 100%;
 		}
-		
+		.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>

+ 4 - 2
pages/index/confirmYuyue.vue

@@ -57,9 +57,9 @@
 			<view class="bottom-container-price"><span class="qianhaospan" >¥</span> {{totalPrice}} <span></span></view>
 			<view class="ckj">参考价格(到店支付)</view>
 		</view>
-	  <view  class="newyyBotbutton" @click="yuyue">立即预约</view>
+	  <view  class="newyyBotbutton" :style="{background:'#'+themeColor}" @click="yuyue">立即预约</view>
 	</view>
-	<timeSelect ref="timeSelect" :timedata="timedata" @changeTime="changeTime"></timeSelect>
+	<timeSelect ref="timeSelect" :timedata="timedata" :themeColor="themeColor" @changeTime="changeTime"></timeSelect>
 </view>
 </template>
 
@@ -80,9 +80,11 @@
 				yuyueData:'',
 				carInfo:'',
 				yyshopInfo:'',
+				themeColor:'',
 			}
 		},
 		onLoad() {
+			this.themeColor = uni.getStorageSync("themeColor");
 			console.log(this.$store.state.yuyueData)
 			this.yuyueData=this.$store.state.yuyueData;
 			//this.carInfo=this.$store.state.carInfo

+ 7 - 2
pages/index/discountCardDetail.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="box">
-		<view style="width: 750rpx;height: 172rpx;background: #FF0000;"></view>
+		<view style="width: 750rpx;height: 172rpx;" class="boxtop"  :style="{background:'#'+themeColor}"></view>
 
 		<view class="detailBg">
 			<view class="detailTop">
@@ -65,9 +65,11 @@
 			return {
 				id: '',
 				detail: {},
+				themeColor:'',
 			}
 		},
 		onLoad(opt) {
+			this.themeColor = uni.getStorageSync("themeColor");
 			this.id = opt.id;
 			this.getData();
 		},
@@ -92,7 +94,10 @@
 	}
 </script>
 
-<style>
+<style scoped>
+	.boxtop{
+		background: #FF0000;
+	}
 	.box {
 		min-height: 100vh;
 		background: #F4F5F7;

+ 9 - 0
pages/index/index.vue

@@ -266,6 +266,7 @@
 			this.shopId=ext.shopId;
 			this.url=ext.url;
 			this.unionId=ext.unionId
+			//this.unionId="EF7981B9-2D1D-4006-9C0A-66CE7177134D"
 			// uni.setStorage({
 			// 	key: 'extdata',
 			// 	data: {
@@ -513,6 +514,14 @@
 				   code:e.code,
 				   unionId:this.unionId
 				  },'GET').then(res => {
+					if(res.code!=0){
+						 uni.hideLoading();
+						 uni.showToast({
+						 	title: res.msg,
+						 	icon: 'none',
+						 	duration: 3000
+						 });
+					}
 				 	this.wxOpenData=res.data;
 					this.themeColor=res.data.themeColor
 					//this.themeColor='FFFFFF'

+ 4 - 3
pages/index/onlineBooking.vue

@@ -315,12 +315,13 @@
 	height: 500rpx;
 }
 .newshopNames{
-	width: 702rpx;
-	margin-left: 24rpx;
+	width: 750rpx;
 	background: #FFFFFF;
 	border-radius: 10rpx;
 	margin-top: -60rpx;
 	position: relative;
+	border-radius: 24rpx 24rpx 0px 0px;
+	padding-bottom: 20rpx;
 }
 .newshopDname{
 	color: #333333;font-size: 30rpx;
@@ -377,6 +378,7 @@
   padding: 20rpx 20rpx;
   background: url(http://dmsphoto.66km.com.cn/thFiles/010748B7-5678-46C3-941B-60B3CD4D10CB.png) no-repeat;
   background-size: 100% 100%;
+  margin-left: 24rpx;
 }
 .newshopDadressName{
 	color: #999999;padding-top: 16rpx;
@@ -414,7 +416,6 @@
 }
 .yuyue-container{
 	display: flex;
-	margin-top: 20rpx;
 	padding-bottom: 120rpx;
 	min-height: 40vh;
 }

+ 3 - 1
pages/integral/integralConfirm.vue

@@ -26,7 +26,7 @@
 	 	<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 class="bottomBtn" :style="{background:'#'+themeColor}" @click="goBuy">提交订单</view>
 	 </view>
  </view>
 </template>
@@ -40,6 +40,7 @@
 				avaIntegral:'',
 				goodsnum:'',
 				jfgoodsDetail:'',
+				themeColor:'',
 			}
 		},
 		onLoad(opt) {
@@ -48,6 +49,7 @@
 			this.shopId=opt.shopID;
 			this.avaIntegral=opt.avaIntegral;
 			this.goodsnum=opt.goodsnum;
+			this.themeColor = uni.getStorageSync("themeColor");
 		},
 		methods: {
 			

+ 4 - 2
pages/integral/integralgoodsDetail.vue

@@ -36,7 +36,7 @@
 	
 	<view class="bottomBox">
 		<view class="ktyong" style="padding-top: 46rpx;">可用 <span class="ktyong1" style="font-weight: 500;">{{avaIntegral}}</span><span class="ktyong2">积分</span> </view>
-		<view class="bottomBtn" @click="ljbuy">立即兑换</view>
+		<view class="bottomBtn" :style="{background:'#'+themeColor}" @click="ljbuy">立即兑换</view>
 		
 	</view>
 	
@@ -99,7 +99,7 @@
 				<view class="ktyong"><view>合计 <span class="ktyong1" style="font-weight: 500;">{{totalIntegral}}</span><span class="ktyong2">积分</span>   </view> 
 				   <view class="kyNum">可用积分:{{avaIntegral}}</view>
 				</view>
-				<view class="bottomBtn" @click="goBuy">立即兑换</view>
+				<view class="bottomBtn" @click="goBuy" :style="{background:'#'+themeColor}">立即兑换</view>
 			</view>
 			
 		</view>
@@ -166,6 +166,7 @@
 				totalIntegral:'',
 				avaIntegral:'',
 				ckshopShow:false,
+				themeColor:'',
 				//snapup:
 			}
 		},
@@ -176,6 +177,7 @@
 			//this.userInfo = uni.getStorageSync("userInfo");
 			this.userInfo=this.$store.state.userInfo;
 			this.ext=this.$common.getExtStoreId();
+			this.themeColor = uni.getStorageSync("themeColor");
 			if(this.userInfo){
 				this.wxOpenData=this.$store.state.wxOpenData;
 				this.openGoodsDetailById();

+ 3 - 3
pages/integral/recordDetail.vue

@@ -18,7 +18,7 @@
 		<view style="height: 44px;"></view>
 
 
-		<view class="top">
+		<view class="top" :style="{background:'#'+themeColor}">
 			<view class="orderState">
 				<image src="../../static/img/icon_order_def.png" mode="" style="width: 44rpx;height: 44rpx;"></image>
 
@@ -186,7 +186,7 @@
 				lv: 3, // 二维码容错级别 , 一般不用设置,默认就行
 				src: '', // 二维码生成后的图片地址或base64
 				isShowMa: true,
-
+                themeColor:'',
 
 			}
 		},
@@ -194,7 +194,7 @@
 			this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
 			this.id = opt.id
 			this.SheetType = opt.SheetType
-
+            this.themeColor = uni.getStorageSync("themeColor");
 			if (this.id) {
 				this.getData()
 			}

+ 1 - 1
pages/shop/shop.vue

@@ -49,7 +49,7 @@
 			</view>
 	   </view>
 	   <scroll-view scroll-y="true" class="scroll-Y goodsSw goodsBox" :scroll-top="scrollTop" @scroll="onscroll" >
-	   		<view><!--  class="goodsBox" -->
+	   		<view style="padding-bottom: 30rpx;"><!--  class="goodsBox" -->
 	   			<view class="hotGoodsLine" v-for="(item,index) in list" @click="goDetail(item)">
 	   				<view>
 	   					<image :src="item.url" v-if="item.url" mode="" @error="defImg()" class="hotGoodsLineImg"></image>

+ 1 - 1
pages/user/expertServices.vue

@@ -16,7 +16,7 @@
 		</view>
 		<!-- 全部服务顾问横栏 -->
 		<view class="mid-box">
-			<view class="mid-v-line"></view>
+			<view class="mid-v-line" :style="{background:'#'+themeColor}"></view>
 			<view class="mid-sec-tit">全部服务顾问</view>
 		</view>
 		<!-- 服务顾问list -->

+ 12 - 5
pages/user/user.vue

@@ -87,7 +87,10 @@
 				{{numList.shopInfo.startTime}}-{{numList.shopInfo.endTime}}</view>
 			<view class="address">
 				<view class="Address">
-					{{numList.shopInfo.provinceName}}{{numList.shopInfo.cityName}}{{numList.shopInfo.areaName}}{{numList.shopInfo.address}}
+					{{numList.shopInfo.provinceName?numList.shopInfo.provinceName:''}}
+					{{numList.shopInfo.cityName?numList.shopInfo.cityName:''}}
+					{{numList.shopInfo.areaName?numList.shopInfo.areaName:''}}
+					{{numList.shopInfo.address?numList.shopInfo.address:''}}
 				</view>
 				<!-- <view class="distance" v-if="numList.shopInfo.distance&&numList.shopInfo.distance!= '0.00'">{{numList.shopInfo.distance}}km</view> -->
 			</view>
@@ -373,10 +376,14 @@
 				})
 			},
 			gonavigateTo(url) {
-
-				uni.navigateTo({
-					url: url
-				})
+			   if (this.userInfo) {
+					uni.navigateTo({
+						url: url
+					})
+				} else {
+					this.authorizShow = true;
+				}
+				
 			},
 			signOut() {
 				//uni.clearStorageSync();

+ 4 - 1
utils/request.js

@@ -1,17 +1,20 @@
 //测试地址
 //const baseUrl = 'http://api.dms.66km.com.cn/'
 //const baseUrl = 'http://192.168.0.121:20187/'
+//const baseUrl = 'http://192.168.0.183:20187/'
 //正式
-//const baseUrl = 'http://apidms.66km.com/'
+//const baseUrl = 'https://apidms.66km.com/'
 //正式地址
 import $store from '../store'
 const extConfig = uni.getExtConfigSync();		
 console.log(extConfig)
 const baseUrl=extConfig.url+'/'
+//wx2c6f04c0dcd15984正式  wx33053a645546ec31
 const http = (url = '', date = {}, type = 'POST', header = {
 }) => {
     return new Promise((resolve, reject) => {
 		header={};
+		console.log(baseUrl)
 		//const wxOpenData = uni.getStorageSync("wxOpenData");
 		var wxOpenData=$store.state.wxOpenData
 		if(wxOpenData.loginInfo){