Ver Fonte

游客模式发票限制

zhengkaixin há 2 anos atrás
pai
commit
d0d210128b

+ 3 - 3
.env.dev.js

@@ -1,7 +1,7 @@
 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: '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/' ,
 	//PARK_URL: 'http://192.168.11.120:8082/charging-parking/' ,
 	//PARK_URL: 'https://51team.xiaoxinda.com/charging-parking/' ,
@@ -11,7 +11,7 @@ const UNI_APP = {
 	
 	openId:"zkxtest",//zkx
 	
-	openId:"oK9Wr54VbEh3xvWYmD_zT5NbH4AY",//zkx
+	//openId:"oK9Wr54VbEh3xvWYmD_zT5NbH4AY",//zkx
 	//openId:"oK9Wr59rru-i3bm7dtTtxnkR-i4s",//杨所
 	//openId:"oK9Wr56vX9nP_B56_Pyigg5n5Ce8",//
 	//openId:"oK9Wr5_2USr1yP4MRew9KbJA0-ng",//老板

+ 313 - 0
components/Udropdown.vue

@@ -0,0 +1,313 @@
+<template>
+	<view class="u-dropdown">
+		<view class="u-dropdown__menu" :style="{
+			height: $u.addUnit(height)
+		}" :class="{
+			'u-border-bottom': borderBottom
+		}">
+			<view class="u-dropdown__menu__item" v-for="(item, index) in menuList" :key="index" @tap.stop="menuClick(index)">
+				<view class="u-flex">
+					<text class="u-dropdown__menu__item__text" :style="{
+						color: item.disabled ? '#c0c4cc' : (index === current || highlightIndex == index) ? activeColor : inactiveColor,
+						fontSize: $u.addUnit(titleSize)
+					}">{{item.title}}</text>
+					<view class="u-dropdown__menu__item__arrow" :class="{
+						'u-dropdown__menu__item__arrow--rotate': index === current
+					}">
+						<u-icon :custom-style="{display: 'flex'}" :name="menuIcon" :size="$u.addUnit(menuIconSize)" :color="index === current || highlightIndex == index ? activeColor : '#c0c4cc'"></u-icon>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="u-dropdown__content"  :style="[contentStyle, {
+			transition: `opacity ${duration / 1000}s linear`,
+			top: $u.addUnit(top),
+			height: contentHeight + 'px'
+		}]"
+		 @tap="maskClick" @touchmove.stop.prevent>
+			<view @tap.stop.prevent   class="u-dropdown__content__popup" :style="[popupStyle]">
+				<slot ></slot>
+			</view>
+			<view v-show="active" >
+				 <view class="u-dropdown__content__mask"></view>
+				 
+			</view>
+			
+			
+		</view>
+	</view>
+</template>
+
+<script>
+	/**
+	 * dropdown 下拉菜单
+	 * @description 该组件一般用于向下展开菜单,同时可切换多个选项卡的场景
+	 * @tutorial http://uviewui.com/components/dropdown.html
+	 * @property {String} active-color 标题和选项卡选中的颜色(默认#2979ff)
+	 * @property {String} inactive-color 标题和选项卡未选中的颜色(默认#606266)
+	 * @property {Boolean} close-on-click-mask 点击遮罩是否关闭菜单(默认true)
+	 * @property {Boolean} close-on-click-self 点击当前激活项标题是否关闭菜单(默认true)
+	 * @property {String | Number} duration 选项卡展开和收起的过渡时间,单位ms(默认300)
+	 * @property {String | Number} height 标题菜单的高度,单位任意(默认80)
+	 * @property {String | Number} border-radius 菜单展开内容下方的圆角值,单位任意(默认0)
+	 * @property {Boolean} border-bottom 标题菜单是否显示下边框(默认false)
+	 * @property {String | Number} title-size 标题的字体大小,单位任意,数值默认为rpx单位(默认28)
+	 * @event {Function} open 下拉菜单被打开时触发
+	 * @event {Function} close 下拉菜单被关闭时触发
+	 * @example <u-dropdown></u-dropdown>
+	 */
+	export default {
+		name: 'u-dropdown',
+		props: {
+			// 菜单标题和选项的激活态颜色
+			activeColor: {
+				type: String,
+				default: '#2979ff'
+			},
+			// 菜单标题和选项的未激活态颜色
+			inactiveColor: {
+				type: String,
+				default: '#606266'
+			},
+			// 点击遮罩是否关闭菜单
+			closeOnClickMask: {
+				type: Boolean,
+				default: true
+			},
+			// 点击当前激活项标题是否关闭菜单
+			closeOnClickSelf: {
+				type: Boolean,
+				default: true
+			},
+			// 过渡时间
+			duration: {
+				type: [Number, String],
+				default: 300
+			},
+			// 标题菜单的高度,单位任意,数值默认为rpx单位
+			height: {
+				type: [Number, String],
+				default: 80
+			},
+			top: {
+				type: [Number, String],
+				default: 80
+			},
+			// 是否显示下边框
+			borderBottom: {
+				type: Boolean,
+				default: false
+			},
+			// 标题的字体大小
+			titleSize: {
+				type: [Number, String],
+				default: 28
+			},
+			// 下拉出来的内容部分的圆角值
+			borderRadius: {
+				type: [Number, String],
+				default: 0
+			},
+			// 菜单右侧的icon图标
+			menuIcon: {
+				type: String,
+				default: 'arrow-down'
+			},
+			// 菜单右侧图标的大小
+			menuIconSize: {
+				type: [Number, String],
+				default: 26
+			}
+		},
+		data() {
+			return {
+				showDropdown: true, // 是否打开下来菜单,
+				menuList: [], // 显示的菜单
+				active: false, // 下拉菜单的状态
+				// 当前是第几个菜单处于激活状态,小程序中此处不能写成false或者"",否则后续将current赋值为0,
+				// 无能的TX没有使用===而是使用==判断,导致程序认为前后二者没有变化,从而不会触发视图更新
+				current: 99999,
+				// 外层内容的样式,初始时处于底层,且透明
+				contentStyle: {
+					zIndex: -1,
+					opacity: 0
+				},
+				// 让某个菜单保持高亮的状态
+				highlightIndex: 99999,
+				contentHeight: 0
+			}
+		},
+		computed: {
+			// 下拉出来部分的样式
+			popupStyle() {
+				let style = {};
+				// 进行Y轴位移,展开状态时,恢复原位。收齐状态时,往上位移100%,进行隐藏
+				style.transform = `translateY(${this.active ? 0 : '-100%'})`
+				style['transition-duration'] = this.duration / 1000 + 's';
+				style.borderRadius = `0 0 ${this.$u.addUnit(this.borderRadius)} ${this.$u.addUnit(this.borderRadius)}`;
+				return style;
+			}
+		},
+		created() {
+			// 引用所有子组件(u-dropdown-item)的this,不能在data中声明变量,否则在微信小程序会造成循环引用而报错
+			this.children = [];
+		},
+		mounted() {
+			
+		},
+		methods: {
+			init() {
+				// 当某个子组件内容变化时,触发父组件的init,父组件再让每一个子组件重新初始化一遍
+				// 以保证数据的正确性
+				this.menuList = [];
+				this.children.map(child => {
+					child.init();
+				})
+			},
+			// 点击菜单
+			menuClick(index) {
+				// 判断是否被禁用
+				if (this.menuList[index].disabled) return;
+				// 如果点击时的索引和当前激活项索引相同,意味着点击了激活项,需要收起下拉菜单
+				if (index === this.current && this.closeOnClickSelf) {
+					this.close();
+					// 等动画结束后,再移除下拉菜单中的内容,否则直接移除,也就没有下拉菜单收起的效果了
+					setTimeout(() => {
+						this.children[index].active = false;
+					}, this.duration)
+					return;
+				}
+				this.open(index);
+			},
+			// 打开下拉菜单
+			open(index) {
+				// 重置高亮索引,否则会造成多个菜单同时高亮
+				// this.highlightIndex = 9999;
+				// 展开时,设置下拉内容的样式
+				this.contentStyle = {
+					zIndex: 11,
+				}
+				// 标记展开状态以及当前展开项的索引
+				this.active = true;
+				this.current = index;
+				// 历遍所有的子元素,将索引匹配的项标记为激活状态,因为子元素是通过v-if控制切换的
+				// 之所以不是因display: none,是因为nvue没有display这个属性
+				this.children.map((val, idx) => {
+					val.active = index == idx ? true : false;
+				})
+				this.getContentHeight();
+				this.$emit('open', this.current);
+				
+			},
+			// 设置下拉菜单处于收起状态
+			close() {
+				this.contentHeight =0
+				this.$emit('close', this.current);
+				// 设置为收起状态,同时current归位,设置为空字符串
+				this.active = false;
+				this.current = 99999;
+				// 下拉内容的样式进行调整,不透明度设置为0
+				this.contentStyle = {
+					zIndex: -1,
+					opacity: 0
+				}
+			},
+			// 点击遮罩
+			maskClick() {
+				// 如果不允许点击遮罩,直接返回
+				if (!this.closeOnClickMask) return;
+				this.close();
+			},
+			// 外部手动设置某个菜单高亮
+			highlight(index = undefined) {
+				this.highlightIndex = index !== undefined ? index : 99999;
+			},
+			// 获取下拉菜单内容的高度
+			getContentHeight() {
+				// 这里的原理为,因为dropdown组件是相对定位的,它的下拉出来的内容,必须给定一个高度
+				// 才能让遮罩占满菜单一下,直到屏幕底部的高度
+				// this.$u.sys()为uView封装的获取设备信息的方法
+				let windowHeight = this.$u.sys().windowHeight;
+				this.$uGetRect('.u-dropdown__menu').then(res => {
+					// 这里获取的是dropdown的尺寸,在H5上,uniapp获取尺寸是有bug的(以前提出修复过,后来又出现了此bug,目前hx2.8.11版本)
+					// H5端bug表现为元素尺寸的top值为导航栏底部到到元素的上边沿的距离,但是元素的bottom值确是导航栏顶部到元素底部的距离
+					// 二者是互相矛盾的,本质原因是H5端导航栏非原生,uni的开发者大意造成
+					// 这里取菜单栏的botton值合理的,不能用res.top,否则页面会造成滚动
+					this.contentHeight = windowHeight - res.bottom;
+				})
+			}
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	//@import "../../libs/css/style.components.scss";
+
+	.u-dropdown {
+		flex: 1;
+		width: 100%;
+		position: relative;
+
+		&__menu {
+			//@include vue-flex;
+			display: flex;
+			position: relative;
+			z-index: 11;
+			height: 80rpx;
+
+			&__item {
+				flex: 1;
+				//@include vue-flex;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+
+				&__text {
+					font-size: 28rpx;
+					color: $u-content-color;
+				}
+
+				&__arrow {
+					margin-left: 6rpx;
+					transition: transform .3s;
+					align-items: center;
+					//@include vue-flex;
+					display: flex;
+
+					&--rotate {
+						transform: rotate(180deg);
+					}
+				}
+			}
+		}
+
+		&__content {
+			position: absolute;
+			z-index: 8;
+			width: 100%;
+			left: 0px;
+			bottom: 0;
+			overflow: hidden;
+			
+
+			&__mask {
+				position: absolute;
+				z-index: 9;
+				background: rgba(0, 0, 0, .3);
+				width: 100%;
+				left: 0;
+				top: 0;
+				bottom: 0;
+			}
+
+			&__popup {
+				position: relative;
+				z-index: 10;
+				transition: all 0.3s;
+				transform: translate3D(0, -100%, 0);
+				overflow: hidden;
+			}
+		}
+
+	}
+</style>

+ 8 - 0
pages.json

@@ -255,6 +255,14 @@
 				"enablePullDownRefresh": false
 			}
 
+		},{
+			
+			"path": "pages/searchPile/searchPile2",
+			"style": {
+				
+				"enablePullDownRefresh": false
+			}
+
 		},
 		{
 			"name":"找桩-地图模式",

+ 32 - 4
pages/MyInvoice/invoiceManagement.vue

@@ -1,13 +1,19 @@
 <template>
 	<view >
-		<ujp-navbar title="收款账户">
+		<ujp-navbar title="我的发票">
 			<text class="management" @click="gotoUrl('pages/MyInvoice/invoiceTitleManagement')">抬头管理</text>
 		</ujp-navbar>
-		
+		<u-alert-tips type="warning"  v-if="personInfo&&personInfo.userType==1" 
+		 :descStyle="{
+			     fontSize: '28rpx',
+			     color: '#ef7a30',
+		 }" @click="alerttipsCk"
+		 :show-icon="true"  :description="description"></u-alert-tips>
 	
 			<u-tabs  inactive-color="#888888" active-color="#101010" :list="list" :is-scroll="true"
 					:current="current" @change="change"></u-tabs>
 	
