Browse Source

样式修改

twt 2 years ago
parent
commit
01761e4142

+ 5 - 4
pages.json

@@ -90,7 +90,7 @@
 		    "style" :                                                                                    
 		    {
 		        "navigationBarTitleText": "活动",
-		        "enablePullDownRefresh": false
+		        "enablePullDownRefresh": true
 		    }
 		    
 		}
@@ -137,8 +137,8 @@
 		    "path" : "pages/shop/goodsDetail",
 		    "style" :                                                                                    
 		    {
-		        "navigationBarTitleText": "商品详情"
-
+		        "navigationBarTitleText": "商品详情",
+                 "enablePullDownRefresh": true
 		    }
 		}
 
@@ -302,7 +302,8 @@
 			"path": "pages/activity/jkDetail",
 			"style": {
 				"navigationBarTitleText": "活动详情",
-				"app-plus": { "softinputMode": "adjustPan"}
+				"app-plus": { "softinputMode": "adjustPan"},
+				"enablePullDownRefresh": true
 			}
 		},
 		{

+ 2 - 2
pages/activity/activity.vue

@@ -225,8 +225,8 @@ border-radius: 10rpx 10rpx 0px 0px;
 		padding: 5rpx 10rpx;
 		color: #FFFFFF;
 		font-size: 24rpx;
-		background: #000000;
-
+		background: rgba(0, 0, 0, 0.5);
+        margin-left: -8rpx;
 		border-radius: 0 10rpx 0 0;
 	}
 

+ 142 - 16
pages/activity/jkDetail.vue

@@ -11,7 +11,7 @@
 		<view class="shopBox">
 			<view class="shopBoxTop">
 				<view class="shopMs">活动门店</view>
-				<view class="shopTy">
+				<view class="shopTy" @click="useShow">
 					<view class="shopTyTxt">{{info.shopCount}}家门店通用</view>
 					<img src="../../static/timg/jt2.png" alt="" class="shopjt">
 				</view>
@@ -96,7 +96,7 @@
 				</button>
 				<!-- 状态1未开始 2进行中3已结束 -->
 				<view class="bottomBtn" v-if="info.state==2" @click="signUp">
-				  <span v-if="info.money">¥{{info.money}} &nbsp; 立即购</span>
+				  <span v-if="info.money">¥{{info.money}} &nbsp; 立即购</span>
 				  <span v-else>立即报名</span>
 				</view>
 				<view class="bottomBtn2" v-if="info.state==1">报名未开始</view>
@@ -105,32 +105,36 @@
 		</view>
 		<!-- 报名弹框 -->
 		<view class="baomingBox" v-if="bmShow" @click="nobmshow">
-			<view class="baomingCont" @click.stop="">
+			<view class="baomingCont" @click.stop="" :style="{bottom: jpHeight}">
 				<view class="bmTop">
 					<view class="bmTitle">登记信息</view>
 					<img src="../../static/timg/chahao.png" alt="" class="bmChimg" @click="nobmshow">
 				</view>
 				<view style="padding: 0 24rpx;">
 					<view class="bmshopLine" @click="showCkshop">
-						<view class="bmshopname">{{shopName?shopName:'请选择门店'}}</view>
+						<view class="bmshopname">请选择门店</view>
+						<view class="bmshopname" style="color: #333333;">{{shopName}}</view>
 						<img src="../../static/timg/icon_arrow_right.png" alt="" class="bmshopjt">
 					</view>
 					<!-- clWhere报名凭证1,2,3,4 1手机号2车牌号3姓名4单位 -->
 					<view class="bmLine" v-if="info.clWhere.indexOf(1)!=-1" >
-						<input type="text" v-model="mobilePhone" cursor-spacing="10" class="bmlineInput" placeholder="输入手机号">
+						<input  type="text" v-model="mobilePhone" cursor-spacing="10" class="bmlineInput" placeholder="输入手机号" placeholder-style="color:#999999">
 					</view>
 					<view class="bmLine" v-if="info.clWhere.indexOf(2)!=-1">
-						<input type="text" v-model="plateNumber"  cursor-spacing="10" class="bmlineInput" placeholder="输入车牌号">
+						<input type="text" v-model="plateNumber"  cursor-spacing="10" class="bmlineInput" placeholder="输入车牌号" placeholder-style="color:#999999">
 					</view>
 					<view class="bmLine" v-if="info.clWhere.indexOf(3)!=-1">
-						<input type="text"  v-model="customerName"  cursor-spacing="10" class="bmlineInput" placeholder="输入姓名">
+						<input type="text"  v-model="customerName"  cursor-spacing="10" class="bmlineInput" placeholder="输入姓名" placeholder-style="color:#999999">
 					</view>
 					<view class="bmLine" v-if="info.clWhere.indexOf(4)!=-1">
