zhengkaixin 1 år sedan
förälder
incheckning
cb8e2d77e6

+ 2 - 2
.env.dev.js

@@ -1,8 +1,8 @@
 const UNI_APP = {  
 	ProjectName :"51充电联盟",
 	BASE_URL: 'https://51team.xiaoxinda.com/charging-station-server/',
-	BASE_URL: 'https://charging.xiaoxinda.com/charging-station-test/',
-	BASE_URL: 'http://192.168.77.162:8081/charging-station/' ,
+	//BASE_URL: 'https://charging.xiaoxinda.com/charging-station-test/',
+	//BASE_URL: 'http://192.168.77.162:8081/charging-station/' ,
 	//PARK_URL: 'http://192.168.11.120:8082/charging-parking/' ,
 	//PARK_URL: 'https://51team.xiaoxinda.com/charging-parking/' ,
 	NODE_ENV :"dev",

+ 6 - 0
assets/img/buy/riFill-gift-fill.svg

@@ -0,0 +1,6 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32" width="72" height="72" style="border-color: rgba(187,187,187,1);border-width: 0px;border-style: solid" filter="none">
+    
+    <g>
+    <path d="M20 2.667c0 0 0 0 0.001 0 2.946 0 5.333 2.388 5.333 5.333 0 0.982-0.266 1.903-0.729 2.693l0.014-0.025 6.048-0.001v2.667h-2.667v13.333c0 0.736-0.597 1.333-1.333 1.333v0h-21.333c-0.736 0-1.333-0.597-1.333-1.333v0-13.333h-2.667v-2.667l6.048 0.001c-0.449-0.765-0.715-1.685-0.715-2.667 0-2.946 2.388-5.333 5.333-5.333 1.59 0 3.018 0.696 3.995 1.8l0.005 0.006c0.978-1.11 2.403-1.807 3.991-1.807 0.003 0 0.007 0 0.010 0h-0zM17.333 13.333h-2.667v13.333h2.667v-13.333zM12 5.333c-0.004-0-0.008-0-0.012-0-1.473 0-2.667 1.194-2.667 2.667 0 1.407 1.089 2.559 2.47 2.66l0.009 0.001 0.2 0.007h2.667v-2.667c0-0 0-0 0-0 0-1.33-0.974-2.433-2.248-2.634l-0.015-0.002-0.205-0.024-0.199-0.007zM20 5.333c-0 0-0.001 0-0.001 0-1.402 0-2.552 1.083-2.659 2.458l-0.001 0.009-0.007 0.2v2.667h2.667c0 0 0.001 0 0.001 0 1.402 0 2.552-1.083 2.659-2.458l0.001-0.009 0.007-0.2c0-1.473-1.194-2.667-2.667-2.667v0z" fill="rgba(0,184.875,97.92,1)"></path>
+    </g>
+  </svg>

+ 6 - 0
assets/img/buy/riLine-gift-line.svg

@@ -0,0 +1,6 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32" width="72" height="72" style="border-color: rgba(187,187,187,1);border-width: 0px;border-style: solid" filter="none">
+    
+    <g>
+    <path d="M20 2.667c0 0 0 0 0.001 0 2.946 0 5.333 2.388 5.333 5.333 0 0.982-0.266 1.903-0.729 2.693l0.014-0.025 6.048-0.001v2.667h-2.667v13.333c0 0.736-0.597 1.333-1.333 1.333v0h-21.333c-0.736 0-1.333-0.597-1.333-1.333v0-13.333h-2.667v-2.667l6.048 0.001c-0.449-0.765-0.715-1.685-0.715-2.667 0-2.946 2.388-5.333 5.333-5.333 1.59 0 3.018 0.696 3.995 1.8l0.005 0.006c0.978-1.11 2.403-1.807 3.991-1.807 0.003 0 0.007 0 0.010 0h-0zM14.667 13.333h-8v12h8v-12zM25.333 13.333h-8v12h8v-12zM12 5.333c-0.004-0-0.008-0-0.012-0-1.473 0-2.667 1.194-2.667 2.667 0 1.407 1.089 2.559 2.47 2.66l0.009 0.001 0.2 0.007h2.667v-2.667c0-0 0-0 0-0 0-1.33-0.974-2.433-2.248-2.634l-0.015-0.002-0.205-0.024-0.199-0.007zM20 5.333c-0 0-0.001 0-0.001 0-1.402 0-2.552 1.083-2.659 2.458l-0.001 0.009-0.007 0.2v2.667h2.667c0 0 0.001 0 0.001 0 1.402 0 2.552-1.083 2.659-2.458l0.001-0.009 0.007-0.2c0-1.473-1.194-2.667-2.667-2.667v0z" fill="rgba(168.04500000000002,175.95,172.89000000000001,1)"></path>
+    </g>
+  </svg>

BIN
assets/img/buy/tip.png


+ 9 - 5
components/Tabbar.vue

@@ -10,7 +10,11 @@
 <script>
 	var img1=require('@/assets/img/riLine-vip-crown-2-line.svg')
 	var img2=require('@/assets/img/riFill-vip-crown-2-fill.svg')
- 
+	
+	var img3=require('@/assets/img/buy/riFill-gift-fill.svg')
+	var img4=require('@/assets/img/buy/riLine-gift-line.svg')
+	 
+	 
  	export default {
 		name:"tabbarJob",
 		props:{
@@ -33,13 +37,13 @@
 						pagePath2:"/pages/index/index",
 				 	},
 					{
-						iconPath: img1,
-						selectedIconPath: img2,
+						iconPath: img4,
+						selectedIconPath: img3,
 					
-						text: '会员',
+						text: '优惠',
 						midButton: true,
 						//customIcon: true,
-						pagePath2:"/pages/monthlyCardActivity/monthlyCardBuy",
+						pagePath2:"/pages/index/activity",
 					},
 				 	{
 				 		iconPath: "road-map-line",

+ 9 - 0
pages.json

@@ -795,6 +795,15 @@
             }
             
         }
+        ,{
+            "path" : "pages/index/activity",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false
+            }
+            
+        }
     ],
 	"globalStyle": {
 		"navigationStyle": "custom", // 隐藏系统导航栏

+ 148 - 0
pages/index/activity.vue

@@ -0,0 +1,148 @@
+<template>
+	<view>
+			<ujp-navbar title="优惠活动" :is-back="false" ></ujp-navbar>
+			<view class="background">
+				<view class="banner" v-for="(item,i) in bannerList"
+				
+				 :key="i">
+						<u-image width="100%" @click="clickBanner(i)"
+						 mode="scaleToFill"  height="250" border-radius	="12"
+						 :src="item.picUrl"></u-image>
+						 <view  class="tag"
+						 
+						 v-if="item.isMain">
+							 <img src="@/assets/img/buy/tip.png">
+						 </view>
+
+				</view>
+				<u-divider  bg-color="#F2F4F4" >已经到底了</u-divider>
+				
+			</view>
+			
+			<Tabbar :current="1" ref="tabbarMain" ></Tabbar>
+			
+	</view>
+</template>
+
+<script>
+	import Tabbar from '@/components/Tabbar.vue';
+	import * as newsApi from '@/apis/news.js'
+	
+	export default {
+		data() {
+			return {
+					bannerList: [],
+			}
+		},
+		components: {
+			Tabbar
+		},
+		onShow() {
+		
+			if (this.$refs.tabbarMain) {
+				this.$refs.tabbarMain.setcount(1);
+			}
+		
+		},onLoad() {
+			this.getBannerInfo("homepage");
+		},
+		
+		methods: {
+			getBannerInfo(code) {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				newsApi.getBannerInfo(code).then((res) => {
+					this.bannerList = res.data;
+					uni.hideLoading()
+					//document.getElementsByClassName("uni-swiper-wrapper")[0].parentNode.style="background-color: rgb(255, 255, 255); height: 120px;"
+				}).catch(error => {
+					uni.showToast({
+			
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+			clickBannerTopI(i) {
+				var mod = this.bannerListTop[i];
+				//this.showTop = false;
+				this.clickBanner(0, true, mod)
+			},
+			clickBannerTop() {
+				var mod = this.bannerListTop[this.showTopIndex];
+				this.showTop = false;
+				this.clickBanner(0, true, mod)
+			},
+			clickBanner(index, bl, modout) {
+				var uurl = "";
+				var mod = this.bannerList[index]
+				if (modout) {
+					mod = modout;
+				}
+				mod.clickUrl = mod.linkUrl
+			
+				if (mod.linkPicUrl && !bl) {
+			
+					this.showOss = true;
+					this.showOssImg = mod.linkPicUrl;
+					this.showOssIndex = index;
+			
+				} else if (mod.clickUrl == null) {
+			
+				} else if (mod.clickUrl.indexOf('http') == 0) {
+			
+					window.location = mod.clickUrl + uurl;
+				} else if (mod.clickUrl.slice(-5) == 'login' && this.userId) {
+			
+				} else if (mod.clickUrl.indexOf('#/') == 0) {
+					if (mod.clickUrl.indexOf("?") == -1) {
+						mod.clickUrl += '?';
+					}
+					var url = mod.clickUrl.split("#")[1]
+					//window.location = mod.clickUrl;
+					uni.navigateTo({
+						url: url + uurl
+					})
+				} else if (mod.clickUrl == '#' || mod.clickUrl == '') {
+			
+				} else {
+					uni.navigateTo({
+						url: mod.clickUrl + uurl
+					})
+				}
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.tag {
+		
+		
+		top: -100rpx;
+		left: 460rpx;
+		position: relative;
+		border-radius: 4px 4px 4px 0px;
+		color: #fff;
+		padding: 2px 6px;
+		font-size: 20rpx;
+		line-height: 20rpx;
+		height: 10rpx;
+		//background: linear-gradient(to right bottom, rgba(255, 255, 255, 0.4), transparent) var(--bg, #EA3447);
+		background-blend-mode: soft-light;
+		img{
+			height: 74rpx;
+			width: 240rpx;
+		}
+	}
+	
+	.background{
+		padding-bottom: 30px;
+	}
+	.banner{
+		margin: 24rpx;
+		
+	}
+</style>

+ 2 - 3
pages/monthlyCardActivity/monthlyCardBuy.vue

@@ -1,6 +1,6 @@
 <template>
 	<view>
-		<ujp-navbar title="服务费包月会员" :background="{background: '#424a5d'}" title-color="#ffffff" :is-back="false">
+		<ujp-navbar title="服务费包月会员"   >
 			<view class="iconfont service" @click="openModal">
 				&#xe60d;
 			</view>
@@ -361,7 +361,6 @@
 		<u-modal v-model="show3" @confirm="confirmPhone" confirm-text="拨打电话" confirm-color="#606266"
 			:show-cancel-button="true" ref="uModal" :asyncClose="true" title="客服电话" :content="consumerPhone"
 			:content-style="{fontSize: '24px',color: '#101010'}"></u-modal>
-		<Tabbar :current="1" ref="tabbarMain" :elderStatus="elderStatus"></Tabbar>
 
 	</view>
 </template>
@@ -955,7 +954,7 @@
 
 	.service {
 		font-size: 24px;
-		color: #fff;
+		//color: #fff;
 		position: absolute;
 		right: 16px;
 	}

+ 5 - 4
pages/searchPile/searchPile.vue

@@ -38,12 +38,13 @@
 						<!-- <view v-show="dropdownShow" >
 							 <u-mask :show="dropdownShow" ></u-mask>
 						</view> -->
-						<jp-dropdown @open="dropdownShow=true" @close="dropdownShow=false" ref="uDropdown"
+						<jp-dropdown @open="dropdownShow=true" active-color="rgb(0, 185, 98)"
+						 @close="dropdownShow=false" ref="uDropdown"
 							style="    display: contents;" :top="180">
 							<u-dropdown-item title="筛选">
 								<view class="slot-content">
 
-									<view v-if="dropdownShow" class="u-text-center u-content-color u-m-t-20 u-m-b-20">
+									<view v-if="dropdownShow" class="u-text-center u-content-color  ">
 										<view class="preference" style="z-index:1024;width: 100%;">
 											<view class="content-s">
 												<view class="preference_group">
@@ -954,7 +955,7 @@
 		text-align: center;
 		border-style: none;
 		width: 20%;
-		height: 56rpx;
+		//height: 56rpx;
 
 		/*	line-height: 14px;*/
 	}
@@ -971,7 +972,7 @@
 		text-align: center;
 		border-style: none;
 		min-width: 22%;
-		height: 56rpx;
+		//height: 56rpx;
 
 		@include themeify {
 			font-size: themed('font-size2');