+	
 		<view class="carNone" v-if="list[current].list.length == 0">
 				<img src="static/img/暂无数据-缺省页.png" alt="">
 				<p class="oldTextjp2" oldstyle="font-size: 18px;">暂无记录</p>
@@ -106,7 +112,8 @@
 					list:[],
 				}],
 				current: 0,
-			
+				personInfo:{},
+				description:"游客模式下需要补全手机号信息,点击前往",
 				
 			}
 		},
@@ -119,7 +126,7 @@
 			}
 		},
 		onShow(){
-		
+			this.personInfo=this.carhelp.getPersonInfo()
 			this.getlist(true);
 		},
 		computed:{
@@ -169,7 +176,13 @@
 				return count;
 			}
 		},
+		 
 		methods: {
+			alerttipsCk(){
+				uni.redirectTo({
+					url:"/pages/login/login?jpcode2=invoice"
+				})
+			},
 			view(id){
 				uni.navigateTo({
 					url:"/pages/MyInvoice/invoiceDetail?id="+id
@@ -259,6 +272,21 @@
 				this.getlist(true);
 			},
 			submit(id){
+				if(this.personInfo&&this.personInfo.userType==1 ){
+					uni.showModal({
+						title: "提示",
+						content: "游客模式下需要补全手机号信息,点击前往",
+						confirmText: "补全手机号",
+						success: res1 => {
+							if (res1.confirm) {
+								this.alerttipsCk()
+							} else if (res1.cancel) {
+								//('用户点击取消');
+							}
+						}
+					})
+					return
+				}
 				if(!id){
 					id=this.selectIds
 				}

+ 8 - 1
pages/login/login.vue

@@ -171,6 +171,9 @@
 			this.projectName = process.car.ProjectName;
 			if (op.member) {
 				this.member = true;
+			}
+			if (op.jpcode2) {
+				this.code = op.jpcode2;
 			}
 			if (op.jpcode) {
 
@@ -388,7 +391,11 @@
 						})
 					}
 
-				} else {
+				} else if (this.code == 'invoice') {
+					uni.redirectTo({
+						url: '/pages/MyInvoice/invoiceManagement'
+					})
+				}else {
 					uni.redirectTo({
 						url: '/pages/index/index'
 					})

+ 929 - 0
pages/searchPile/searchPile2.vue

@@ -0,0 +1,929 @@
+<template>
+	<view>
+		<ujp-navbar :is-back="false" height='88' style="background-color: bisque;">
+			<view class="ujp-navbar-main">
+				<view class="ujp-navbar-main1">
+					<view style="margin-left:20rpx;width: 160rpx;">
+						<uni-combox class='font2' ref="city" :border="false" v-model="area" :candidates="cities"
+							@updateModel='updateCity' @updateSelector="updateTypeSelector(3)"></uni-combox>
+					</view>
+					<view style="margin-right: 20rpx; flex:1">
+						<u-search height="60" :input-style='inputStyle' placeholder="查询站点地址或站名" :showAction="false"
+							@focus="navigate"></u-search>
+					</view>
+					<view style="margin-right: 20rpx;" v-show="viewMode" @click="listMode">
+						<text class="iconfont">&#xe613;</text> <text class="list font2">列表</text>
+					</view>
+					<view style="margin-right: 20rpx;" v-show="!viewMode" @click="mapMode">
+						<text class="iconfont">&#xe622;</text> <text class="list font2">地图</text>
+					</view>
+				</view>
+				<view class="ujp-navbar-main2">
+					<view style="margin-left:20rpx;margin-right:10rpx;flex:1; ">
+						
+						<uni-combox class='font2' ref="raidus" :border="false" v-model="raidus" :candidates="radiuses"
+							@updateModel='updateRadius'   ></uni-combox>
+					</view>
+					<view style="flex:1;   ">
+						<uni-combox ref="type" class='font2' :border="false" v-model="type" :candidates="types"
+							@updateModel='updateType' @updateSelector="updateTypeSelector(1)"></uni-combox>
+					</view>
+					<view style="flex:1;">
+						<uni-combox ref="stationType" class='font2' :border="false" v-model="stationType"
+							:candidates="stationTypes" @updateModel='updateType2'
+							@updateSelector="updateTypeSelector(2)"></uni-combox>
+					</view>
+					<view style="margin-right: 20rpx;">
+						<!--  -->
+						<!-- <view v-show="dropdownShow" >
+							 <u-mask :show="dropdownShow" ></u-mask>
+						</view> -->
+						<jp-dropdown 
+						@open="dropdownShow=true"  @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 class="preference" style="z-index:1024;width: 100%;">
+											<view class="content-s">
+												<view class="preference_group">
+													<view class="preference_group_item"><label
+															class="preference_label">距离我</label></view>
+													<view>
+														<u-tag class="preference_item"
+															v-for="(item, index) in info.miles_type" :key="index"
+															:style="index == preference.miles_index ? 'background-color:#00B962;color:#FFFFFF' : 'background-color:#EFF4F2;color:#926666'"
+															shape="circle" :text="item.text"
+															@click="selectMiles(index)"></u-tag>
+													</view>
+												</view>
+												<view class="preference_group">
+													<view class="preference_group_item"><label
+															class="preference_label">充电站类型</label></view>
+													<view>
+														<u-tag class="preference_item_medium"
+															v-for="(item, index) in info.obc_type" :key="index"
+															:style="index == preference.obc_type_index ? 'background-color:#00B962;color:#FFFFFF' : 'background-color:#EFF4F2;color:#926666'"
+															shape="circle" :text="item.text"
+															@click="selectOBSType(index)"></u-tag>
+													</view>
+												</view>
+												<view class="preference_group">
+													<view class="preference_group_item"><label
+															class="preference_label">充电站所属</label></view>
+													<view>
+														<u-tag class="preference_item_medium"
+															v-for="(item, index) in info.obc_stationType" :key="index"
+															:style="index == preference.obc_stationType_index ? 'background-color:#00B962;color:#FFFFFF' : 'background-color:#EFF4F2;color:#926666'"
+															shape="circle" :text="item.text"
+															@click="selectOBSType2(index)"></u-tag>
+													</view>
+												</view>
+
+												<view class="preference_group" v-if="false">
+													<view class="preference_group_item"><label
+															class="preference_label">是否对外开放</label></view>
+													<view>
+														<u-tag class="preference_item_plus"
+															v-for="(item, index) in info.obc_status" :key="index"
+															:style="index == preference.obc_status_index ? 'background-color:#00B962;color:#FFFFFF' : 'background-color:#EFF4F2;color:#926666'"
+															shape="circle" :text="item.text"
+															@click="selectOBSStatus(index)"></u-tag>
+													</view>
+												</view>
+
+												<view class="preference_group" v-if="false">
+													<view style="margin-left: 30rpx;"><u-checkbox active-color="#00b962"
+															shape="circle" v-model="preference.save_preference"
+															@change="radioChange">保存偏好设置</u-checkbox></view>
+												</view>
+
+											</view>
+											<view class="pre-btn" style="display: flex;flex-direction: row;">
+												<view class="btn-1 font3" @click="reset" style="width: 30%;">重置</view>
+												<view class="btn-2 font3" @click="close"
+													style="width: 70%;background-color: #00B962;color: #fff;">确定</view>
+											</view>
+
+										</view>
+									</view>
+									<u-button type="primary" @click="closeDropdown">确定</u-button>
+								</view>
+							</u-dropdown-item>
+						</jp-dropdown>
+					</view>
+				</view>
+			</view>
+		</ujp-navbar>
+		<!-- 定位 -->
+		<view class="location-box" v-if="message != 'getLocation:ok' && stationslist.length == 0 ">
+			<view class="location">
+				<view class="location-text">
+					<view class="text-1 oldTextjp" oldstyle="font-size: 20px;">
+						定位中...
+					</view>
+					<view class="text-2 oldTextjp2" oldstyle="font-size: 16px;">
+						授权定位后可查询附近充电站
+					</view>
+					<view class="text-3 oldTextjp2" oldstyle="font-size: 16px;" @click="getPoint()">
+						重新定位
+					</view>
+				</view>
+				<view class="img-box">
+					<img src="static/img/暂无网络信号-缺省页 1.png">
+				</view>
+			</view>
+
+		</view>
+		<view v-else-if="message == 'getLocation:ok'&&stationslist.length==0">
+			<view class="carNone" v-if="stationslist.length == 0">
+				<img src="static/img/暂无数据-缺省页.png" alt="">
+				<p class="oldTextjp2" oldstyle="font-size: 18px;">{{loading?'暂无可用充电站':'正在为你加载可用的充电站...'}}</p>
+
+			</view>
+		</view>
+		<view v-else>
+			<view v-show="!viewMode">
+				<view v-for="(item,index) in stationslist" :key="item.id" class="charing-slow"
+					@click="stationDetail(item)">
+
+
+
+					<view class="address">
+						<view class="name oldTextjp" oldstyle="font-size: 20px;">
+							{{item.name}}
+						</view>
+						<view class="distance " v-if="item.distance != '99999999'">
+							<text class="iconfont" style="color:#666666">&#xe615;</text>
+							{{item.distance!=null && item.distance>0.1 ? item.distance.toFixed(1)+'公里' : '小于100米'}}
+						</view>
+						<view class="distance oldTextjp2" oldstyle="font-size: 16px;" v-else>
+							<text class="iconfont" style="color:#666666">&#xe615;</text>
+							暂无定位
+						</view>
+					</view>
+					<view class="sign" v-if="item.stationType==50">
+						{{item.address}}
+					</view>
+					<view class="sign" v-else>
+						<template v-if="personInfo&&personInfo.userType!=1">
+							<view class="sign-1" v-if="item.giveDiscount&&item.discountRatio&&item.discountRatio!=100">
+								会员服务费{{discountRatio10(item.discountRatio)}}折</view>
+							<view class="sign-3" v-if="item.category=='超充'">160kW超充站</view>
+							<view class="sign-4"
+								v-if="item.id=='3c554cea-f522-4281-b582-d761510ed91e'||item.id=='3865b3a3-13fd-461a-8145-ee9711df35a2'||item.nightLowPriceEnabled">
+								夜间超低价</view>
+							<view class="sign-2" v-if="item.tagList.length != 0"
+								v-for="(tagName,tagIndex) in item.tagList" :key="tagIndex">{{tagName}}</view>
+
+						</template>
+					</view>
+					<view class="price-free price-freeList">
+						<view class="price">
+							<view class="price-1">
+								<text class="num">{{!item.giveDiscount ? (item.electricityPrice+item.servicePrice).toFixed(2)
+								: (item.electricityPrice+item.discountServicePrice).toFixed(2)}}</text>
+								<text class="unit " oldstyle="font-size: 14px;">
+									元/度
+								</text>
+							</view>
+							<view class="price-2 " oldstyle="font-size: 14px;" v-if="item.giveDiscount">
+								<text class="num">{{(item.electricityPrice+item.servicePrice).toFixed(2)}}</text>
+								<text class="unit">元/度</text>
+							</view>
+						</view>
+
+
+						<view class="free">
+
+							<view class="fast" v-if="item.fastNum">
+								<view class="fast-font">
+									快
+								</view>
+								<view class="num">
+
+									{{item.fastAvailableNum}}/{{item.fastNum}}
+								</view>
+							</view>
+							<view class="slow" v-if="item.slowNum">
+								<view class="slow-font">
+									慢
+								</view>
+								<view class="num">
+									{{item.slowAvailableNum}}/{{item.slowNum}}
+								</view>
+							</view>
+						</view>
+					</view>
+
+
+
+
+				</view>
+
+				<u-divider margin-top="20" bg-color="#F2F4F4"
+					v-if="stationslist.length == recordsTotal">已经到底了</u-divider>
+
+			</view>
+			<view v-show="viewMode">
+			</view>
+		</view>
+
+		<Tabbar :current="2" ref="tabbarMain" ></Tabbar>
+
+	</view>
+</template>
+
+<script>
+	import * as indexAPI from '@/apis/index.js'
+	import * as api from '@/apis/site.js';
+	import Tabbar from '@/components/Tabbar.vue';
+	import Chargermap from '@/components/Chargermap.vue';
+	import jpDropdown from '@/components/Udropdown.vue';
+
+	import uniCombox from '@/components/uni-combox/components/uni-combox/uni-combox.vue'
+	import * as WxJsApi from '@/utils/wxJsApi.js'
+
+	export default {
+		components: {
+			Chargermap,
+			Tabbar,
+			uniCombox,
+			jpDropdown
+		},
+		data() {
+			return {
+				personInfo:{},
+				loading:false,
+				viewMode: false, //列表
+				inputStyle: {
+					backgroundColor: 'transparent',
+					"font-size": '32rpx',
+				},
+
+				cities: ['荆州市'],
+				radiuses: ['1公里', '2公里', '5公里', '10公里', '20公里', '50公里', '100公里', '200公里'],
+				types: ['全部', '交流快充', '直流慢充'],
+				stationTypes: ['全部', '公共充电桩', '个人充电桩'],
+				info: {
+					miles_type: [{
+							distance: 1,
+							text: '1公里'
+						},
+						{
+							distance: 2,
+							text: '2公里'
+						},
+						{
+							distance: 5,
+							text: '5公里'
+						},
+						{
+							distance: 10,
+							text: '10公里'
+						},
+						{
+							distance: 20,
+							text: '20公里'
+						},
+						{
+							distance: 50,
+							text: '50公里'
+						},
+						{
+							distance: 100,
+							text: '100公里'
+						},
+						{
+							distance: 200,
+							text: '200公里'
+						}
+					],
+					obc_type: [{
+						value: '',
+						text: '全部'
+					}, {
+						value: 1,
+						text: '直流快充'
+					}, {
+						value: 2,
+						text: '交流慢充'
+					}],
+					obc_status: [{
+						value: 0,
+						text: '对外开放'
+					}, {
+						value: 1,
+						text: '不对外开放'
+					}],
+					obc_voltage: [{
+						value: 0,
+						text: '低于700V'
+					}, {
+						value: 1,
+						text: '700V及以上'
+					}],
+					obc_power: {
+						minValue: 0,
+						maxValue: 1000
+					},
+					obc_stationType: [{
+						value: '',
+						text: '全部'
+					}, {
+						value: 1,
+						text: '公共充电桩'
+					}, {
+						value: 50,
+						text: '个人充电桩'
+					}]
+				},
+				preference: {
+					miles_index: 3,
+					obc_stationType_index: 0,
+					obc_type_index: 0,
+					obc_status_index: 0,
+					obc_voltage_index: 0,
+					save_preference: false,
+					obc_power: {
+						minValue: 0,
+						maxValue: 500
+					}
+				},
+
+				area: '荆州市',
+				raidus: '10公里',
+				type: '全部',
+				stationType: '全部',
+				longitude: '',
+				latitude: '',
+				message: '',
+				stationslist: [],
+				pointTimeOut: true,
+				dropdownShow:false,
+				currentIndex:0,
+				
+			}
+		},
+		onUnload() {
+			//this.timeOut = false;
+			this.pointTimeOut = false;
+		},
+		onHide() {
+			//this.timeOut = false;
+			this.pointTimeOut = false;
+		},
+		onShow() {
+			if (this.$refs.tabbarMain) {
+				this.$refs.tabbarMain.setcount(2);
+			}
+			if (!this.pointTimeOut) {
+				this.pointTimeOut = true
+				this.getPointTimeOut();
+			}
+			
+		
+		},
+		onReady() {
+			WxJsApi.getWxConfig(['getLocation', 'addEventListener', 'scanQRCode']).then((res) => {
+				// //(res)
+			}).catch(error => {
+				//(res)
+			})
+			if (this.carhelp.getPersonInfo()) {
+			//	this.userId = this.carhelp.getPersonInfo().id;
+						this.personInfo=this.carhelp.getPersonInfo();
+			}
+			this.getPointTimeOut();
+		},
+		methods: {
+			updateType2(e) {
+				this.preference.obc_stationType_index = e.value;
+				this.close();
+
+			},
+			updateType(e) {
+				this.preference.obc_type_index = e.value;
+				this.close();
+
+			},
+			updateRadius(e) {
+				this.preference.miles_index = e.value;
+				this.close();
+
+			},
+
+			close() {
+
+				this.updateTypeSelector('')
+
+				this.type = this.info.obc_type[this.preference.obc_type_index].text;
+				this.raidus = this.info.miles_type[this.preference.miles_index].text;
+				this.stationType = this.info.obc_stationType[this.preference.obc_stationType_index].text;
+
+				if (this.preference.save_preference) {
+					this.carhelp.set('preference', this.preference)
+				}
+				this.searchStationData();
+
+			},
+			getPoint() {
+				if (this.stationslist.length != 0) {
+					return
+				}
+				WxJsApi.getLocation().then((res) => {
+
+					this.latitude = parseFloat(res.latitude);
+					this.longitude = parseFloat(res.longitude);
+					this.message = res.errMsg;
+
+					if (res.errMsg != 'getLocation:ok') {
+						uni.showToast({
+							title: res
+						})
+					} else {
+
+						this.searchStationData()
+					}
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+			searchStationData() {
+				let data1 = {
+					latitude: this.latitude,
+					longitude: this.longitude,
+					findType: "1",
+					pageIndex: 1,
+					pageSize: 999
+				};
+				data1.type = this.info.obc_type[this.preference.obc_type_index].value;
+				if(this.info.miles_type[this.preference.miles_index].distance!=null)
+					data1.raidus = this.info.miles_type[this.preference.miles_index].distance.toString();
+				
+				if(this.preference.obc_stationType_index!=null){
+					data1.stationType= this.info.obc_stationType[this.preference.obc_stationType_index].value
+				}
+				this.currentIndex = -1;
+				//data1.findType = this.viewMode?"0":"1";
+				uni.showLoading({})
+				
+				if (this.carhelp.getPersonInfo()) {
+						data1.openId=this.carhelp.getOpenId()
+				}
+				this.loading=false
+				api.getChargingStationData(data1).then(res=>{
+					uni.hideLoading()
+					this.loading=true
+					this.recordsTotal = res.data.recordsTotal;
+					this.stationslist = res.data.data;
+					if(data1.findType == "0"){
+						this.$refs.amap.calcDistances([this.longitude, this.latitude],this.stationslist)
+						this.$refs.amap.setChargerList(this.stationslist);
+						this.currentIndex = 0; 
+						if(this.stationslist.length){
+							this.$refs.amap.updateCharger(this.stationslist[0]);
+						}
+					}else{
+						
+					}
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+				
+			},
+			getPointTimeOut() {
+
+				setTimeout(() => {
+					if (this.pointTimeOut) {
+						this.getPoint();
+					}
+				}, 1000)
+
+			},
+			closeDropdown() {
+				this.$refs.uDropdown.close();
+			},
+			close_all(){
+				
+				this.updateTypeSelector('')
+					
+			},
+			updateTypeSelector(val) {
+
+				var sz = ["raidus", "type", "stationType", 'city']
+				for (var i in sz) {
+					if (i == val && val != '') {
+
+					} else {
+						this.$refs[sz[i]].closeSelector();
+					}
+				}
+				//this.show = false;		
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	@import "@/_theme.scss";
+
+	.ujp-navbar-main {
+		display: flex;
+		flex-direction: column;
+		width: 100%;
+		height: 100%;
+
+		.ujp-navbar-main1 {
+			display: flex;
+			flex-direction: row;
+			height: 100%;
+			align-items: center;
+			margin-top: 0rpx;
+			padding-top: 0rpx;
+			padding-bottom: 20rpx;
+		}
+
+		.ujp-navbar-main2 {
+			display: flex;
+			flex-direction: row;
+			width: 100%;
+			justify-content: space-between;
+			align-items: center;
+		}
+	}
+
+
+	.preference_group_item {
+		padding: 15rpx;
+
+	}
+
+	.preference_group {
+		padding-bottom: 20rpx;
+	}
+
+	.preference {
+		background-color: #ffffff;
+		left: 0rpx;
+		//	position: absolute
+
+	}
+
+	.preference_item {
+		margin-bottom: 10rpx;
+		margin-left: 20rpx;
+		text-align: center;
+		border-style: none;
+		width: 20%;
+		height: 56rpx;
+
+		/*	line-height: 14px;*/
+	}
+
+	.content-s {
+		height: 640rpx;
+		overflow-y: scroll;
+		text-align: left;
+	}
+
+	.preference_item_medium {
+		margin-bottom: 10rpx;
+		margin-left: 20rpx;
+		text-align: center;
+		border-style: none;
+		min-width: 22%;
+		height: 56rpx;
+
+		@include themeify {
+			font-size: themed('font-size2');
+			line-height: themed('font-size2');
+		}
+
+		/*	line-height: 14px;*/
+	}
+
+	.preference_item_plus {
+		margin-bottom: 10rpx;
+		margin-left: 20rpx;
+		align-items: center;
+		justify-content: center;
+		text-align: center;
+		width: 28%;
+		border-style: none;
+		height: 56rpx;
+
+		@include themeify {
+			font-size: themed('font-size2');
+			line-height: themed('font-size2');
+		}
+
+		/*	line-height: 14px;*/
+	}
+
+	.preference_label {
+		@include themeify {
+			color: themed('font_colorLabel');
+			font-size: themed('font-size1');
+			font-weight: themed('fontWeight');
+		}
+
+		margin-left: 20rpx;
+		margin-bottom: 100rpx;
+	}
+
+	.pre-btn {
+		width: 100%;
+		height: 96rpx;
+		z-index: 999;
+	}
+
+	.btn-1,
+	.btn-2 {
+		height: 96rpx;
+		line-height: 96rpx;
+		text-align: center;
+		border-top: 1px solid rgba(225, 228, 232, 100);
+	}
+
+	.station,
+	.location,
+	.state1 {
+		box-shadow: 0px 4rpx 12rpx 0px #008c4a33;
+	}
+
+	//定位
+
+	.location {
+		width: 91.4%;
+		background-color: #ffffff;
+		height: 120px;
+		display: flex;
+		justify-content: space-between;
+		margin: 20px auto 0;
+		border-radius: 8px;
+		border: #F2F4F4 1px;
+
+		.location-text {
+			padding: 24px 0 0 28px;
+
+			.text-1 {
+				height: 16px;
+				line-height: 16px;
+				color: rgba(16, 16, 16, 100);
+				font-size: 16px;
+				text-align: left;
+			}
+
+			.text-2 {
+				height: 17px;
+				line-height: 17px;
+				color: rgba(102, 102, 102, 100);
+				font-size: 12px;
+				text-align: left;
+				margin-top: 4px;
+				white-space: nowrap; //强制不换行
+				text-overflow: ellipsis; //文本超出出现省略号
+				overflow: hidden;
+			}
+
+			.text-3 {
+				width: 80px;
+				height: 24px;
+				line-height: 22px;
+				border-radius: 50px;
+				color: rgba(0, 185, 98, 100);
+				font-size: 12px;
+				text-align: center;
+				border: 1px solid rgba(0, 185, 98, 100);
+				margin-top: 11px;
+			}
+		}
+
+		.img-box {
+			width: 120px;
+			height: 120px;
+			margin-right: 20px;
+
+		}
+	}
+	
+	.carNone{
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+		img{
+			width: 100%;
+			height: 100%;
+		}
+		p{
+			margin-top: -60px;
+		}
+	}
+	
+	.charing-slow{
+		box-shadow: 0px 4rpx 12rpx 0px #008c4a33;
+		background-color: #fff;
+		margin: 36rpx;
+		border-radius: 16rpx;
+		padding: 40rpx 24rpx 24rpx;
+		position: relative;
+		left: 0;
+		right: 0;
+	}
+	
+	.sign{
+		display: flex;
+		flex-wrap: wrap;
+		margin-top: 10px;
+		
+		.sign-1{
+			height: 20px;
+			line-height: 20px;
+			border-radius: 4px;
+			background-color: rgba(255, 255, 255, 100);
+			color: rgba(255, 139, 0, 100);
+			font-size: 12px;
+			text-align: center;
+			border: 1px solid rgba(255, 139, 0, 100);
+			padding: 0 4px;
+			margin-right: 8px;
+			margin-bottom: 4px;
+		}
+		.sign-2{
+			height: 20px;
+			line-height: 20px;
+			border-radius: 4px;
+			background-color: rgba(255, 255, 255, 100);
+			color: rgba(153, 153, 153, 100);
+			font-size: 12px;
+			text-align: center;
+			border: 1px solid rgba(204, 204, 204, 100);
+			padding: 0 4px;
+			margin-right: 8px;
+			margin-bottom: 4px;
+		}
+		.sign-3{
+			line-height: 40rpx;
+			border-radius: 8rpx;
+			background-color: rgba(255, 255, 255, 100);
+			color: #8161FF ;
+			font-size: 24rpx;
+			text-align: center;
+			border: 1px solid  #8161FF;
+			padding: 0 8rpx;
+			margin-right: 16rpx;
+			margin-bottom: 8rpx;
+		}
+		.sign-4 {
+			line-height: 40rpx;
+			border-radius: 8rpx;
+			background-color: rgba(255, 255, 255, 100);
+			color: #00B962;
+			font-size: 24rpx;
+			text-align: center;
+			border: 1px solid #00B962;
+			padding: 0 8rpx;
+			margin-right: 16rpx;
+			margin-bottom: 8rpx;
+		}
+	}
+	.address {
+			width: 100%;
+			line-height: 20px;
+			display: flex;
+			justify-content: space-between;
+			.name{
+				font-size: 16px;
+				white-space: nowrap;
+				overflow: hidden;
+				text-overflow: ellipsis;
+			}
+			.distance{
+				color: rgba(102, 102, 102, 100);
+				text-align: end;
+				font-size: 30rpx;
+				 width: 180rpx;
+				min-width: 180rpx;
+				.iconfont{
+					font-size: 12px;
+					margin-right: 2px;
+				}
+			}
+			
+			@include themeify{
+				font-size: themed('font-size5');
+				line-height: themed('font-size7');
+			}
+	/* 		font-size: 11px;*/
+	font-weight: 600;
+	 		color: #101010;
+	 	}
+		
+		.price-free{
+			 width: 100%;
+			 display: flex;
+			 align-items: center;
+			 justify-content: space-between;
+			
+		}
+			.price {
+				display: flex;
+				align-items: baseline;
+				line-height: 40rpx;
+				
+				.price-1{
+				
+					
+					.num {
+					
+					 	color: rgba(255, 98, 0, 100);
+					 
+					
+						     font-size: 44rpx;
+						     height: 44rpx;
+					 	text-align: left;
+					 	font-family: Roboto-medium;
+					 }
+					 .unit {
+							// font-size: 12px;
+					  	color: rgba(102, 102, 102, 100);
+					 	@include themeify{
+					 			// font-size: themed('font-size2');
+								font-size: 24rpx;
+								
+					 			height: themed('font-size2');
+					 			
+					 	}
+					
+					  	text-align: left;
+					  	font-family: AlibabaPuHui-regular;
+					  	
+					  	margin-left: 8rpx;
+					  }
+				}
+		       .price-2{
+		       	color: rgba(153, 153, 153, 100);
+		       	margin-left: 6rpx;
+		       	text-decoration: line-through;
+					font-size: 24rpx
+		       }
+			}
+		
+		.free{
+			display: flex;
+		    align-items: center;
+			.slow,.fast{
+				display: flex;
+				.sp-font{
+					width: 40rpx;
+					height: 40rpx;
+					line-height: 40rpx;
+					border-radius: 4px;
+					background-color: #7a68f6;
+					color: #fff;
+					font-size: 28rpx;
+					text-align: center;
+					margin-right: 2rpx;
+				}
+				.fast-font{
+					width: 40rpx;
+					height: 40rpx;
+					line-height: 40rpx;
+					border-radius: 4px;
+					background-color: rgba(186, 240, 215, 100);
+					color: rgba(0, 130, 69, 100);
+					font-size: 28rpx;
+					text-align: center;
+					margin-right: 2rpx;
+				}
+				.slow-font{
+					width: 40rpx;
+					height: 40rpx;
+					line-height: 40rpx;
+					border-radius: 4px;
+					background-color: rgba(226, 226, 226, 100);
+					color: rgba(128, 128, 128, 100);
+					font-size: 28rpx;
+					text-align: center;
+					margin-right: 2rpx;
+				}
+				.num{
+					font-size: 32rpx;color: rgba(0, 145, 67, 100);
+					line-height: 40rpx;
+				}
+			}
+			.slow{
+				margin-left: 16rpx;
+			}
+		}
+		
+</style>