twt 2 éve%!(EXTRA string=óta)
szülő
commit
78b801cb69

+ 10 - 1
manifest.json

@@ -68,5 +68,14 @@
     "uniStatistics" : {
         "enable" : false
     },
-    "vueVersion" : "2"
+    "vueVersion" : "2",
+    "h5" : {
+        "sdkConfigs" : {
+            "maps" : {
+                "qqmap" : {
+                    "key" : ""
+                }
+            }
+        }
+    }
 }

+ 6 - 0
pages.json

@@ -24,6 +24,12 @@
 				"navigationBarTitleText": "选择门店"
 			}
 		},
+		{
+			"path": "pages/addjk/ckmusic",
+			"style": {
+				"navigationBarTitleText": "选择音乐"
+			}
+		},
 		{
 			"path": "pages/addjk/jkDetail",
 			"style": {

+ 1 - 0
pages/addjk/addActivity.vue

@@ -26,6 +26,7 @@
 		methods: {
             eadit(){
 				uni.removeStorageSync('shopckList');
+				uni.removeStorageSync('ckmusic');
 				uni.navigateTo({
 					url:'eadit?img='+this.img
 				})

+ 125 - 0
pages/addjk/ckmusic.vue

@@ -0,0 +1,125 @@
+<template>
+	<view class="content">
+	 <view class="content2">
+		 <view class="shopBox">
+			<view class="shopLine" v-for="(item,index) in list" @click="ckshop(item,index)">
+				<img src="../../static/img/ckn.png" alt="" class="ckImg" v-if="ckIndex!=index">
+				<img src="../../static/img/cky.png" alt="" class="ckImg" v-if="ckIndex==index">
+				<view class="shopName">{{item.name}}</view>
+			</view>
+		 </view>
+		 
+	 </view>
+	 <view class="bottom"  @click="determine">
+		确定添加
+	 </view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				list:'',
+				allck:false,
+				ckIndex:0,
+				
+			}
+		},
+		onLoad() {
+          this.getShopList()
+		},
+		methods: {
+		   determine(){
+			   var ckmusic=this.list[this.ckIndex];
+			   console.log(ckmusic)
+			   uni.setStorage({
+			   		key: 'ckmusic',
+			   		data: ckmusic,
+			   		 success: function () {	
+						 uni.navigateBack(-1)
+			   		 }
+			   });
+		   },
+		   ckshop(item,index){
+			   this.ckIndex=index
+		   },
+		 
+           getShopList(){
+			   uni.showLoading({
+			   	title: '加载中'
+			   })
+			   this.$http('openH5SetTheGuest/selectmusic', {
+			     
+			    },'GET').then(res => {
+			   		uni.hideLoading();
+					
+			   		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: 98rpx;
+		background: #3F90F7;
+		line-height: 98rpx;
+		text-align: center;
+		color: #ffffff;
+		font-size: 30rpx;
+		position: fixed;
+		left: 0;
+		bottom: 0;
+	}
+	.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>

+ 74 - 12
pages/addjk/eadit.vue

@@ -91,7 +91,7 @@
 	  		<view class="title">活动详情</view>
 			<view class="line">
 				  <view class="lineLeft">
-					  <span class="linexx">*</span> <span>活动说明</span>
+					  <span>活动说明</span>
 				  </view>
 				  <view class="lineRight">
 					  <textarea placeholder-class="inputPlace" v-model="activityContent" placeholder="请输入" class="textsr"/> 
@@ -114,19 +114,19 @@
 			  <view class="lineLeft">
 				<span>音乐</span>
 			  </view>
-			  <view class="lineRight musicRight">
+			  <view class="lineRight musicRight" @click="goMusic">
 				 <view class="musicMS">选择/更换音乐</view>
 				 <img src="../../static/img/jt.png" alt="" class="musicJt">
 			  </view>
 			</view>
-			<view class="musicBox">
-				<view class="musicLine" v-for="(item,index) in 3">
+			<view class="musicBox" v-if="ckMusic">
+				<view class="musicLine">
 					<view class="musicLineLeft">
 						<img src="../../static/img/music.png" alt="" class="musicImg">
-						<view class="musicName">Young For You - GALA.mp3</view>
+						<view class="musicName">{{ckMusic.name}}</view>
 					</view>
 					<view>
-						<img src="../../static/img/sanchu.png" alt="" class="musicDel">
+						<img src="../../static/img/sanchu.png" alt="" class="musicDel" @click="musicDel">
 					</view>
 					
 				</view>
@@ -160,6 +160,7 @@
 				clWhereString:'',
 				imgListArr:[],
 				money:'',
+				ckMusic:'',
 			}
 		},
 		onLoad(opt) {
@@ -167,17 +168,67 @@
 		},
 		onShow() {
 			const shopckList = uni.getStorageSync("shopckList");
+			this.ckMusic=uni.getStorageSync("ckmusic")
+			if(this.ckMusic){
+				this.music=this.ckMusic.id
+			}
 			var shopNames=[];
 			var shopList=[];
-			shopckList.forEach(item=>{
-				shopNames.push(item.shopName)
-				shopList.push(item.id)
-			})
-			this.shopNames=shopNames.join(',')
-			this.shopList=shopList.join(',')
+			if(shopckList){
+				shopckList.forEach(item=>{
+					shopNames.push(item.shopName)
+					shopList.push(item.id)
+				})
+				this.shopNames=shopNames.join(',')
+				this.shopList=shopList.join(',')
+			}
+			
 		},
 		methods: {
 		  preview(){
+			if(this.activityName==''){
+				uni.showToast({
+					 title: '请输入活动名称',
+					 icon:'none',
+					 duration: 2000
+				});
+				return false;
+			}else if(!this.startTime||!this.endTime){
+				uni.showToast({
+					 title: '请选择报名时间',
+					 icon:'none',
+					 duration: 2000
+				});
+				return false;
+			}else if(this.shopList==''){
+				uni.showToast({
+					 title: '请选择活动门店',
+					 icon:'none',
+					 duration: 2000
+				});
+				return false;
+			}else if(this.clWhere==''){
+				uni.showToast({
+					 title: '请选择报名凭证',
+					 icon:'none',
+					 duration: 2000
+				});
+				return false;
+			}else if(this.number==''){
+				uni.showToast({
+					 title: '请输入最多报名人数',
+					 icon:'none',
+					 duration: 2000
+				});
+				return false;
+			}else if(this.money==''){
+				uni.showToast({
+					 title: '请输入支付金额',
+					 icon:'none',
+					 duration: 2000
+				});
+				return false;
+			}
 			var editdata={
 				id:this.id,
 				activityName:this.activityName,
@@ -210,6 +261,16 @@
 			  	url:'ckshop'
 			  })
 		  },
+		  goMusic(){
+			  uni.navigateTo({
+			  	url:'ckmusic'
+			  })
+		  },
+		  musicDel(){
+			  this.music='';
+			  this.ckMusic=''
+			  uni.removeStorageSync('ckmusic');
+		  },
           bindTimeChangeStart(e){
 			  console.log(e)
 			  this.startTime=e.detail.value;
@@ -296,6 +357,7 @@
 }
 .musicName{
 	color: #3C3C3C;font-size: 24rpx;
+	padding-left: 10rpx;
 }
 .musicLineLeft{
 	display: flex;

+ 106 - 1
pages/addjk/jkDetail.vue

@@ -16,6 +16,23 @@
 					<img src="../../static/img/jt2.png" alt="" class="shopjt">
 				</view>
 			</view>
+			<view class="shopCont">
+				<view class="shopContLeft">
+					<view class="shopName">{{shopInfo.shopName}}</view>
+					<view class="shopaddress">{{shopInfo.address}}</view>
+				</view>
+				<view class="shopContRight">
+					<view class="shopContRightLine" @click="getmap">
+						<img src="../../static/img/icon_map.png" alt="" class="shopRightIcon">
+						<view class="shopRightTxt">地图</view>
+					</view>
+					<view class="shopRightSx"></view>
+					<view class="shopContRightLine" @click="call">
+						<img src="../../static/img/icon_phone.png" alt="" class="shopRightIcon">
+						<view class="shopRightTxt">电话</view>
+					</view>
+				</view>
+			</view>
 			
 		</view>
 		
@@ -28,7 +45,7 @@
 		
 		<view style="height: 120rpx;"></view>
 		<view class="bottom" v-if="type==1"> 
-			<view class="bottomLeft">编辑活动内容</view>
+			<view class="bottomLeft" @click="edit1">编辑活动内容</view>
 			<view class="bottomRight" @click="generate">生成活动</view>
 		</view>
 	</view>
@@ -41,6 +58,7 @@
 				info:'',
 				type:'',
 				shopNum:'',
+				shopInfo:'',
 			}
 		},
 		onLoad(opt) {
@@ -52,18 +70,65 @@
 				title:this.info.activityName
 				})
 			}