-						<input type="text"  v-model="unit"  cursor-spacing="10" class="bmlineInput" placeholder="输入单位">
+						<input type="text"  v-model="unit"  cursor-spacing="10" class="bmlineInput" placeholder="输入单位" placeholder-style="color:#999999">
 					</view>
 				</view>
 				<view class="bmTtnBox">
-					<view class="bmBtn" @click="submitOrder">提交</view>
+					<view class="bmBtn" @click="submitOrder">
+						<span v-if="info.money">¥{{info.money}} &nbsp; 立即抢购</span>
+						<span v-else>立即报名</span>
+					</view>
 				</view>
 			</view>
 		</view>
@@ -166,6 +170,40 @@
 				</view>
 				
 				
+			</view>
+		</view>
+		<!-- 适用门店 -->
+		<view class="baomingBox ckshopBox" v-if="useShopShow" @click="noShowShop2">
+			<view class="baomingCont" @click.stop="">
+				<view class="bmTop">
+					<view class="bmTitle">选择门店</view>
+					<img src="../../static/timg/chahao.png" alt="" class="bmChimg" @click="noShowShop2">
+				</view>
+				<view style="padding: 0 24rpx; height: 45vh;overflow-y: scroll;">
+					<view class="ckshopLine" v-for="(item,index) in info.shopList"  @click="ckshop(item)">
+						<view class="shoplineLeft">
+							<image :src="item.photoPath" mode="" class="shopImg" v-if="item.photoPath"></image>
+							<image src="../../static/img/noimg.png" mode="" class="shopImg" v-else></image>
+						</view>
+						<view class="shopright" style="padding-left: 20rpx;">
+							<view class="shopTop">
+								<view class="shopName">{{item.shopName}}</view>
+							</view>
+							<view class="brandsBg" v-if="item.brands">
+								<view class="brands" v-for="(v,index2) in item.brands.split(',')">{{v}}</view>
+							</view>
+							<view class="shopTime"><span v-if="item.startTime">{{item.startTime}}</span> - <span
+									v-if="item.endTime">{{item.endTime}}</span> </view>
+							<view class="shopBottomLeft">
+								<span class="shopaddress"
+									v-if="item.address">{{item.provinceName}}{{item.cityName}}{{item.areaName}}{{item.address}}</span>
+								<span v-if="item.distance&&item.distance!= '0.00'">{{item.distance}}km</span>
+							</view>
+						</view>
+					</view>
+				</view>
+				
+				
 			</view>
 		</view>
 	</view>
@@ -198,6 +236,9 @@
 				plateNumber:'',
 				comment:'',
 				userInfo:'',
+				useShopShow:false,
+				jpHeight:0,
+				 isPlay: false
 			}
 		},
 		onLoad(opt) {
@@ -205,19 +246,51 @@
 		   if(this.userInfo){
 		   	this.collectingID=opt.id;
 		   	this.getInfo();
-		   	this.queryActivityInfo()
+		   	this.queryActivityInfo();
+			this.queryGoodsLook()
 		   }else{
 		   	this.$common.automaticlogin().then(val => {
 		   		this.userInfo=this.$store.state.userInfo;
 		   		
 		   		this.collectingID=opt.id;
 		   		this.getInfo();
-		   		this.queryActivityInfo()
+		   		this.queryActivityInfo();
+				this.queryGoodsLook()
 		   	})
 		   }
 		  
+		  uni.onKeyboardHeightChange((obj)=>{
+		      // 获取系统信息
+		  	let _sysInfo = uni.getSystemInfoSync();
+		  	let _heightDiff = _sysInfo.screenHeight - _sysInfo.windowHeight
+		  	let _diff = obj.height - _heightDiff
+		  	// 键盘高度
+		  	this.jpHeight = (_diff > 0 ? _diff : 0) - 2 + "px";
+		  })
+		 
+		},
+		onPullDownRefresh(){
+			this.getInfo();
+			this.queryActivityInfo();
+			setTimeout(() => {
+					uni.stopPullDownRefresh(); // 关闭下拉刷新 
+			}, 1000);
 		},
 		methods: {
+			queryGoodsLook(){
+				this.$http('openmy/queryGoodsLook', {
+				  goodsId:this.collectingID,
+				  openId:this.userInfo.openId
+				 },'POST').then(res => {
+					
+				 })
+			},
+			noShowShop2(){
+				this.useShopShow=false;
+			},
+			useShow(){
+				this.useShopShow=true;
+			},
 			submitOrder(){
 				var jsonArray={
 					itemId:this.collectingID,
@@ -234,6 +307,38 @@
 					});
 					return false;
 				}
