Browse Source

Merge branch 'master' of http://47.98.226.240:3000/twt/jikeH5

* 'master' of http://47.98.226.240:3000/twt/jikeH5:
  1
  bug修改
  编辑

# Conflicts:
#	pages/addjk/activity.vue
guo 2 years ago
parent
commit
5a042fde7a
6 changed files with 80 additions and 18 deletions
  1. 8 0
      .gitignore
  2. 5 4
      pages/addjk/activity.vue
  3. 2 3
      pages/addjk/addActivity.vue
  4. 26 1
      pages/addjk/ckshop.vue
  5. 37 9
      pages/addjk/eadit.vue
  6. 2 1
      pages/addjk/jkDetail.vue

+ 8 - 0
.gitignore

@@ -0,0 +1,8 @@
+node_modules/
+dist/**
+.project
+unpackage/
+.DS_Store
+wxcomponents/**/*.vue
+wxcomponents/**/*.css
+.hbuilderx/

+ 5 - 4
pages/addjk/activity.vue

@@ -48,7 +48,7 @@
 						<view class="btn" style="width: 120rpx;" @click="">分享</view>
 					</view>
 					<view class="moreBtn" v-if="item.showMoreBtn==true">
-						<view class="more" @click="goEdit(item.id)">
+						<view class="more" @click="goEdit(item.ID)">
 							<image src="../../static/img/icon_bianji.png" mode="" class="btnImg"></image>
 							<view class="btn2">编辑</view>
 						</view>
@@ -57,6 +57,7 @@
 							<view class="btn2">停用</view>
 						</view>
 					</view>
+
 				</view>
 
 			</view>
@@ -144,9 +145,9 @@
 				// })
 			},
 			goEdit(id) {
-				// uni.navigateTo({
-				// 	url: 'jkDetail?id=' + id
-				// })
+				uni.navigateTo({
+					url: 'eadit?id=' + id
+				 })
 			},
 			goSign(item) {
 				uni.navigateTo({

+ 2 - 3
pages/addjk/addActivity.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="box">
 		<view class="imgBox">
-			<image  class="scimg" :src="img" mode="aspectFit"></image>
+			<image  class="scimg" :src="img" mode="widthFix"></image>
 		</view>
 		<view class="cont">
 			<view class="name">活动名称展示区域</view>
@@ -38,8 +38,6 @@
 <style scoped>
 .imgBox{
 	width: 750rpx;
-	
-	background:#F4F5F7;
 }
 .scimg{
 	width: 750rpx;
@@ -50,6 +48,7 @@
 	border-radius: 24rpx 24rpx 0px 0px;
 	margin-top: -30rpx;
 	padding: 30rpx 24rpx;
+	position: relative;
 }
 .name{
 	color: #3C3C3C;

+ 26 - 1
pages/addjk/ckshop.vue

@@ -72,11 +72,36 @@
 			     
 			    },'GET').then(res => {
 			   		uni.hideLoading();
+					const shopckList = uni.getStorageSync("shopckList");
+					// shopckList.forEach(item=>{
+					// 	delete item.ck
+					// })
 					res.data.forEach(item=>{
 						item.ck=false;
 					})
+					console.log(shopckList)
+					if(shopckList){
+						res.data.forEach(item=>{
+							 shopckList.forEach(item2=>{
+							 	if(item2.id==item.id){
+									item.ck=true;
+								}else{
+									//item.ck=false;
+								}
+							})
+							// if(shopckList.includes(item)){
+							// 	item.ck=true;
+							// }else{
+							// 	item.ck=false;
+							// }
+						})
+					}else{
+						
+					}
+					
 			   		this.list=res.data;
-					//console.log(this.list)
+					
+					console.log(this.list)
 			    })
 		   }
 		}

+ 37 - 9
pages/addjk/eadit.vue

@@ -57,7 +57,7 @@
 			  <span class="linexx">*</span> <span>最多报名人数</span>
 		  </view>
 		  <view class="lineRight">
-			  <input type="text" v-model="number" placeholder="请输入" class="lineRightInput" placeholder-class="inputPlace">
+			  <input  type="number" v-model="number" placeholder="请输入" class="lineRightInput" placeholder-class="inputPlace">
 		  </view>
 		</view>
 		<view class="line">
