Forráskód Böngészése

feat(pages): 更新反馈页面与充电站信息展示逻辑

- 修改 feedback-reply 页面,调整 API 接口路径为 /applet/v1/user/myFeedback
- 更新 feedback 页面字段映射,将 problemDescribe 改为 description、filesUrl 改为 images
- 修改优惠券购买页支付请求 URL 格式,使用 orderId 作为路径参数
- 调整地图页面站点信息展示字段,如 stationName、distance、fastCharging 等
- 优化地图标记点击事件处理逻辑,通过 stationId 匹配选中站点
- 更新个人中心微信手机号授权登录流程,增加 uni.login 获取 code
- 优化 new-site 页面样式代码排版,统一缩进风格
- 微调 ax-body 组件模板结构及样式细节,增强可读性
zouzexu 1 hete
szülő
commit
44e7d3f34f
48 módosított fájl, 1246 hozzáadás és 1238 törlés
  1. 31 25
      components/ax-body/ax-body.vue
  2. 1 3
      pages/coupon-buy/coupon-buy.vue
  3. 46 43
      pages/feedback-reply/feedback-reply.vue
  4. 96 90
      pages/feedback/feedback.vue
  5. 11 11
      pages/index/index.vue
  6. 25 26
      pages/map/map.vue
  7. 22 12
      pages/my/my.vue
  8. 435 406
      pages/new-site/new-site.css
  9. 351 359
      pages/new-site/new-site.vue
  10. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map
  11. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/app-navigation/app-navigation.js.map
  12. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/ax-body/ax-body.js.map
  13. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/ax-custom-title/ax-custom-title.js.map
  14. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/ax-ios-indicator/ax-ios-indicator.js.map
  15. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/ax-popup/ax-popup.js.map
  16. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/banner-page/banner-page.js.map
  17. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/charging/charging.js.map
  18. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/coupon-buy/coupon-buy.js.map
  19. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/coupons/coupons.js.map
  20. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/feedback-reply/feedback-reply.js.map
  21. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/feedback/feedback.js.map
  22. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map
  23. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/login/login.js.map
  24. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/map/map.js.map
  25. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/my.js.map
  26. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/new-site/new-site.js.map
  27. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/order-detail/order-detail.js.map
  28. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/order/order.js.map
  29. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/recharge-log/recharge-log.js.map
  30. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/search/search.js.map
  31. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/site-more/site-more.js.map
  32. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/site/site.js.map
  33. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/terminal/terminal.js.map
  34. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/lime-painter/components/l-painter/l-painter.js.map
  35. 4 0
      unpackage/dist/dev/mp-weixin/components/ax-body/ax-body.js
  36. 3 3
      unpackage/dist/dev/mp-weixin/components/ax-body/ax-body.wxss
  37. 1 3
      unpackage/dist/dev/mp-weixin/pages/coupon-buy/coupon-buy.js
  38. 4 1
      unpackage/dist/dev/mp-weixin/pages/feedback-reply/feedback-reply.js
  39. 3 0
      unpackage/dist/dev/mp-weixin/pages/feedback-reply/feedback-reply.wxss
  40. 26 22
      unpackage/dist/dev/mp-weixin/pages/feedback/feedback.js
  41. 0 0
      unpackage/dist/dev/mp-weixin/pages/feedback/feedback.wxml
  42. 23 25
      unpackage/dist/dev/mp-weixin/pages/index/index.js
  43. 17 30
      unpackage/dist/dev/mp-weixin/pages/map/map.js
  44. 0 0
      unpackage/dist/dev/mp-weixin/pages/map/map.wxml
  45. 23 13
      unpackage/dist/dev/mp-weixin/pages/my/my.js
  46. 75 117
      unpackage/dist/dev/mp-weixin/pages/new-site/new-site.js
  47. 0 0
      unpackage/dist/dev/mp-weixin/pages/new-site/new-site.wxml
  48. 49 49
      unpackage/dist/dev/mp-weixin/pages/new-site/new-site.wxss

+ 31 - 25
components/ax-body/ax-body.vue

@@ -1,49 +1,55 @@
 <template>
 	<view class="ax ax-body" :style="[StyleSheet]">
-		<ax-custom-title v-if="$slots.title" @display="$emit('display',$event)"><slot name="title"></slot></ax-custom-title>
-		<ax-custom-title v-else @display="$emit('display',$event)"></ax-custom-title>
-		<view class="__root"><slot></slot></view>
-		<ax-ios-indicator v-if="hideIndicatorArea==false"></ax-ios-indicator>
+		<ax-custom-title v-if="$slots.title" @display="$emit('display', $event)">
+			<slot name="title"></slot>
+		</ax-custom-title>
+		<ax-custom-title v-else @display="$emit('display', $event)"></ax-custom-title>
+		<view class="__root">
+			<slot></slot>
+		</view>
+		<ax-ios-indicator v-if="hideIndicatorArea == false"></ax-ios-indicator>
 	</view>
 </template>
 
 <script>
