Преглед на файлове

feat(coupons): 优化优惠券页面展示逻辑与接口调用

- 调整待领取、待使用、已使用、已过期标签页的展示逻辑
- 修改优惠券列表为空时显示“暂无数据”提示
- 更新统计数量接口,分别获取未使用、已使用、已过期数量
- 替换原接口为新接口:getCouponTemplatePage 和 getCouponPage
- 修复立即领取按钮点击事件及状态判断逻辑
- 添加选项卡切换时重新加载对应状态优惠券列表的功能

fix(feedback-reply): 修复反馈详情字段映射错误

- 将 problemDescribe 字段改为 description
- 将 filesUrl 字段改为 images
- 修改问题类型字段从 problemType 为 type
- 修复功能建议类型的值由3改为4

style(index): 调整首页样式细节

- 修改 banner 高度计算比例
- 注释掉支付信息相关方法调用
- 删除 console 日志输出
- 微调背景色与字体颜色统一风格

refactor(my): 重构个人中心模块

- 更新广告图接口地址并移除旧参数处理
- 修改 swiper 图片资源路径引用方式
- 调整统计数据展示结构以适配新接口返回格式
- 移除冗余代码与调试语句

refactor(search): 重写搜索功能逻辑

- 更改站点名称字段 stationName 替代 name
- 使用 distance 替代 rangeShow 并增加单位 km 显示
- 修改快慢桩数量字段命名规范
- 引入百度坐标转腾讯坐标的转换函数
- 更新跳转链接指向 new-site 页面而非 site 页面

refactor(site-more): 重构电站详情扩展页

- 更改电站名称字段 stationName 替代 name
- 替换终端设备列表字段名以匹配新接口响应结构
- 修改电价时段标签字段 periodFlagName 和 timePeriod
- 更新终端状态字段 statusName 及设备类型 equipmentType
- 移除原有状态码获取函数,直接使用接口返回值
zouzexu преди 6 дни
родител
ревизия
020d8bfa53
променени са 55 файла, в които са добавени 1078 реда и са изтрити 1118 реда
  1. 142 135
      pages/coupons/coupons.vue
  2. 7 7
      pages/feedback-reply/feedback-reply.vue
  3. 1 1
      pages/index/index.css
  4. 3 5
      pages/index/index.vue
  5. 167 166
      pages/my/my.css
  6. 3 3
      pages/my/my.vue
  7. 2 4
      pages/new-site/new-site.vue
  8. 80 68
      pages/search/search.vue
  9. 145 171
      pages/site-more/site-more.vue
  10. 244 232
      pages/site/site.vue
  11. 2 2
      static/js/config.js
  12. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map
  13. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map
  14. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/app-navigation/app-navigation.js.map
  15. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/ax-body/ax-body.js.map
  16. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/ax-custom-title/ax-custom-title.js.map
  17. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/ax-ios-indicator/ax-ios-indicator.js.map
  18. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/ax-popup/ax-popup.js.map
  19. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/banner-page/banner-page.js.map
  20. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/charging/charging.js.map
  21. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/coupon-buy/coupon-buy.js.map
  22. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/coupons/coupons.js.map
  23. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/feedback-reply/feedback-reply.js.map
  24. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/feedback/feedback.js.map
  25. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map
  26. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/login/login.js.map
  27. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/map/map.js.map
  28. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/my.js.map
  29. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/new-site/new-site.js.map
  30. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/order-detail/order-detail.js.map
  31. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/order/order.js.map
  32. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/recharge-log/recharge-log.js.map
  33. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/search/search.js.map
  34. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/site-more/site-more.js.map
  35. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/site/site.js.map
  36. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/terminal/terminal.js.map
  37. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/lime-painter/components/l-painter/l-painter.js.map
  38. 2 2
      unpackage/dist/dev/mp-weixin/common/vendor.js
  39. 30 23
      unpackage/dist/dev/mp-weixin/pages/coupons/coupons.js
  40. 0 0
      unpackage/dist/dev/mp-weixin/pages/coupons/coupons.wxml
  41. 5 4
      unpackage/dist/dev/mp-weixin/pages/feedback-reply/feedback-reply.js
  42. 1 1
      unpackage/dist/dev/mp-weixin/pages/feedback-reply/feedback-reply.wxml
  43. 3 4
      unpackage/dist/dev/mp-weixin/pages/index/index.js
  44. 1 1
      unpackage/dist/dev/mp-weixin/pages/index/index.wxss
  45. 2 14
      unpackage/dist/dev/mp-weixin/pages/my/my.js
  46. 0 0
      unpackage/dist/dev/mp-weixin/pages/my/my.wxml
  47. 166 165
      unpackage/dist/dev/mp-weixin/pages/my/my.wxss
  48. 2 4
      unpackage/dist/dev/mp-weixin/pages/new-site/new-site.js
  49. 23 12
      unpackage/dist/dev/mp-weixin/pages/search/search.js
  50. 0 0
      unpackage/dist/dev/mp-weixin/pages/search/search.wxml
  51. 32 91
      unpackage/dist/dev/mp-weixin/pages/site-more/site-more.js
  52. 0 0
      unpackage/dist/dev/mp-weixin/pages/site-more/site-more.wxml
  53. 13 1
      unpackage/dist/dev/mp-weixin/pages/site/site.js
  54. 0 0
      unpackage/dist/dev/mp-weixin/pages/site/site.wxml
  55. 2 2
      unpackage/dist/dev/mp-weixin/static/js/config.js

+ 142 - 135
pages/coupons/coupons.vue

@@ -4,160 +4,167 @@
 		<view class="page-background">
 			<image :src="couponsBg" mode="widthFix"></image>
 		</view>
-	<view class="tabs-body">
-		<view class="tabs-box">
-			<view class="item-tabs" :class="{active:currentIndex===item.id}" v-for="item in tabsList" :key="item.id"
-				@click="handleTabClick(item)">{{item.text}}({{item.count||0}})</view>
-		</view>
-		<view style="height: 350rpx;"></view>
-		<view class="list-body">
-			<view class="coupons-list-box" :style="{opacity:`${currentIndex===3?'0.5':''}`}"
-				v-for="item in toBeclaimedCoupons" :key="item.id">
-				<image class="coupons-bg-img" :src="coupons_card" mode=""></image>
-				<view class="coupons-content-box">
-					<view class="coupons-left">
-						<view class="left-price">{{item.discountPrice}}<text>元</text></view>
-						<view class="left-rules">满{{item.usePrice}}元可用</view>
-					</view>
-					<view class="coupons-center">
-						<view class="coupons-title textHidden">{{item.name||''}}</view>
-						<view class="coupons-valid" v-if="currentIndex==0">有效期:领取后{{item.failureTime}}天</view>
-						<view class="coupons-valid" v-else>{{item.validEndTime}}到期</view>
-						<view class="coupons-range">平台所有充电桩可用</view>
+		<view class="tabs-body">
+			<view class="tabs-box">
+				<view class="item-tabs" :class="{ active: currentIndex === item.id }" v-for="item in tabsList"
+					:key="item.id" @click="handleTabClick(item)">{{ item.text }}({{ item.count || 0 }})</view>
+			</view>
+			<view style="height: 350rpx;"></view>
+			<view class="list-body">
+				<view class="coupons-list-box" :style="{ opacity: `${currentIndex === 3 ? '0.5' : ''}` }"
+					v-for="item in toBeclaimedCoupons" :key="item.id">
+					<image class="coupons-bg-img" :src="coupons_card" mode=""></image>
+					<view class="coupons-content-box">
+						<view class="coupons-left">
+							<view class="left-price">{{ item.discountPrice }}<text>元</text></view>
+							<view class="left-rules">满{{ item.usePrice }}元可用</view>
+						</view>
+						<view class="coupons-center">
+							<view class="coupons-title textHidden">{{ item.name || '' }}</view>
+							<view class="coupons-valid" v-if="currentIndex == 0">有效期:领取后{{ item.failureTime }}天</view>
+							<view class="coupons-valid" v-else>{{ item.validEndTime }}到期</view>
+							<view class="coupons-range">平台所有充电桩可用</view>
+						</view>
+						<view class="coupons-right">
+							<view class="coupons-dayrules textHidden" v-if="currentIndex === 0">{{ item.description }}
+							</view>
+							<view class="coupons-getbtn" v-if="currentIndex === 0" @click="get_coupons(item)">立即领取
+							</view>
+							<view class="coupons-getbtn" v-if="currentIndex === 2" @click="goto_orderDetail(item)">查看订单
+							</view>
+						</view>
 					</view>
-					<view class="coupons-right">
-						<view class="coupons-dayrules textHidden" v-if="currentIndex===0">{{item.description}}</view>
-						<view class="coupons-getbtn" v-if="currentIndex===0" @click="get_coupons(item)">立即领取</view>
-						<view class="coupons-getbtn" v-if="currentIndex===2" @click="goto_orderDetail(item)">查看订单</view>
+					<view class="ribbon"
+						:style="{ backgroundColor: `${currentIndex === 3 ? '#e8e8e8' : ''}`, color: `${currentIndex === 3 ? '#8c8c8c' : ''}` }">
+						{{ tabsList[currentIndex].text }}
 					</view>
 				</view>
-				<view class="ribbon"
-					:style="{backgroundColor:`${currentIndex===3?'#e8e8e8':''}`,color:`${currentIndex===3?'#8c8c8c':''}`}">
-					{{tabsList[currentIndex].text}}
+				<view style="height: 30rpx;"></view>
+				<view v-if="toBeclaimedCoupons.length == 0" class="not-data">
+					<image src="@/static/img/empty.svg" mode="widthFix" class="icon"></image>
+					<view>暂无数据</view>
 				</view>
 			</view>
-			<view style="height: 30rpx;"></view>
-			<view v-if="toBeclaimedCoupons.length<1" class="not-data">
-				<image src="@/static/img/empty.svg" mode="widthFix" class="icon"></image>
-				<view>暂无数据</view>
-			</view>
 		</view>
-	</view>
 	</ax-body>
 </template>
 
 <script>
