Переглянути джерело

```
refactor(charging): 移动充电相关页面到subPackages目录

- 将充电页面从pages/charging移动到subPackages/charging/charging
- 更新订单完成跳转逻辑,将订单状态4作为结束条件
- 修正订单详情跳转路径到新的subPackages结构
- 优化电站页面连接器列表过滤逻辑

refactor(order): 移动订单相关页面到subPackages目录

- 将订单详情页面从pages/order-detail移动到subPackages/order/order-detail
- 删除原pages/order-detail目录
- 更新订单详情API接口和数据结构
- 修正订单列表页面的API响应数据结构

refactor(coupon): 移动优惠券相关页面到subPackages目录

- 将优惠券购买页面从pages/coupon-buy移动到subPackages/coupon/coupon-buy
- 将优惠券列表页面从pages/coupons移动到subPackages/coupon/coupons
- 将充值记录页面从pages/recharge-log移动到subPackages/coupon/recharge-log
- 更新相关页面跳转路径

refactor(site): 移动电站相关页面到subPackages目录

- 将电站页面从pages/site移动到subPackages/charging/site
- 将新电站页面从pages/new-site移动到subPackages/charging/new-site
- 将更多电站页面从pages/site-more移动到subPackages/charging/site-more
- 将终端页面从pages/terminal移动到subPackages/charging/terminal

refactor(other): 移动其他页面到subPackages目录

- 将横幅页面从pages/banner-page移动到subPackages/other/banner-page
- 将反馈页面从pages/feedback移动到subPackages/other/feedback
- 将反馈回复页面从pages/feedback-reply移动到subPackages/other/feedback-reply
- 将搜索页面从pages/search移动到subPackages/other/search
- 将网页页面从pages/web移动到subPackages/other/web
```

zouzexu 23 годин тому
батько
коміт
c3cb02581a
32 змінених файлів з 256 додано та 244 видалено
  1. 0 201
      pages/order-detail/order-detail.vue
  2. 0 0
      subPackages/charging/charging/charging.css
  3. 2 4
      subPackages/charging/charging/charging.vue
  4. 0 0
      subPackages/charging/new-site/new-site.css
  5. 21 18
      subPackages/charging/new-site/new-site.vue
  6. 0 0
      subPackages/charging/site-more/site-more.css
  7. 9 10
      subPackages/charging/site-more/site-more.vue
  8. 0 0
      subPackages/charging/site/site.css
  9. 0 0
      subPackages/charging/site/site.vue
  10. 0 0
      subPackages/charging/site/ysbth2.ttf
  11. 0 0
      subPackages/charging/terminal/terminal.css
  12. 1 1
      subPackages/charging/terminal/terminal.vue
  13. 0 0
      subPackages/coupon/coupon-buy/coupon-buy.css
  14. 2 2
      subPackages/coupon/coupon-buy/coupon-buy.vue
  15. 0 0
      subPackages/coupon/coupon-buy/ysbth.ttf
  16. 0 0
      subPackages/coupon/coupons/coupons.css
  17. 1 1
      subPackages/coupon/coupons/coupons.vue
  18. 0 0
      subPackages/coupon/recharge-log/recharge-log.css
  19. 0 0
      subPackages/coupon/recharge-log/recharge-log.vue
  20. 0 0
      subPackages/order/order-detail/order-detail.css
  21. 212 0
      subPackages/order/order-detail/order-detail.vue
  22. 0 0
      subPackages/order/order/order.css
  23. 7 6
      subPackages/order/order/order.vue
  24. 0 0
      subPackages/other/banner-page/banner-page.css
  25. 0 0
      subPackages/other/banner-page/banner-page.vue
  26. 0 0
      subPackages/other/feedback-reply/feedback-reply.css
  27. 0 0
      subPackages/other/feedback-reply/feedback-reply.vue
  28. 0 0
      subPackages/other/feedback/feedback.css
  29. 1 1
      subPackages/other/feedback/feedback.vue
  30. 0 0
      subPackages/other/search/search.css
  31. 0 0
      subPackages/other/search/search.vue
  32. 0 0
      subPackages/other/web/web.vue

+ 0 - 201
pages/order-detail/order-detail.vue

@@ -1,201 +0,0 @@
-<template>
-	<ax-body>
-		<view class="page-background">
-			<image src="@/static/img/order-detail-bg.png" mode="widthFix"></image>
-		</view>
-		<view class="body">
-			<view style="height: 220rpx;"></view>
-			<!-- 基础信息 -->
-			<view class="base-info">
-				<view class="content">
-					<view class="name">
-						<image src="@/static/img/order-detail-icon.png" class="icon" mode="widthFix"></image>
-						<text>充电度数</text>
-					</view>
-					<view class="val"><text class="value">{{orderInfo.totalCharge || 0}}</text><text
-							class="unit">度电</text></view>
-				</view>
-				<!-- <image src="@/static/img/order-detail-bg.png" class="bg" mode="widthFix"></image> -->
-			</view>
-			<!-- 单元格 -->
-			<view class="cell-group multi-line">
-				<view class="cell">
-					<view class="lable">起始时间</view>
-					<view class="contet">{{orderInfo.startTime || '未知'}}</view>
-				</view>
-				<view class="cell">
-					<view class="lable">终止时间</view>
-					<view class="contet">{{orderInfo.endTime || '未知'}}</view>
-				</view>
-				<view class="cell">
-					<view class="lable">终止方式</view>
-					<view class="contet">{{getStopType()}}</view>
-				</view>
-			</view>
-			<view class="cell-group" v-if="orderInfo.maspStatus!=0">
-				<template v-if="orderInfo.maspStatus===1">
-					<view class="cell">
-						<view class="load-payment">待补缴</view>
-						<view class="load-payment-btn" @click="$app.url.goto('/pages/coupon-buy/coupon-buy')">去补缴</view>
-					</view>
-					<view class="cell">
-						<view class="lable">超充金额</view>
-						<view class="flow-money">{{(orderInfo.maspAmount+orderInfo.maspRealAmount).toFixed(2)||'0'}}元
-						</view>
-					</view>
-				</template>
-				<template v-else-if="orderInfo.maspStatus===2">
-					<view class="finish-payment">已补缴</view>
-					<view class="cell">
-						<view class="lable">超充金额</view>
-						<view class="contet">{{(orderInfo.maspAmount+orderInfo.maspRealAmount).toFixed(2)}}</view>
-					</view>
-					<view class="cell">
-						<view class="lable">补缴时间</view>
-						<view class="contet">{{orderInfo.maspTime}}</view>
-					</view>
-				</template>
-			</view>
-			<!-- 单元格 -->
-			<view class="cell-group">
-				<view class="cell">
-					<view class="lable">订单状态</view>
-					<view class="contet">{{getOrderStatus(orderInfo.status)}}</view>
-				</view>
-				<view class="cell">
-					<view class="lable">订单编号</view>
-					<view class="contet">{{orderInfo.id}}</view>
-				</view>
-				<view class="cell">
-					<view class="lable">订单时间</view>
-					<view class="contet">{{orderInfo.createTime}}</view>
-				</view>
-				<view class="cell">
-					<view class="lable">充电电站</view>
-					<view class="contet">{{deviceInfo.thirdPartyStationName}}</view>
-				</view>
-				<view class="cell">
-					<view class="lable">终端名称</view>
-					<view class="contet">{{deviceInfo.deviceName}}</view>
-				</view>
-				<view class="cell">
-					<view class="lable">终端编号</view>
-					<view class="contet">{{deviceInfo.deviceNo}}</view>
-				</view>
-				<view class="cell">
-					<view class="lable">车位编号</view>
-					<view class="contet">{{deviceInfo.parkNo ? deviceInfo.parkNo : "无"}}</view>
-				</view>
-				<!-- <view class="cell"><view class="lable">电费</view><view class="contet">{{orderInfo.thirdPartyElecfee?orderInfo.thirdPartyElecfee.toFixed(4):"0.0000"}}元</view></view>
-				<view class="cell"><view class="lable">服务费</view><view class="contet">{{clcaServicePrice(orderInfo)}}元</view></view> -->
-				<view class="hr"></view>
-				<view class="cell">
-					<view class="lable">订单金额</view>
-					<view class="contet sum">{{(orderInfo.discountMoney+orderInfo.firmPrice+orderInfo.couponPrice+orderInfo.realCost).toFixed(4)||"0.0000"}}元</view>
-				</view>
-				<view class="cell" v-if="orderInfo.discountMoney">
-					<view class="lable">{{orderInfo.discountDes}}</view>
-					<view class="contet sum">-{{orderInfo.discountMoney?orderInfo.discountMoney.toFixed(4):"0.0000"}}元
-					</view>
-				</view>
-				<view class="cell" v-if="orderInfo.firmPrice">
-					<view class="lable">企业专享价减</view>
-					<view class="contet sum">-{{orderInfo.firmPrice?orderInfo.firmPrice.toFixed(4):"0.0000"}}元</view>
-				</view>
-				<view class="cell" v-if="orderInfo.couponPrice">
-					<view class="lable">优惠券减</view>
-					<view class="contet sum">-{{orderInfo.couponPrice?orderInfo.couponPrice.toFixed(4):"0.0000"}}元</view>
-				</view>
-				<view class="cell">
-					<view class="lable">实际付款</view>
-					<view class="contet sum">{{orderInfo.realCost?orderInfo.realCost.toFixed(4):"0.0000"}}元</view>
-				</view>
-			</view>
-			<view class="tips">
-				<image src="@/static/img/warn.svg" class="icon"></image>
-				<text>本次充电费用已从您的“充电抵扣券”中抵扣结算</text>
-			</view>
-		</view>
-	</ax-body>
-</template>
-
-<script>
-	export default {
-		onLoad(opts) {
-			console.log("启动充值页面的参数:", opts)
-			this.getOrderInfo(opts.orderId);
-		},
-		data() {
-			return {
-				orderInfo: {
-					id: 1
-				}, //订单信息
-				deviceInfo: {}, //充电桩详情
-			}
-		},
-		methods: {
-			getStopType() {
-				var str = "用户主动终止";
-				if (this.orderInfo.stopType) {
-					if (this.orderInfo.stopType == 1) {
-						str = "用户主动终止";
-					} else if (this.orderInfo.stopType == 2) {
-						str = "充电桩主动终止";
-					}
-				}
-				return str;
-			},
-			clcaServicePrice() {
-				var serivp = this.orderInfo.realCost - this.orderInfo.thirdPartyElecfee;
-				if (this.orderInfo.discountMoney) {
-					//有优惠价,服务费显示把优惠价加回去
-					serivp = serivp + this.orderInfo.discountMoney;
-				}
-				return serivp ? serivp.toFixed(4) : "0.0000"
-			},
-			//查询订单详情
-			getOrderInfo(orderId) {
-				this.$api.base("post", "/chargeApi/queryIsSuccessStop", {
-					"id": orderId
-				}, {}).then(res => {
-					console.log("订单详情:", res)
-					this.orderInfo = res.obj.orderInfo;
-					this.deviceInfo = res.obj.deviceInfo;
-				})
-			},
-			//拆解时间
-			splitTime(time, index) {
-				if (!time) {
-					return;
-				}
-				return time.split(" ")[index];
-			},
-			getOrderStatus(status) {
-				var str = "";
-				//状态0待启动 1 充电中 2 结算中 3 已完成, 5未成功充电
-				switch (status) {
-					case 0:
-						str = "待启动";
-						break;
-					case 1:
-						str = "充电中";
-						break;
-					case 2:
-						str = "结算中";
-						break;
-					case 3:
-						str = "已完成";
-						break;
-					case 5:
-						str = "未成功充电";
-						break;
-				}
-				return str;
-			}
-		}
-	}
-</script>
-
-<style scoped>
-	@import url("order-detail.css");
-</style>

+ 0 - 0
pages/charging/charging.css → subPackages/charging/charging/charging.css


+ 2 - 4
pages/charging/charging.vue → subPackages/charging/charging/charging.vue

@@ -148,11 +148,11 @@ export default {
 				this.deviceInfo = res.data;
 
 				// 检查订单状态,已完成或已结束则跳转订单详情
-				if (res.data.orderStatus == 3 || res.data.orderStatus == 5) {
+				if (res.data.orderStatus == 4 || res.data.orderStatus == 5) {
 					uni.hideLoading();
 					this.stopPolling();
 					clearInterval(this.timer.id);
-					this.$app.url.goto('/pages/order-detail/order-detail?orderId=' + res.data.chargeOrderId, false);
+					this.$app.url.goto('/subPackages/order/order-detail?orderId=' + res.data.chargeOrderId, false);
 					return;
 				}
 
@@ -160,10 +160,8 @@ export default {
 				if (res.data.orderStatus == 2 && !this.timer.isSatrt) {
 					this.startup();
 				}
-
 				// 检查是否显示结束按钮
 				this.checkShowEndBtn(res.data.startTime);
-
 				// 启动轮询
 				this.startPolling();
 			})

+ 0 - 0
pages/new-site/new-site.css → subPackages/charging/new-site/new-site.css


+ 21 - 18
pages/new-site/new-site.vue → subPackages/charging/new-site/new-site.vue

@@ -111,7 +111,7 @@
 							<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 class="name">{{ formatStatusName(item.statusName) }}</view>
 								</view>
 							</view>
 							<view class="info">
@@ -242,15 +242,11 @@ export default {
 
 		getStationsInfo() {
 			let location = this.$app.storage.get('USER_LOCATION')
-			console.log(parseInt(this.stationInfo.stationId), 'stationId');
-			console.log(location.split(",")[0], 'longitude');
-			console.log(location.split(",")[1], 'latitude');
 			this.$api.base("get", "/applet/v1/station/detail", {
 				stationId: parseInt(this.stationInfo.stationId),
 				longitude: location.split(",")[0] || 0,
 				latitude: location.split(",")[1] || 0
 			}, {}).then(res => {
-				console.log("电站详情:", res)
 				res.data.pictures = JSON.parse(res.data.pictures)
 				const countMapping = {
 					'空闲': res.data.idleCount,
@@ -266,23 +262,27 @@ export default {
 				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
+			// 根据选择的状态过滤 connectorList - 先过滤再取前3条
 			if (e.status === 1) { // 空闲
-				this.filteredConnectorList = this.stationDetail.connectorList.slice(0, 3).filter(connector => connector.status == 1);
+				this.filteredConnectorList = this.stationDetail.connectorList
+					.filter(connector => connector.status == 1)
+					.slice(0, 3);
+				console.log("空闲过滤后的connectorList:", this.filteredConnectorList);
 			} else if (e.status === 2) { // 占用
-				this.filteredConnectorList = this.stationDetail.connectorList.slice(0, 3).filter(connector =>
-					connector.status == 2 || connector.status == 3 || connector.status == 4
-				);
+				this.filteredConnectorList = this.stationDetail.connectorList
+					.filter(connector => connector.status == 2)
+					.slice(0, 3);
+				console.log("占用过滤后的connectorList:", this.filteredConnectorList);
 			} else if (e.status === 0) { // 离线
-				this.filteredConnectorList = this.stationDetail.connectorList.slice(0, 3).filter(connector => connector.status == 0);
+				this.filteredConnectorList = this.stationDetail.connectorList
+					.filter(connector => connector.status == 0)
+					.slice(0, 3);
+				console.log("离线过滤后的connectorList:", this.filteredConnectorList);
 			}
 		},
 
@@ -298,7 +298,10 @@ export default {
 			}
 			return obj;
 		},
-
+		formatStatusName(statusName) {
+			// 去掉括号及括号内的内容
+			return statusName.replace(/\([^)]*\)/g, '');
+		},
 		//获取配置文件信息
 		getConfigStationInfo() {
 			this.$api.static(this.$config.url.configUrl + "stationConfi.json").then(res => {
@@ -347,15 +350,15 @@ export default {
 			if (item.status == 0 || item.status == 255) {
 				return;
 			}
-			this.$app.url.goto('/pages/terminal/terminal?deviceId=' + item.connectorCode + "&deviceStatus=" + item.status);
+			this.$app.url.goto('/subPackages/charging/terminal?deviceId=' + item.connectorCode + "&deviceStatus=" + item.status);
 		},
 		//去查看全部电站
 		toDeiceAll() {
-			this.$app.url.goto('/pages/site-more/site-more?stationId=' + this.stationDetail.stationId)
+			this.$app.url.goto('/subPackages/charging/site-more?stationId=' + this.stationDetail.stationId)
 		},
 		//去查看全部电价
 		toPriceAll() {
-			this.$app.url.goto('/pages/site-more/site-more?show=1&stationId=' + this.stationDetail.stationId)
+			this.$app.url.goto('/subPackages/charging/site-more?show=1&stationId=' + this.stationDetail.stationId)
 		},
 		//扫一扫
 		sacn() {

+ 0 - 0
pages/site-more/site-more.css → subPackages/charging/site-more/site-more.css


+ 9 - 10
pages/site-more/site-more.vue → subPackages/charging/site-more/site-more.vue

@@ -40,7 +40,7 @@
 					<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 class="name">{{ formatStatusName(item.statusName) }}</view>
 						</view>
 					</view>
 					<view class="info">
@@ -53,7 +53,7 @@
 			<!-- 价格列表 -->
 			<view v-else class="prices list">
 				<view v-for="(item, index) in prices.data.priceList" :key="index" class="price"
-					:class="{ active: prices.index == index }">
+					:class="{ active: item.currentPeriod }">
 					<view class="header">
 						<view class="icon">{{ item.periodFlagName }}</view>
 						<view class="value">{{ item.timePeriod }}</view>
@@ -128,23 +128,22 @@ export default {
 			if (!stationId) {
 				return;
 			}
+			// 终端列表
 			this.$api.base("get", "/applet/v1/station/connectors", { "stationId": stationId }, {}).then(res => {
 				this.stationInfo = res.data;
-				//当前的价格时间断的下标
-				for (var i = 0; i < this.prices.data.length; i++) {
-					if (this.nowPriceTime.id == this.prices.data[i].id) {
-						this.prices.index = i;
-						break
-					}
-				}
+
 			})
 		},
+		// 价格列表
 		getStationPriceList(stationId) {
 			this.$api.base("get", "/applet/v1/station/prices", { "stationId": stationId }, {}).then(res => {
 				this.prices.data = res.data;
-				// this.nowPriceTime = res.data[this.prices.index];
 			})
 		},
+		formatStatusName(statusName) {
+			// 去掉括号及括号内的内容
+			return statusName.replace(/\([^)]*\)/g, '');
+		},
 		getSatesObj(item) {
 			//{name:'离线',color:'grey'},{name:'空闲',color:'green'},{name:'占用',color:'blue'}
 			var obj = {};

+ 0 - 0
pages/site/site.css → subPackages/charging/site/site.css


+ 0 - 0
pages/site/site.vue → subPackages/charging/site/site.vue


+ 0 - 0
pages/site/ysbth2.ttf → subPackages/charging/site/ysbth2.ttf


+ 0 - 0
pages/terminal/terminal.css → subPackages/charging/terminal/terminal.css


+ 1 - 1
pages/terminal/terminal.vue → subPackages/charging/terminal/terminal.vue

@@ -169,7 +169,7 @@ export default {
 		this.userInfo = this.$app.storage.get(this.$config.keyname.userInfo);
 		console.log(this.userInfo, '获取到的用户信息');
 		if (!this.userInfo.phone) {
-			this.$app.url.goto('/pages/login/login')
+			this.$app.url.goto('/pages/index/index')
 			return;
 		}
 		// this.$api.login({

+ 0 - 0
pages/coupon-buy/coupon-buy.css → subPackages/coupon/coupon-buy/coupon-buy.css


+ 2 - 2
pages/coupon-buy/coupon-buy.vue → subPackages/coupon/coupon-buy/coupon-buy.vue

@@ -143,7 +143,7 @@ export default {
 					confirmText: "查看订单"
 				}).then((res) => {
 					if (res) {
-						this.$app.url.goto('/pages/order/order?index=' + 1);
+						this.$app.url.goto('/subPackages/order/order?index=' + 1);
 					}
 				})
 				return
@@ -218,7 +218,7 @@ export default {
 			})
 		},
 		topage_order() {
-			this.$app.url.goto('/pages/order-detail/order-detail?orderId=' + this.order_info.id);
+			this.$app.url.goto('/subPackages/order/order-detail?orderId=' + this.order_info.id);
 		},
 		getMyAccount() {
 			this.$api.base("get", "/applet/v1/user/getUserInfo", {}, {}).then(res => {

+ 0 - 0
pages/coupon-buy/ysbth.ttf → subPackages/coupon/coupon-buy/ysbth.ttf


+ 0 - 0
pages/coupons/coupons.css → subPackages/coupon/coupons/coupons.css


+ 1 - 1
pages/coupons/coupons.vue → subPackages/coupon/coupons/coupons.vue

@@ -139,7 +139,7 @@ export default {
 		},
 		goto_orderDetail(e) {
 			uni.navigateTo({
-				url: `/pages/order-detail/order-detail?orderId=${e.useOrderId}`
+				url: `/subPackages/order/order-detail?orderId=${e.useOrderId}`
 			})
 		},
 		get_coupons(e) {

+ 0 - 0
pages/recharge-log/recharge-log.css → subPackages/coupon/recharge-log/recharge-log.css


+ 0 - 0
pages/recharge-log/recharge-log.vue → subPackages/coupon/recharge-log/recharge-log.vue


+ 0 - 0
pages/order-detail/order-detail.css → subPackages/order/order-detail/order-detail.css


+ 212 - 0
subPackages/order/order-detail/order-detail.vue

@@ -0,0 +1,212 @@
+<template>
+	<ax-body>
+		<view class="page-background">
+			<image src="@/static/img/order-detail-bg.png" mode="widthFix"></image>
+		</view>
+		<view class="body">
+			<view style="height: 220rpx;"></view>
+			<!-- 基础信息 -->
+			<view class="base-info">
+				<view class="content">
+					<view class="name">
+						<image src="@/static/img/order-detail-icon.png" class="icon" mode="widthFix"></image>
+						<text>充电度数</text>
+					</view>
+					<view class="val"><text class="value">{{ orderInfo.totalCharge || 0 }}</text><text
+							class="unit">度电</text></view>
+				</view>
+				<!-- <image src="@/static/img/order-detail-bg.png" class="bg" mode="widthFix"></image> -->
+			</view>
+			<!-- 单元格 -->
+			<view class="cell-group multi-line">
+				<view class="cell">
+					<view class="lable">起始时间</view>
+					<view class="contet">{{ orderInfo.startTime || '未知' }}</view>
+				</view>
+				<view class="cell">
+					<view class="lable">终止时间</view>
+					<view class="contet">{{ orderInfo.endTime || '未知' }}</view>
+				</view>
+				<view class="cell">
+					<view class="lable">终止方式</view>
+					<view class="contet">{{ getStopType() }}</view>
+				</view>
+			</view>
+			<view class="cell-group" v-if="orderInfo.maspStatus != 0">
+				<template v-if="orderInfo.maspStatus === 1">
+					<view class="cell">
+						<view class="load-payment">待补缴</view>
+						<view class="load-payment-btn" @click="$app.url.goto('/pages/coupon-buy/coupon-buy')">去补缴</view>
+					</view>
+					<view class="cell">
+						<view class="lable">超充金额</view>
+						<view class="flow-money">{{ (orderInfo.maspAmount + orderInfo.maspRealAmount).toFixed(2) || '0'
+						}}元
+						</view>
+					</view>
+				</template>
+				<template v-else-if="orderInfo.maspStatus === 2">
+					<view class="finish-payment">已补缴</view>
+					<view class="cell">
+						<view class="lable">超充金额</view>
+						<view class="contet">{{ (orderInfo.maspAmount + orderInfo.maspRealAmount).toFixed(2) }}</view>
+					</view>
+					<view class="cell">
+						<view class="lable">补缴时间</view>
+						<view class="contet">{{ orderInfo.maspTime }}</view>
+					</view>
+				</template>
+			</view>
+			<!-- 单元格 -->
+			<view class="cell-group">
+				<view class="cell">
+					<view class="lable">订单状态</view>
+					<view class="contet">{{ getOrderStatus(orderInfo.status) }}</view>
+				</view>
+				<view class="cell">
+					<view class="lable">订单编号</view>
+					<view class="contet">{{ orderInfo.chargeOrderNo }}</view>
+				</view>
+				<view class="cell">
+					<view class="lable">充电时长</view>
+					<view class="contet">{{ formatDuration(orderInfo.chargeTime) || '--' }}</view>
+				</view>
+				<view class="cell">
+					<view class="lable">充电电站</view>
+					<view class="contet">{{ orderInfo.stationName }}</view>
+				</view>
+				<view class="cell">
+					<view class="lable">终端名称</view>
+					<view class="contet">{{ orderInfo.connectorName }}</view>
+				</view>
+				<view class="cell">
+					<view class="lable">终端编号</view>
+					<view class="contet">{{ orderInfo.connectorId }}</view>
+				</view>
+				<view class="hr"></view>
+				<view class="cell">
+					<view class="lable">订单金额</view>
+					<view class="contet sum">
+						{{ orderInfo.realCost }}元
+					</view>
+				</view>
+				<view class="cell" v-if="orderInfo.discountMoney">
+					<view class="lable">{{ orderInfo.discountDes }}</view>
+					<view class="contet sum">-{{ orderInfo.discountMoney ? orderInfo.discountMoney.toFixed(4) : "0.00"
+					}}元
+					</view>
+				</view>
+				<view class="cell" v-if="orderInfo.firmPrice">
+					<view class="lable">企业专享价减</view>
+					<view class="contet sum">-{{ orderInfo.firmPrice ? orderInfo.firmPrice.toFixed(4) : "0.00" }}元
+					</view>
+				</view>
+				<view class="cell" v-if="orderInfo.couponPrice">
+					<view class="lable">优惠券减</view>
+					<view class="contet sum">-{{ orderInfo.couponPrice ? orderInfo.couponPrice.toFixed(4) : "0.00" }}元
+					</view>
+				</view>
+				<view class="cell">
+					<view class="lable">实际付款</view>
+					<view class="contet sum">{{ orderInfo.realCost || "0.00" }}元</view>
+				</view>
+			</view>
+			<view class="tips">
+				<image src="@/static/img/warn.svg" class="icon"></image>
+				<text>本次充电费用已从您的“充电抵扣券”中抵扣结算</text>
+			</view>
+		</view>
+	</ax-body>
+</template>
+
+<script>
+export default {
+	onLoad(opts) {
+		console.log("启动充值页面的参数:", opts)
+		this.getOrderInfo(opts.chargeOrderNo);
+	},
+	data() {
+		return {
+			orderInfo: {
+				id: 1
+			}, //订单信息
+			deviceInfo: {}, //充电桩详情
+		}
+	},
+	methods: {
+		getStopType() {
+			var str = "用户主动终止";
+			if (this.orderInfo.stopType) {
+				if (this.orderInfo.stopType == 1) {
+					str = "用户主动终止";
+				} else if (this.orderInfo.stopType == 2) {
+					str = "充电桩主动终止";
+				}
+			}
+			return str;
+		},
+		clcaServicePrice() {
+			var serivp = this.orderInfo.realCost - this.orderInfo.thirdPartyElecfee;
+			if (this.orderInfo.discountMoney) {
+				//有优惠价,服务费显示把优惠价加回去
+				serivp = serivp + this.orderInfo.discountMoney;
+			}
+			return serivp ? serivp.toFixed(4) : "0.0000"
+		},
+		//查询订单详情
+		getOrderInfo(chargeOrderNo) {
+			this.$api.base("get", `/applet/v1/charge/queryOrder/${chargeOrderNo}`, {}, {}).then(res => {
+				console.log("订单详情:", res)
+				this.orderInfo = res.data;
+				// this.deviceInfo = res.obj.deviceInfo;
+			})
+		},
+		//拆解时间
+		splitTime(time, index) {
+			if (!time) {
+				return;
+			}
+			return time.split(" ")[index];
+		},
+		formatDuration(seconds) {
+			if (!seconds || seconds < 0) {
+				return "0分钟";
+			}
+			const h = Math.floor(seconds / 3600);
+			const m = Math.floor((seconds % 3600) / 60);
+
+			if (h > 0) {
+				return `${h}小时${m}分钟`;
+			} else {
+				return `${m}分钟`;
+			}
+		},
+		getOrderStatus(status) {
+			var str = "";
+			//状态0待启动 1 充电中 2 结算中 3 已完成, 5未成功充电
+			switch (status) {
+				case 0:
+					str = "待启动";
+					break;
+				case 1:
+					str = "充电中";
+					break;
+				case 2:
+					str = "结算中";
+					break;
+				case 3:
+					str = "已完成";
+					break;
+				case 5:
+					str = "未成功充电";
+					break;
+			}
+			return str;
+		}
+	}
+}
+</script>
+
+<style scoped>
+@import url("order-detail.css");
+</style>

+ 0 - 0
pages/order/order.css → subPackages/order/order/order.css


+ 7 - 6
pages/order/order.vue → subPackages/order/order/order.vue

@@ -17,7 +17,8 @@
 					<view class="subinfo" @click="toOrderDeile(item)">
 						<view>
 							<view>订单时间: {{ item.createTime }}</view>
-							<view>终端名称: {{ item.params.deviceName }}</view>
+							<view>电站名称: {{ item.stationName }}</view>
+							<view>终端编号: {{ item.connectorId }}</view>
 						</view>
 					</view>
 					<view class="bottom" @click="toOrderDeile(item)">
@@ -35,7 +36,7 @@
 					<view class="button-box">
 						<view @click.stop="customerService()" class="invoice">开发票</view>
 						<view class="arrears-btn-box" v-if="item.maspStatus === 1"
-							@click="$app.url.goto('/pages/coupon-buy/coupon-buy')">
+							@click="$app.url.goto('/subPackages/coupon/coupon-buy')">
 							<view class="overflow-mon">超{{ (item.maspAmount + item.maspRealAmount).toFixed(2) }}元</view>
 							<view class="arrears-btn">去补缴</view>
 						</view>
@@ -185,8 +186,8 @@ export default {
 			}
 			this.$api.base("post", "/applet/v1/charge/getPage", this.formSubmitPara, {}).then(res => {
 				console.log("订单列表:", res)
-				this.orders.data = this.orders.data.concat(res.table.rows);
-				this.orders.total = res.table.total;
+				this.orders.data = this.orders.data.concat(res.data.records);
+				this.orders.total = res.data.records;
 			})
 		},
 		//映射状态信息
@@ -213,9 +214,9 @@ export default {
 		toOrderDeile(item) {
 			if (item.status == 0 || item.status == 1) {
 				//有充电中的订单,点击时跳转到充电中页面进行查看
-				this.$app.url.goto('/pages/charging/charging?orderId=' + item.id + "&deviceId=" + item.deviceId, true);
+				this.$app.url.goto('/subPackages/charging/charging?orderId=' + item.id + "&deviceId=" + item.deviceId, true);
 			} else {
-				this.$app.url.goto('/pages/order-detail/order-detail?orderId=' + item.id);
+				this.$app.url.goto('/subPackages/order/order-detail?chargeOrderNo=' + item.chargeOrderNo);
 			}
 
 		},

+ 0 - 0
pages/banner-page/banner-page.css → subPackages/other/banner-page/banner-page.css


+ 0 - 0
pages/banner-page/banner-page.vue → subPackages/other/banner-page/banner-page.vue


+ 0 - 0
pages/feedback-reply/feedback-reply.css → subPackages/other/feedback-reply/feedback-reply.css


+ 0 - 0
pages/feedback-reply/feedback-reply.vue → subPackages/other/feedback-reply/feedback-reply.vue


+ 0 - 0
pages/feedback/feedback.css → subPackages/other/feedback/feedback.css


+ 1 - 1
pages/feedback/feedback.vue → subPackages/other/feedback/feedback.vue

@@ -10,7 +10,7 @@
 					<view class="subtitle">感谢您的每一条建议或反馈~</view>
 				</view>
 				<view class="em" style="font-size: 14px;"
-					@click="$app.url.goto('/pages/feedback-reply/feedback-reply')">查看反馈</view>
+					@click="$app.url.goto('/subPackages/other/feedback-reply')">查看反馈</view>
 			</view>
 
 			<view class="card form-type">

+ 0 - 0
pages/search/search.css → subPackages/other/search/search.css


+ 0 - 0
pages/search/search.vue → subPackages/other/search/search.vue


+ 0 - 0
pages/web/web.vue → subPackages/other/web/web.vue