@@ -77,7 +77,7 @@
 			 </view>
 		  </view>
 		</view>
-		<view class="line">
+		<view class="line" v-if="payType==1">
 		  <view class="lineLeft">
 			  <span class="linexx">*</span> <span>支付金额</span>
 		  </view>
@@ -101,11 +101,11 @@
 				<view class="lineTitle">主图</view>
 				<view class="lineMS">此图在活动顶部显示,建议宽度750px</view>
 				<view class="lineImgBOx">
-					<view class="lineimghz" v-if="img">
+					<view class="lineimghz" v-if="img" >
 						<img src="../../static/img/del.png" alt="" class="lineimgdel" @click="delimgzt" >
-						<img :src="img" alt="" class="lineimg">
+						<img :src="img" alt="" class="lineimg" @click="previewImage(img)">
 					</view>
-					<view class="lineimghz" @click="upimgzt">
+					<view class="lineimghz" @click="upimgzt" v-if="!img">
 						<img src="../../static/img/scimg.png" alt="" class="lineimg">
 					</view>
 				</view>
@@ -116,7 +116,7 @@
 				<view class="lineImgBOx">
 					<view class="lineimghz" v-for="(item,index) in imgListArr">
 						<img src="../../static/img/del.png" alt="" class="lineimgdel" @click="delimg(index)" >
-						<img :src="item" alt="" class="lineimg">
+						<img :src="item" alt="" class="lineimg" @click="previewImage(item)">
 					</view>
 					<view class="lineimghz" @click="upimg">
 						<img src="../../static/img/scimg.png" alt="" class="lineimg">
@@ -206,6 +206,19 @@
 			
 		},
 		methods: {
+		  previewImage(img){
+			  var arr=[]
+			  arr.push(img)
+				uni.previewImage({
+					urls: arr,
+					longPressActions: {
+						itemList: ['发送给朋友', '保存图片',],
+						success: function(data) {},
+						fail: function(err) {}
+					}
+				});
+		  },
+		
 		  getDetails(){
 			  uni.showLoading({
 			  	title: '加载中'
@@ -219,17 +232,30 @@
 					this.activityContent=jkdata.activityContent;
 					this.money=jkdata.money;
 					this.number=jkdata.number;
-					this.music=jkdata.music;
+					
 					this.clWhereString=jkdata.clWhere;
 					this.clWhereList=this.clWhereString.slice(',');
 					this.startTime=jkdata.startTime.slice(0,10);
 					this.endTime=jkdata.endTime.slice(0,10);
-					this.payType=jkdata.payType
+					this.payType=jkdata.payType;
+					this.img=res.data.img.img;
 					if(res.data.imgList){
 						res.data.imgList.forEach(item=>{
 							this.imgListArr.push(item.img)
 						})
 					}
+					var shopNames=[];
+					var shopList=[];
+					if(res.data.shopList){
+						res.data.shopList.forEach(item=>{
+							shopNames.push(item.shopName)
+							shopList.push(item.shopId)
+						})
+						this.shopNames=shopNames.join(',')
+						this.shopList=shopList.join(',')
+					}
+					this.ckMusic=res.data.selectedMusic
+					this.music=ckMusic.id;
 					console.log(this.imgListArr)
 					
 			  		//this.list=res.data
@@ -307,7 +333,7 @@
 					 duration: 2000
 				});
 				return false;
-			}else if(this.money!=0&&this.money==''){
+			}else if(this.money!=0&&this.money==''&&payType==1){
 				uni.showToast({
 					 title: '请输入支付金额',
 					 icon:'none',
@@ -591,6 +617,7 @@
 .lineRightInput{
 	font-size: 28rpx;
 	color:#3C3C3C ;
+	width: 500rpx;
 }
 .lineRight{
 	color:#3C3C3C ;
@@ -603,6 +630,7 @@
 }
 .box{
 	background: #ffffff;
+	padding-bottom: 30rpx;
 }
 .kk{
 	background:#F4F5F7;

+ 2 - 1
pages/addjk/jkDetail.vue

@@ -80,7 +80,8 @@
 				});
 			},
 			getmap() {
-				console.log("打开地图")
+				console.log("打开地图");
+				return false;
 				var that = this;
 				if (!that.shopInfo.lat || !that.shopInfo.lng) {
 					uni.showToast({