-	export default {
-		data() {
-			return {
-				coupons_card: 'https://hyxhsh.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/bNfT8BQFvtcead404bdf22856fe1306af8fbb672a74c.png/1.png',
-				couponsBg:'https://charge.hub.zswlgz.com/apifile//2025/12/09/YXVyOk6RqkKi2a5b93800594ecafd15e6599498e7e90_20251209095058A002.png',
-				currentIndex: 0, // 默认选中第一个选项卡
-				tabsList: [{
-					text: '待领取',
-					id: 0
-				}, {
-					text: '待使用',
-					id: 1
-				}, {
-					text: '已使用',
-					id: 2
-				}, {
-					text: '已过期',
-					id: 3
-				}],
-				toBeclaimedCoupons: [],
-				totalNumber: 0,
-				form_submit: {
-					pageNum: 1,
-					pageSize: 10,
-					status: 1,
-				}
-			};
-		},
-		onLoad() {
-			this.get_statistical()
-		},
-		onReachBottom(e) {
-			this.form_submit.pageNum++
-			if (this.totalNumber > this.toBeclaimedCoupons.length) {
-				this.get_TobeclaimedCoupons()
+export default {
+	data() {
+		return {
+			coupons_card: 'https://hyxhsh.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/bNfT8BQFvtcead404bdf22856fe1306af8fbb672a74c.png/1.png',
+			couponsBg: 'https://charge.hub.zswlgz.com/apifile//2025/12/09/YXVyOk6RqkKi2a5b93800594ecafd15e6599498e7e90_20251209095058A002.png',
+			currentIndex: 0, // 默认选中第一个选项卡
+			tabsList: [{
+				text: '待领取',
+				id: 0,
+				count: 0
+			}, {
+				text: '待使用',
+				id: 1,
+				count: 0
+			}, {
+				text: '已使用',
+				id: 2,
+				count: 0
+			}, {
+				text: '已过期',
+				id: 3,
+				count: 0
+			}],
+			toBeclaimedCoupons: [],
+			totalNumber: 0,
+			form_submit: {
+				pageNum: 1,
+				pageSize: 10,
+				status: 1,
 			}
-		},
+		};
+	},
+	onLoad() {
+		this.get_statistical()
+	},
+	onReachBottom(e) {
+		this.form_submit.pageNum++
+		if (this.totalNumber > this.toBeclaimedCoupons.length) {
+			this.get_TobeclaimedCoupons()
+		}
+	},
 
-		mounted() {
+	mounted() {
+		this.get_TobeclaimedCoupons()
+	},
+	methods: {
+		handleTabClick(e) {
+			this.currentIndex = e.id;
+			this.form_submit.status = e.id + 1
+			this.toBeclaimedCoupons = []
 			this.get_TobeclaimedCoupons()
 		},
-		methods: {
-			handleTabClick(e) {
-				this.currentIndex = e.id;
-				this.form_submit.status = e.id
-				this.toBeclaimedCoupons = []
-				this.get_TobeclaimedCoupons()
-				this.get_statistical()
-			},
-			get_TobeclaimedCoupons() {
-				if (this.currentIndex == 0) {
-					this.$api.base("post", "/couponApi/list-pending", {}, {}).then(res => {
-						this.toBeclaimedCoupons = res.list
-					})
-				} else {
-					this.$api.base("post",
-						`/couponApi/list-user?pageNum=${this.form_submit.pageNum}&pageSize=${this.form_submit.pageSize}&status=${this.form_submit.status}`, {}, {}
-						).then(res => {
-						this.totalNumber = res.total
-						if (this.form_submit.pageNum == 1) {
-							this.toBeclaimedCoupons = res.rows
-						} else {
-							this.toBeclaimedCoupons = [...this.toBeclaimedCoupons, ...res.rows]
-						}
-					})
-				}
-
-			},
-			get_statistical() {
-				// 数据映射
-				const idToKeyMap = {
-					0: 'list-pending',
-					1: 'list-unused',
-					2: 'list-used',
-					3: 'list-overdue'
-				};
-				this.$api.base("post", "/couponApi/statistical", {}, {}).then(res => {
-					this.tabsList.forEach(tab => {
-						const key = idToKeyMap[tab.id];
-						tab.count = res.data[key] || 0;
-					});
+		get_TobeclaimedCoupons() {
+			if (this.currentIndex == 0) {
+				this.$api.base("get", "/applet/v1/user/getCouponTemplatePage", {
+					pageNum: this.form_submit.pageNum,
+					pageSize: this.form_submit.pageSize,
+					status: this.form_submit.status
+				}, {}).then(res => {
+					this.toBeclaimedCoupons = res.data.records
+					this.tabsList[0].count = res.data.total
 				})
-			},
-			goto_orderDetail(e) {
-				uni.navigateTo({
-					url: `/pages/order-detail/order-detail?orderId=${e.useOrderId}`
+			} else {
+				this.$api.base("post",
+					`/applet/v1/user/getCouponPage`, {
+					pageNum: this.form_submit.pageNum,
+					pageSize: this.form_submit.pageSize,
+					status: this.form_submit.status
+				}, {}
+				).then(res => {
+					this.totalNumber = res.total
+					if (this.form_submit.pageNum == 1) {
+						this.toBeclaimedCoupons = res.data.records
+					} else {
+						this.toBeclaimedCoupons = [...this.toBeclaimedCoupons, ...res.data.records]
+					}
 				})
-			},
-			get_coupons(e) {
-				if (e.dayReceiveCount > e.totalCount) return this.$app.popup.toast('您来慢了~该优惠券已被领完')
-				uni.showLoading({
-					mask:true
-				});
-				let timer = setInterval(() => {
-					clearInterval(timer)
-					this.$api.base("post", "/couponApi/receive", {
-						templateId: e.id
-					}, {}).then(res => {
-						uni.hideLoading()
-						if (res.code == 0) {
-							this.get_statistical()
-							this.get_TobeclaimedCoupons()
-							this.$app.popup.toast('领取成功')
-						}
-					})
-				}, 100);
 			}
+
+		},
+		get_statistical() {
+			this.$api.base("get", "/applet/v1/user/getCouponStatusNum", {}, {}).then(res => {
+				this.tabsList[1].count = res.data.unusedNum
+				this.tabsList[2].count = res.data.usedNum
+				this.tabsList[3].count = res.data.expiredNum
+			})
+		},
+		goto_orderDetail(e) {
+			uni.navigateTo({
+				url: `/pages/order-detail/order-detail?orderId=${e.useOrderId}`
+			})
+		},
+		get_coupons(e) {
+			if (e.dayReceiveCount > e.totalCount) return this.$app.popup.toast('您来慢了~该优惠券已被领完')
+			uni.showLoading({
+				mask: true
+			});
+			let timer = setInterval(() => {
+				clearInterval(timer)
+				this.$api.base("post", "/couponApi/receive", {
+					templateId: e.id
+				}, {}).then(res => {
+					uni.hideLoading()
+					if (res.code == 0) {
+						this.get_statistical()
+						this.get_TobeclaimedCoupons()
+						this.$app.popup.toast('领取成功')
+					}
+				})
+			}, 100);
 		}
-	};
+	}
+};
 </script>
 
 <style>
-	@import url("coupons");
+@import url("coupons");
 </style>

+ 7 - 7
pages/feedback-reply/feedback-reply.vue

@@ -9,12 +9,12 @@
 					<view class="mask"></view>
 					<view class="mask-box">
 						<view>{{ item.createTime }}</view>
-						<view>{{ typesLable(item.problemType) }}</view>
+						<view>{{ typesLable(item.type) }}</view>
 					</view>
 					<view class="card">
 						<view>
-							<text>{{ item.problemDescribe }}</text>
-							<text v-if="item.filesUrl" @click="previewImage(item.filesUrl.split(','))"
+							<text>{{ item.description }}</text>
+							<text v-if="item.images" @click="previewImage(item.images.split(','))"
 								class="item-pic">查看附件</text>
 						</view>
 						<view v-if="item.reply" class="reply">
@@ -40,7 +40,7 @@ export default {
 				data: [],
 				total: 10
 			},
-			types: [{ name: '投诉吐槽', value: 1 }, { name: '功能异常', value: 2 }, { name: '体验问题', value: 3 }, { name: '功能建议', value: 3 }, { name: '其他', value: 9 }]
+			types: [{ name: '投诉吐槽', value: 1 }, { name: '功能异常', value: 2 }, { name: '体验问题', value: 3 }, { name: '功能建议', value: 4 }, { name: '其他', value: 9 }]
 		}
 	},
 	onShow() {
@@ -48,11 +48,11 @@ export default {
 	},
 	methods: {
 		loadListData() {
-
 			this.$api.base("get", "/applet/v1/user/myFeedback", {}, {}).then(res => {
-				this.list.data = res.list
-			})
+				this.list.data = res.data
+				console.log(this.list.data);
 
+			})
 		},
 		typesLable(val) {
 			if (!this.types.length) return '';

+ 1 - 1
pages/index/index.css

@@ -311,7 +311,7 @@ app-navigation {
 /* 版头广告 */
 .banner {
   width: 100%;
-  height: calc((100vw - 20px) * (5 / 27));
+  height: calc((100vw - 20px) * (5 / 20));
 }
 
 .banner .swiper-item {

+ 3 - 5
pages/index/index.vue

@@ -232,7 +232,7 @@ export default {
 		this.setAppNavigationHeight();
 		this.get_frimid()
 		this.get_userinfo()
-		this.get_paymentMsg()
+		// this.get_paymentMsg()
 		this.getBanners()
 	},
 	data() {
@@ -316,7 +316,7 @@ export default {
 		}
 	},
 	onShow() {
-		this.getAdswiper()
+		// this.getAdswiper()
 	},
 	onHide() {
 		this.$app.storage.remove('AD_STATUS')
@@ -577,10 +577,8 @@ export default {
 		// 	})
 		// },
 		getBanners() {
-			this.$api.base("get", "/applet/v1/homePage/getBannerList", {}, {}).then(res => {
+			this.$api.base("get", "/applet/v1/homePage/getBannerList/1", {}, {}).then(res => {
 				this.banners = res.data
-				console.log(this.banners, 'banner数据');
-
 			})
 		},
 		// getAdswiper() {

+ 167 - 166
pages/my/my.css

@@ -1,270 +1,271 @@
 ax-body {
-	display: block;
-	height: 100%;
-	background: #F6FAFF;
+  display: block;
+  height: 100%;
+  background: #f6faff;
 }
 
 app-navigation {
-	position: fixed;
-	left: 0;
-	right: 0;
-	bottom: 0;
+  position: fixed;
+  left: 0;
+  right: 0;
+  bottom: 0;
 }
 
 .page-background {
-	position: fixed;
-	top: 0;
-	left: 0;
-	right: 0;
-	z-index: 0;
+  position: fixed;
+  top: 0;
+  left: 0;
+  right: 0;
+  z-index: 0;
 }
 
 .page-background image {
-	display: block;
-	width: 100%;
+  display: block;
+  width: 100%;
 }
 
 .main {
-	position: relative;
-	z-index: 1;
+  position: relative;
+  z-index: 1;
 }
 
 /* 用户卡 */
 .user-card {
-	padding: 20px 0;
-	position: relative;
+  padding: 20px 0;
+  position: relative;
 }
 
 .user-avatar {
-	display: block;
-	width: 50px;
-	height: 50px;
-	margin-right: 10px;
+  display: block;
+  width: 50px;
+  height: 50px;
+  margin-right: 10px;
 }
 
 .user-name {
-	display: flex;
-	align-items: center;
+  display: flex;
+  align-items: center;
 }
 
 .user-name-text {
-	font-size: 18px;
-	font-weight: bold;
+  font-size: 18px;
+  font-weight: bold;
 }
 
 .user-phone {
-	font-size: 12px;
-	margin-top: 5px;
+  font-size: 12px;
+  margin-top: 5px;
 }
 
 .seting-icon-box {
-	position: absolute;
-	right: 0;
-	display: flex;
-	align-items: center;
-	right: -20rpx;
+  position: absolute;
+  right: 0;
+  display: flex;
+  align-items: center;
+  right: -20rpx;
 }
 
 .seting-icon-box .img-icon {
-	position: absolute;
-	right: 110rpx;
-	width: 100rpx;
-	height: 100rpx;
+  position: absolute;
+  right: 110rpx;
+  width: 100rpx;
+  height: 100rpx;
 }
 
 .seting-icon-box .tips-text {
-	width: 146rpx;
-	height: 44rpx;
-	background: linear-gradient(259deg, #F75441 0%, #FCB83C 100%);
-	border-radius: 22rpx 0rpx 0rpx 22rpx;
-	font-size: 28rpx;
-	color: #FFFFFF;
-	text-align: center;
-	line-height: 44rpx;
+  width: 146rpx;
+  height: 44rpx;
+  background: linear-gradient(259deg, #f75441 0%, #fcb83c 100%);
+  border-radius: 22rpx 0rpx 0rpx 22rpx;
+  font-size: 28rpx;
+  color: #ffffff;
+  text-align: center;
+  line-height: 44rpx;
 }
 
 .get-phone-number {
-	display: inline-flex;
-	height: unset;
-	border: none;
-	line-height: normal;
-	background-color: transparent;
-	font-size: 12px;
-	color: #2B303A;
-	padding: 0;
-	margin: 0;
+  display: inline-flex;
+  height: unset;
+  border: none;
+  line-height: normal;
+  background-color: transparent;
+  font-size: 12px;
+  color: #2b303a;
+  padding: 0;
+  margin: 0;
 }
 
 .get-phone-number::after {
-	display: none;
+  display: none;
 }
 
 .enterprise-name-card {
-	margin-left: 10rpx;
-	padding: 10rpx;
-	background-color: rgba(62, 182, 248, 0.3);
-	border-radius: 8rpx;
-	font-size: 22rpx;
-	color: #181818;
+  margin-left: 10rpx;
+  padding: 10rpx;
+  background-color: rgba(62, 182, 248, 0.3);
+  border-radius: 8rpx;
+  font-size: 22rpx;
+  color: #181818;
 }
 /* 统计卡 新*/
-.statistics-card{
-	background: #FFFFFF;
-	border-radius: 32rpx;
-	padding: 20rpx;
-}
-.statistics-title{
-	font-weight: bold;
-	font-size: 32rpx;
-}
-.statistics-dataInfo{
-	display: flex;
-	align-items: center;
-	justify-content: space-around;
-	margin-top: 28rpx;
-}
-.dataInfo-left{
-	text-align: center;
-	position: relative;
-	flex: 1;
-}
-.dataInfo-left .left-text{
-	font-size: 24rpx;
-	color: #2B303A;
-}
-.left-number{
-	margin-top: 20rpx;
-	font-weight: 600;
-	font-size: 48rpx;
-	color: #2B303A;
-}
-.dataInfo-left .left-refund-btn{
-	position: absolute;
-	font-size: 14px;
-	color: #fff;
-	background-color: #3EB6F8;
-	padding: 2px 8px;
-	border-radius: 10px 0 0 10px;
-	bottom: 5px;
-	right: -20rpx;
-	z-index: 99;
-}
-.dataInfo-line{
-	height: 104rpx;
-	border: 2rpx solid #F0F0F0;
+.statistics-card {
+  background: #ffffff;
+  border-radius: 32rpx;
+  padding: 20rpx;
+}
+.statistics-title {
+  font-weight: bold;
+  font-size: 32rpx;
+}
+.statistics-dataInfo {
+  display: flex;
+  align-items: center;
+  justify-content: space-around;
+  margin-top: 28rpx;
+}
+.dataInfo-left {
+  text-align: center;
+  position: relative;
+  flex: 1;
+}
+.dataInfo-left .left-text {
+  font-size: 24rpx;
+  color: #2b303a;
+}
+.left-number {
+  margin-top: 20rpx;
+  font-weight: 600;
+  font-size: 48rpx;
+  color: #2b303a;
+}
+.dataInfo-left .left-refund-btn {
+  position: absolute;
+  font-size: 14px;
+  color: #fff;
+  background-color: #3eb6f8;
+  padding: 2px 8px;
+  border-radius: 10px 0 0 10px;
+  bottom: 5px;
+  right: -20rpx;
+  z-index: 99;
+}
+.dataInfo-line {
+  height: 104rpx;
+  border: 2rpx solid #f0f0f0;
 }
 /* 版头广告 */
 .banner {
-	width: 100%;
-	height: calc((100vw - 20px) * (5/27));
+  width: 100%;
+  height: calc((100vw - 20px) * (5 / 20));
+  margin-top: 10rpx;
 }
 
 .banner .swiper-item {
-	display: flex;
-	width: 100%;
+  display: flex;
+  width: 100%;
 }
 
 .banner .swiper-item .swiper-item-image {
-	display: block;
-	width: 100%;
-	border-radius: 5px;
+  display: block;
+  width: 100%;
+  border-radius: 5px;
 }
 
 .buy {
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	height: 50px;
-	border-radius: 8px;
-	font-size: 14px;
-	margin-top: 15px;
-	background: linear-gradient(to right, #8FF8FB, #47AEFF);
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  height: 50px;
+  border-radius: 8px;
+  font-size: 14px;
+  margin-top: 15px;
+  background: linear-gradient(to right, #8ff8fb, #47aeff);
 }
 
 /* 卡片 */
 .card {
-	background-color: #fff;
-	border-radius: 8px;
-	margin-top: 15px;
-	box-shadow: 0 1px 8px rgba(122, 168, 222, 0.1);
+  background-color: #fff;
+  border-radius: 8px;
+  margin-top: 15px;
+  box-shadow: 0 1px 8px rgba(122, 168, 222, 0.1);
 }
 
 .card-title {
-	padding: 10px 20px 0 20px;
-	font-weight: bold;
+  padding: 10px 20px 0 20px;
+  font-weight: bold;
 }
 
 .act-wrap {
-	display: flex;
-	align-items: flex-end;
-	width: 100%;
-	padding: 15px 0px;
+  display: flex;
+  align-items: flex-end;
+  width: 100%;
+  padding: 15px 0px;
 }
 
 .act-item {
-	display: inline-flex;
-	align-items: center;
-	justify-content: space-between;
-	flex-direction: column;
-	width: 25%;
-	height: 50px;
+  display: inline-flex;
+  align-items: center;
+  justify-content: space-between;
+  flex-direction: column;
+  width: 25%;
+  height: 50px;
 }
 
 .act-item .icon {
-	display: block;
-	width: 30px;
-	height: 30px;
+  display: block;
+  width: 30px;
+  height: 30px;
 }
 
 .act-item .name {
-	font-size: 12px;
+  font-size: 12px;
 }
 
 .act-item.about {
-	height: auto;
+  height: auto;
 }
 
 .act-item.about .icon {
-	width: 40px;
-	height: 40px;
+  width: 40px;
+  height: 40px;
 }
 
 .playbil-box {
-	position: relative;
+  position: relative;
 }
 
 .playbil-box .playbil-bg {
-	width: 600rpx;
+  width: 600rpx;
 }
 
 .enterprise-name {
-	width: 600rpx;
-	text-align: center;
-	font-size: 22rpx;
-	position: absolute;
-	top: 610rpx;
-	color: rgb(33, 111, 247);
+  width: 600rpx;
+  text-align: center;
+  font-size: 22rpx;
+  position: absolute;
+  top: 610rpx;
+  color: rgb(33, 111, 247);
 }
 
 .playbil-qrcode {
-	position: absolute;
-	left: 170rpx;
-	top: 280rpx;
-	width: 260rpx;
-	height: 260rpx;
+  position: absolute;
+  left: 170rpx;
+  top: 280rpx;
+  width: 260rpx;
+  height: 260rpx;
 }
 
 .enterprise-user {
-	position: absolute;
-	width: 600rpx;
-	text-align: center;
-	top: 880rpx;
-	font-size: 22rpx;
-	color: #fff;
+  position: absolute;
+  width: 600rpx;
+  text-align: center;
+  top: 880rpx;
+  font-size: 22rpx;
+  color: #fff;
 }
 
 .enterprise-tips {
-	text-align: center;
-	font-size: 28rpx;
-	color: #ff0004;
-}
+  text-align: center;
+  font-size: 28rpx;
+  color: #ff0004;
+}

+ 3 - 3
pages/my/my.vue

@@ -51,7 +51,7 @@
 			<swiper class="banner" v-if="banners.length > 0" autoplay="true">
 				<swiper-item v-for="(item, index) in banners" :key="index" @click="$app.url.goto(item.jumpPage)">
 					<view class="swiper-item">
-						<image @load="bannerLoadCompleted()" :src="showImg(item.pic)" class="swiper-item-image"
+						<image @load="bannerLoadCompleted()" :src="item.picture" class="swiper-item-image"
 							mode="widthFix">
 						</image>
 					</view>
@@ -161,8 +161,8 @@ export default {
 			return this.$config.url.request + img
 		},
 		getBanners() {
-			this.$api.base("post", "/userApi/getBanners", {}, {}).then(res => {
-				this.banners = res.banners
+			this.$api.base("get", "/applet/v1/homePage/getBannerList/2", {}, {}).then(res => {
+				this.banners = res.data
 			})
 		},
 		get_qrCode() {

+ 2 - 4
pages/new-site/new-site.vue

@@ -354,13 +354,11 @@ export default {
 		},
 		//去查看全部电站
 		toDeiceAll() {
-			var strList = JSON.stringify(this.timePricesList);
-			var currPriceId = this.nowPriceTime.id
-			this.$app.url.goto('/pages/site-more/site-more?stationId=' + this.stationInfo.id)
+			this.$app.url.goto('/pages/site-more/site-more?stationId=' + this.stationDetail.stationId)
 		},
 		//去查看全部电价
 		toPriceAll() {
-			this.$app.url.goto('/pages/site-more/site-more?show=1&stationId=' + this.stationInfo.id)
+			this.$app.url.goto('/pages/site-more/site-more?show=1&stationId=' + this.stationDetail.stationId)
 		},
 		//扫一扫
 		sacn() {

+ 80 - 68
pages/search/search.vue

@@ -1,11 +1,15 @@
 <template>
 	<ax-body blank="0">
-		<view class="page-background"><image src="@/static/img/my-bg.svg" mode="widthFix"></image></view>
+		<view class="page-background">
+			<image src="@/static/img/my-bg.svg" mode="widthFix"></image>
+		</view>
 		<view class="body">
 			<view class="search-box">
 				<icon class="ax-iconline i-search icon"></icon>
-				<input v-model="search" placeholder="输入目的地/电站名" placeholder-class="app-placeholder" class="input"/>
-				<view v-if="search.length" @click="search=''" class="clear"><icon class="ax-iconblock i-cuowu"></icon></view>
+				<input v-model="search" placeholder="输入目的地/电站名" placeholder-class="app-placeholder" class="input" />
+				<view v-if="search.length" @click="search = ''" class="clear">
+					<icon class="ax-iconblock i-cuowu"></icon>
+				</view>
 				<text @click="query()" class="txt">搜索</text>
 			</view>
 			<!-- 搜索历史 -->
@@ -15,25 +19,33 @@
 					<icon @click="clean()" class="ax-iconline i-delete icon"></icon>
 				</view>
 				<view class="list app-hide-scrollbar">
-					<view class="wrap"><view v-for="(item,index) in histories" :key="index" @click="setSearch(item)" class="item">{{item}}</view></view>
+					<view class="wrap">
+						<view v-for="(item, index) in histories" :key="index" @click="setSearch(item)" class="item">
+							{{ item }}</view>
+					</view>
 				</view>
 			</view>
 			<!-- 搜索结果 -->
 			<view class="result">
 				<view class="title">
 					<text class="txt">搜索结果</text>
-					<text class="total">共计 {{result.length}} 条</text>
+					<text class="total">共计 {{ result.length }} 条</text>
 				</view>
 				<view class="list">
 					<view class="wrap app-hide-scrollbar">
-						<view v-for="(item,index) in result" :key="index" class="site" @click="gotoSiteDetail(item)" >
-							<view class="name">{{item.name}}</view>
+						<view v-for="(item, index) in result" :key="index" class="site" @click="gotoSiteDetail(item)">
+							<view class="name">{{ item.stationName }}</view>
 							<!-- <view class="aux" v-html="item.parkTips"></view> -->
-							<view class="aux">充电减免2小时停车费,超出时长部分计时收费</view>
+							<view class="aux">{{ item.tips }}</view>
 							<view class="info">
-								<view class="sta"><text class="txt green">快</text><text class="val">{{item.params.emptyFast}}</text><text class="unit">/{{item.params.totalFast}}</text></view>
-								<view class="sta"><text class="txt blue">慢</text><text class="val">{{item.params.emptySlow}}</text><text class="unit">/{{item.params.totalSlow}}</text></view>
-								<view class="sta"><text class="txt orange">距离</text><text class="val">{{item.params.rangeShow}}</text></view>
+								<view class="sta"><text class="txt green">快</text><text class="val">{{
+									item.fastIdleCount }}</text><text class="unit">/{{ item.fastTotalCount
+										}}</text></view>
+								<view class="sta"><text class="txt blue">慢</text><text class="val">{{
+									item.slowIdleCount }}</text><text class="unit">/{{ item.slowTotalCount
+										}}</text></view>
+								<view class="sta"><text class="txt orange">距离</text><text class="val">{{
+									item.distance }}km</text></view>
 							</view>
 						</view>
 						<view v-if="!result.length" class="empty">
@@ -48,69 +60,69 @@
 </template>
 
 <script>
-	export default {
-		onLoad() {
-			this.histories = this.$app.storage.get('history-search') || [];
+export default {
+	onLoad() {
+		this.histories = this.$app.storage.get('history-search') || [];
+	},
+	data() {
+		return {
+			search: "",
+			histories: [],
+			result: []
+		}
+	},
+	methods: {
+		convertBdToTx(lng, lat) {
+			// 百度坐标系(BD09)转火星坐标系(GCJ-02,即腾讯地图使用的坐标系)  
+			// 这里的转换公式是基于经验公式,可能存在一定的误差  
+			let x_pi = 3.14159265358979324 * 3000.0 / 180.0;
+			let x = lng - 0.0065;
+			let y = lat - 0.006;
+			let z = Math.sqrt(x * x + y * y) - 0.00002 * Math.sin(y * x_pi);
+			let theta = Math.atan2(y, x) - 0.000003 * Math.cos(x * x_pi);
+			let lngs = z * Math.cos(theta);
+			let lats = z * Math.sin(theta);
+			return { lng: lngs, lat: lats };
 		},
-		data() {
-			return {
-				search: "",
-				histories:[],
-				result:[]
+		gotoSiteDetail(item) {
+			this.$app.url.goto('/pages/new-site/new-site?item=' + JSON.stringify(item));
+		},
+		query() {
+			const history = Array.from(new Set([this.search].concat(this.histories)));
+			this.histories = history;
+			this.$app.storage.set('history-search', history);
+			this.result = [{}, {}, {}, {}, {}];
+			let location = this.$app.storage.get('USER_LOCATION')
+			let lng = ""
+			let lat = ""
+			if (location && location.split(",").length == 2) {
+				lng = location.split(",")[0]
+				lat = location.split(",")[1]
 			}
+			var key = this.search
+			this.$api.base("get", "/applet/v1/station/search", { longitude: lng, latitude: lat, keyword: key }, {}).then(res => {
+				// res.stationList.forEach(i => {
+				// 	var txPoint = this.convertBdToTx(i.lng, i.lat)
+				// 	i.lng = txPoint.lng
+				// 	i.lat = txPoint.lat
+				// })
+				this.result = res.data
+			})
+		},
+		setSearch(item) {
+			this.search = item;
+			this.query();
 		},
-		methods: {
-			convertBdToTx(lng, lat) {
-			    // 百度坐标系(BD09)转火星坐标系(GCJ-02,即腾讯地图使用的坐标系)  
-			    // 这里的转换公式是基于经验公式,可能存在一定的误差  
-			    let x_pi = 3.14159265358979324 * 3000.0 / 180.0;  
-			    let x = lng - 0.0065;  
-			    let y = lat - 0.006;  
-			    let z = Math.sqrt(x * x + y * y) - 0.00002 * Math.sin(y * x_pi);  
-			    let theta = Math.atan2(y, x) - 0.000003 * Math.cos(x * x_pi);  
-			    let lngs = z * Math.cos(theta);  
-			    let lats = z * Math.sin(theta);  
-			    return { lng: lngs, lat: lats };  
-			},
-			gotoSiteDetail(item){
-				this.$app.url.goto('/pages/site/site?item='+JSON.stringify(item));
-			},
-			query(){
-				const history = Array.from(new Set([this.search].concat(this.histories)));
-				this.histories = history;
-				this.$app.storage.set('history-search',history);
-				this.result = [{},{},{},{},{}];
-				let location = this.$app.storage.get('USER_LOCATION')
-				let lng = ""
-				let lat = ""
-				if(location&&location.split(",").length==2){
-					lng = location.split(",")[0]
-					lat = location.split(",")[1]
+		clean() {
+			this.$app.popup.confirm('确定是否删除所有历史搜索纪录?', '清空历史').then(confirm => {
+				if (confirm) {
+					this.histories = [];
+					this.$app.storage.remove('history-search');
 				}
-				var key = this.search
-				this.$api.base("post","/chargeApi/getStations",{order:"0",lng,lat,key},{}).then(res=>{
-					res.stationList.forEach(i=>{
-						var txPoint = this.convertBdToTx(i.lng,i.lat)
-						i.lng = txPoint.lng
-						i.lat = txPoint.lat
-					})
-					this.result = res.stationList
-				})
-			},
-			setSearch(item){
-				this.search = item;
-				this.query();
-			},
-			clean(){
-				this.$app.popup.confirm('确定是否删除所有历史搜索纪录?','清空历史').then(confirm=>{
-					if(confirm){
-						this.histories = [];
-						this.$app.storage.remove('history-search');
-					}
-				});
-			}
+			});
 		}
 	}
+}
 </script>
 
 <style scoped>

+ 145 - 171
pages/site-more/site-more.vue

@@ -1,23 +1,32 @@
 <template>
 	<ax-body>
 		<image src="@/static/img/page-bg01.png" class="page-background"></image>
-		<view class="body" :style="{'--list-height':`${listHeight}px`}">
+		<view class="body" :style="{ '--list-height': `${listHeight}px` }">
 			<view class="top-title-box">
 				<view class="">
-					<view class="title">{{stationInfo.name}}</view>
+					<view class="title">{{ stationInfo.stationName }}</view>
 					<!-- <view class="subtitle" v-html="stationInfo.parkTips"></view> -->
-					<view class="subtitle">充电减免2小时停车费,超出时长部分计时收费</view>
+					<view class="subtitle">{{ stationInfo.tips }}</view>
 				</view>
 				<image class="site-more-topIcon" src="/static/img/site-more-topicon.png" mode=""></image>
 			</view>
 			<!-- 面包屑 -->
 			<view class="crumbs">
-				<view class="item"><view class="value">{{getStatusNum(1)}}</view><view class="name">空闲</view></view>
-				<view class="item"><view class="value">{{getStatusNum(2)}}</view><view class="name">占用</view></view>
-				<view class="item"><view class="value">{{getStatusNum(0)}}</view><view class="name">离线</view></view>
+				<view class="item">
+					<view class="value">{{ stationInfo.idleCount }}</view>
+					<view class="name">空闲</view>
+				</view>
+				<view class="item">
+					<view class="value">{{ stationInfo.occupiedCount }}</view>
+					<view class="name">占用</view>
+				</view>
+				<view class="item">
+					<view class="value">{{ stationInfo.offlineCount }}</view>
+					<view class="name">离线</view>
+				</view>
 			</view>
 			<!-- 数据切换 -->
-			<view id="switch" class="switch" @click="another = !another" :class="{another}">
+			<view id="switch" class="switch" @click="another = !another" :class="{ another }">
 				<view class="contet">
 					<view class="text">电站价格</view>
 					<view class="text">充电终端</view>
@@ -26,43 +35,45 @@
 			</view>
 			<!-- 终端列表 -->
 			<view v-if="another" class="terminals list">
-				<view v-for="(item,index) in deviceList" :key="index" @click="goTerminal(item)" class="terminal-item">
+				<view v-for="(item, index) in stationInfo.connectorList" :key="index" @click="goTerminal(item)"
+					class="terminal-item">
 					<view class="state" :class="[getSatesObj(item).color]">
 						<view class="cake">
 							<image src="@/static/img/site-icon01.svg" class="icon"></image>
-							<view class="name">{{getSatesObj(item).name}}</view>
+							<view class="name">{{ item.statusName }}</view>
 						</view>
 					</view>
 					<view class="info">
-						<view class="name">{{item.deviceName}}</view>
-						<view class="subinfo">电类分类:{{getdeviceTypeName(item.eType)}}</view>
-						<view class="subinfo">终端编号:{{item.deviceNo}}</view>
+						<view class="name">{{ item.deviceName }}</view>
+						<view class="subinfo">电类分类:{{ item.equipmentType }}</view>
+						<view class="subinfo">终端编号:{{ item.connectorCode }}</view>
 					</view>
 				</view>
 			</view>
 			<!-- 价格列表 -->
 			<view v-else class="prices list">
-				<view v-for="(item,index) in prices.data" :key="index" class="price" :class="{active:prices.index==index}">
+				<view v-for="(item, index) in prices.data.priceList" :key="index" class="price"
+					:class="{ active: prices.index == index }">
 					<view class="header">
-						<view class="icon">{{getPriceLable(item.timeType)}}</view>
-						<view class="value">{{item.time}}</view>
+						<view class="icon">{{ item.periodFlagName }}</view>
+						<view class="value">{{ item.timePeriod }}</view>
 					</view>
 					<view class="info">
 						<!-- v-if="user_info.firmId===null" -->
-						<view class="row" v-if="user_info.firmId===null||$app.storage.get('USER_INFO').firmType===0">
+						<view class="row" v-if="!prices.data.hasEnterprisePrice">
 							<view class="name">抵扣券电价</view>
-							<view ><text class="value" v-if="item.price">{{(item.price).toFixed(4)}}</text><text class="unit" >{{item.unit}}</text></view>
+							<view><text class="value">{{ item.elecPrice }}</text><text class="unit">元/度</text></view>
 						</view>
 						<view class="operation-price-box" v-else>
 							<view class="operation-price">
 								<text class="operation-symbol">¥</text>
-								<text v-if="item.firmPrice">{{(item.firmPrice).toFixed(4)}}</text>
+								<text>{{ item.enterprisePrice }}</text>
 							</view>
 							<view class="mini-text">元/度</view>
 							<view class="operation-price-btn">
 								企业专享价
 							</view>
-							<view class="ordinary-price" v-if="item.price">{{(item.price).toFixed(4)}}</view>
+							<view class="ordinary-price">{{ item.elecPrice }}</view>
 						</view>
 						<!-- <view class="row">
 							<view class="name">服务费</view>
@@ -77,173 +88,136 @@
 			</view>
 		</view>
 		<view id="underside" class="underside">
-			<view class="scan"  @click="sacn()">扫码充电</view>
+			<view class="scan" @click="sacn()">扫码充电</view>
 			<ax-ios-indicator min="10"></ax-ios-indicator>
 		</view>
 	</ax-body>
 </template>
 
 <script>
-	export default {
-		onLoad(opts) {
-			this.another = !Boolean(opts.show);
-			this.getStationsInfo(opts.stationId);
+export default {
+	onLoad(opts) {
+		this.another = !Boolean(opts.show);
+		this.getStationsInfo(opts.stationId);
+		this.getStationPriceList(opts.stationId);
+	},
+	mounted() {
+		this.$app.act.selectorQuery(this, '#switch,#underside', true).then(res => {
+			const s = res.find(i => i.id == 'switch');
+			const u = res.find(i => i.id == 'underside');
+			const w = uni.getWindowInfo();
+			this.listHeight = w.windowHeight - s.top - s.height - u.height;
+		});
+	},
+	data() {
+		return {
+			user_info: this.$app.storage.get('USER_INFO'),
+			another: false,
+			listHeight: 0,
+			prices: {
+				index: 0,
+				data: []
+			},
+			stationInfo: {},
+			deviceList: [],//该站点桩列表
+			nowPriceTime: {},//当前费用时段信息
+		}
+	},
+	methods: {
+		getStationsInfo(stationId) {
+			if (!stationId) {
+				return;
+			}
+			this.$api.base("get", "/applet/v1/station/connectors", { "stationId": stationId }, {}).then(res => {
+				this.stationInfo = res.data;
+				//当前的价格时间断的下标
+				for (var i = 0; i < this.prices.data.length; i++) {
+					if (this.nowPriceTime.id == this.prices.data[i].id) {
+						this.prices.index = i;
+						break
+					}
+				}
+			})
 		},
-		mounted() {
-			this.$app.act.selectorQuery(this,'#switch,#underside',true).then(res=>{
-				const s = res.find(i=>i.id=='switch');
-				const u = res.find(i=>i.id=='underside');
-				const w = uni.getWindowInfo();
-				this.listHeight = w.windowHeight - s.top - s.height - u.height;
-			});
+		getStationPriceList(stationId) {
+			this.$api.base("get", "/applet/v1/station/prices", { "stationId": stationId }, {}).then(res => {
+				this.prices.data = res.data;
+				// this.nowPriceTime = res.data[this.prices.index];
+			})
 		},
-		data() {
-			return {
-				user_info:this.$app.storage.get('USER_INFO'),
-				another: false,
-				listHeight: 0,
-				prices:{
-					index: 0,
-					data: []
-				},
-				stationInfo : {},
-				deviceList: [],//该站点桩列表
-				nowPriceTime: {},//当前费用时段信息
+		getSatesObj(item) {
+			//{name:'离线',color:'grey'},{name:'空闲',color:'green'},{name:'占用',color:'blue'}
+			var obj = {};
+			if (item.status == 2 || item.status == 4) {
+				obj = { color: 'blue' };
+			} else if (item.deviceStatus == 3) {
+				obj = { color: 'orange' };
+			} else if (item.deviceStatus == 0) {
+				obj = { color: 'grey' };
+			} else if (item.deviceStatus == 1) {
+				obj = { color: 'green' };
+			} else if (item.deviceStatus == 255) {
+				obj = { color: 'err' };
 			}
+			return obj;
 		},
-		methods: {
-			getStationsInfo(stationId){
-				if(!stationId){
-					return;
-				}
-				this.$api.base("post","/chargeApi/getStationsInfo",{"stationId":stationId},{}).then(res=>{
-					this.deviceList = res.devices;
-					this.prices.data = res.prices;
-					this.nowPriceTime = res.nowPriceTime;
-					this.stationInfo = res.stationInfo;
-					//当前的价格时间断的下标
-					for(var i = 0; i < this.prices.data.length; i++){
-						if(this.nowPriceTime.id == this.prices.data[i].id){
-							this.prices.index = i;
-							break
-						}
-					}
-				})
-			},
-			//获取桩状态的数量
-			getStatusNum(status){
-				var num = 0;
-				//设备状态 0:离网1:空闲2:占用(未充电)3:占用(充电中)4:占用(预约锁定)255:故障
-				for(var i = 0; i < this.deviceList.length; i++){
-					var device = this.deviceList[i];
-					if(status == 2){
-						if(device.deviceStatus == 2 || device.deviceStatus == 3 || device.deviceStatus == 4){
-							num++;
-							continue;
-						}
-					}
-					if(device.deviceStatus == status){
-						num++;
-					}
-				}
-				return num;
-			},
-			getSatesObj(item){
-				//{name:'离线',color:'grey'},{name:'空闲',color:'green'},{name:'占用',color:'blue'}
-				var obj = {};
-				if(item.deviceStatus == 2 || item.deviceStatus == 4){
-					obj = {name:'占用',color:'blue'};
-				}else if(item.deviceStatus == 3){
-					obj = {name:'充电中',color:'orange'};
-				}else if(item.deviceStatus == 0){
-					obj = {name:'离线',color:'grey'};
-				}else if(item.deviceStatus == 1){
-					obj = {name:'空闲',color:'green'};
-				}else if(item.deviceStatus == 255){
-					obj = {name:'故障',color:'err'};
-				}
-				return obj;
-			},
-			//获取充电桩设备类型
-			getdeviceTypeName(type){
-				//电类型 1:直流设备;2:交流设备3:交直流一体设备;4:无线设备;5:其他
-				var str = "";
-				switch(type){
-					case "1":
-						str = "直流设备";
-						break
-					case "2":
-						str = "交流设备";
-						break
-					case "3":
-						str = "交直流一体设备";
-						break
-					case "4":
-						str = "无线设备";
-						break
-					case "5":
-						str = "其他";
-						break
-				}
-				return str;
-			},
-			//映射 峰  平  谷
-			getPriceLable(type){
-				//时间类型 1 谷 2 平 3 峰
-				var str = "";
-				switch (type){
-					case 1:
-						str = "谷";
-						break;
-					case 2:
-						str = "平";
-						break;
-					case 3:
-						str = "峰";
-						break;
-				}
-				return str;
-			},
-			settitle(title){
-				uni.setNavigationBarTitle({title});
-			},
-			// 跳转充电终端
-			goTerminal(item){
-				//设备状态 0:离网1:空闲2:占用(未充电)3:占用(充电中)4:占用(预约锁定)255:故障
-				if(item.deviceStatus == 0 || item.deviceStatus == 255 ){
+		//映射 峰  平  谷
+		getPriceLable(type) {
+			//时间类型 1 谷 2 平 3 峰
+			var str = "";
+			switch (type) {
+				case 1:
+					str = "谷";
+					break;
+				case 2:
+					str = "平";
+					break;
+				case 3:
+					str = "峰";
+					break;
+			}
+			return str;
+		},
+		settitle(title) {
+			uni.setNavigationBarTitle({ title });
+		},
+		// 跳转充电终端
+		goTerminal(item) {
+			//设备状态 0:离网1:空闲2:占用(未充电)3:占用(充电中)4:占用(预约锁定)255:故障
+			if (item.deviceStatus == 0 || item.deviceStatus == 255) {
+				return;
+			}
+			this.$app.url.goto('/pages/terminal/terminal?deviceId=' + item.id + "&deviceStatus=" + item.deviceStatus);
+		},
+		//扫一扫
+		sacn() {
+			this.$app.act.scan().then(res => {
+				var paramObj = this.getUrlParams(res.result);
+				if (!paramObj || !paramObj.connectorCode) {
+					this.$app.popup.alert("二维码不正确。", "温馨提示!");
 					return;
 				}
-				this.$app.url.goto('/pages/terminal/terminal?deviceId='+item.id+"&deviceStatus="+item.deviceStatus);
-			},
-			//扫一扫
-			sacn(){
-				this.$app.act.scan().then(res=>{
-					var paramObj = this.getUrlParams(res.result);
-					if(!paramObj || !paramObj.connectorCode){
-						this.$app.popup.alert("二维码不正确。","温馨提示!");
-						return;
-					}
-					this.getDeviceInfo(paramObj.connectorCode);
-				})
-			},
-			getUrlParams(url) {
-			  const paramsRegex = /[?&]+([^=&]+)=([^&]*)/gi;
-			  const params = {};
-			  let match;
-			  while (match = paramsRegex.exec(url)) {
-			    params[match[1]] = match[2];
-			  }
-			  return params;
-			},
-			//通过充电桩编码(sn)获取设备详情
-			getDeviceInfo(sn){
-				this.$api.base("post","/chargeApi/checkDevicesBySn",{"sn":sn},{}).then(res=>{
-					console.log("设备信息:",res)
-					this.goTerminal(res.device);
-				})
+				this.getDeviceInfo(paramObj.connectorCode);
+			})
+		},
+		getUrlParams(url) {
+			const paramsRegex = /[?&]+([^=&]+)=([^&]*)/gi;
+			const params = {};
+			let match;
+			while (match = paramsRegex.exec(url)) {
+				params[match[1]] = match[2];
 			}
+			return params;
+		},
+		//通过充电桩编码(sn)获取设备详情
+		getDeviceInfo(sn) {
+			this.$api.base("post", "/chargeApi/checkDevicesBySn", { "sn": sn }, {}).then(res => {
+				console.log("设备信息:", res)
+				this.goTerminal(res.device);
+			})
 		}
 	}
+}
 </script>
 
 <style scoped>

+ 244 - 232
pages/site/site.vue

@@ -4,13 +4,13 @@
 			<!-- 顶部 -->
 			<view class="top">
 				<view class="site-base">
-					<view class="site-name">{{stationInfo.name}}</view>
+					<view class="site-name">{{ stationInfo.name }}</view>
 					<view class="site-parkade">充电减免2小时停车费,超出部分按每小时3元计算</view>
 				</view>
 				<view class="location">
 					<view class="info app-flex-one">
-						<view class="name">距离您{{stationInfo.params.rangeShow}}</view>
-						<view class="subname">{{stationInfo.addr}}</view>
+						<view class="name">距离您{{ stationInfo.params.rangeShow }}</view>
+						<view class="subname">{{ stationInfo.addr }}</view>
 					</view>
 					<view @click="openLocation()" class="info app-flex c-center column">
 						<image src="@/static/img/locate2.svg" class="icon"></image>
@@ -31,7 +31,7 @@
 				</view>
 				<view class="info-cell">
 					<image src="@/static/img/site-icon02.png" class="icon"></image>
-					<text>当前时段:</text><text>{{stationInfo.params.priceShow}}</text>
+					<text>当前时段:</text><text>{{ stationInfo.params.priceShow }}</text>
 				</view>
 				<view class="info-cell">
 					<image src="@/static/img/site-icon03.png" class="icon"></image>
@@ -43,23 +43,24 @@
 						<image src="@/static/img/site-bg05.svg" class="bg" mode="heightFix"></image>
 					</view>
 					<!-- v-if="user_info.firmId===null" -->
-					<view class="price-wrap" v-if="user_info.firmId===null||$app.storage.get('USER_INFO').firmType===0">
+					<view class="price-wrap" v-if="user_info.firmId === null || $app.storage.get('USER_INFO').firmType === 0">
 						<view class="price">
 							<text class="symbol">¥</text>
-							<text>{{nowPriceTime.price?parseFloat(nowPriceTime.price).toFixed(4):"0.0000"}}</text>
+							<text>{{ nowPriceTime.price ? parseFloat(nowPriceTime.price).toFixed(4) : "0.0000" }}</text>
 						</view>
 						<view class="unit">元/度</view>
 					</view>
 					<view class="price-wrap" v-else>
 						<view class="operation-price">
 							<text class="operation-symbol">¥</text>
-							<text>{{parseFloat(nowPriceTime.firmPrice).toFixed(4)}}</text>
+							<text>{{ parseFloat(nowPriceTime.firmPrice).toFixed(4) }}</text>
 						</view>
 						<view class="mini-text">元/度</view>
 						<view class="operation-price-btn">
 							企业专享价
 						</view>
-						<view class="ordinary-price">{{nowPriceTime.price?parseFloat(nowPriceTime.price).toFixed(4):"0.0000"}}</view>
+						<view class="ordinary-price">
+							{{ nowPriceTime.price ? parseFloat(nowPriceTime.price).toFixed(4) : "0.0000" }}</view>
 					</view>
 				</view>
 			</view>
@@ -73,22 +74,32 @@
 					</view>
 				</view>
 				<view class="bread">
-					<view class="bread-item"><view class="value">{{getStatusNum(1)}}</view><view class="name">空闲</view></view>
-					<view class="bread-item"><view class="value">{{getStatusNum(2)}}</view><view class="name">占用</view></view>
-					<view class="bread-item"><view class="value">{{getStatusNum(0)}}</view><view class="name">离线</view></view>
+					<view class="bread-item">
+						<view class="value">{{ getStatusNum(1) }}</view>
+						<view class="name">空闲</view>
+					</view>
+					<view class="bread-item">
+						<view class="value">{{ getStatusNum(2) }}</view>
+						<view class="name">占用</view>
+					</view>
+					<view class="bread-item">
+						<view class="value">{{ getStatusNum(0) }}</view>
+						<view class="name">离线</view>
+					</view>
 				</view>
 				<view class="terminals">
-					<view v-for="(item,index) in terminals" :key="index" @click="goTerminal(item)" class="terminal-item">
+					<view v-for="(item, index) in terminals" :key="index" @click="goTerminal(item)"
+						class="terminal-item">
 						<view class="state" :class="[getSatesObj(item).color]">
 							<view class="cake">
 								<image src="@/static/img/site-icon01.svg" class="icon"></image>
-								<view class="name">{{getSatesObj(item).name}}</view>
+								<view class="name">{{ getSatesObj(item).name }}</view>
 							</view>
 						</view>
 						<view class="info">
-							<view class="name">{{item.deviceName}}</view>
-							<view class="subinfo">电类分类:{{getdeviceTypeName(item.eType)}}</view>
-							<view class="subinfo">终端编号:{{item.deviceNo}}</view>
+							<view class="name">{{ item.deviceName }}</view>
+							<view class="subinfo">电类分类:{{ getdeviceTypeName(item.eType) }}</view>
+							<view class="subinfo">终端编号:{{ item.deviceNo }}</view>
 						</view>
 					</view>
 				</view>
@@ -106,10 +117,11 @@
 					<view class="price">
 						<text class="symbol">¥</text>
 						<!-- v-if="nowPriceTime.firmPrice===null" -->
-						<text v-if="nowPriceTime.firmPrice===null||$app.storage.get('USER_INFO').firmType===0">{{nowPriceTime.price?nowPriceTime.price.toFixed(4):"0.0000"}}</text>
-						<text v-else>{{parseFloat(nowPriceTime.firmPrice).toFixed(4)}}</text>
+						<text
+							v-if="nowPriceTime.firmPrice === null || $app.storage.get('USER_INFO').firmType === 0">{{ nowPriceTime.price ? nowPriceTime.price.toFixed(4) : "0.0000" }}</text>
+						<text v-else>{{ parseFloat(nowPriceTime.firmPrice).toFixed(4) }}</text>
 					</view>
-					<view class="unit">{{nowPriceTime.unit}}</view>
+					<view class="unit">{{ nowPriceTime.unit }}</view>
 				</view>
 				<view @click="sacn()" class="scan">扫码充电</view>
 			</view>
@@ -118,231 +130,231 @@
 </template>
 
 <script>
-	export default {
-		onLoad: function (option) {
-				console.log(option); //打印出上个页面传递的参数。
-				this.stationInfo = JSON.parse(option.item);
-				if(this.stationInfo.pictures){
-					//添加站点图片
-					var imgArr = this.stationInfo.pictures.split(",");
-					if(imgArr.length > 0){
-						this.tops = imgArr;
-					}
-				}
-				this.getStationsInfo();
-				this.getConfigStationInfo();
-		},
-		mounted() {
-			this.$app.act.selectorQuery(this,'#footer').then(res=>{
-				const win = uni.getWindowInfo();
-				const tHight = win.windowWidth * 9 /16;
-				this.mainHeight = win.windowHeight - tHight - res.height + 10;
-			});
-		},
-		data() {
-			return {
-				user_info:this.$app.storage.get('USER_INFO'),
-				mainHeight: 0,
-				tops:["../../static/img/$temp-site.png"],
-				another: false,
-				terminals: [],
-				entInfo:{
-					title:'服务提供',
-					name: '华能贵州盘州市风电有限责任公司',
-					code: '915205555155625655',
-					tel: '0851-8815158',
-					businessLicenceUrl:"/static/img/$temp-site01.jpg"
-				},
-				stationInfo : "",//站点信息
-				deviceList: [],//该站点桩列表
-				timePricesList: [],//费用时段列表
-				nowPriceTime: {},//当前费用时段信息
-				service:{
-					tel: '400-0000-0000',
-					work: '09:00 至 18:00'
-				},
-				busineHours:"",//营业时间
+export default {
+	onLoad: function (option) {
+		console.log(option); //打印出上个页面传递的参数。
+		this.stationInfo = JSON.parse(option.item);
+		if (this.stationInfo.pictures) {
+			//添加站点图片
+			var imgArr = this.stationInfo.pictures.split(",");
+			if (imgArr.length > 0) {
+				this.tops = imgArr;
 			}
-		},
-		methods: {
-			getStationsInfo(){
-				this.$api.base("post","/chargeApi/getStationsInfoAndUpdateDecice",{"stationId":this.stationInfo.id},{}).then(res=>{
-					this.deviceList = res.devices;
-					this.timePricesList = res.prices;
-					this.nowPriceTime = res.nowPriceTime;
-					//只显示三个设备信息
-					for(var i = 0; i < this.deviceList.length; i++){
-						this.terminals.push(this.deviceList[i]);
-						if(i == 2){
-							break;
-						}
-					}
-				})
+		}
+		this.getStationsInfo();
+		this.getConfigStationInfo();
+	},
+	mounted() {
+		this.$app.act.selectorQuery(this, '#footer').then(res => {
+			const win = uni.getWindowInfo();
+			const tHight = win.windowWidth * 9 / 16;
+			this.mainHeight = win.windowHeight - tHight - res.height + 10;
+		});
+	},
+	data() {
+		return {
+			user_info: this.$app.storage.get('USER_INFO'),
+			mainHeight: 0,
+			tops: ["../../static/img/$temp-site.png"],
+			another: false,
+			terminals: [],
+			entInfo: {
+				title: '服务提供',
+				name: '华能贵州盘州市风电有限责任公司',
+				code: '915205555155625655',
+				tel: '0851-8815158',
+				businessLicenceUrl: "/static/img/$temp-site01.jpg"
+			},
+			stationInfo: "",//站点信息
+			deviceList: [],//该站点桩列表
+			timePricesList: [],//费用时段列表
+			nowPriceTime: {},//当前费用时段信息
+			service: {
+				tel: '400-0000-0000',
+				work: '09:00 至 18:00'
 			},
-			//获取桩状态的数量
-			getStatusNum(status){
-				var num = 0;
-				//设备状态 0:离网1:空闲2:占用(未充电)3:占用(充电中)4:占用(预约锁定)255:故障
-				for(var i = 0; i < this.deviceList.length; i++){
-					var device = this.deviceList[i];
-					if(status == 2){
-						if(device.deviceStatus == 2 || device.deviceStatus == 3 || device.deviceStatus == 4){
-							num++;
-							continue;
-						}
+			busineHours: "",//营业时间
+		}
+	},
+	methods: {
+		getStationsInfo() {
+			this.$api.base("post", "/chargeApi/getStationsInfoAndUpdateDecice", { "stationId": this.stationInfo.stationId }, {}).then(res => {
+				this.deviceList = res.devices;
+				this.timePricesList = res.prices;
+				this.nowPriceTime = res.nowPriceTime;
+				//只显示三个设备信息
+				for (var i = 0; i < this.deviceList.length; i++) {
+					this.terminals.push(this.deviceList[i]);
+					if (i == 2) {
+						break;
 					}
-					if(device.deviceStatus == status){
+				}
+			})
+		},
+		//获取桩状态的数量
+		getStatusNum(status) {
+			var num = 0;
+			//设备状态 0:离网1:空闲2:占用(未充电)3:占用(充电中)4:占用(预约锁定)255:故障
+			for (var i = 0; i < this.deviceList.length; i++) {
+				var device = this.deviceList[i];
+				if (status == 2) {
+					if (device.deviceStatus == 2 || device.deviceStatus == 3 || device.deviceStatus == 4) {
 						num++;
+						continue;
 					}
 				}
-				return num;
-			},
-			getSatesObj(item){
-				//{name:'离线',color:'grey'},{name:'空闲',color:'green'},{name:'占用',color:'blue'}
-				var obj = {};
-				if(item.deviceStatus == 2 || item.deviceStatus == 4){
-					obj = {name:'占用',color:'blue'};
-				}else if(item.deviceStatus == 3){
-					obj = {name:'充电中',color:'orange'};
-				}else if(item.deviceStatus == 0){
-					obj = {name:'离线',color:'grey'};
-				}else if(item.deviceStatus == 1){
-					obj = {name:'空闲',color:'green'};
-				}else if(item.deviceStatus == 255){
-					obj = {name:'故障',color:'err'};
-				}
-				return obj;
-			},
-			//获取充电桩设备类型
-			getdeviceTypeName(type){
-				//电类型 1:直流设备;2:交流设备3:交直流一体设备;4:无线设备;5:其他
-				var str = "";
-				switch(type){
-					case "1":
-						str = "直流设备";
-						break
-					case "2":
-						str = "交流设备";
-						break
-					case "3":
-						str = "交直流一体设备";
-						break
-					case "4":
-						str = "无线设备";
-						break
-					case "5":
-						str = "其他";
-						break
-				}
-				return str;
-			},
-			//映射 峰  平  谷
-			getPriceLable(type){
-				//时间类型 1 谷 2 平 3 峰
-				var str = "";
-				switch (type){
-					case 1:
-						str = "谷";
-						break;
-					case 2:
-						str = "平";
-						break;
-					case 3:
-						str = "峰";
-						break;
+				if (device.deviceStatus == status) {
+					num++;
 				}
-				return str;
-			},
-			//获取配置文件信息
-			getConfigStationInfo(){
-				this.$api.static(this.$config.url.configUrl+"stationConfi.json").then(res=>{
-					console.log("获取的配置文件信息:",res);
-					this.entInfo = res.entInfo;
-					this.service = res.service;
-					this.busineHours = res.busineHours;
-				})
-			},
-			// 拨打电话
-			callPhone(phone){
-				this.$app.act.callPhone(phone);
-			},
-			// 打开客服
-			openCustomerService(){
-				this.$refs.service.open();
-			},
-			// 打开服务提供
-			openEnt_Serve(){
-				this.entInfo.title = '服务提供';
-				this.$refs.entInfo.open();
-			},
-			// 打开发票提供
-			openEnt_Invoicing(){
-				this.entInfo.title = '发票提供';
-				this.$refs.entInfo.open();
-			},
-			// 关闭企业弹窗
-			closeEnt(){
-				this.$refs.entInfo.close();
-			},
-			// 关闭服务弹窗
-			closeService(){
-				this.$refs.service.close();
-			},
-			// 打开地图
-			openLocation(){
-				uni.openLocation({
-					latitude: Number(this.stationInfo.lat),
-					longitude:  Number(this.stationInfo.lng),
-				});
-			},
-			// 跳转充电终端
-			goTerminal(item){
-				//设备状态 0:离网1:空闲2:占用(未充电)3:占用(充电中)4:占用(预约锁定)255:故障
-				if(item.deviceStatus == 0 || item.deviceStatus == 255 ){
+			}
+			return num;
+		},
+		getSatesObj(item) {
+			//{name:'离线',color:'grey'},{name:'空闲',color:'green'},{name:'占用',color:'blue'}
+			var obj = {};
+			if (item.deviceStatus == 2 || item.deviceStatus == 4) {
+				obj = { name: '占用', color: 'blue' };
+			} else if (item.deviceStatus == 3) {
+				obj = { name: '充电中', color: 'orange' };
+			} else if (item.deviceStatus == 0) {
+				obj = { name: '离线', color: 'grey' };
+			} else if (item.deviceStatus == 1) {
+				obj = { name: '空闲', color: 'green' };
+			} else if (item.deviceStatus == 255) {
+				obj = { name: '故障', color: 'err' };
+			}
+			return obj;
+		},
+		//获取充电桩设备类型
+		getdeviceTypeName(type) {
+			//电类型 1:直流设备;2:交流设备3:交直流一体设备;4:无线设备;5:其他
+			var str = "";
+			switch (type) {
+				case "1":
+					str = "直流设备";
+					break
+				case "2":
+					str = "交流设备";
+					break
+				case "3":
+					str = "交直流一体设备";
+					break
+				case "4":
+					str = "无线设备";
+					break
+				case "5":
+					str = "其他";
+					break
+			}
+			return str;
+		},
+		//映射 峰  平  谷
+		getPriceLable(type) {
+			//时间类型 1 谷 2 平 3 峰
+			var str = "";
+			switch (type) {
+				case 1:
+					str = "谷";
+					break;
+				case 2:
+					str = "平";
+					break;
+				case 3:
+					str = "峰";
+					break;
+			}
+			return str;
+		},
+		//获取配置文件信息
+		getConfigStationInfo() {
+			this.$api.static(this.$config.url.configUrl + "stationConfi.json").then(res => {
+				console.log("获取的配置文件信息:", res);
+				this.entInfo = res.entInfo;
+				this.service = res.service;
+				this.busineHours = res.busineHours;
+			})
+		},
+		// 拨打电话
+		callPhone(phone) {
+			this.$app.act.callPhone(phone);
+		},
+		// 打开客服
+		openCustomerService() {
+			this.$refs.service.open();
+		},
+		// 打开服务提供
+		openEnt_Serve() {
+			this.entInfo.title = '服务提供';
+			this.$refs.entInfo.open();
+		},
+		// 打开发票提供
+		openEnt_Invoicing() {
+			this.entInfo.title = '发票提供';
+			this.$refs.entInfo.open();
+		},
+		// 关闭企业弹窗
+		closeEnt() {
+			this.$refs.entInfo.close();
+		},
+		// 关闭服务弹窗
+		closeService() {
+			this.$refs.service.close();
+		},
+		// 打开地图
+		openLocation() {
+			uni.openLocation({
+				latitude: Number(this.stationInfo.lat),
+				longitude: Number(this.stationInfo.lng),
+			});
+		},
+		// 跳转充电终端
+		goTerminal(item) {
+			//设备状态 0:离网1:空闲2:占用(未充电)3:占用(充电中)4:占用(预约锁定)255:故障
+			if (item.deviceStatus == 0 || item.deviceStatus == 255) {
+				return;
+			}
+			this.$app.url.goto('/pages/terminal/terminal?deviceId=' + item.id + "&deviceStatus=" + item.deviceStatus);
+		},
+		//去查看全部电站
+		toDeiceAll() {
+			var strList = JSON.stringify(this.timePricesList);
+			var currPriceId = this.nowPriceTime.id
+			this.$app.url.goto('/pages/site-more/site-more?stationId=' + this.stationInfo.id)
+		},
+		//去查看全部电价
+		toPriceAll() {
+			this.$app.url.goto('/pages/site-more/site-more?show=1&stationId=' + this.stationInfo.id)
+		},
+		//扫一扫
+		sacn() {
+			this.$app.act.scan().then(res => {
+				console.log(res);
+				var paramObj = this.getUrlParams(res.result);
+				if (!paramObj || !paramObj.connectorCode) {
+					this.$app.popup.alert("二维码不正确。", "温馨提示!");
 					return;
 				}
-				this.$app.url.goto('/pages/terminal/terminal?deviceId='+item.id+"&deviceStatus="+item.deviceStatus);
-			},
-			//去查看全部电站
-			toDeiceAll(){
-				var strList = JSON.stringify(this.timePricesList);
-				var currPriceId = this.nowPriceTime.id
-				this.$app.url.goto('/pages/site-more/site-more?stationId='+this.stationInfo.id)
-			},
-			//去查看全部电价
-			toPriceAll(){
-				this.$app.url.goto('/pages/site-more/site-more?show=1&stationId='+this.stationInfo.id)
-			},
-			//扫一扫
-			sacn(){
-				this.$app.act.scan().then(res=>{
-					console.log(res);
-					var paramObj = this.getUrlParams(res.result);
-					if(!paramObj || !paramObj.connectorCode){
-						this.$app.popup.alert("二维码不正确。","温馨提示!");
-						return;
-					}
-					this.getDeviceInfo(paramObj.connectorCode);
-				})
-			},
-			getUrlParams(url) {
-			  const paramsRegex = /[?&]+([^=&]+)=([^&]*)/gi;
-			  const params = {};
-			  let match;
-			  while (match = paramsRegex.exec(url)) {
-			    params[match[1]] = match[2];
-			  }
-			  return params;
-			},
-			//通过充电桩编码(sn)获取设备详情
-			getDeviceInfo(sn){
-				this.$api.base("post","/chargeApi/checkDevicesBySn",{"sn":sn},{}).then(res=>{
-					console.log("设备信息:",res)
-					this.goTerminal(res.device);
-				})
+				this.getDeviceInfo(paramObj.connectorCode);
+			})
+		},
+		getUrlParams(url) {
+			const paramsRegex = /[?&]+([^=&]+)=([^&]*)/gi;
+			const params = {};
+			let match;
+			while (match = paramsRegex.exec(url)) {
+				params[match[1]] = match[2];
 			}
+			return params;
+		},
+		//通过充电桩编码(sn)获取设备详情
+		getDeviceInfo(sn) {
+			this.$api.base("post", "/chargeApi/checkDevicesBySn", { "sn": sn }, {}).then(res => {
+				console.log("设备信息:", res)
+				this.goTerminal(res.device);
+			})
 		}
 	}
+}
 </script>
 
 <style scoped>

+ 2 - 2
static/js/config.js

@@ -11,8 +11,8 @@ config.url = {
   // request : 'http://192.168.110.3:80/',
   // request : 'http://192.168.1.253:80/',
   // request : 'http://120.78.228.211:8866/',
-  request: "http://192.168.0.11:8989/",
-  // request: "http://192.168.0.217:8989/",
+  // request: "http://192.168.0.11:8989/",
+  request: "http://192.168.0.217:8989/",
   // request : 'https://charge.dev.hub.zswlgz.com/',
   // 上传地址
   upload: "http://127.0.0.1:3000/upload/",

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/app-navigation/app-navigation.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/ax-body/ax-body.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/ax-custom-title/ax-custom-title.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/ax-ios-indicator/ax-ios-indicator.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/ax-popup/ax-popup.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/banner-page/banner-page.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/charging/charging.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/coupon-buy/coupon-buy.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/coupons/coupons.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/feedback-reply/feedback-reply.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/feedback/feedback.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/login/login.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/map/map.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/my.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/new-site/new-site.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/order-detail/order-detail.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/order/order.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/recharge-log/recharge-log.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/search/search.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/site-more/site-more.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/site/site.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/terminal/terminal.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/lime-painter/components/l-painter/l-painter.js.map


+ 2 - 2
unpackage/dist/dev/mp-weixin/common/vendor.js

@@ -13876,8 +13876,8 @@ config.url = {
   // request : 'http://192.168.110.3:80/',
   // request : 'http://192.168.1.253:80/',
   // request : 'http://120.78.228.211:8866/',
-  request: "http://192.168.0.11:8989/",
-  // request: "http://192.168.0.217:8989/",
+  // request: "http://192.168.0.11:8989/",
+  request: "http://192.168.0.217:8989/",
   // request : 'https://charge.dev.hub.zswlgz.com/',
   // 上传地址
   upload: "http://127.0.0.1:3000/upload/",

+ 30 - 23
unpackage/dist/dev/mp-weixin/pages/coupons/coupons.js

@@ -223,6 +223,9 @@ var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/
 //
 //
 //
+//
+//
+//
 var _default = {
   data: function data() {
     return {
@@ -232,16 +235,20 @@ var _default = {
       // 默认选中第一个选项卡
       tabsList: [{
         text: '待领取',
-        id: 0
+        id: 0,
+        count: 0
       }, {
         text: '待使用',
-        id: 1
+        id: 1,
+        count: 0
       }, {
         text: '已使用',
-        id: 2
+        id: 2,
+        count: 0
       }, {
         text: '已过期',
-        id: 3
+        id: 3,
+        count: 0
       }],
       toBeclaimedCoupons: [],
       totalNumber: 0,
@@ -267,42 +274,42 @@ var _default = {
   methods: {
     handleTabClick: function handleTabClick(e) {
       this.currentIndex = e.id;
-      this.form_submit.status = e.id;
+      this.form_submit.status = e.id + 1;
       this.toBeclaimedCoupons = [];
       this.get_TobeclaimedCoupons();
-      this.get_statistical();
     },
     get_TobeclaimedCoupons: function get_TobeclaimedCoupons() {
       var _this = this;
       if (this.currentIndex == 0) {
-        this.$api.base("post", "/couponApi/list-pending", {}, {}).then(function (res) {
-          _this.toBeclaimedCoupons = res.list;
+        this.$api.base("get", "/applet/v1/user/getCouponTemplatePage", {
+          pageNum: this.form_submit.pageNum,
+          pageSize: this.form_submit.pageSize,
+          status: this.form_submit.status
+        }, {}).then(function (res) {
+          _this.toBeclaimedCoupons = res.data.records;
+          _this.tabsList[0].count = res.data.total;
         });
       } else {
-        this.$api.base("post", "/couponApi/list-user?pageNum=".concat(this.form_submit.pageNum, "&pageSize=").concat(this.form_submit.pageSize, "&status=").concat(this.form_submit.status), {}, {}).then(function (res) {
+        this.$api.base("post", "/applet/v1/user/getCouponPage", {
+          pageNum: this.form_submit.pageNum,
+          pageSize: this.form_submit.pageSize,
+          status: this.form_submit.status
+        }, {}).then(function (res) {
           _this.totalNumber = res.total;
           if (_this.form_submit.pageNum == 1) {
-            _this.toBeclaimedCoupons = res.rows;
+            _this.toBeclaimedCoupons = res.data.records;
           } else {
-            _this.toBeclaimedCoupons = [].concat((0, _toConsumableArray2.default)(_this.toBeclaimedCoupons), (0, _toConsumableArray2.default)(res.rows));
+            _this.toBeclaimedCoupons = [].concat((0, _toConsumableArray2.default)(_this.toBeclaimedCoupons), (0, _toConsumableArray2.default)(res.data.records));
           }
         });
       }
     },
     get_statistical: function get_statistical() {
       var _this2 = this;
-      // 数据映射
-      var idToKeyMap = {
-        0: 'list-pending',
-        1: 'list-unused',
-        2: 'list-used',
-        3: 'list-overdue'
-      };
-      this.$api.base("post", "/couponApi/statistical", {}, {}).then(function (res) {
-        _this2.tabsList.forEach(function (tab) {
-          var key = idToKeyMap[tab.id];
-          tab.count = res.data[key] || 0;
-        });
+      this.$api.base("get", "/applet/v1/user/getCouponStatusNum", {}, {}).then(function (res) {
+        _this2.tabsList[1].count = res.data.unusedNum;
+        _this2.tabsList[2].count = res.data.usedNum;
+        _this2.tabsList[3].count = res.data.expiredNum;
       });
     },
     goto_orderDetail: function goto_orderDetail(e) {

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
unpackage/dist/dev/mp-weixin/pages/coupons/coupons.wxml


+ 5 - 4
unpackage/dist/dev/mp-weixin/pages/feedback-reply/feedback-reply.js

@@ -129,7 +129,7 @@ var render = function () {
   var l0 = g0
     ? _vm.__map(_vm.list.data, function (item, index) {
         var $orig = _vm.__get_orig(item)
-        var m0 = _vm.typesLable(item.problemType)
+        var m0 = _vm.typesLable(item.type)
         return {
           $orig: $orig,
           m0: m0,
@@ -142,7 +142,7 @@ var render = function () {
         _temp2 = _temp.eventParams || _temp["event-params"],
         item = _temp2.item
       var _temp, _temp2
-      _vm.previewImage(item.filesUrl.split(","))
+      _vm.previewImage(item.images.split(","))
     }
   }
   _vm.$mp.data = Object.assign(
@@ -245,7 +245,7 @@ var _default = {
         value: 3
       }, {
         name: '功能建议',
-        value: 3
+        value: 4
       }, {
         name: '其他',
         value: 9
@@ -259,7 +259,8 @@ var _default = {
     loadListData: function loadListData() {
       var _this = this;
       this.$api.base("get", "/applet/v1/user/myFeedback", {}, {}).then(function (res) {
-        _this.list.data = res.list;
+        _this.list.data = res.data;
+        console.log(_this.list.data);
       });
     },
     typesLable: function typesLable(val) {

+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/feedback-reply/feedback-reply.wxml

@@ -1 +1 @@
-<ax-body vue-id="1c771940-1" bind:__l="__l" vue-slots="{{['default']}}"><view class="page-background"><image src="/static/img/my-bg.svg" mode="widthFix"></image></view><view class="body app-hide-scrollbar root"><block wx:if="{{$root.g0}}"><view class="list"><block wx:for="{{$root.l0}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="item"><view class="mask"></view><view class="mask-box"><view>{{item.$orig.createTime}}</view><view>{{item.m0}}</view></view><view class="card"><view><text>{{item.$orig.problemDescribe}}</text><block wx:if="{{item.$orig.filesUrl}}"><text data-event-opts="{{[['tap',[['e0',['$event']]]]]}}" data-event-params="{{({item:item.$orig})}}" class="item-pic" bindtap="__e">查看附件</text></block></view><block wx:if="{{item.$orig.reply}}"><view class="reply"><text class="start-label">答复:</text><text>{{item.$orig.reply}}</text></view></block></view></view></block></view></block><block wx:else><view class="nothing-wrap"><view class="ax ax-iconblock i-kongshuju icon"></view><view>暂无数据</view></view></block></view></ax-body>
+<ax-body vue-id="1c771940-1" bind:__l="__l" vue-slots="{{['default']}}"><view class="page-background"><image src="/static/img/my-bg.svg" mode="widthFix"></image></view><view class="body app-hide-scrollbar root"><block wx:if="{{$root.g0}}"><view class="list"><block wx:for="{{$root.l0}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="item"><view class="mask"></view><view class="mask-box"><view>{{item.$orig.createTime}}</view><view>{{item.m0}}</view></view><view class="card"><view><text>{{item.$orig.description}}</text><block wx:if="{{item.$orig.images}}"><text data-event-opts="{{[['tap',[['e0',['$event']]]]]}}" data-event-params="{{({item:item.$orig})}}" class="item-pic" bindtap="__e">查看附件</text></block></view><block wx:if="{{item.$orig.reply}}"><view class="reply"><text class="start-label">答复:</text><text>{{item.$orig.reply}}</text></view></block></view></view></block></view></block><block wx:else><view class="nothing-wrap"><view class="ax ax-iconblock i-kongshuju icon"></view><view>暂无数据</view></view></block></view></ax-body>

+ 3 - 4
unpackage/dist/dev/mp-weixin/pages/index/index.js

@@ -475,7 +475,7 @@ var _default = {
     this.setAppNavigationHeight();
     this.get_frimid();
     this.get_userinfo();
-    this.get_paymentMsg();
+    // this.get_paymentMsg()
     this.getBanners();
   },
   data: function data() {
@@ -549,7 +549,7 @@ var _default = {
     };
   },
   onShow: function onShow() {
-    this.getAdswiper();
+    // this.getAdswiper()
   },
   onHide: function onHide() {
     this.$app.storage.remove('AD_STATUS');
@@ -781,9 +781,8 @@ var _default = {
     // },
     getBanners: function getBanners() {
       var _this9 = this;
-      this.$api.base("get", "/applet/v1/homePage/getBannerList", {}, {}).then(function (res) {
+      this.$api.base("get", "/applet/v1/homePage/getBannerList/1", {}, {}).then(function (res) {
         _this9.banners = res.data;
-        console.log(_this9.banners, 'banner数据');
       });
     },
     // getAdswiper() {

+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/index/index.wxss

@@ -277,7 +277,7 @@ app-navigation {
 /* 版头广告 */
 .banner {
   width: 100%;
-  height: calc((100vw - 20px) * (5 / 27));
+  height: calc((100vw - 20px) * (5 / 20));
 }
 .banner .swiper-item {
   display: flex;

+ 2 - 14
unpackage/dist/dev/mp-weixin/pages/my/my.js

@@ -144,17 +144,6 @@ var render = function () {
   var _h = _vm.$createElement
   var _c = _vm._self._c || _h
   var g0 = _vm.banners.length
-  var l0 =
-    g0 > 0
-      ? _vm.__map(_vm.banners, function (item, index) {
-          var $orig = _vm.__get_orig(item)
-          var m0 = _vm.showImg(item.pic)
-          return {
-            $orig: $orig,
-            m0: m0,
-          }
-        })
-      : null
   if (!_vm._isMounted) {
     _vm.e0 = function ($event) {
       return _vm.$app.url.goto("/pages/coupons/coupons")
@@ -187,7 +176,6 @@ var render = function () {
     {
       $root: {
         g0: g0,
-        l0: l0,
       },
     }
   )
@@ -394,8 +382,8 @@ var _default = {
     },
     getBanners: function getBanners() {
       var _this = this;
-      this.$api.base("post", "/userApi/getBanners", {}, {}).then(function (res) {
-        _this.banners = res.banners;
+      this.$api.base("get", "/applet/v1/homePage/getBannerList/2", {}, {}).then(function (res) {
+        _this.banners = res.data;
       });
     },
     get_qrCode: function get_qrCode() {

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
unpackage/dist/dev/mp-weixin/pages/my/my.wxml


+ 166 - 165
unpackage/dist/dev/mp-weixin/pages/my/my.wxss

@@ -1,244 +1,245 @@
 ax-body.data-v-0be17cc6 {
-	display: block;
-	height: 100%;
-	background: #F6FAFF;
+  display: block;
+  height: 100%;
+  background: #f6faff;
 }
 app-navigation.data-v-0be17cc6 {
-	position: fixed;
-	left: 0;
-	right: 0;
-	bottom: 0;
+  position: fixed;
+  left: 0;
+  right: 0;
+  bottom: 0;
 }
 .page-background.data-v-0be17cc6 {
-	position: fixed;
-	top: 0;
-	left: 0;
-	right: 0;
-	z-index: 0;
+  position: fixed;
+  top: 0;
+  left: 0;
+  right: 0;
+  z-index: 0;
 }
 .page-background image.data-v-0be17cc6 {
-	display: block;
-	width: 100%;
+  display: block;
+  width: 100%;
 }
 .main.data-v-0be17cc6 {
-	position: relative;
-	z-index: 1;
+  position: relative;
+  z-index: 1;
 }
 
 /* 用户卡 */
 .user-card.data-v-0be17cc6 {
-	padding: 20px 0;
-	position: relative;
+  padding: 20px 0;
+  position: relative;
 }
 .user-avatar.data-v-0be17cc6 {
-	display: block;
-	width: 50px;
-	height: 50px;
-	margin-right: 10px;
+  display: block;
+  width: 50px;
+  height: 50px;
+  margin-right: 10px;
 }
 .user-name.data-v-0be17cc6 {
-	display: flex;
-	align-items: center;
+  display: flex;
+  align-items: center;
 }
 .user-name-text.data-v-0be17cc6 {
-	font-size: 18px;
-	font-weight: bold;
+  font-size: 18px;
+  font-weight: bold;
 }
 .user-phone.data-v-0be17cc6 {
-	font-size: 12px;
-	margin-top: 5px;
+  font-size: 12px;
+  margin-top: 5px;
 }
 .seting-icon-box.data-v-0be17cc6 {
-	position: absolute;
-	right: 0;
-	display: flex;
-	align-items: center;
-	right: -20rpx;
+  position: absolute;
+  right: 0;
+  display: flex;
+  align-items: center;
+  right: -20rpx;
 }
 .seting-icon-box .img-icon.data-v-0be17cc6 {
-	position: absolute;
-	right: 110rpx;
-	width: 100rpx;
-	height: 100rpx;
+  position: absolute;
+  right: 110rpx;
+  width: 100rpx;
+  height: 100rpx;
 }
 .seting-icon-box .tips-text.data-v-0be17cc6 {
-	width: 146rpx;
-	height: 44rpx;
-	background: linear-gradient(259deg, #F75441 0%, #FCB83C 100%);
-	border-radius: 22rpx 0rpx 0rpx 22rpx;
-	font-size: 28rpx;
-	color: #FFFFFF;
-	text-align: center;
-	line-height: 44rpx;
+  width: 146rpx;
+  height: 44rpx;
+  background: linear-gradient(259deg, #f75441 0%, #fcb83c 100%);
+  border-radius: 22rpx 0rpx 0rpx 22rpx;
+  font-size: 28rpx;
+  color: #ffffff;
+  text-align: center;
+  line-height: 44rpx;
 }
 .get-phone-number.data-v-0be17cc6 {
-	display: inline-flex;
-	height: unset;
-	border: none;
-	line-height: normal;
-	background-color: transparent;
-	font-size: 12px;
-	color: #2B303A;
-	padding: 0;
-	margin: 0;
+  display: inline-flex;
+  height: unset;
+  border: none;
+  line-height: normal;
+  background-color: transparent;
+  font-size: 12px;
+  color: #2b303a;
+  padding: 0;
+  margin: 0;
 }
 .get-phone-number.data-v-0be17cc6::after {
-	display: none;
+  display: none;
 }
 .enterprise-name-card.data-v-0be17cc6 {
-	margin-left: 10rpx;
-	padding: 10rpx;
-	background-color: rgba(62, 182, 248, 0.3);
-	border-radius: 8rpx;
-	font-size: 22rpx;
-	color: #181818;
+  margin-left: 10rpx;
+  padding: 10rpx;
+  background-color: rgba(62, 182, 248, 0.3);
+  border-radius: 8rpx;
+  font-size: 22rpx;
+  color: #181818;
 }
 
 /* 统计卡 新*/
-.statistics-card.data-v-0be17cc6{
-	background: #FFFFFF;
-	border-radius: 32rpx;
-	padding: 20rpx;
-}
-.statistics-title.data-v-0be17cc6{
-	font-weight: bold;
-	font-size: 32rpx;
-}
-.statistics-dataInfo.data-v-0be17cc6{
-	display: flex;
-	align-items: center;
-	justify-content: space-around;
-	margin-top: 28rpx;
-}
-.dataInfo-left.data-v-0be17cc6{
-	text-align: center;
-	position: relative;
-	flex: 1;
-}
-.dataInfo-left .left-text.data-v-0be17cc6{
-	font-size: 24rpx;
-	color: #2B303A;
-}
-.left-number.data-v-0be17cc6{
-	margin-top: 20rpx;
-	font-weight: 600;
-	font-size: 48rpx;
-	color: #2B303A;
-}
-.dataInfo-left .left-refund-btn.data-v-0be17cc6{
-	position: absolute;
-	font-size: 14px;
-	color: #fff;
-	background-color: #3EB6F8;
-	padding: 2px 8px;
-	border-radius: 10px 0 0 10px;
-	bottom: 5px;
-	right: -20rpx;
-	z-index: 99;
-}
-.dataInfo-line.data-v-0be17cc6{
-	height: 104rpx;
-	border: 2rpx solid #F0F0F0;
+.statistics-card.data-v-0be17cc6 {
+  background: #ffffff;
+  border-radius: 32rpx;
+  padding: 20rpx;
+}
+.statistics-title.data-v-0be17cc6 {
+  font-weight: bold;
+  font-size: 32rpx;
+}
+.statistics-dataInfo.data-v-0be17cc6 {
+  display: flex;
+  align-items: center;
+  justify-content: space-around;
+  margin-top: 28rpx;
+}
+.dataInfo-left.data-v-0be17cc6 {
+  text-align: center;
+  position: relative;
+  flex: 1;
+}
+.dataInfo-left .left-text.data-v-0be17cc6 {
+  font-size: 24rpx;
+  color: #2b303a;
+}
+.left-number.data-v-0be17cc6 {
+  margin-top: 20rpx;
+  font-weight: 600;
+  font-size: 48rpx;
+  color: #2b303a;
+}
+.dataInfo-left .left-refund-btn.data-v-0be17cc6 {
+  position: absolute;
+  font-size: 14px;
+  color: #fff;
+  background-color: #3eb6f8;
+  padding: 2px 8px;
+  border-radius: 10px 0 0 10px;
+  bottom: 5px;
+  right: -20rpx;
+  z-index: 99;
+}
+.dataInfo-line.data-v-0be17cc6 {
+  height: 104rpx;
+  border: 2rpx solid #f0f0f0;
 }
 
 /* 版头广告 */
 .banner.data-v-0be17cc6 {
-	width: 100%;
-	height: calc((100vw - 20px) * (5/27));
+  width: 100%;
+  height: calc((100vw - 20px) * (5 / 20));
+  margin-top: 10rpx;
 }
 .banner .swiper-item.data-v-0be17cc6 {
-	display: flex;
-	width: 100%;
+  display: flex;
+  width: 100%;
 }
 .banner .swiper-item .swiper-item-image.data-v-0be17cc6 {
-	display: block;
-	width: 100%;
-	border-radius: 5px;
+  display: block;
+  width: 100%;
+  border-radius: 5px;
 }
 .buy.data-v-0be17cc6 {
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	height: 50px;
-	border-radius: 8px;
-	font-size: 14px;
-	margin-top: 15px;
-	background: linear-gradient(to right, #8FF8FB, #47AEFF);
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  height: 50px;
+  border-radius: 8px;
+  font-size: 14px;
+  margin-top: 15px;
+  background: linear-gradient(to right, #8ff8fb, #47aeff);
 }
 
 /* 卡片 */
 .card.data-v-0be17cc6 {
-	background-color: #fff;
-	border-radius: 8px;
-	margin-top: 15px;
-	box-shadow: 0 1px 8px rgba(122, 168, 222, 0.1);
+  background-color: #fff;
+  border-radius: 8px;
+  margin-top: 15px;
+  box-shadow: 0 1px 8px rgba(122, 168, 222, 0.1);
 }
 .card-title.data-v-0be17cc6 {
-	padding: 10px 20px 0 20px;
-	font-weight: bold;
+  padding: 10px 20px 0 20px;
+  font-weight: bold;
 }
 .act-wrap.data-v-0be17cc6 {
-	display: flex;
-	align-items: flex-end;
-	width: 100%;
-	padding: 15px 0px;
+  display: flex;
+  align-items: flex-end;
+  width: 100%;
+  padding: 15px 0px;
 }
 .act-item.data-v-0be17cc6 {
-	display: inline-flex;
-	align-items: center;
-	justify-content: space-between;
-	flex-direction: column;
-	width: 25%;
-	height: 50px;
+  display: inline-flex;
+  align-items: center;
+  justify-content: space-between;
+  flex-direction: column;
+  width: 25%;
+  height: 50px;
 }
 .act-item .icon.data-v-0be17cc6 {
-	display: block;
-	width: 30px;
-	height: 30px;
+  display: block;
+  width: 30px;
+  height: 30px;
 }
 .act-item .name.data-v-0be17cc6 {
-	font-size: 12px;
+  font-size: 12px;
 }
 .act-item.about.data-v-0be17cc6 {
-	height: auto;
+  height: auto;
 }
 .act-item.about .icon.data-v-0be17cc6 {
-	width: 40px;
-	height: 40px;
+  width: 40px;
+  height: 40px;
 }
 .playbil-box.data-v-0be17cc6 {
-	position: relative;
+  position: relative;
 }
 .playbil-box .playbil-bg.data-v-0be17cc6 {
-	width: 600rpx;
+  width: 600rpx;
 }
 .enterprise-name.data-v-0be17cc6 {
-	width: 600rpx;
-	text-align: center;
-	font-size: 22rpx;
-	position: absolute;
-	top: 610rpx;
-	color: rgb(33, 111, 247);
+  width: 600rpx;
+  text-align: center;
+  font-size: 22rpx;
+  position: absolute;
+  top: 610rpx;
+  color: rgb(33, 111, 247);
 }
 .playbil-qrcode.data-v-0be17cc6 {
-	position: absolute;
-	left: 170rpx;
-	top: 280rpx;
-	width: 260rpx;
-	height: 260rpx;
+  position: absolute;
+  left: 170rpx;
+  top: 280rpx;
+  width: 260rpx;
+  height: 260rpx;
 }
 .enterprise-user.data-v-0be17cc6 {
-	position: absolute;
-	width: 600rpx;
-	text-align: center;
-	top: 880rpx;
-	font-size: 22rpx;
-	color: #fff;
+  position: absolute;
+  width: 600rpx;
+  text-align: center;
+  top: 880rpx;
+  font-size: 22rpx;
+  color: #fff;
 }
 .enterprise-tips.data-v-0be17cc6 {
-	text-align: center;
-	font-size: 28rpx;
-	color: #ff0004;
+  text-align: center;
+  font-size: 28rpx;
+  color: #ff0004;
 }
 .refund_btn.data-v-0be17cc6 {
 	position: absolute;

+ 2 - 4
unpackage/dist/dev/mp-weixin/pages/new-site/new-site.js

@@ -557,13 +557,11 @@ var _default = {
     },
     //去查看全部电站
     toDeiceAll: function toDeiceAll() {
-      var strList = JSON.stringify(this.timePricesList);
-      var currPriceId = this.nowPriceTime.id;
-      this.$app.url.goto('/pages/site-more/site-more?stationId=' + this.stationInfo.id);
+      this.$app.url.goto('/pages/site-more/site-more?stationId=' + this.stationDetail.stationId);
     },
     //去查看全部电价
     toPriceAll: function toPriceAll() {
-      this.$app.url.goto('/pages/site-more/site-more?show=1&stationId=' + this.stationInfo.id);
+      this.$app.url.goto('/pages/site-more/site-more?show=1&stationId=' + this.stationDetail.stationId);
     },
     //扫一扫
     sacn: function sacn() {

+ 23 - 12
unpackage/dist/dev/mp-weixin/pages/search/search.js

@@ -233,6 +233,18 @@ exports.default = void 0;
 //
 //
 //
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
 var _default = {
   onLoad: function onLoad() {
     this.histories = this.$app.storage.get('history-search') || [];
@@ -261,7 +273,7 @@ var _default = {
       };
     },
     gotoSiteDetail: function gotoSiteDetail(item) {
-      this.$app.url.goto('/pages/site/site?item=' + JSON.stringify(item));
+      this.$app.url.goto('/pages/new-site/new-site?item=' + JSON.stringify(item));
     },
     query: function query() {
       var _this = this;
@@ -277,18 +289,17 @@ var _default = {
         lat = location.split(",")[1];
       }
       var key = this.search;
-      this.$api.base("post", "/chargeApi/getStations", {
-        order: "0",
-        lng: lng,
-        lat: lat,
-        key: key
+      this.$api.base("get", "/applet/v1/station/search", {
+        longitude: lng,
+        latitude: lat,
+        keyword: key
       }, {}).then(function (res) {
-        res.stationList.forEach(function (i) {
-          var txPoint = _this.convertBdToTx(i.lng, i.lat);
-          i.lng = txPoint.lng;
-          i.lat = txPoint.lat;
-        });
-        _this.result = res.stationList;
+        // res.stationList.forEach(i => {
+        // 	var txPoint = this.convertBdToTx(i.lng, i.lat)
+        // 	i.lng = txPoint.lng
+        // 	i.lat = txPoint.lat
+        // })
+        _this.result = res.data;
       });
     },
     setSearch: function setSearch(item) {

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
unpackage/dist/dev/mp-weixin/pages/search/search.wxml


+ 32 - 91
unpackage/dist/dev/mp-weixin/pages/site-more/site-more.js

@@ -128,40 +128,13 @@ var render = function () {
   var _vm = this
   var _h = _vm.$createElement
   var _c = _vm._self._c || _h
-  var m0 = _vm.getStatusNum(1)
-  var m1 = _vm.getStatusNum(2)
-  var m2 = _vm.getStatusNum(0)
   var l0 = _vm.another
-    ? _vm.__map(_vm.deviceList, function (item, index) {
+    ? _vm.__map(_vm.stationInfo.connectorList, function (item, index) {
         var $orig = _vm.__get_orig(item)
-        var m3 = _vm.getSatesObj(item)
-        var m4 = _vm.getSatesObj(item)
-        var m5 = _vm.getdeviceTypeName(item.eType)
+        var m0 = _vm.getSatesObj(item)
         return {
           $orig: $orig,
-          m3: m3,
-          m4: m4,
-          m5: m5,
-        }
-      })
-    : null
-  var l1 = !_vm.another
-    ? _vm.__map(_vm.prices.data, function (item, index) {
-        var $orig = _vm.__get_orig(item)
-        var m6 = _vm.getPriceLable(item.timeType)
-        var g0 =
-          _vm.user_info.firmId === null ||
-          _vm.$app.storage.get("USER_INFO").firmType === 0
-        var g1 = g0 && item.price ? item.price.toFixed(4) : null
-        var g2 = !g0 && item.firmPrice ? item.firmPrice.toFixed(4) : null
-        var g3 = !g0 && item.price ? item.price.toFixed(4) : null
-        return {
-          $orig: $orig,
-          m6: m6,
-          g0: g0,
-          g1: g1,
-          g2: g2,
-          g3: g3,
+          m0: m0,
         }
       })
     : null
@@ -174,11 +147,7 @@ var render = function () {
     {},
     {
       $root: {
-        m0: m0,
-        m1: m1,
-        m2: m2,
         l0: l0,
-        l1: l1,
       },
     }
   )
@@ -306,10 +275,22 @@ exports.default = void 0;
 //
 //
 //
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
 var _default = {
   onLoad: function onLoad(opts) {
     this.another = !Boolean(opts.show);
     this.getStationsInfo(opts.stationId);
+    this.getStationPriceList(opts.stationId);
   },
   mounted: function mounted() {
     var _this = this;
@@ -346,13 +327,10 @@ var _default = {
       if (!stationId) {
         return;
       }
-      this.$api.base("post", "/chargeApi/getStationsInfo", {
+      this.$api.base("get", "/applet/v1/station/connectors", {
         "stationId": stationId
       }, {}).then(function (res) {
-        _this2.deviceList = res.devices;
-        _this2.prices.data = res.prices;
-        _this2.nowPriceTime = res.nowPriceTime;
-        _this2.stationInfo = res.stationInfo;
+        _this2.stationInfo = res.data;
         //当前的价格时间断的下标
         for (var i = 0; i < _this2.prices.data.length; i++) {
           if (_this2.nowPriceTime.id == _this2.prices.data[i].id) {
@@ -362,78 +340,41 @@ var _default = {
         }
       });
     },
-    //获取桩状态的数量
-    getStatusNum: function getStatusNum(status) {
-      var num = 0;
-      //设备状态 0:离网1:空闲2:占用(未充电)3:占用(充电中)4:占用(预约锁定)255:故障
-      for (var i = 0; i < this.deviceList.length; i++) {
-        var device = this.deviceList[i];
-        if (status == 2) {
-          if (device.deviceStatus == 2 || device.deviceStatus == 3 || device.deviceStatus == 4) {
-            num++;
-            continue;
-          }
-        }
-        if (device.deviceStatus == status) {
-          num++;
-        }
-      }
-      return num;
+    getStationPriceList: function getStationPriceList(stationId) {
+      var _this3 = this;
+      this.$api.base("get", "/applet/v1/station/prices", {
+        "stationId": stationId
+      }, {}).then(function (res) {
+        _this3.prices.data = res.data;
+        // this.nowPriceTime = res.data[this.prices.index];
+      });
     },
     getSatesObj: function getSatesObj(item) {
       //{name:'离线',color:'grey'},{name:'空闲',color:'green'},{name:'占用',color:'blue'}
       var obj = {};
-      if (item.deviceStatus == 2 || item.deviceStatus == 4) {
+      if (item.status == 2 || item.status == 4) {
         obj = {
-          name: '占用',
           color: 'blue'
         };
       } else if (item.deviceStatus == 3) {
         obj = {
-          name: '充电中',
           color: 'orange'
         };
       } else if (item.deviceStatus == 0) {
         obj = {
-          name: '离线',
           color: 'grey'
         };
       } else if (item.deviceStatus == 1) {
         obj = {
-          name: '空闲',
           color: 'green'
         };
       } else if (item.deviceStatus == 255) {
         obj = {
-          name: '故障',
           color: 'err'
         };
       }
       return obj;
     },
-    //获取充电桩设备类型
-    getdeviceTypeName: function getdeviceTypeName(type) {
-      //电类型 1:直流设备;2:交流设备3:交直流一体设备;4:无线设备;5:其他
-      var str = "";
-      switch (type) {
-        case "1":
-          str = "直流设备";
-          break;
-        case "2":
-          str = "交流设备";
-          break;
-        case "3":
-          str = "交直流一体设备";
-          break;
-        case "4":
-          str = "无线设备";
-          break;
-        case "5":
-          str = "其他";
-          break;
-      }
-      return str;
-    },
     //映射 峰  平  谷
     getPriceLable: function getPriceLable(type) {
       //时间类型 1 谷 2 平 3 峰
@@ -466,14 +407,14 @@ var _default = {
     },
     //扫一扫
     sacn: function sacn() {
-      var _this3 = this;
+      var _this4 = this;
       this.$app.act.scan().then(function (res) {
-        var paramObj = _this3.getUrlParams(res.result);
+        var paramObj = _this4.getUrlParams(res.result);
         if (!paramObj || !paramObj.connectorCode) {
-          _this3.$app.popup.alert("二维码不正确。", "温馨提示!");
+          _this4.$app.popup.alert("二维码不正确。", "温馨提示!");
           return;
         }
-        _this3.getDeviceInfo(paramObj.connectorCode);
+        _this4.getDeviceInfo(paramObj.connectorCode);
       });
     },
     getUrlParams: function getUrlParams(url) {
@@ -487,12 +428,12 @@ var _default = {
     },
     //通过充电桩编码(sn)获取设备详情
     getDeviceInfo: function getDeviceInfo(sn) {
-      var _this4 = this;
+      var _this5 = this;
       this.$api.base("post", "/chargeApi/checkDevicesBySn", {
         "sn": sn
       }, {}).then(function (res) {
         console.log("设备信息:", res);
-        _this4.goTerminal(res.device);
+        _this5.goTerminal(res.device);
       });
     }
   }

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
unpackage/dist/dev/mp-weixin/pages/site-more/site-more.wxml


+ 13 - 1
unpackage/dist/dev/mp-weixin/pages/site/site.js

@@ -334,6 +334,18 @@ exports.default = void 0;
 //
 //
 //
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
 var _default = {
   onLoad: function onLoad(option) {
     console.log(option); //打印出上个页面传递的参数。
@@ -390,7 +402,7 @@ var _default = {
     getStationsInfo: function getStationsInfo() {
       var _this2 = this;
       this.$api.base("post", "/chargeApi/getStationsInfoAndUpdateDecice", {
-        "stationId": this.stationInfo.id
+        "stationId": this.stationInfo.stationId
       }, {}).then(function (res) {
         _this2.deviceList = res.devices;
         _this2.timePricesList = res.prices;

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
unpackage/dist/dev/mp-weixin/pages/site/site.wxml


+ 2 - 2
unpackage/dist/dev/mp-weixin/static/js/config.js

@@ -11,8 +11,8 @@ config.url = {
   // request : 'http://192.168.110.3:80/',
   // request : 'http://192.168.1.253:80/',
   // request : 'http://120.78.228.211:8866/',
-  request: "http://192.168.0.11:8989/",
-  // request: "http://192.168.0.217:8989/",
+  // request: "http://192.168.0.11:8989/",
+  request: "http://192.168.0.217:8989/",
   // request : 'https://charge.dev.hub.zswlgz.com/',
   // 上传地址
   upload: "http://127.0.0.1:3000/upload/",

Някои файлове не бяха показани, защото твърде много файлове са промени