+				if(this.info.clWhere.indexOf(1)!=-1&&this.mobilePhone==''){
+					uni.showToast({
+						title: '请输入手机号',
+						icon: 'none',
+						duration: 3000
+					});
+					return false;
+				}
+				if(this.info.clWhere.indexOf(2)!=-1&&this.plateNumber==''){
+					uni.showToast({
+						title: '请输入车牌号',
+						icon: 'none',
+						duration: 3000
+					});
+					return false;
+				}
+				if(this.info.clWhere.indexOf(3)!=-1&&this.customerName==''){
+					uni.showToast({
+						title: '请输入姓名',
+						icon: 'none',
+						duration: 3000
+					});
+					return false;
+				}
+				if(this.info.clWhere.indexOf(4)!=-1&&this.unit==''){
+					uni.showToast({
+						title: '请输入单位',
+						icon: 'none',
+						duration: 3000
+					});
+					return false;
+				}
 				var arr=[]
 				arr.push(jsonArray)
 				var params={
@@ -349,6 +454,7 @@
 				this.ckshopdata=item;
 				this.shopName=item.shopName;
 				this.ckshopShow=false;
+				this.shopInfo=item
 			},
 			showCkshop(){
 				console.log("选择门店")
@@ -399,9 +505,29 @@
 					if (this.activityNoOpen && !this.activityEnd) {
 					  this.clock2()
 					}
+					// if(this.info.music){
+					// 	this.innerAudioContext = uni.createInnerAudioContext();
+					// 		this.playVoice(this.info.music.music)
+					// 		uni.$on('changePlay', isPlay => {
+					// 			this.playVoice(this.lastRecord, this.isPlay)
+					// 		})
+					// }
+					  
 					
 				})
 			},
