Browse Source

bug修改

twt 2 years ago
parent
commit
78dd7266d3
4 changed files with 52 additions and 12 deletions
  1. 2 3
      pages/addjk/addActivity.vue
  2. 26 1
      pages/addjk/ckshop.vue
  3. 22 7
      pages/addjk/eadit.vue
  4. 2 1
      pages/addjk/jkDetail.vue

+ 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)
 			    })
 		   }
 		}

+ 22 - 7
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: '加载中'
@@ -320,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',
@@ -604,6 +617,7 @@
 .lineRightInput{
 	font-size: 28rpx;
 	color:#3C3C3C ;
+	width: 500rpx;
 }
 .lineRight{
 	color:#3C3C3C ;
@@ -616,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({