twt пре 2 година
родитељ
комит
7d7603ad22
6 измењених фајлова са 181 додато и 15 уклоњено
  1. 9 10
      pages.json
  2. 15 3
      pages/addjk/eadit.vue
  3. 157 2
      pages/addjk/jkDetail.vue
  4. BIN
      static/img/chahao.png
  5. BIN
      static/img/noimg.png
  6. BIN
      static/img/scimg.png

+ 9 - 10
pages.json

@@ -1,20 +1,19 @@
 {
 	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
-		
-		{
-		    "path" : "pages/addjk/activity",
-		    "style" :                                                                                    
-		    {
-		        "navigationStyle": "custom",
-		        "enablePullDownRefresh": true
-		    }
-		    
-		},
 		{
 			"path": "pages/addjk/choice",
 			"style": {
 				"navigationBarTitleText": "选择素材"
 			}
+		},
+		{
+		    "path" : "pages/addjk/activity",
+		    "style" :                                                                                    
+		    {
+		        "navigationStyle": "custom",
+		        "enablePullDownRefresh": true
+		    }
+		    
 		},
 		{
 			"path": "pages/addjk/addActivity",

+ 15 - 3
pages/addjk/eadit.vue

@@ -248,16 +248,27 @@
 					var shopList=[];
 					if(res.data.shopList){
 						res.data.shopList.forEach(item=>{
+							item.id=item.shopId
 							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)
+					var useshoplist=res.data.shopList
+					this.ckMusic=res.data.selectedMusic;
+					if(this.ckMusic){
+						this.music=this.ckMusic.id;
+					}
 					
+					//console.log(this.imgListArr)
+					uni.setStorage({
+							key: 'shopckList',
+							data: useshoplist,
+							 success: function () {	
+								
+						}
+					});
 			  		//this.list=res.data
 			   })
 		  },
@@ -356,6 +367,7 @@
 				img:this.img,
 				imgList:this.imgListArr.join(','),
 				clState:'',
+				
 			} 
 			console.log(editdata)
 			uni.setStorage({

+ 157 - 2
pages/addjk/jkDetail.vue

@@ -11,7 +11,7 @@
 		<view class="shopBox">
 			<view class="shopBoxTop">
 				<view class="shopMs">活动门店</view>
-				<view class="shopTy">
+				<view class="shopTy" @click="showuse">
 					<view class="shopTyTxt">{{shopNum}}家门店通用</view>
 					<img src="../../static/img/jt2.png" alt="" class="shopjt">
 				</view>
@@ -48,6 +48,42 @@
 			<view class="bottomLeft" @click="edit1">编辑活动内容</view>
 			<view class="bottomRight" @click="generate">生成活动</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/img/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 shopckList" >
+						<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>
 </template>
 
@@ -59,6 +95,8 @@
 				type:'',
 				shopNum:'',
 				shopInfo:'',
+				useShopShow:false,
+				shopckList:'',
 			}
 		},
 		onLoad(opt) {
@@ -71,9 +109,15 @@
 				})
 			}
 			this.getShopinfo()
-          
+            this.shopckList= uni.getStorageSync("shopckList");
 		},
 		methods: {
+			noShowShop2(){
+				this.useShopShow=false;
+			},
+			showuse(){
+				this.useShopShow=true;
+			},
 			call() {
 				uni.makePhoneCall({
 					phoneNumber: this.shopInfo.mobilePhone
@@ -156,6 +200,81 @@
 </script>
 
 <style scoped>
+	.shopImg {
+		width: 146rpx;
+		height: 146rpx;
+		border-radius: 6rpx;
+	}
+	.ckshopLine{
+		display: flex;
+		padding: 20rpx 0;
+		border-bottom: 1px solid #EEEEEE;
+	}
+	.baomingBox{
+		width: 750rpx;
+		height: 100vh;
+		background: rgba(0, 0, 0, 0.4);
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 11;
+	}
+	.bmshopjt{
+		width: 12rpx;
+		height: 20rpx;
+		margin-top: 10rpx;
+	}
+	.bmlineInput{
+		color: #333333;
+		font-size: 28rpx;
+		height: 98rpx;
+		line-height: 98rpx;
+	}
+	.bmshopname{
+		font-weight: 400;
+		color: #999999;
+		font-size: 28rpx;
+		line-height: 40rpx;
+		width: 500rpx;
+		white-space:nowrap;
+		overflow:hidden;
+		text-overflow:ellipsis;
+	}
+	.bmshopLine{
+		display: flex;
+		justify-content: space-between;
+		padding: 26rpx 0;
+		border-bottom: 1px solid #EEEEEE;
+	}
+	.bmLine{
+		border-bottom: 1px solid #EEEEEE;
+	}
+	.bmTop{
+		display: flex;
+		justify-content: space-between;
+		padding: 40rpx 24rpx 10rpx 24rpx;
+	}
+	.bmTitle{
+		font-weight: 500;
+		color: #3C3C3C;
+		font-size: 30rpx;
+		line-height: 36rpx;
+	}
+	.bmChimg{
+		width: 36rpx;
+		height: 36rpx;
+	}
+	.baomingCont{
+		position: absolute;
+		width: 750rpx;
+		height:850rpx;
+		padding-bottom: constant(safe-area-inset-bottom);
+		padding-bottom: env(safe-area-inset-bottom);
+		left: 0;
+		bottom: 0;
+		background: #ffffff;
+		border-radius: 24rpx 24rpx 0px 0px;
+	}
 	.shopRightIcon{
 		width: 44rpx;
 		height: 44rpx;
@@ -299,4 +418,40 @@
 		color: #FFFFFF;
 		font-size: 30rpx;
 	}
+	.brandsBg {
+		display: flex;
+	    height: 38rpx;
+		flex-wrap: wrap;
+		align-items: center;
+		overflow: hidden;
+		padding: 5rpx 0rpx;
+	
+	}
+	
+	.brands {
+		border-radius: 4rpx;
+		padding: 0 5rpx;
+		color: #F19D01;
+		height: 28rpx;
+		border: 1px solid #F19D01;
+	
+		font-size: 20rpx;
+		line-height: 28rpx;
+		margin: 5rpx 10rpx 5rpx 0rpx;
+	}
+	
+	.timeBg {
+		display: flex;
+	
+	}
+	
+	.shopTime {
+		color: #666666;
+		font-size: 22rpx;
+	}
+	
+	.addressBox {
+		color: #666666;
+		font-size: 22rpx;
+	}
 </style>

BIN
static/img/chahao.png


BIN
static/img/noimg.png


BIN
static/img/scimg.png