+			playVoice(url, isPlay){
+				if (url) {
+					this.lastRecord = url; // 将路径赋值给定义的变量好做判断
+					this.innerAudioContext.src = url; // 配置音频播放路径
+					this.innerAudioContext.play(); // 播放
+					this.innerAudioContext.loop = true; // 是否循环播放
+				}
+				this.isPlay = !this.isPlay;
+				if (isPlay) {
+					this.innerAudioContext.pause(); // 停止
+				}
+			},
 			getInfo(){
 				this.$http('openreservation/getInfo', {
 					lat: '',
@@ -590,7 +716,7 @@
 	}
 	.bmshopname{
 		font-weight: 400;
-		color: #333333;
+		color: #999999;
 		font-size: 28rpx;
 		line-height: 40rpx;
 		width: 500rpx;
@@ -625,7 +751,7 @@
 	.baomingCont{
 		position: absolute;
 		width: 750rpx;
-		height:770rpx;
+		height:850rpx;
 		padding-bottom: constant(safe-area-inset-bottom);
 		padding-bottom: env(safe-area-inset-bottom);
 		left: 0;
@@ -702,7 +828,7 @@
 		color: #FFFFFF;
 		width: 41rpx;
 		text-align: center;
-		background: #FF4F00;
+		background: #F03B3B;
 		border-radius: 6rpx;
 		margin-top: 9rpx;
 		margin-left: 15rpx;
@@ -839,7 +965,7 @@
 		margin-top: 20rpx;
 	}
 	.detailTitle{
-		color: #3C3C3C;
+		color: #222222;
 		font-weight: 500;
 		padding: 20rpx 24rpx;
 		font-size: 30rpx;
@@ -856,7 +982,7 @@
 	.shopBox{
 		background: #ffffff;
 		margin-top: 20rpx;
-		padding: 20rpx 34rpx;
+		padding: 20rpx 24rpx;
 	}
 	.shopBoxTop{
 		display: flex;

+ 144 - 0
pages/activity/jkshop.vue

@@ -0,0 +1,144 @@
+<template>
+	<view class="content">
+	 <view class="content2">
+		 <view class="shopBox">
+			<view class="shopLine" v-for="(item,index) in list" @click="ckshop(item)">
+				<img src="../../static/img/ckn.png" alt="" class="ckImg" v-if="!item.ck">
+				<img src="../../static/img/cky.png" alt="" class="ckImg" v-if="item.ck">
+				<view class="shopName">{{item.shopName}}</view>
+			</view>
+		 </view>
+		 
+	 </view>
+	 <view class="bottom">
+		 <view class="bottomLeft" @click="all">
+			 <img src="../../static/img/ckn.png" alt="" class="ckImg" v-if="!allck">
+			 <img src="../../static/img/cky.png" alt="" class="ckImg" v-if="allck">
+			 <view class="allTxt">全选</view>
+		 </view>
+		 <view class="determine" @click="determine">确定添加</view>
+	 </view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				list:'',
+				allck:false,
+				shopckList:'',
+			}
+		},
+		onLoad() {
+          this.getShopList()
+		},
+		methods: {
+		   determine(){
+			   var shopckList=[]
+			   this.list.forEach(item=>{
+			      if(item.ck){
+					  shopckList.push(item)
+				  }
+			   })
+			   uni.setStorage({
+			   		key: 'shopckList',
+			   		data: shopckList,
+			   		 success: function () {	
+						 uni.navigateBack(-1)
+			   		 }
+			   });
+		   },
+		   ckshop(item){
+			   item.ck=!item.ck
+		   },
+		   all(){
+			   this.allck=!this.allck;
+			   if(this.allck){
+				   this.list.forEach(item=>{
+				   	item.ck=true;
+				   })
+			   }else{
+				   this.list.forEach(item=>{
+				   	item.ck=false;
+				   })
+			   }
+		   },
+           getShopList(){
+			   uni.showLoading({
+			   	title: '加载中'
+			   })
+			   this.$http('openH5SetTheGuest/getShopList', {
+			     
+			    },'GET').then(res => {
+			   		uni.hideLoading();
+					res.data.forEach(item=>{
+						item.ck=false;
+					})
+			   		this.list=res.data;
+					//console.log(this.list)
+			    })
+		   }
+		}
+	}
+</script>
+
+<style scoped>
+	.content{
+		min-height: 100vh;
+		background:#F4F5F7;
+	}
+	.shopBox{
+		background: #ffffff;
+		border-radius: 10rpx;
+	}
+	.content2{
+		padding: 20rpx 24rpx;
+	}
+	.shopLine{
+		display: flex;
+		padding: 30rpx 20rpx;
+		border-bottom: 1px solid #EEEEEE;
+	}
+	.ckImg{
+		width: 44rpx;
+		height: 44rpx;
+	}
+	.shopName{
+		color: #3C3C3C;
+		line-height: 44rpx;
+		font-size: 28rpx;
+		padding-left: 26rpx;
+	}
+	.bottom{
+		width: 750rpx;
+		height: 120rpx;
+		background: #FFFFFF;
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		display: flex;
+		justify-content: space-between;
+	}
+	.bottomLeft{
+		display: flex;
+		padding-top: 38rpx;
+		padding-left: 24rpx;
+	}
+	.allTxt{
+		line-height: 44rpx;padding-left: 12rpx;color: #3C3C3C;
+	}
+	.determine{
+		width: 310rpx;
+		height: 98rpx;
+		background: #3F90F7;
+		border-radius: 10rpx;
+		font-weight: 500;
+		color: #FFFFFF;
+		font-size: 31rpx;
+		line-height: 98rpx;
+		text-align: center;
+		margin-top: 11rpx;
+		margin-right: 24rpx;
+	}
+</style>

+ 13 - 3
pages/index/index.vue

@@ -153,8 +153,10 @@
 				<view class="hotLineTop">
 					<image class="hotLineTopImg" :src="item.img" mode=""></image>
 				    <view class="hotlineTimebox">
-				    	<view class="hotlinestate1" v-if="item.state==2">进行中</view>
-						<view class="hotlinestate2" v-if="item.state==1">未开始</view>
+				    	<!-- <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>
 						<view class="hotTime">{{item.startTime.slice(0,10)}}-{{item.endTime.slice(0,10)}}</view>
 				    </view>
 				</view>
@@ -1112,15 +1114,18 @@
 		position: absolute;
 		left: 0;
 		bottom: 0;
-		background: rgba(0, 0, 0, 0.5);
+		
 		display: flex;
 	}
 	.hotTime{
+		background: rgba(0, 0, 0, 0.5);
 		font-weight: 400;
 		color: #FFFFFF;
 		font-size: 24rpx;
 		line-height: 44rpx;
 		padding: 0 20rpx;
+		margin-top: 9rpx;
+		margin-left: -8rpx;
 	}
 	.hotName{
 		padding: 24rpx 20rpx;
@@ -1195,4 +1200,9 @@
 		font-size: 24rpx;
 		padding-top: 8rpx;
 	}
+	.jkStateImg{
+		width: 102rpx;
+		height: 53rpx;
+		position: relative;
+	}
 </style>

+ 6 - 0
pages/shop/goodsDetail.vue

@@ -242,6 +242,12 @@
 			
 			//console.log(this.shopInfo)
 		},
+		onPullDownRefresh(){
+			this.openGoodsDetailById();
+			setTimeout(() => {
+					uni.stopPullDownRefresh(); // 关闭下拉刷新 
+			}, 2000);
+		},
 		methods: {
 			sharewx(){
 				

BIN
static/timg/mp3.png


BIN
static/timg/mp31.png