+			this.getShopinfo()
           
 		},
 		methods: {
+			call() {
+				uni.makePhoneCall({
+					phoneNumber: this.shopInfo.mobilePhone
+				});
+			},
+			getmap() {
+				console.log("打开地图")
+				var that = this;
+				if (!that.shopInfo.lat || !that.shopInfo.lng) {
+					uni.showToast({
+						title: '该店铺未设置定位',
+						icon: 'none',
+						duration: 3000
+					});
+				} else {
+					
+					uni.openLocation({
+						latitude: Number(that.shopInfo.lat),
+						longitude: Number(that.shopInfo.lng),
+						name: that.shopInfo.shopName,
+						address: that.shopInfo.provinceName + that.shopInfo.cityName + that.shopInfo.areaName + that.shopInfo.address,
+						success: function() {
+							console.log('success');
+						},
+						fail(err) {
+							console.log(err)
+						}
+					});
+				}
+			
+			},
+			edit1(){
+				uni.navigateBack(-1)
+			},
 			auditSetTheGuest(){
 				uni.showLoading({
 					title: '加载中'
 				})
 				this.$http('openH5SetTheGuest/auditSetTheGuest', this.info,'POST').then(res => {
 						uni.hideLoading();
+						if(res.code==0){
+							uni.showToast({
+								 title: '活动已生成',
+								 icon:'none',
+								 duration: 2000
+							});
+						}
 						//this.list=res.data
 				 })
 			},
+			getShopinfo(){
+				this.$http('openH5SetTheGuest/getShopinfo',{},'GET').then(res => {
+						this.shopInfo=res.data
+				 })
+			},
             generate(){
 				var that=this;
 				uni.showModal({
@@ -90,6 +155,46 @@
 </script>
 
 <style scoped>
+	.shopRightIcon{
+		width: 44rpx;
+		height: 44rpx;
+		display: block;
+		margin: 0 auto;
+		margin-bottom: 10rpx;
+	}
+	.shopName{
+		color: #3C3C3C;
+		font-size: 28rpx;
+	}
+	.shopaddress{
+		font-weight: 400;
+		color: #999999;
+		font-size: 24rpx;
+		padding-top: 10rpx;
+		width: 500rpx;
+	}
+	.shopRightSx{
+		width: 2rpx;
+		height: 69rpx;
+		background:#EEEEEE ;
+		margin-left: 34rpx;
+		margin-right: 34rpx;
+		margin-top: 14rpx;
+	}
+	.shopCont{
+		display: flex;
+		justify-content: space-between;
+		padding-top: 25rpx;
+	}
+	.shopContRight{
+		display: flex;
+		
+	}
+	.shopContRightLine{
+		text-align: center;
+		color: #999999;
+		font-size: 24rpx;
+	}
 	.content{
 		min-height: 100vh;
 		background:#F4F5F7;

BIN
static/img/icon_map.png


BIN
static/img/icon_phone.png