-	export default {
-		name:"ax-body",
-		props:{
-			// 两侧留白范围
-			blank:{type:[Number,String],default:10},
-			// 隐藏指示器范围占位
-			hideIndicatorArea:{type:Boolean,default:false}
-		},
-		mounted() {
-			uni.createSelectorQuery().in(this).select(".__root").boundingClientRect((data) => {
-				if(data) this.$emit('init',data);
-			}).exec();
-		},
-		computed:{
-			StyleSheet(){
-				return {
-					'--blank': `${Number(this.blank) || 0}px`
-				}
+export default {
+	name: "ax-body",
+	props: {
+		// 两侧留白范围
+		blank: { type: [Number, String], default: 10 },
+		// 隐藏指示器范围占位
+		hideIndicatorArea: { type: Boolean, default: false }
+	},
+	mounted() {
+		uni.createSelectorQuery().in(this).select(".__root").boundingClientRect((data) => {
+			if (data) this.$emit('init', data);
+		}).exec();
+	},
+	computed: {
+		StyleSheet() {
+			return {
+				'--blank': `${Number(this.blank) || 0}px`
 			}
 		}
 	}
+}
 </script>
 
 <style>
-.ax-body{
+.ax-body {
 	display: flex;
 	flex-direction: column;
 	height: 100%;
 }
-.ax-body .__root{
+
+.ax-body .__root {
 	flex: 1;
 	overflow: auto;
 	padding-left: var(--blank) !important;
 	padding-right: var(--blank) !important;
 }
-ax-custom-title{
+
+ax-custom-title {
 	position: relative;
 	z-index: 99999999;
 }

+ 1 - 3
pages/coupon-buy/coupon-buy.vue

@@ -153,9 +153,7 @@ export default {
 			}, {}).then(addRes => {
 				console.log(addRes, '创建订单返回');
 				if (addRes.data.orderId) {
-					this.$api.base("put", "/applet/v1/order/payOrder", {
-						orderId: addRes.orderId
-					}, {}).then(res => {
+					this.$api.base("put", `/applet/v1/order/payOrder/${addRes.data.orderId}`, {}, {}).then(res => {
 						var payInfo = JSON.parse(res.wx.wx.pay_info)
 						uni.requestPayment({
 							provider: 'wxpay',

+ 46 - 43
pages/feedback-reply/feedback-reply.vue

@@ -1,22 +1,25 @@
 <template>
 	<ax-body>
-		<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 app-hide-scrollbar root">
 			<view v-if="list.data.length" class="list">
-				<view v-for="(item,index) in list.data" :key="index" class="item">
+				<view v-for="(item, index) in list.data" :key="index" class="item">
 					<view class="mask"></view>
 					<view class="mask-box">
-						<view>{{item.createTime}}</view>
-						<view>{{typesLable(item.problemType)}}</view>
+						<view>{{ item.createTime }}</view>
+						<view>{{ typesLable(item.problemType) }}</view>
 					</view>
 					<view class="card">
 						<view>
-							<text>{{item.problemDescribe}}</text>
-							<text v-if="item.filesUrl" @click="previewImage(item.filesUrl.split(','))" class="item-pic">查看附件</text>
+							<text>{{ item.problemDescribe }}</text>
+							<text v-if="item.filesUrl" @click="previewImage(item.filesUrl.split(','))"
+								class="item-pic">查看附件</text>
 						</view>
 						<view v-if="item.reply" class="reply">
 							<text class="start-label">答复:</text>
-							<text>{{item.reply}}</text>
+							<text>{{ item.reply }}</text>
 						</view>
 					</view>
 				</view>
@@ -30,45 +33,45 @@
 </template>
 
 <script>
-	export default {
-		data() {
-			return {
-				list:{
-					data: [],
-					total: 10
-				},
-				types:[{name:'投诉吐槽',value:1},{name:'功能异常',value:2},{name:'体验问题',value:3},{name:'功能建议',value:3},{name:'其他',value:9}]
-			}
-		},
-		onShow() {
-			this.loadListData();
-		},
-		methods: {
-			loadListData(){
-				
-				this.$api.base("post","/userApi/getMyFeekBack",{},{}).then(res=>{
-					this.list.data = res.list
-				})
-				
-			},
-			typesLable(val){
-				if(!this.types.length) return '';
-				var item = this.types.find(i=>i.value==val);
-				return item.name || '';
-			},
-			previewImage(url){
-				if(!url) return;
-				console.log(this.$config.url.request)
-				var newUrl = new Array()
-				url.forEach(i=>{
-					newUrl.push(this.$config.url.request+i)
-				})
-				console.log(newUrl)
-				
-				uni.previewImage({urls:newUrl, indicator:'none'});
+export default {
+	data() {
+		return {
+			list: {
+				data: [],
+				total: 10
 			},
+			types: [{ name: '投诉吐槽', value: 1 }, { name: '功能异常', value: 2 }, { name: '体验问题', value: 3 }, { name: '功能建议', value: 3 }, { name: '其他', value: 9 }]
 		}
+	},
+	onShow() {
+		this.loadListData();
+	},
+	methods: {
+		loadListData() {
+
+			this.$api.base("get", "/applet/v1/user/myFeedback", {}, {}).then(res => {
+				this.list.data = res.list
+			})
+
+		},
+		typesLable(val) {
+			if (!this.types.length) return '';
+			var item = this.types.find(i => i.value == val);
+			return item.name || '';
+		},
+		previewImage(url) {
+			if (!url) return;
+			console.log(this.$config.url.request)
+			var newUrl = new Array()
+			url.forEach(i => {
+				newUrl.push(this.$config.url.request + i)
+			})
+			console.log(newUrl)
+
+			uni.previewImage({ urls: newUrl, indicator: 'none' });
+		},
 	}
+}
 </script>
 
 <style>

+ 96 - 90
pages/feedback/feedback.vue

@@ -1,46 +1,54 @@
 <template>
 	<ax-body title="">
-		<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 app-hide-scrollbar">
 			<view class="top">
 				<view class="app-flex-one">
 					<view class="title">意见反馈</view>
 					<view class="subtitle">感谢您的每一条建议或反馈~</view>
 				</view>
-				<view class="em" style="font-size: 14px;" @click="$app.url.goto('/pages/feedback-reply/feedback-reply')">查看反馈</view>
+				<view class="em" style="font-size: 14px;"
+					@click="$app.url.goto('/pages/feedback-reply/feedback-reply')">查看反馈</view>
 			</view>
-			
+
 			<view class="card form-type">
 				<view class="lable required">请选择问题</view>
 				<view class="content">
-					<view v-for="(item,index) in types.data" :key="index" class="tag" :class="{active:types.index==index}" @click="onTag(item,index)">{{item.name}}</view>
+					<view v-for="(item, index) in types.data" :key="index" class="tag"
+						:class="{ active: types.index == index }" @click="onTag(item, index)">{{ item.name }}</view>
 				</view>
 			</view>
-			
+
 			<view class="card form-describe">
 				<view class="lable required">问题描述</view>
 				<view class="content">
-					<textarea placeholder="请输入描述内容" maxlength="500" v-model="saveObj.problemDescribe" placeholder-class="app-placeholder" class="textarea"></textarea>
+					<textarea placeholder="请输入描述内容" maxlength="500" v-model="saveObj.description"
+						placeholder-class="app-placeholder" class="textarea"></textarea>
 				</view>
-				<view class="footer"><text>可输入字数</text><text>{{saveObj.problemDescribe.length}}/500</text></view>
+				<view class="footer"><text>可输入字数</text><text>{{ saveObj.description.length }}/500</text></view>
 			</view>
-			
+
 			<view class="card form-picture">
 				<view class="lable">相关截图或图片</view>
 				<view class="content">
-					<view class="picture view" v-for="(item,index) in upFileUrls" :key="index">
-						<view class="remove" @click="clearUpFile(item)"><text class="ax-iconblock i-cancel icon"></text></view>
+					<view class="picture view" v-for="(item, index) in upFileUrls" :key="index">
+						<view class="remove" @click="clearUpFile(item)"><text class="ax-iconblock i-cancel icon"></text>
+						</view>
 						<image :src="item.temUrl" class="image" mode="aspectFill"></image>
 					</view>
-					<view class="picture" v-if="upFileUrls.length < 4" @click="upFile()"><text class="ax-iconblock i-paizhao icon"></text><text class="name">点击上传</text></view>
+					<view class="picture" v-if="upFileUrls.length < 4" @click="upFile()"><text
+							class="ax-iconblock i-paizhao icon"></text><text class="name">点击上传</text></view>
 				</view>
-				<view class="footer"><text>上传问题截图可以让问题快速解决哦</text><text>{{upFileUrls.length}}/4</text></view>
+				<view class="footer"><text>上传问题截图可以让问题快速解决哦</text><text>{{ upFileUrls.length }}/4</text></view>
 			</view>
-			
+
 			<view class="card form-contact">
 				<view class="lable">联系方式</view>
 				<view class="content">
-					<input placeholder="手机号或邮箱以便我们回复您" v-model="saveObj.contactWay" placeholder-class="app-placeholder" class="input"/>
+					<input placeholder="手机号或邮箱以便我们回复您" v-model="saveObj.contactWay" placeholder-class="app-placeholder"
+						class="input" />
 				</view>
 			</view>
 			<view class="tips">咨询问题可以联系<text class="em">在线客服</text>哦</view>
@@ -50,88 +58,86 @@
 </template>
 
 <script>
-	export default {
-		data() {
-			return {
-				types:{
-					index: -1,
-					data:[{name:'投诉吐槽',value:1},{name:'功能异常',value:2},{name:'体验问题',value:3},{name:'功能建议',value:3},{name:'其他',value:9}]
-				},
-				upFileUrls : [],//上传的图片地址
-				saveObj:{
-					problemType : 9,//问题类型(1投诉吐槽,2功能异常,3体验问题,4功能建议,9其他 )
-					problemDescribe : "",//问题描述
-					filesUrl : "",//相关图片地址
-					contactWay : "",//联系方式(手机号或者邮箱)
-				}
+export default {
+	data() {
+		return {
+			types: {
+				index: -1,
+				data: [{ name: '投诉吐槽', value: 1 }, { name: '功能异常', value: 2 }, { name: '体验问题', value: 3 }, { name: '功能建议', value: 4 }, { name: '其他', value: 9 }]
+			},
+			upFileUrls: [],//上传的图片地址
+			saveObj: {
+				type: 9,//问题类型(1投诉吐槽,2功能异常,3体验问题,4功能建议,9其他 )
+				description: "",//问题描述
+				images: "",//相关图片地址
+				contactWay: "",//联系方式(手机号或者邮箱)
 			}
+		}
+	},
+	methods: {
+		onTag(item, index) {
+			this.types.index = this.types.index == index ? -1 : index;
+			this.saveObj.type = this.types.data[this.types.index].value;
 		},
-		methods: {
-			onTag(item,index){
-				this.types.index = this.types.index==index ? -1 : index;
-				this.saveObj.problemType = this.types.data[this.types.index].value;
-			},
-			//删除上传的图片
-			clearUpFile(item){
-				this.upFileUrls = this.upFileUrls.filter(obj => obj.temUrl != item.temUrl);
-			},
-			//上次图片
-			upFile(){
-				var _this = this;
-				uni.chooseImage({
-					count: 6, //默认9
-					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
-					sourceType: ['album'], //从相册选择
-					success: function (res) {
-						console.log(res)
-						console.log(JSON.stringify(res.tempFilePaths));
-						uni.uploadFile({
-									url: _this.$config.url.request+"userApi/upFile", //仅为示例,非真实的接口地址
-									filePath: res.tempFilePaths[0],
-									name: 'file',
-									formData: {
-										'user': 'test',//额外参数
-									},
-									success: (uploadFileRes) => {
-										var upObj = JSON.parse(uploadFileRes.data);
-										var tem = {
-											temUrl : res.tempFilePaths[0],
-											url : upObj.fileUrl
-										}
-										_this.upFileUrls.push(tem);
-										console.log(upObj);
-									}
-								});
-					}
-				});
-				
-			},
-			//保存意见反馈
-			saveFeeback(){
-				if(this.types.index == -1){
-					this.$app.popup.alert("请选择一个问题。","温馨提示");
-					return;
-				}
-				if(!this.saveObj.problemDescribe){
-					this.$app.popup.alert("请填写您意见或建议。","温馨提示");
-					return;
-				}
-				if(this.saveObj.problemDescribe.length > 500){
-					this.$app.popup.alert("问题描述只能填写500字以内。","温馨提示");
-					return;
+		//删除上传的图片
+		clearUpFile(item) {
+			this.upFileUrls = this.upFileUrls.filter(obj => obj.temUrl != item.temUrl);
+		},
+		//上次图片
+		upFile() {
+			var _this = this;
+			uni.chooseImage({
+				count: 6, //默认9
+				sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
+				sourceType: ['album'], //从相册选择
+				success: function (res) {
+					console.log(JSON.stringify(res.tempFilePaths));
+					uni.uploadFile({
+						url: _this.$config.url.request + "api/v1/files",
+						filePath: res.tempFilePaths[0],
+						name: 'file',
+						header: {
+							'Authorization': "Bearer " + _this.$app.storage.get("ACCESS_TOKEN"),
+							'Content-Type': 'multipart/form-data'
+						},
+						success: (uploadFileRes) => {
+							var imgUrl = JSON.parse(uploadFileRes.data);
+							var tem = {
+								temUrl: res.tempFilePaths[0],
+								url: imgUrl.data.url
+							}
+							_this.upFileUrls.push(tem);
+							_this.saveObj.images = _this.upFileUrls.map(item => item.url).join(',');
+						}
+					});
 				}
-				this.saveObj.filesUrl = this.upFileUrls.map(obj=>obj.url).join(",");
-				var obj = this.saveObj;
-				this.$api.base("post","/userApi/addUserFeedback",obj,{}).then(res=>{
-					console.log("设备信息:",res)
-					this.$app.popup.confirm("感谢您的反馈。","温馨提示",{showCancel:false}).then(cRes=>{
-						this.$app.url.back()
-					})
-				})
+			});
+
+		},
+		//保存意见反馈
+		saveFeeback() {
+			if (this.types.index == -1) {
+				this.$app.popup.alert("请选择一个问题。", "温馨提示");
+				return;
+			}
+			if (!this.saveObj.description) {
+				this.$app.popup.alert("请填写您意见或建议。", "温馨提示");
+				return;
+			}
+			if (this.saveObj.description.length > 500) {
+				this.$app.popup.alert("问题描述只能填写500字以内。", "温馨提示");
+				return;
 			}
-		
+			var obj = this.saveObj;
+			this.$api.base("post", "/applet/v1/user/addUserFeedback", obj, {}).then(res => {
+				this.$app.popup.confirm("感谢您的反馈。", "温馨提示", { showCancel: false }).then(cRes => {
+					this.$app.url.back()
+				})
+			})
 		}
+
 	}
+}
 </script>
 
 <style scoped>

+ 11 - 11
pages/index/index.vue

@@ -570,12 +570,12 @@ export default {
 			});
 			// #endif
 		},
-		get_paymentMsg() {
-			// maspStatus(1:待补缴,2:已补缴)realPredictServiceCost平台;maspAmount第三方
-			this.$api.base("post", "/chargeApi/queryOrderList-arrearage", {}, {}).then(res => {
-				this.payment_msg = res.data
-			})
-		},
+		// get_paymentMsg() {
+		// 	// maspStatus(1:待补缴,2:已补缴)realPredictServiceCost平台;maspAmount第三方
+		// 	this.$api.base("post", "/chargeApi/queryOrderList-arrearage", {}, {}).then(res => {
+		// 		this.payment_msg = res.data
+		// 	})
+		// },
 		getBanners() {
 			this.$api.base("get", "/applet/v1/homePage/getBannerList", {}, {}).then(res => {
 				this.banners = res.data
@@ -583,11 +583,11 @@ export default {
 
 			})
 		},
-		getAdswiper() {
-			this.$api.base("post", "/userApi/getAdvertising", {}, {}).then(res => {
-				this.adBanner = res.banners
-			})
-		},
+		// getAdswiper() {
+		// 	this.$api.base("post", "/userApi/getAdvertising", {}, {}).then(res => {
+		// 		this.adBanner = res.banners
+		// 	})
+		// },
 		convertBdToTx(lng, lat) {
 			// 百度坐标系(BD09)转火星坐标系(GCJ-02,即腾讯地图使用的坐标系)  
 			// 这里的转换公式是基于经验公式,可能存在一定的误差  

+ 25 - 26
pages/map/map.vue

@@ -42,48 +42,44 @@
 							<view class="icon">
 								<image src="@/static/img/plug.svg" mode="widthFix"></image>
 							</view>
-							<view class="txt">{{ list.data[list.index].name }}</view>
+							<view class="txt">{{ list.data[list.index].stationName }}</view>
 						</view>
 						<view class="distance">
 							<view class="icon">
 								<image src="@/static/img/distance.svg" mode="widthFix"></image>
 							</view>
-							<text>{{ list.data[list.index].params.rangeShow }}</text>
+							<text>{{ list.data[list.index].distance }}km</text>
 						</view>
 					</view>
 					<view class="ec-name">{{ list.data[list.index].equipmentOwnerName }}</view>
 					<view class="app-flex c-between info">
 						<view class="charge">
 							<view class="icon">快充</view>
-							<view><text class="value">{{ list.data[list.index].params.emptyFast }}</text><text
-									class="max">{{
-										list.data[list.index].params.totalFast }}</text></view>
+							<view><text class="value">{{ list.data[list.index].fastCharging }}</text></view>
 						</view>
 						<view class="charge purple">
 							<view class="icon">慢充</view>
-							<view><text class="value">{{ list.data[list.index].params.emptySlow }}</text><text
-									class="max">{{
-										list.data[list.index].params.totalSlow }}</text></view>
+							<view><text class="value">{{ list.data[list.index].slowCharging }}</text></view>
 						</view>
 						<view class="charge blue">
 							<view class="icon">停车</view>
-							<view><text class="value">3</text><text class="max">h</text></view>
+							<view><text class="value">{{ list.data[list.index].parkingFee || '0' }}</text><text
+									class="max">h</text></view>
 						</view>
 					</view>
 					<view class="price">
 						<view class="app-flex middle" style="color: #FF5D50;">
-							<text class="value">{{ (list.data[list.index] && list.data[list.index].params.nowPrice) ?
-								list.data[list.index].params.nowPrice.toFixed(4) : '0.0000' }}</text>
+							<text class="value">{{ list.data[list.index].platformPrice }}</text>
 							<text class="unit">元/度</text>
 						</view>
-						<view>{{ list.data[list.index].params.priceShow }}</view>
+						<view>{{ list.data[list.index].peakValue }}{{ list.data[list.index].peakTime }}</view>
 					</view>
 					<view class="parkade">
 						<view class="icon">
 							<image src="@/static/img/parkade.svg" mode="widthFix"></image>
 						</view>
 						<!-- <view class="txt" v-html="list.data[list.index].parkTips"></view> -->
-						<view class="txt">充电减免2小时停车费,超出时长部分计时收费</view>
+						<view class="txt">{{ list.data[list.index].tips }}</view>
 					</view>
 				</view>
 				<view :style="{ height: `${footPad}px` }"></view>
@@ -137,6 +133,7 @@ export default {
 			const markers = this.list.data.map((i, index) => {
 				const marker = {
 					...i,
+					id: parseInt(i.stationId) || index,
 					width: index == this.list.index ? 32 : 28,
 					height: index == this.list.index ? 32 : 28,
 					iconPath: '/static/img/marker-icon.png',
@@ -192,27 +189,29 @@ export default {
 				lat = location.split(",")[1]
 			}
 
-			this.$api.base("get", "/applet/v1/homePage/getStationInfoMap", {
+			this.$api.base("get", "/applet/v1/homePage/getStationInfoMapList", {
 				longitude: lng,
 				latitude: lat
 			}, {}).then(res => {
-				res.stationList.forEach(i => {
-					var txPoint = this.convertBdToTx(i.lng, i.lat)
-					i.lng = txPoint.lng
-					i.lat = txPoint.lat
+				res.data.forEach(i => {
+					var txPoint = this.convertBdToTx(i.longitude, i.latitude)
+					i.longitude = txPoint.lng
+					i.latitude = txPoint.lat
 				})
-
-				res.stationList.forEach(i => {
-					i.latitude = i.lat
-					i.longitude = i.lng
-				})
-				this.list.data = res.stationList
+				this.list.data = res.data
 			})
 		},
 		// 点击标记
 		markertap(e) {
-			this.list.index = this.list.data.findIndex(i => i.id == e.detail.markerId);
-			this.$refs.site.open();
+			console.log(e.detail.markerId, '点击的标记事件');
+			const selectedItem = this.list.data.find(i => parseInt(i.stationId) === e.detail.markerId);
+			if (selectedItem) {
+				this.list.index = this.list.data.indexOf(selectedItem);
+				console.log(this.list.data[this.list.index], '点击的标记');
+				this.$refs.site.open();
+			} else {
+				console.log('未找到匹配的标记点');
+			}
 		},
 		// 关闭站点信息
 		onClosed() {

+ 22 - 12
pages/my/my.vue

@@ -289,18 +289,28 @@ export default {
 			}
 		},
 		onGetPhoneNumber(e) {
-			if (e.detail.code) {
-				this.$api.base("post", '/api/v1/auth/wx/miniapp/phone-code-login', {
-					code: e.detail.code
-				}).then(res => {
-					console.log(res);
-					uni.setStorageSync($config.keyname.accessToken, res?.data?.accessToken);
-					uni.setStorageSync($config.keyname.refreshToken, res?.data?.refreshToken);
-					this.$app.storage.set('USER_INFO', res.data);
-					this.getMyAccount();
-					this.get_firmId()
-				});
-			}
+			uni.login({
+				provider: 'weixin',
+				success: (result) => {
+					console.log(result, '微信登录');
+					if (result.code) {
+						if (e.detail.code) {
+							this.$api.base("post", '/api/v1/auth/wx/miniapp/phone-code-login', {
+								code: result.code,
+								phoneCode: e.detail.code
+							}).then(res => {
+								console.log(res);
+								uni.setStorageSync($config.keyname.accessToken, res?.data?.accessToken);
+								uni.setStorageSync($config.keyname.refreshToken, res?.data?.refreshToken);
+								this.$app.storage.set('USER_INFO', res.data);
+								this.getMyAccount();
+								this.get_firmId()
+							});
+						}
+					}
+				},
+				fail: (error) => { }
+			})
 
 		},
 	}

+ 435 - 406
pages/new-site/new-site.css

@@ -1,644 +1,673 @@
 ax-body {
-	display: block;
-	height: 100%;
-	background: #F6FAFF;
+  display: block;
+  height: 100%;
+  background: #f6faff;
 }
 .site-body {
-	position: relative;
+  position: relative;
 }
 
 .top-banner {
-	position: fixed;
-	top: 0;
-	left: 0;
-	right: 0;
-	z-index: 0;
-	width: 100%;
-	height: 520rpx;
-	/* position: relative; */
+  position: fixed;
+  top: 0;
+  left: 0;
+  right: 0;
+  z-index: 0;
+  width: 100%;
+  height: 520rpx;
+  /* position: relative; */
 }
 
 .banner-swiper {
-	width: 100%;
-	height: 520rpx;
+  width: 100%;
+  height: 520rpx;
 }
 
 .banner-swiper-item {
-	width: 100%;
-	height: 100%;
-}
-.swiper-current{
-	position: absolute;
-	width: 72rpx;
-	height: 34rpx;
-	background: rgba(255, 255, 255, 0.5);
-	border-radius: 18rpx;
-	font-size: 24rpx;
-	color: #FFFFFF;
-	text-align: center;
-	line-height: 34rpx;
-	right: 20rpx;
-	bottom: 40rpx;
+  width: 100%;
+  height: 100%;
+}
+.swiper-current {
+  position: absolute;
+  width: 72rpx;
+  height: 34rpx;
+  background: rgba(255, 255, 255, 0.5);
+  border-radius: 18rpx;
+  font-size: 24rpx;
+  color: #ffffff;
+  text-align: center;
+  line-height: 34rpx;
+  right: 20rpx;
+  bottom: 40rpx;
 }
 .swiper-item-image {
-	width: 100%;
-	height: 100%;
+  width: 100%;
+  height: 100%;
 }
 
 .site-content {
-	width: 100%;
-	position: absolute;
-	top: 320rpx;
-	background: linear-gradient(180deg, #ffffff 0%, #f6faff 82%, #f6faff 100%);
-	border-radius: 32rpx 32rpx 0rpx 0rpx;
-	padding: 0 20rpx 0 20rpx;
+  width: 100%;
+  position: absolute;
+  top: 320rpx;
+  background: linear-gradient(180deg, #ffffff 0%, #f6faff 82%, #f6faff 100%);
+  border-radius: 32rpx 32rpx 0rpx 0rpx;
+  padding: 0 20rpx 0 20rpx;
 }
 
 .top-site-info {
-	margin-top: 28rpx;
+  margin-top: 28rpx;
 }
 
 .site-title {
-	font-weight: 800;
-	font-size: 32rpx;
-	color: #2b303a;
+  font-weight: 800;
+  font-size: 32rpx;
+  color: #2b303a;
 }
 
 .site-text {
-	display: flex;
-	align-items: center;
-	gap: 16rpx;
-	font-size: 24rpx;
-	color: #aaaaaa;
-	margin-top: 20rpx;
+  display: flex;
+  align-items: center;
+  gap: 16rpx;
+  font-size: 24rpx;
+  color: #aaaaaa;
+  margin-top: 20rpx;
 }
 
 .site-text .icon {
-	width: 30rpx;
-	height: 30rpx;
+  width: 30rpx;
+  height: 30rpx;
 }
 
 .site-location {
-	background: url("@/static/img/site-bg01.png");
-	background-size: cover;
-	background-position: center;
-	display: flex;
-	align-items: center;
-	justify-content: space-between;
-	padding: 20rpx;
-	margin-top: 20rpx;
+  background: url("@/static/img/site-bg01.png");
+  background-size: cover;
+  background-position: center;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  padding: 20rpx;
+  margin-top: 20rpx;
 }
 
 .location-left .left-km {
-	font-weight: bold;
-	font-size: 28rpx;
-	color: #2b303a;
+  font-weight: bold;
+  font-size: 28rpx;
+  color: #2b303a;
 }
 
 .location-left .left-address {
-	margin-top: 10rpx;
-	font-size: 24rpx;
-	color: #aaaaaa;
+  margin-top: 10rpx;
+  font-size: 24rpx;
+  color: #aaaaaa;
 }
 
 .location-rihgt {
-	text-align: center;
-	font-size: 24rpx;
-	color: #181818;
+  text-align: center;
+  font-size: 24rpx;
+  color: #181818;
 }
 
 .location-rihgt .right-icon {
-	width: 40rpx;
-	height: 40rpx;
+  width: 40rpx;
+  height: 40rpx;
 }
 
 .site-cost-info {
-	background: #ffffff;
-	border-radius: 16rpx;
-	padding: 20rpx;
-	margin-top: 20rpx;
+  background: #ffffff;
+  border-radius: 16rpx;
+  padding: 20rpx;
+  margin-top: 20rpx;
 }
 
 .cost-info-title {
-	display: flex;
-	align-items: center;
-	justify-content: space-between;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
 }
 
 .cost-info-title .title-name {
-	font-weight: bold;
-	font-size: 32rpx;
-	color: #2b303a;
+  font-weight: bold;
+  font-size: 32rpx;
+  color: #2b303a;
 }
 
 .cost-info-title .check-info {
-	display: flex;
-	align-items: center;
-	gap: 10rpx;
-	font-size: 24rpx;
-	color: #aaaaaa;
+  display: flex;
+  align-items: center;
+  gap: 10rpx;
+  font-size: 24rpx;
+  color: #aaaaaa;
 }
 
 .cost-price-info {
-	margin-top: 24rpx;
-	width: 654rpx;
-	height: 240rpx;
-	background: linear-gradient(90deg,
-			#fee4c6 0%,
-			rgba(251, 235, 198, 0.23) 100%);
-	border-radius: 16rpx;
+  margin-top: 24rpx;
+  width: 654rpx;
+  height: 240rpx;
+  background: linear-gradient(
+    90deg,
+    #fee4c6 0%,
+    rgba(251, 235, 198, 0.23) 100%
+  );
+  border-radius: 16rpx;
 }
 
 .cost-price-info .cost-title {
-	display: flex;
-	align-items: center;
-	justify-content: space-between;
-	position: relative;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  position: relative;
 }
 
 .cost-title .title-left {
-	font-weight: bold;
-	font-size: 28rpx;
-	color: #2b303a;
-	margin-left: 20rpx;
+  font-weight: bold;
+  font-size: 28rpx;
+  color: #2b303a;
+  margin-left: 20rpx;
 }
 
 .cost-title .title-right {
-	width: 125rpx;
-	height: 52rpx;
-	font-weight: bold;
-	font-size: 28rpx;
-	color: #ffffff;
-	text-align: center;
-	line-height: 52rpx;
-	border-radius: 0rpx 16rpx 0rpx 40rpx;
-	background: linear-gradient(90deg, #f32027 0%, #f67014 100%);
+  width: 125rpx;
+  height: 52rpx;
+  font-weight: bold;
+  font-size: 28rpx;
+  color: #ffffff;
+  text-align: center;
+  line-height: 52rpx;
+  border-radius: 0rpx 16rpx 0rpx 40rpx;
+  background: linear-gradient(90deg, #f32027 0%, #f67014 100%);
 }
 
 .cost-price {
-	display: flex;
-	align-items: center;
-	gap: 10rpx;
-	margin-left: 20rpx;
+  display: flex;
+  align-items: center;
+  gap: 10rpx;
+  margin-left: 20rpx;
 }
 
 .cost-price .cost-price-text {
-	font-weight: 800;
-	font-size: 48rpx;
-	color: #ff6464;
+  font-weight: 800;
+  font-size: 48rpx;
+  color: #ff6464;
 }
 
 .cost-price .cost-price-unit {
-	font-size: 24rpx;
-	color: #2b303a;
+  margin-top: 16rpx;
+  font-size: 24rpx;
+  color: #2b303a;
 }
 
 .time-cost-price {
-	margin-top: 12rpx;
-	font-size: 28rpx;
-	color: #2b303a;
-	margin-left: 20rpx;
+  margin-top: 12rpx;
+  font-size: 28rpx;
+  color: #2b303a;
+  margin-left: 20rpx;
 }
 
 .time-cost-number {
-	font-size: 28rpx;
-	color: #2b303a;
-	margin-left: 20rpx;
-	margin-top: 12rpx;
+  font-size: 28rpx;
+  color: #2b303a;
+  margin-left: 20rpx;
+  margin-top: 12rpx;
 }
 
 .firm-price-info-box {
-	margin-top: 24rpx;
-	display: flex;
-	align-items: center;
-	justify-content: space-between;
+  margin-top: 24rpx;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
 }
 
 .current-price-info {
-	width: 316rpx;
-	background: #f6faff;
-	border-radius: 16rpx;
-	clip-path: polygon(0 0, 100% 0, 89% 100%, 0 100%);
-	padding: 20rpx;
+  width: 316rpx;
+  background: #f6faff;
+  border-radius: 16rpx;
+  clip-path: polygon(0 0, 100% 0, 89% 100%, 0 100%);
+  padding: 20rpx;
 }
 
 .current-price-title {
-	font-weight: bold;
-	font-size: 28rpx;
-	color: #2b303a;
+  font-weight: bold;
+  font-size: 28rpx;
+  color: #2b303a;
 }
 
 .current-price {
-	display: flex;
-	align-items: center;
-	gap: 8rpx;
-	margin-top: 20rpx;
+  display: flex;
+  align-items: center;
+  gap: 8rpx;
+  margin-top: 20rpx;
 }
 
 .current-price .current-price-text {
-	font-weight: 800;
-	font-size: 48rpx;
-	color: #ff6464;
+  font-weight: 800;
+  font-size: 48rpx;
+  color: #ff6464;
 }
 
 .current-price .current-price-unit {
-	font-size: 24rpx;
-	color: #2b303a;
+  margin-top: 16rpx;
+  font-size: 24rpx;
+  color: #2b303a;
 }
 
 .time-current-price {
-	font-size: 28rpx;
-	color: #2b303a;
-	margin-top: 12rpx;
+  font-size: 28rpx;
+  color: #2b303a;
+  margin-top: 12rpx;
 }
 
 .time-current-number {
-	font-size: 28rpx;
-	color: #2b303a;
-	margin-top: 20rpx;
-	margin-bottom: 12rpx;
+  font-size: 28rpx;
+  color: #2b303a;
+  margin-top: 20rpx;
+  margin-bottom: 12rpx;
 }
 
 .firm-price-info {
-	width: 346rpx;
-	padding: 20rpx;
-	background: linear-gradient(90deg,
-			#fee4c6 0%,
-			rgba(251, 235, 198, 0.23) 100%);
-	clip-path: polygon(8% 0, 100% 0, 100% 100%, 0 100%);
-	border-radius: 16rpx;
+  width: 346rpx;
+  padding: 20rpx;
+  background: linear-gradient(
+    90deg,
+    #fee4c6 0%,
+    rgba(251, 235, 198, 0.23) 100%
+  );
+  clip-path: polygon(8% 0, 100% 0, 100% 100%, 0 100%);
+  border-radius: 16rpx;
 }
 
 .firm-border {
-	width: 30rpx;
-	height: 30rpx;
-	background: #3eb6f8;
-	border-radius: 50%;
-	position: absolute;
-	z-index: 9999;
-	top: -20rpx;
+  width: 30rpx;
+  height: 30rpx;
+  background: #3eb6f8;
+  border-radius: 50%;
+  position: absolute;
+  z-index: 9999;
+  top: -20rpx;
 }
 
 .firm-price-title {
-	display: flex;
-	align-items: center;
-	justify-content: space-between;
-	position: relative;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  position: relative;
 }
 
 .firm-price-title .title-text {
-	font-weight: bold;
-	font-size: 28rpx;
-	color: #f43921;
-	margin-left: 20rpx;
+  font-weight: bold;
+  font-size: 28rpx;
+  color: #f43921;
+  margin-left: 20rpx;
 }
 
 .tags-price {
-	position: absolute;
-	right: -20rpx;
-	top: -20rpx;
-	width: 125rpx;
-	height: 52rpx;
-	font-weight: bold;
-	font-size: 28rpx;
-	color: #ffffff;
-	text-align: center;
-	line-height: 52rpx;
-	border-radius: 0rpx 16rpx 0rpx 40rpx;
-	background: linear-gradient(90deg, #f32027 0%, #f67014 100%);
+  position: absolute;
+  right: -20rpx;
+  top: -20rpx;
+  width: 125rpx;
+  height: 52rpx;
+  font-weight: bold;
+  font-size: 28rpx;
+  color: #ffffff;
+  text-align: center;
+  line-height: 52rpx;
+  border-radius: 0rpx 16rpx 0rpx 40rpx;
+  background: linear-gradient(90deg, #f32027 0%, #f67014 100%);
 }
 
 .firm-price-box {
-	display: flex;
-	align-items: center;
-	gap: 8rpx;
-	margin-top: 20rpx;
-	margin-left: 20rpx;
+  display: flex;
+  align-items: center;
+  gap: 8rpx;
+  margin-top: 20rpx;
+  margin-left: 20rpx;
 }
 
 .firm-price-text {
-	font-weight: 800;
-	font-size: 48rpx;
-	color: #9b683c;
+  font-weight: 800;
+  font-size: 48rpx;
+  color: #9b683c;
 }
 
 .firm-price-unit {
-	font-size: 24rpx;
-	color: #2b303a;
+  font-size: 24rpx;
+  color: #2b303a;
 }
 
 .current-pay-price-box {
-	display: flex;
-	align-items: center;
-	gap: 40rpx;
-	margin-left: 20rpx;
+  display: flex;
+  align-items: center;
+  gap: 40rpx;
+  margin-left: 20rpx;
 }
 
 .pay-price .firm-old-price {
-	font-size: 28rpx;
-	color: #aaaaaa;
-	text-transform: none;
+  font-size: 28rpx;
+  color: #aaaaaa;
+  text-transform: none;
+  text-decoration: line-through;
 }
 
 .pay-price .discount-price {
-	font-weight: bold;
-	font-size: 28rpx;
-	color: #ff6464;
-	margin-top: 12rpx;
+  font-weight: bold;
+  font-size: 28rpx;
+  color: #ff6464;
+  margin-top: 12rpx;
 }
 
 .current-pay-price-box .pay-price-icon {
-	width: 58rpx;
-	height: 120rpx;
+  width: 58rpx;
+  height: 120rpx;
 }
 
 .stopcar-tips {
-	display: flex;
-	align-items: center;
-	gap: 20rpx;
-	margin-top: 20rpx;
+  display: flex;
+  align-items: center;
+  gap: 20rpx;
+  margin-top: 20rpx;
 }
 
 .stopcar-tips .stopcar-tips-icon {
-	width: 40rpx;
-	height: 40rpx;
+  width: 40rpx;
+  height: 40rpx;
 }
 
 .stopcar-tips-text {
-	display: flex;
-	align-items: center;
-	gap: 20rpx;
+  display: flex;
+  align-items: center;
+  gap: 20rpx;
 }
 
 .stopcar-tips-text .tips-text-title {
-	font-size: 28rpx;
-	color: #2b303a;
+  font-size: 28rpx;
+  color: #2b303a;
 }
 
 .stopcar-tips-text .tips-text-mini {
-	font-size: 28rpx;
-	color: #aaaaaa;
+  font-size: 28rpx;
+  color: #aaaaaa;
 }
 
 .site-list-card {
-	padding: 20rpx;
-	background: #ffffff;
-	border-radius: 16rpx;
-	margin-top: 20rpx;
+  padding: 20rpx;
+  background: #ffffff;
+  border-radius: 16rpx;
+  margin-top: 20rpx;
 }
 
 .site-select-tab {
-	margin-top: 28rpx;
-	gap: 20rpx;
+  margin-top: 28rpx;
+  gap: 20rpx;
 }
 
 .site-select-tab .select-item {
-	width: 132rpx;
-	height: 56rpx;
-	background: #f6faff;
-	border-radius: 16rpx;
-	font-size: 28rpx;
-	color: #aaaaaa;
-	text-align: center;
-	line-height: 56rpx;
-	transition: opacity 0.3s ease-in-out;
+  width: 132rpx;
+  height: 56rpx;
+  background: #f6faff;
+  border-radius: 16rpx;
+  font-size: 28rpx;
+  color: #aaaaaa;
+  text-align: center;
+  line-height: 56rpx;
+  transition: opacity 0.3s ease-in-out;
 }
 
 .site-select-tab .selectItemActive {
-	width: 132rpx;
-	height: 56rpx;
-	background: #3eb6f8;
-	border-radius: 16rpx;
-	font-size: 28rpx;
-	color: #ffffff;
-	text-align: center;
-	line-height: 56rpx;
-	transition: all 0.3s ease-in-out;
+  width: 132rpx;
+  height: 56rpx;
+  background: #3eb6f8;
+  border-radius: 16rpx;
+  font-size: 28rpx;
+  color: #ffffff;
+  text-align: center;
+  line-height: 56rpx;
+  transition: all 0.3s ease-in-out;
 }
 
 .site-select-tab .selectItemActive::before {
-	opacity: 1;
+  opacity: 1;
 }
 
 .site-list-box {
-	margin-top: 10rpx;
+  margin-top: 10rpx;
+}
+.not-data {
+  text-align: center;
+  color: #aaaaaa;
+  font-size: 14px;
+  margin-top: 20px;
+  height: 80rpx;
 }
-
 .terminal-item {
-	display: flex;
-	align-items: center;
-	justify-content: space-between;
-	background-color: #f6f6f6;
-	border-radius: 8px;
-	height: 78px;
-	padding: 10px;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  background-color: #f6f6f6;
+  border-radius: 8px;
+  height: 78px;
+  padding: 10px;
 }
 
-.terminal-item+.terminal-item {
-	margin-top: 10px;
+.terminal-item + .terminal-item {
+  margin-top: 10px;
 }
 
 .terminal-item .state {
-	display: flex;
-	width: 58px;
-	height: 58px;
-	border-radius: 100%;
-	margin-right: 10px;
-	padding: 4px;
-	background-image: linear-gradient(to right,
-			#ccc 0%,
-			#ccc 35.8%,
-			#c7cccf 65.9%,
-			#e8e8e8 80.4%,
-			#c8c8c8 100%);
+  display: flex;
+  width: 58px;
+  height: 58px;
+  border-radius: 100%;
+  margin-right: 10px;
+  padding: 4px;
+  background-image: linear-gradient(
+    to right,
+    #ccc 0%,
+    #ccc 35.8%,
+    #c7cccf 65.9%,
+    #e8e8e8 80.4%,
+    #c8c8c8 100%
+  );
 }
 
 .terminal-item .state .cake {
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	flex-direction: column;
-	width: 100%;
-	height: 100%;
-	border-radius: 100%;
-	background-color: #eee;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  flex-direction: column;
+  width: 100%;
+  height: 100%;
+  border-radius: 100%;
+  background-color: #eee;
 }
 
 .terminal-item .state .icon {
-	display: block;
-	width: 20px;
-	height: 20px;
+  display: block;
+  width: 20px;
+  height: 20px;
 }
 
 .terminal-item .state .name {
-	font-size: 12px;
-	margin-top: 3px;
+  font-size: 12px;
+  margin-top: 3px;
 }
 
 .terminal-item .info {
-	flex: 1;
+  flex: 1;
 }
 
 .terminal-item .info .name {
-	font-size: 14px;
-	font-weight: bold;
-	margin-bottom: 5px;
+  font-size: 14px;
+  font-weight: bold;
+  margin-bottom: 5px;
 }
 
 .terminal-item .info .subinfo {
-	font-size: 12px;
-	color: #aaa;
+  font-size: 12px;
+  color: #aaa;
 }
 
 .terminal-item .state.green {
-	background-image: linear-gradient(to right,
-			#73e6a0 0%,
-			#3eff8a 30%,
-			#4edc86 60%,
-			#b4ffd1 75%,
-			#6be49a 100%);
+  background-image: linear-gradient(
+    to right,
+    #73e6a0 0%,
+    #3eff8a 30%,
+    #4edc86 60%,
+    #b4ffd1 75%,
+    #6be49a 100%
+  );
 }
 
 .terminal-item .state.green .cake {
-	background-color: #ecfff4;
+  background-color: #ecfff4;
 }
 
 .terminal-item .state.blue {
-	background-image: linear-gradient(to right,
-			#3eb6f8 0%,
-			#81d8ff 35%,
-			#75ceff 65%,
-			#94e2ff 80%,
-			#2cb5ff 100%);
+  background-image: linear-gradient(
+    to right,
+    #3eb6f8 0%,
+    #81d8ff 35%,
+    #75ceff 65%,
+    #94e2ff 80%,
+    #2cb5ff 100%
+  );
 }
 
 .terminal-item .state.blue .cake {
-	background-color: #e9f9ff;
+  background-color: #e9f9ff;
 }
 
 .terminal-item .state.orange {
-	background-image: linear-gradient(to right,
-			#ffe9bc 0%,
-			#ffd070 35%,
-			#ffd887 65%,
-			#ffd887 80%,
-			#ffc246 100%);
+  background-image: linear-gradient(
+    to right,
+    #ffe9bc 0%,
+    #ffd070 35%,
+    #ffd887 65%,
+    #ffd887 80%,
+    #ffc246 100%
+  );
 }
 
 .terminal-item .state.orange .cake {
-	background-color: #fff8eb;
+  background-color: #fff8eb;
 }
 
 .terminal-item .state.err {
-	background-image: linear-gradient(to right,
-			#ffc4c4 0%,
-			#f77474 35%,
-			#ffaaaa 65%,
-			#ffaaaa 80%,
-			#f55b5b 100%);
+  background-image: linear-gradient(
+    to right,
+    #ffc4c4 0%,
+    #f77474 35%,
+    #ffaaaa 65%,
+    #ffaaaa 80%,
+    #f55b5b 100%
+  );
 }
 
 .terminal-item .state.err .cake {
-	background-color: #ffe9e9;
+  background-color: #ffe9e9;
 }
 
 .site-detail-line {
-	margin-top: 20rpx;
-	border: 2rpx solid #f0f0f0;
+  margin-top: 20rpx;
+  border: 2rpx solid #f0f0f0;
 }
 
-.site-detail-info {}
+.site-detail-info {
+}
 
 .site-detail-info .detail-info-item {
-	display: flex;
-	align-items: center;
-	gap: 24rpx;
-	margin-top: 20rpx;
+  display: flex;
+  align-items: center;
+  gap: 24rpx;
+  margin-top: 20rpx;
 }
 
 .detail-info-item .left-item {
-	font-weight: 500;
-	font-size: 28rpx;
-	color: #2b303a;
+  font-weight: 500;
+  font-size: 28rpx;
+  color: #2b303a;
 }
 
 .detail-info-item .right-item {
-	font-size: 28rpx;
-	color: #aaaaaa;
-}
-.footer{
-	position: fixed;
-	left: 0;
-	right: 0;
-	bottom: 0;
-	display: flex;
-	align-items: center;
-	height: 84px;
-	overflow: hidden;
-	border-radius: 20px 20px 0 0;
-	background-image: linear-gradient(to right,#fee4c6 0%,rgba(255,255,255,0.533) 75%,rgba(255,255,255,0) 100%);
-	background-color: #fff;
-}
-.footer .price-wrap .price{
-	font-size: 20px;
-}
-.scan{
-	flex: 1;
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	border-radius: 8px;
-	height: 50px;
-	font-size: 14px;
-	color: #2B303A;
-	background-image: linear-gradient(to right,#8FF8FB,#47AEFF);
-	margin: 0 10px;
-}
-.operation-symbol{
-	font-size: 24rpx;
-}
-.price-wrap{
-	display: flex;
-	align-items: center;
-}
-.price-wrap .price{
-	display: flex;
-	align-items: flex-end;
-	font-size: 24px;
-	font-weight: bold;
-	color: #F5531A;
-	margin-left: 10px;
-}
-.price-wrap .price .symbol{
-	display: inline-block;
-	font-size: 12px;
-	color: #F5531A;
-	transform: translateY(-4px);
-}
-.price-wrap .unit{
-	font-size: 12px;
-	color: #aaa;
-	margin-left: 15px;
-}
-
-.bg5{
-	display: inline-flex;
-	align-items: center;
-	justify-content: center;
-	position: relative;
-	color: #fff;
-	height: inherit;
-}
-.bg5 > .text{
-	display: inline-block;
-	position: absolute;
-	font-family: 'ysbth';
-	white-space: nowrap;
-	top: 50%;
-	left: 50%;
-	transform: translate(-65%,-50%);
-	font-size: 16px;
-}
-.bg5 > .bg{
-	height: 100%;
-}
+  font-size: 28rpx;
+  color: #aaaaaa;
+}
+.footer {
+  position: fixed;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  display: flex;
+  align-items: center;
+  height: 84px;
+  overflow: hidden;
+  border-radius: 20px 20px 0 0;
+  background-image: linear-gradient(
+    to right,
+    #fee4c6 0%,
+    rgba(255, 255, 255, 0.533) 75%,
+    rgba(255, 255, 255, 0) 100%
+  );
+  background-color: #fff;
+}
+.footer .price-wrap .price {
+  font-size: 20px;
+}
+.scan {
+  flex: 1;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  border-radius: 8px;
+  height: 50px;
+  font-size: 14px;
+  color: #2b303a;
+  background-image: linear-gradient(to right, #8ff8fb, #47aeff);
+  margin: 0 10px;
+}
+.operation-symbol {
+  font-size: 24rpx;
+}
+.price-wrap {
+  display: flex;
+  align-items: center;
+}
+.price-wrap .price {
+  display: flex;
+  align-items: flex-end;
+  font-size: 24px;
+  font-weight: bold;
+  color: #f5531a;
+  margin-left: 10px;
+}
+.price-wrap .price .symbol {
+  display: inline-block;
+  font-size: 12px;
+  color: #f5531a;
+  transform: translateY(-4px);
+}
+.price-wrap .unit {
+  font-size: 12px;
+  color: #aaa;
+  margin-left: 15px;
+}
+
+.bg5 {
+  display: inline-flex;
+  align-items: center;
+  justify-content: center;
+  position: relative;
+  color: #fff;
+  height: inherit;
+}
+.bg5 > .text {
+  display: inline-block;
+  position: absolute;
+  font-family: "ysbth";
+  white-space: nowrap;
+  top: 50%;
+  left: 50%;
+  transform: translate(-65%, -50%);
+  font-size: 16px;
+}
+.bg5 > .bg {
+  height: 100%;
+}

+ 351 - 359
pages/new-site/new-site.vue

@@ -1,407 +1,399 @@
 <template>
-	<ax-body>
-	<view class="site-body">
-		<view class="top-banner">
-			<swiper class="banner-swiper" circular :autoplay="true" interval="3000" duration="500" @change="swiperChange">
-				<swiper-item class="banner-swiper-item" v-for="item in 4">
-					<image class="swiper-item-image" src="/static/img/share.jpg" mode=""></image>
-				</swiper-item>
-			</swiper>
-			<view class="swiper-current">{{bannerIndex}}/5</view>
-		</view>
-		<view class="site-content">
-			<view class="top-site-info">
-				<view class="site-title">{{stationInfo.name}}</view>
-				<view class="site-text">
-					<image src="@/static/img/site-icon03.png" class="icon"></image>
-					<view class="item-text">充电减免2小时停车费,超出部分按每小时3元计算</view>
-				</view>
-			</view>
-			<view class="site-location">
-				<view class="location-left">
-					<view class="left-km">距离您{{stationInfo.params.rangeShow}}</view>
-					<view class="left-address">{{stationInfo.addr}}</view>
-				</view>
-				<view class="location-rihgt"  @click="openLocation()">
-					<image src="@/static/img/locate2.svg" class="right-icon"></image>
-					<view class="right-nav">导航</view>
-				</view>
+	<ax-body :blank="0">
+		<view class="site-body">
+			<view class="top-banner">
+				<swiper class="banner-swiper" circular :autoplay="true" interval="3000" duration="500"
+					@change="swiperChange">
+					<swiper-item class="banner-swiper-item" v-for="item in stationDetail.pictures">
+						<image class="swiper-item-image" :src="item" mode=""></image>
+					</swiper-item>
+				</swiper>
+				<view class="swiper-current">{{ bannerIndex }}/{{ stationDetail.pictures.length }}</view>
 			</view>
-			<view class="site-cost-info">
-				<view class="cost-info-title">
-					<view class="title-name">费用信息</view>
-					<view class="check-info" @click="toPriceAll()">
-						<text>查看全部</text>
-						<text class="ax ax-iconline i-arrow-right icon"></text>
+			<view class="site-content">
+				<view class="top-site-info">
+					<view class="site-title">{{ stationDetail.stationName }}</view>
+					<view class="site-text">
+						<image src="@/static/img/site-icon03.png" class="icon"></image>
+						<view class="item-text">{{ stationDetail.tips }}</view>
 					</view>
 				</view>
-				<view class="cost-price-info" v-if="user_info.firmId===null||$app.storage.get('USER_INFO').firmType===0">
-					<view class="cost-title">
-						<view class="title-left">当前价</view>
-						<view class="title-right">惊喜价</view>
+				<view class="site-location">
+					<view class="location-left">
+						<view class="left-km">距离您{{ stationDetail.distance }}km</view>
+						<view class="left-address">{{ stationDetail.address }}</view>
 					</view>
-					<view class="cost-price">
-						<text class="symbol">¥</text>
-						<text>{{nowPriceTime.price?parseFloat(nowPriceTime.price).toFixed(2):"0.0000"}}</text>
-						<text class="cost-price-unit">元/度</text>
+					<view class="location-rihgt" @click="openLocation()">
+						<image src="@/static/img/locate2.svg" class="right-icon"></image>
+						<view class="right-nav">导航</view>
 					</view>
-					<view class="time-cost-price">当前时段:</view>
-					<view class="time-cost-number">{{stationInfo.params.priceShow}}</view>
 				</view>
-				<view class="firm-price-info-box" v-else>
-					<view class="current-price-info">
-						<view class="current-price-title">当前价</view>
-						<view class="current-price">
-							<view class="current-price-text"><text class="operation-symbol">¥</text>
-							<text>{{parseFloat(nowPriceTime.firmPrice).toFixed(2)}}</text></view>
-							<view class="current-price-unit">元/度</view>
+				<view class="site-cost-info">
+					<view class="cost-info-title">
+						<view class="title-name">费用信息</view>
+						<view class="check-info" @click="toPriceAll()">
+							<text>查看全部</text>
+							<text class="ax ax-iconline i-arrow-right icon"></text>
 						</view>
-						<view class="time-current-price">当前时段:</view>
-						<view class="time-current-number">{{stationInfo.params.priceShow}}</view>
 					</view>
-					<view class="firm-price-info">
-						<view class="firm-price-title">
-							<view class="title-text">企业专享价</view>
-							<view class="tags-price">特惠价</view>
+					<view class="cost-price-info" v-if="!stationDetail.firmUser">
+						<view class="cost-title">
+							<view class="title-left">当前价</view>
+							<view class="title-right">惊喜价</view>
 						</view>
-						<view class="firm-price-box">
-							<view class="firm-price-text">{{nowPriceTime.price?parseFloat(nowPriceTime.price).toFixed(4):"0.0000"}}</view>
-							<view class="firm-price-unit">元/度</view>
+						<view class="cost-price">
+							<text style="color: #FF6464;font-size: 48rpx;font-weight: 800;">{{
+								stationDetail.currentPrice
+							}}</text>
+							<text class="cost-price-unit">元/度</text>
 						</view>
-						<view class="current-pay-price-box">
-							<view class="pay-price">
-								<view class="firm-old-price">{{parseFloat(nowPriceTime.firmPrice).toFixed(2)}}元/度</view>
-								<view class="discount-price">本单预计省9元</view>
+						<view class="time-cost-price">当前时段:</view>
+						<view class="time-cost-number">{{ stationDetail.currentPeriod }}</view>
+					</view>
+					<view class="firm-price-info-box" v-else>
+						<view class="current-price-info">
+							<view class="current-price-title">当前价</view>
+							<view class="current-price">
+								<view class="current-price-text"><text class="operation-symbol">¥</text>
+									<text>{{ stationDetail.currentPrice }}</text>
+								</view>
+								<view class="current-price-unit">元/度</view>
+							</view>
+							<view class="time-current-price">当前时段:</view>
+							<view class="time-current-number">{{ stationDetail.currentPeriod }}</view>
+						</view>
+						<view class="firm-price-info">
+							<view class="firm-price-title">
+								<view class="title-text">企业专享价</view>
+								<view class="tags-price">特惠价</view>
+							</view>
+							<view class="firm-price-box">
+								<view class="firm-price-text">
+									{{ stationDetail.enterprisePrice || '--' }}
+								</view>
+								<view class="firm-price-unit">元/度</view>
+							</view>
+							<view class="current-pay-price-box">
+								<view class="pay-price">
+									<view class="firm-old-price">{{ stationDetail.currentPrice }}元/度
+									</view>
+									<!-- <view class="discount-price">本单预计省9元</view> -->
+								</view>
+								<image class="pay-price-icon" src="/static/img/firm-price.png" mode=""></image>
 							</view>
-							<image class="pay-price-icon" src="/static/img/firm-price.png" mode=""></image>
 						</view>
 					</view>
-				</view>
-				<view class="stopcar-tips">
-					<image class="stopcar-tips-icon" src="@/static/img/site-icon03.png"></image>
-					<view class="stopcar-tips-text">
-						<view class="tips-text-title">停车参考</view>
-						<view class="tips-text-mini">充电减免2小时停车费</view>
+					<view class="stopcar-tips">
+						<image class="stopcar-tips-icon" src="@/static/img/site-icon03.png"></image>
+						<view class="stopcar-tips-text">
+							<view class="tips-text-title">停车参考</view>
+							<view class="tips-text-mini">充电减免2小时停车费</view>
+						</view>
 					</view>
 				</view>
-			</view>
-			<view class="site-list-card">
-				<view class="cost-info-title">
-					<view class="title-name">充电终端</view>
-					<view class="check-info" @click="toDeiceAll()">
-						<text>查看全部</text>
-						<text class="ax ax-iconline i-arrow-right icon"></text>
+				<view class="site-list-card">
+					<view class="cost-info-title">
+						<view class="title-name">充电终端</view>
+						<view class="check-info" @click="toDeiceAll()">
+							<text>查看全部</text>
+							<text class="ax ax-iconline i-arrow-right icon"></text>
+						</view>
 					</view>
-				</view>
-				<view class="app-flex site-select-tab">
-					<view class="select-item" v-for="(item,index) in siteSortList" 
-					@click="selectItem(index)"
-					:class="{selectItemActive:siteSelectIndex==index}">
-					{{item}}
+					<view class="app-flex site-select-tab">
+						<view class="select-item" v-for="(item, index) in siteSortList" @click="selectItem(item, index)"
+							:class="{ selectItemActive: siteSelectIndex == index }">
+							{{ item.text }}({{ item.total }})
+						</view>
 					</view>
-				</view>
-				<view class="site-list-box">
-					<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="site-list-box">
+						<view v-for="(item, index) in filteredConnectorList" :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">{{ item.statusName }}</view>
+								</view>
+							</view>
+							<view class="info">
+								<view class="name">{{ item.connectorName }}</view>
+								<view class="subinfo">电类分类:{{ item.equipmentType }}</view>
+								<view class="subinfo">终端编号:{{ item.connectorCode }}</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>
-					</view>
-				</view>
-			</view>
-			<view class="site-list-card">
-				<view class="cost-info-title">
-					<view class="title-name">电站信息</view>
-					<view class="check-info">
-						<text>查看全部</text>
-						<text class="ax ax-iconline i-arrow-right icon"></text>
+						<view v-if="filteredConnectorList.length === 0" class="not-data">暂无设备</view>
 					</view>
 				</view>
-				<view class="site-detail-line"></view>
-				<view class="site-detail-info">
-					<view class="detail-info-item">
-						<view class="left-item">营业时间</view>
-						<view class="right-item">{{busineHours.busineHours}}</view>
-					</view>
-					<view class="detail-info-item">
-						<view class="left-item">服务提供</view>
-						<view class="right-item">{{busineHours.entInfo.name}}</view>
-					</view>
-					<view class="detail-info-item">
-						<view class="left-item">发表提供</view>
-						<view class="right-item">{{busineHours.entInfo.name}}</view>
+				<view class="site-list-card">
+					<view class="cost-info-title">
+						<view class="title-name">电站信息</view>
+						<view class="check-info">
+							<text>查看全部</text>
+							<text class="ax ax-iconline i-arrow-right icon"></text>
+						</view>
 					</view>
-					<view class="detail-info-item">
-						<view class="left-item">客服热线</view>
-						<view class="right-item">{{busineHours.entInfo.tel}}</view>
+					<view class="site-detail-line"></view>
+					<view class="site-detail-info">
+						<view class="detail-info-item">
+							<view class="left-item">营业时间</view>
+							<view class="right-item">{{ stationDetail.businessHours || '--' }}</view>
+						</view>
+						<view class="detail-info-item">
+							<view class="left-item">服务提供</view>
+							<view class="right-item">{{ stationDetail.serviceProvider }}</view>
+						</view>
+						<view class="detail-info-item">
+							<view class="left-item">发票提供</view>
+							<view class="right-item">{{ stationDetail.serviceProvider }}</view>
+						</view>
+						<view class="detail-info-item">
+							<view class="left-item">客服热线</view>
+							<view class="right-item">{{ stationDetail.customerServiceHotline }}</view>
+						</view>
 					</view>
 				</view>
+				<view style="height: 200rpx;"></view>
 			</view>
-		</view>
-		<!-- 扫码充电 -->
-		<view class="footer">
-			<view class="bg5">
-				<view class="text">
-					<view>中数电动</view>
-					<view>特惠价</view>
+			<!-- 扫码充电 -->
+			<view class="footer">
+				<view class="bg5">
+					<view class="text">
+						<view>中数电动</view>
+						<view>特惠价</view>
+					</view>
+					<image src="@/static/img/site-bg05.svg" class="bg" mode="heightFix"></image>
 				</view>
-				<image src="@/static/img/site-bg05.svg" class="bg" mode="heightFix"></image>
-			</view>
-			<view class="price-wrap">
-				<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>
+				<view class="price-wrap">
+					<view class="price">
+						<text class="symbol">¥</text>
+						<!-- v-if="nowPriceTime.firmPrice===null" -->
+						<text v-if="!stationDetail.firmUser">{{ stationDetail.currentPrice }}</text>
+						<text v-else>{{ stationDetail.enterprisePrice || '--' }}</text>
+					</view>
+					<view class="unit">元/度</view>
 				</view>
-				<view class="unit">{{nowPriceTime.unit}}</view>
+				<view @click="sacn()" class="scan">扫码充电</view>
 			</view>
-			<view @click="sacn()" class="scan">扫码充电</view>
 		</view>
-	</view>
 	</ax-body>
 </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();
+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: "",//营业时间
+			bannerIndex: 1,//轮播下标
+			stationDetail: {},
+			siteSelectIndex: 0,
+			siteSortList: [{
+				total: 0,
+				text: '空闲',
+				status: 1
+			}, {
+				total: 0,
+				text: '占用',
+				status: 2
+			}, {
+				total: 0,
+				text: '离线',
+				status: 0
+			}],
+			filteredConnectorList: [],
+		}
+	},
+	methods: {
+		swiperChange(e) {
+			this.bannerIndex = e.detail.current + 1
 		},
-		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;
+
+		getStationsInfo() {
+			let location = this.$app.storage.get('USER_LOCATION')
+			this.$api.base("get", "/applet/v1/station/detail", {
+				stationId: parseInt(this.stationInfo.stationId),
+				longitude: location.split(",")[0],
+				latitude: location.split(",")[1]
+			}, {}).then(res => {
+				res.data.pictures = JSON.parse(res.data.pictures)
+				const countMapping = {
+					'空闲': res.data.idleCount,
+					'占用': res.data.occupiedCount,
+					'离线': res.data.offlineCount
+				};
+				this.siteSortList.forEach(item => {
+					item.total = countMapping[item.text] || 0;
+				});
+				this.stationDetail = res.data
+				// 初始化默认显示空闲状态的前3个设备
+				this.siteSelectIndex = 0;
+				this.filteredConnectorList = this.stationDetail.connectorList
+					.filter(connector => connector.status == 1) // 空闲状态
+					.slice(0, 3);
+				// this.deviceList = res.devices;
+				// this.timePricesList = res.prices;
+				// this.nowPriceTime = res.nowPriceTime;
+			})
+		},
+
+		selectItem(e, i) {
+			this.siteSelectIndex = i;
+			// 根据选择的状态过滤 connectorList
+			if (e.status === 1) { // 空闲
+				this.filteredConnectorList = this.stationDetail.connectorList.slice(0, 3).filter(connector => connector.status == 1);
+			} else if (e.status === 2) { // 占用
+				this.filteredConnectorList = this.stationDetail.connectorList.slice(0, 3).filter(connector =>
+					connector.status == 2 || connector.status == 3 || connector.status == 4
+				);
+			} else if (e.status === 0) { // 离线
+				this.filteredConnectorList = this.stationDetail.connectorList.slice(0, 3).filter(connector => connector.status == 0);
+			}
+		},
+
+		getSatesObj(item) {
+			//{name:'离线',color:'grey'},{name:'空闲',color:'green'},{name:'占用',color:'blue'}
+			var obj = {};
+			if (item.status == 2) {
+				obj = { color: 'blue' };
+			} else if (item.status == 0) {
+				obj = { color: 'grey' };
+			} else if (item.status == 1) {
+				obj = { color: 'green' };
+			}
+			return obj;
+		},
+
+		//获取配置文件信息
+		getConfigStationInfo() {
+			this.$api.static(this.$config.url.configUrl + "stationConfi.json").then(res => {
+				console.log("获取的配置文件信息:", res.busineHours);
+				this.entInfo = res.entInfo;
+				this.service = res.service;
+				this.busineHours = res;
+			})
+		},
+		// 拨打电话
+		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),
 			});
 		},
-		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:"",//营业时间
-				bannerIndex:1,//轮播下标
+		// 跳转充电终端
+		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);
 		},
-		methods: {
-			swiperChange(e){
-				this.bannerIndex=e.detail.current+1
-			},
-			
-			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;
-						}
-					}
-				})
-			},
-			//获取桩状态的数量
-			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;
-			},
-			//获取配置文件信息
-			getConfigStationInfo(){
-				this.$api.static(this.$config.url.configUrl+"stationConfi.json").then(res=>{
-					console.log("获取的配置文件信息:",res.busineHours);
-					this.entInfo = res.entInfo;
-					this.service = res.service;
-					this.busineHours = res;
-				})
-			},
-			// 拨打电话
-			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 ){
+		//去查看全部电站
+		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>
-	@import url("new-site.css");
+@import url("new-site.css");
 </style>

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/app-navigation/app-navigation.js.map


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/ax-body/ax-body.js.map


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/ax-custom-title/ax-custom-title.js.map


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/ax-ios-indicator/ax-ios-indicator.js.map


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/ax-popup/ax-popup.js.map


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/banner-page/banner-page.js.map


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/charging/charging.js.map


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/coupon-buy/coupon-buy.js.map


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/coupons/coupons.js.map


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/feedback-reply/feedback-reply.js.map


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/feedback/feedback.js.map


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/login/login.js.map


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/map/map.js.map


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/my.js.map


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/new-site/new-site.js.map


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/order-detail/order-detail.js.map


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/order/order.js.map


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/recharge-log/recharge-log.js.map


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/search/search.js.map


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/site-more/site-more.js.map


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/site/site.js.map


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/terminal/terminal.js.map


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/lime-painter/components/l-painter/l-painter.js.map


+ 4 - 0
unpackage/dist/dev/mp-weixin/components/ax-body/ax-body.js

@@ -164,6 +164,10 @@ exports.default = void 0;
 //
 //
 //
+//
+//
+//
+//
 var _default = {
   name: "ax-body",
   props: {

+ 3 - 3
unpackage/dist/dev/mp-weixin/components/ax-body/ax-body.wxss

@@ -1,16 +1,16 @@
 
-.ax-body{
+.ax-body {
 	display: flex;
 	flex-direction: column;
 	height: 100%;
 }
-.ax-body .__root{
+.ax-body .__root {
 	flex: 1;
 	overflow: auto;
 	padding-left: var(--blank) !important;
 	padding-right: var(--blank) !important;
 }
-ax-custom-title{
+ax-custom-title {
 	position: relative;
 	z-index: 99999999;
 }

+ 1 - 3
unpackage/dist/dev/mp-weixin/pages/coupon-buy/coupon-buy.js

@@ -366,9 +366,7 @@ var _default = {
       }, {}).then(function (addRes) {
         console.log(addRes, '创建订单返回');
         if (addRes.data.orderId) {
-          _this2.$api.base("put", "/applet/v1/order/payOrder", {
-            orderId: addRes.orderId
-          }, {}).then(function (res) {
+          _this2.$api.base("put", "/applet/v1/order/payOrder/".concat(addRes.data.orderId), {}, {}).then(function (res) {
             var payInfo = JSON.parse(res.wx.wx.pay_info);
             uni.requestPayment({
               provider: 'wxpay',

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

@@ -224,6 +224,9 @@ exports.default = void 0;
 //
 //
 //
+//
+//
+//
 var _default = {
   data: function data() {
     return {
@@ -255,7 +258,7 @@ var _default = {
   methods: {
     loadListData: function loadListData() {
       var _this = this;
-      this.$api.base("post", "/userApi/getMyFeekBack", {}, {}).then(function (res) {
+      this.$api.base("get", "/applet/v1/user/myFeedback", {}, {}).then(function (res) {
         _this.list.data = res.list;
       });
     },

+ 3 - 0
unpackage/dist/dev/mp-weixin/pages/feedback-reply/feedback-reply.wxss

@@ -68,6 +68,9 @@
 
 
 
+
+
+
 
 
 

+ 26 - 22
unpackage/dist/dev/mp-weixin/pages/feedback/feedback.js

@@ -125,7 +125,7 @@ var render = function () {
   var _vm = this
   var _h = _vm.$createElement
   var _c = _vm._self._c || _h
-  var g0 = _vm.saveObj.problemDescribe.length
+  var g0 = _vm.saveObj.description.length
   var g1 = _vm.upFileUrls.length
   var g2 = _vm.upFileUrls.length
   if (!_vm._isMounted) {
@@ -233,6 +233,14 @@ exports.default = void 0;
 //
 //
 //
+//
+//
+//
+//
+//
+//
+//
+//
 var _default = {
   data: function data() {
     return {
@@ -249,7 +257,7 @@ var _default = {
           value: 3
         }, {
           name: '功能建议',
-          value: 3
+          value: 4
         }, {
           name: '其他',
           value: 9
@@ -258,11 +266,11 @@ var _default = {
       upFileUrls: [],
       //上传的图片地址
       saveObj: {
-        problemType: 9,
+        type: 9,
         //问题类型(1投诉吐槽,2功能异常,3体验问题,4功能建议,9其他 )
-        problemDescribe: "",
+        description: "",
         //问题描述
-        filesUrl: "",
+        images: "",
         //相关图片地址
         contactWay: "" //联系方式(手机号或者邮箱)
       }
@@ -272,7 +280,7 @@ var _default = {
   methods: {
     onTag: function onTag(item, index) {
       this.types.index = this.types.index == index ? -1 : index;
-      this.saveObj.problemType = this.types.data[this.types.index].value;
+      this.saveObj.type = this.types.data[this.types.index].value;
     },
     //删除上传的图片
     clearUpFile: function clearUpFile(item) {
@@ -291,25 +299,25 @@ var _default = {
         sourceType: ['album'],
         //从相册选择
         success: function success(res) {
-          console.log(res);
           console.log(JSON.stringify(res.tempFilePaths));
           uni.uploadFile({
-            url: _this.$config.url.request + "userApi/upFile",
-            //仅为示例,非真实的接口地址
+            url: _this.$config.url.request + "api/v1/files",
             filePath: res.tempFilePaths[0],
             name: 'file',
-            formData: {
-              'user': 'test' //额外参数
+            header: {
+              'Authorization': "Bearer " + _this.$app.storage.get("ACCESS_TOKEN"),
+              'Content-Type': 'multipart/form-data'
             },
-
             success: function success(uploadFileRes) {
-              var upObj = JSON.parse(uploadFileRes.data);
+              var imgUrl = JSON.parse(uploadFileRes.data);
               var tem = {
                 temUrl: res.tempFilePaths[0],
-                url: upObj.fileUrl
+                url: imgUrl.data.url
               };
               _this.upFileUrls.push(tem);
-              console.log(upObj);
+              _this.saveObj.images = _this.upFileUrls.map(function (item) {
+                return item.url;
+              }).join(',');
             }
           });
         }
@@ -322,20 +330,16 @@ var _default = {
         this.$app.popup.alert("请选择一个问题。", "温馨提示");
         return;
       }
-      if (!this.saveObj.problemDescribe) {
+      if (!this.saveObj.description) {
         this.$app.popup.alert("请填写您意见或建议。", "温馨提示");
         return;
       }
-      if (this.saveObj.problemDescribe.length > 500) {
+      if (this.saveObj.description.length > 500) {
         this.$app.popup.alert("问题描述只能填写500字以内。", "温馨提示");
         return;
       }
-      this.saveObj.filesUrl = this.upFileUrls.map(function (obj) {
-        return obj.url;
-      }).join(",");
       var obj = this.saveObj;
-      this.$api.base("post", "/userApi/addUserFeedback", obj, {}).then(function (res) {
-        console.log("设备信息:", res);
+      this.$api.base("post", "/applet/v1/user/addUserFeedback", obj, {}).then(function (res) {
         _this2.$app.popup.confirm("感谢您的反馈。", "温馨提示", {
           showCancel: false
         }).then(function (cRes) {

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
unpackage/dist/dev/mp-weixin/pages/feedback/feedback.wxml


+ 23 - 25
unpackage/dist/dev/mp-weixin/pages/index/index.js

@@ -773,26 +773,24 @@ var _default = {
         });
       });
     },
-    get_paymentMsg: function get_paymentMsg() {
-      var _this9 = this;
-      // maspStatus(1:待补缴,2:已补缴)realPredictServiceCost平台;maspAmount第三方
-      this.$api.base("post", "/chargeApi/queryOrderList-arrearage", {}, {}).then(function (res) {
-        _this9.payment_msg = res.data;
-      });
-    },
+    // get_paymentMsg() {
+    // 	// maspStatus(1:待补缴,2:已补缴)realPredictServiceCost平台;maspAmount第三方
+    // 	this.$api.base("post", "/chargeApi/queryOrderList-arrearage", {}, {}).then(res => {
+    // 		this.payment_msg = res.data
+    // 	})
+    // },
     getBanners: function getBanners() {
-      var _this10 = this;
+      var _this9 = this;
       this.$api.base("get", "/applet/v1/homePage/getBannerList", {}, {}).then(function (res) {
-        _this10.banners = res.data;
-        console.log(_this10.banners, 'banner数据');
-      });
-    },
-    getAdswiper: function getAdswiper() {
-      var _this11 = this;
-      this.$api.base("post", "/userApi/getAdvertising", {}, {}).then(function (res) {
-        _this11.adBanner = res.banners;
+        _this9.banners = res.data;
+        console.log(_this9.banners, 'banner数据');
       });
     },
+    // getAdswiper() {
+    // 	this.$api.base("post", "/userApi/getAdvertising", {}, {}).then(res => {
+    // 		this.adBanner = res.banners
+    // 	})
+    // },
     convertBdToTx: function convertBdToTx(lng, lat) {
       // 百度坐标系(BD09)转火星坐标系(GCJ-02,即腾讯地图使用的坐标系)  
       // 这里的转换公式是基于经验公式,可能存在一定的误差  
@@ -809,7 +807,7 @@ var _default = {
       };
     },
     getStations: function getStations(lng, lat) {
-      var _this12 = this;
+      var _this10 = this;
       this.$api.base("post", "/applet/v1/homePage/getStationInfoPage", {
         pageNum: this.pageNum,
         pageSize: 10,
@@ -818,25 +816,25 @@ var _default = {
         latitude: lat,
         userId: parseInt(this.$app.storage.get('USER_INFO').id)
       }, {}).then(function (res) {
-        if (_this12.pageNum == 1) {
-          _this12.list.data = res.data.list;
+        if (_this10.pageNum == 1) {
+          _this10.list.data = res.data.list;
         } else {
-          _this12.list.data = _this12.list.data.concat(res.data.list);
+          _this10.list.data = _this10.list.data.concat(res.data.list);
         }
       });
     },
     // 设定导航栏高度
     setAppNavigationHeight: function setAppNavigationHeight() {
-      var _this13 = this;
+      var _this11 = this;
       this.$nextTick(function () {
-        uni.createSelectorQuery().in(_this13).select("#app-navigation").boundingClientRect(function (data) {
-          _this13.appNavigationHeight = data.height;
+        uni.createSelectorQuery().in(_this11).select("#app-navigation").boundingClientRect(function (data) {
+          _this11.appNavigationHeight = data.height;
         }).exec();
       });
     },
     // 设置列表高度
     setListHeight: function setListHeight() {
-      var _this14 = this;
+      var _this12 = this;
       this.$app.act.selectorQuery(this, "#list-box,#roller", true).then(function (res) {
         var win = uni.getWindowInfo();
         var roller = res.find(function (i) {
@@ -845,7 +843,7 @@ var _default = {
         var list = res.find(function (i) {
           return i.id == 'list-box';
         });
-        _this14.list.height = win.windowHeight - list.top - _this14.appNavigationHeight + roller.height;
+        _this12.list.height = win.windowHeight - list.top - _this12.appNavigationHeight + roller.height;
       });
     },
     // 版头加载完成

+ 17 - 30
unpackage/dist/dev/mp-weixin/pages/map/map.js

@@ -131,11 +131,6 @@ var render = function () {
   var _vm = this
   var _h = _vm.$createElement
   var _c = _vm._self._c || _h
-  var g0 =
-    _vm.list.data[_vm.list.index] &&
-    _vm.list.data[_vm.list.index].params.nowPrice
-      ? _vm.list.data[_vm.list.index].params.nowPrice.toFixed(4)
-      : null
   if (!_vm._isMounted) {
     _vm.e0 = function ($event) {
       return _vm.$app.url.goto("/pages/search/search")
@@ -144,14 +139,6 @@ var render = function () {
       return _vm.$app.url.goto("/pages/index/index", false)
     }
   }
-  _vm.$mp.data = Object.assign(
-    {},
-    {
-      $root: {
-        g0: g0,
-      },
-    }
-  )
 }
 var recyclableRender = false
 var staticRenderFns = []
@@ -286,10 +273,6 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
 //
 //
 //
-//
-//
-//
-//
 var _default = {
   onLoad: function onLoad() {
     this.loadData();
@@ -332,6 +315,7 @@ var _default = {
       var _this2 = this;
       var markers = this.list.data.map(function (i, index) {
         var marker = _objectSpread(_objectSpread({}, i), {}, {
+          id: parseInt(i.stationId) || index,
           width: index == _this2.list.index ? 32 : 28,
           height: index == _this2.list.index ? 32 : 28,
           iconPath: '/static/img/marker-icon.png'
@@ -392,28 +376,31 @@ var _default = {
         lng = location.split(",")[0];
         lat = location.split(",")[1];
       }
-      this.$api.base("get", "/applet/v1/homePage/getStationInfoMap", {
+      this.$api.base("get", "/applet/v1/homePage/getStationInfoMapList", {
         longitude: lng,
         latitude: lat
       }, {}).then(function (res) {
-        res.stationList.forEach(function (i) {
-          var txPoint = _this3.convertBdToTx(i.lng, i.lat);
-          i.lng = txPoint.lng;
-          i.lat = txPoint.lat;
+        res.data.forEach(function (i) {
+          var txPoint = _this3.convertBdToTx(i.longitude, i.latitude);
+          i.longitude = txPoint.lng;
+          i.latitude = txPoint.lat;
         });
-        res.stationList.forEach(function (i) {
-          i.latitude = i.lat;
-          i.longitude = i.lng;
-        });
-        _this3.list.data = res.stationList;
+        _this3.list.data = res.data;
       });
     },
     // 点击标记
     markertap: function markertap(e) {
-      this.list.index = this.list.data.findIndex(function (i) {
-        return i.id == e.detail.markerId;
+      console.log(e.detail.markerId, '点击的标记事件');
+      var selectedItem = this.list.data.find(function (i) {
+        return parseInt(i.stationId) === e.detail.markerId;
       });
-      this.$refs.site.open();
+      if (selectedItem) {
+        this.list.index = this.list.data.indexOf(selectedItem);
+        console.log(this.list.data[this.list.index], '点击的标记');
+        this.$refs.site.open();
+      } else {
+        console.log('未找到匹配的标记点');
+      }
     },
     // 关闭站点信息
     onClosed: function onClosed() {

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
unpackage/dist/dev/mp-weixin/pages/map/map.wxml


+ 23 - 13
unpackage/dist/dev/mp-weixin/pages/my/my.js

@@ -528,19 +528,29 @@ var _default = {
     },
     onGetPhoneNumber: function onGetPhoneNumber(e) {
       var _this7 = this;
-      if (e.detail.code) {
-        this.$api.base("post", '/api/v1/auth/wx/miniapp/phone-code-login', {
-          code: e.detail.code
-        }).then(function (res) {
-          var _res$data, _res$data2;
-          console.log(res);
-          uni.setStorageSync(_config.default.keyname.accessToken, res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.accessToken);
-          uni.setStorageSync(_config.default.keyname.refreshToken, res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.refreshToken);
-          _this7.$app.storage.set('USER_INFO', res.data);
-          _this7.getMyAccount();
-          _this7.get_firmId();
-        });
-      }
+      uni.login({
+        provider: 'weixin',
+        success: function success(result) {
+          console.log(result, '微信登录');
+          if (result.code) {
+            if (e.detail.code) {
+              _this7.$api.base("post", '/api/v1/auth/wx/miniapp/phone-code-login', {
+                code: result.code,
+                phoneCode: e.detail.code
+              }).then(function (res) {
+                var _res$data, _res$data2;
+                console.log(res);
+                uni.setStorageSync(_config.default.keyname.accessToken, res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.accessToken);
+                uni.setStorageSync(_config.default.keyname.refreshToken, res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.refreshToken);
+                _this7.$app.storage.set('USER_INFO', res.data);
+                _this7.getMyAccount();
+                _this7.get_firmId();
+              });
+            }
+          }
+        },
+        fail: function fail(error) {}
+      });
     }
   }
 };

+ 75 - 117
unpackage/dist/dev/mp-weixin/pages/new-site/new-site.js

@@ -125,50 +125,23 @@ var render = function () {
   var _vm = this
   var _h = _vm.$createElement
   var _c = _vm._self._c || _h
-  var g0 =
-    _vm.user_info.firmId === null ||
-    _vm.$app.storage.get("USER_INFO").firmType === 0
-  var g1 =
-    g0 && _vm.nowPriceTime.price
-      ? parseFloat(_vm.nowPriceTime.price).toFixed(2)
-      : null
-  var g2 = !g0 ? parseFloat(_vm.nowPriceTime.firmPrice).toFixed(2) : null
-  var g3 =
-    !g0 && _vm.nowPriceTime.price
-      ? parseFloat(_vm.nowPriceTime.price).toFixed(4)
-      : null
-  var g4 = !g0 ? parseFloat(_vm.nowPriceTime.firmPrice).toFixed(2) : null
-  var l0 = _vm.__map(_vm.terminals, function (item, index) {
+  var g0 = _vm.stationDetail.pictures.length
+  var l0 = _vm.__map(_vm.filteredConnectorList, function (item, index) {
     var $orig = _vm.__get_orig(item)
     var m0 = _vm.getSatesObj(item)
-    var m1 = _vm.getSatesObj(item)
-    var m2 = _vm.getdeviceTypeName(item.eType)
     return {
       $orig: $orig,
       m0: m0,
-      m1: m1,
-      m2: m2,
     }
   })
-  var g5 =
-    _vm.nowPriceTime.firmPrice === null ||
-    _vm.$app.storage.get("USER_INFO").firmType === 0
-  var g6 =
-    g5 && _vm.nowPriceTime.price ? _vm.nowPriceTime.price.toFixed(4) : null
-  var g7 = !g5 ? parseFloat(_vm.nowPriceTime.firmPrice).toFixed(4) : null
+  var g1 = _vm.filteredConnectorList.length
   _vm.$mp.data = Object.assign(
     {},
     {
       $root: {
         g0: g0,
-        g1: g1,
-        g2: g2,
-        g3: g3,
-        g4: g4,
         l0: l0,
-        g5: g5,
-        g6: g6,
-        g7: g7,
+        g1: g1,
       },
     }
   )
@@ -382,6 +355,14 @@ exports.default = void 0;
 //
 //
 //
+//
+//
+//
+//
+//
+//
+//
+//
 var _default = {
   onLoad: function onLoad(option) {
     console.log(option); //打印出上个页面传递的参数。
@@ -432,120 +413,97 @@ var _default = {
       },
       busineHours: "",
       //营业时间
-      bannerIndex: 1 //轮播下标
+      bannerIndex: 1,
+      //轮播下标
+      stationDetail: {},
+      siteSelectIndex: 0,
+      siteSortList: [{
+        total: 0,
+        text: '空闲',
+        status: 1
+      }, {
+        total: 0,
+        text: '占用',
+        status: 2
+      }, {
+        total: 0,
+        text: '离线',
+        status: 0
+      }],
+      filteredConnectorList: []
     };
   },
-
   methods: {
     swiperChange: function swiperChange(e) {
       this.bannerIndex = e.detail.current + 1;
     },
     getStationsInfo: function getStationsInfo() {
       var _this2 = this;
-      this.$api.base("post", "/chargeApi/getStationsInfoAndUpdateDecice", {
-        "stationId": this.stationInfo.id
+      var location = this.$app.storage.get('USER_LOCATION');
+      this.$api.base("get", "/applet/v1/station/detail", {
+        stationId: parseInt(this.stationInfo.stationId),
+        longitude: location.split(",")[0],
+        latitude: location.split(",")[1]
       }, {}).then(function (res) {
-        _this2.deviceList = res.devices;
-        _this2.timePricesList = res.prices;
-        _this2.nowPriceTime = res.nowPriceTime;
-        //只显示三个设备信息
-        for (var i = 0; i < _this2.deviceList.length; i++) {
-          _this2.terminals.push(_this2.deviceList[i]);
-          if (i == 2) {
-            break;
-          }
-        }
+        res.data.pictures = JSON.parse(res.data.pictures);
+        var countMapping = {
+          '空闲': res.data.idleCount,
+          '占用': res.data.occupiedCount,
+          '离线': res.data.offlineCount
+        };
+        _this2.siteSortList.forEach(function (item) {
+          item.total = countMapping[item.text] || 0;
+        });
+        _this2.stationDetail = res.data;
+        // 初始化默认显示空闲状态的前3个设备
+        _this2.siteSelectIndex = 0;
+        _this2.filteredConnectorList = _this2.stationDetail.connectorList.filter(function (connector) {
+          return connector.status == 1;
+        }) // 空闲状态
+        .slice(0, 3);
+        // this.deviceList = res.devices;
+        // this.timePricesList = res.prices;
+        // this.nowPriceTime = res.nowPriceTime;
       });
     },
-    //获取桩状态的数量
-    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++;
-        }
+    selectItem: function selectItem(e, i) {
+      this.siteSelectIndex = i;
+      // 根据选择的状态过滤 connectorList
+      if (e.status === 1) {
+        // 空闲
+        this.filteredConnectorList = this.stationDetail.connectorList.slice(0, 3).filter(function (connector) {
+          return connector.status == 1;
+        });
+      } else if (e.status === 2) {
+        // 占用
+        this.filteredConnectorList = this.stationDetail.connectorList.slice(0, 3).filter(function (connector) {
+          return connector.status == 2 || connector.status == 3 || connector.status == 4;
+        });
+      } else if (e.status === 0) {
+        // 离线
+        this.filteredConnectorList = this.stationDetail.connectorList.slice(0, 3).filter(function (connector) {
+          return connector.status == 0;
+        });
       }
-      return num;
     },
     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) {
         obj = {
-          name: '占用',
           color: 'blue'
         };
-      } else if (item.deviceStatus == 3) {
-        obj = {
-          name: '充电中',
-          color: 'orange'
-        };
-      } else if (item.deviceStatus == 0) {
+      } else if (item.status == 0) {
         obj = {
-          name: '离线',
           color: 'grey'
         };
-      } else if (item.deviceStatus == 1) {
+      } else if (item.status == 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 峰
-      var str = "";
-      switch (type) {
-        case 1:
-          str = "谷";
-          break;
-        case 2:
-          str = "平";
-          break;
-        case 3:
-          str = "峰";
-          break;
-      }
-      return str;
-    },
     //获取配置文件信息
     getConfigStationInfo: function getConfigStationInfo() {
       var _this3 = this;

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
unpackage/dist/dev/mp-weixin/pages/new-site/new-site.wxml


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 49 - 49
unpackage/dist/dev/mp-weixin/pages/new-site/new-site.wxss


Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott