Răsfoiți Sursa

refactor(charging): 移除未使用的支付和账户相关代码

- 移除了被注释掉的 get_paymentMsg 方法
- 移除了被注释掉的 getAccountInfo 方法
- 移除了未使用的统一下单并启动接口中的订阅消息相关代码
- 将订单类型判断从 isEcUser 改为 isFirmUser
- 移除了被注释掉的查询订单状态相关代码
zouzexu 3 zile în urmă
părinte
comite
982c86b7df

+ 1 - 48
subPackages/charging/terminal/terminal.vue

@@ -235,32 +235,6 @@ export default {
 				}
 			})
 		},
-		// get_paymentMsg() {
-		// 	// maspStatus(1:待补缴,2:已补缴)realPredictServiceCost平台;maspAmount第三方
-		// 	this.$api.base("post", "/chargeApi/queryOrderList-arrearage", {}, {}).then(res => {
-		// 		this.payment_msg = res.data
-		// 	})
-		// },
-		//获取账户信息
-		// getAccountInfo() {
-		// 	if (this.personal == 1) {
-		// 		//获取个人账户信息
-		// 		this.$api.base("post", "/chargeApi/getUserAccount", {}, {}).then(res => {
-		// 			this.accountInfo.balance = res.userAccount.balance;
-		// 		})
-		// 	} else {
-		// 		//获取集团账户信息
-		// 		this.$api.base("post", "/chargeApi/getEcUserAccount", {}, {
-		// 			error: false
-		// 		}).then(res => {
-		// 			this.ecInfo = res.ecInfo;
-		// 			this.accountInfo.balance = res.ecUserAccount.balance;
-		// 		}).catch(err => {
-		// 			this.accountInfo.balance = 0;
-		// 			this.$app.popup.alert(err.msg, "温馨提示");
-		// 		})
-		// 	}
-		// },
 		//切换账户
 		changeAccount(type) {
 			if (this.personal == type) {
@@ -271,7 +245,6 @@ export default {
 		},
 		//当前集团折扣价
 		getCurrEcPrice() {
-
 			if (!this.nowPriceTime) {
 				return 0;
 			}
@@ -322,12 +295,6 @@ export default {
 		},
 		get_subMessage() {
 			let _this = this
-			// uni.requestSubscribeMessage({
-			// 	tmplIds: ['03bv7QSrzH4DSjmNsI9P0lq0Vj3sBwpN5mgfZln7Rc4'],
-			// 	success(res) {
-			// 		_this.startChangeAndOrder();
-			// 	}
-			// })
 			_this.startChangeAndOrder();
 
 		},
@@ -338,7 +305,7 @@ export default {
 		//统一下单并启动接口
 		startChangeAndOrder() {
 			var obj = {
-				orderType: this.deviceInfo.isEcUser ? 1 : 0, //订单类型 0-平台 1-企业
+				orderType: this.deviceInfo.isFirmUser ? 1 : 0, //订单类型 0-平台 1-企业
 				equipmentId: this.deviceInfo.equipmentId,
 				stationId: this.deviceInfo.stationId,
 				couponId: null,
@@ -366,20 +333,6 @@ export default {
 				}
 			})
 		},
-		// 查询订单
-		checkedStartStatus() {
-			this.$api.base("get", "/applet/v1/station/charging-cost", {}, {}).then(res => {
-				if (res.data.orderStatus == 2) {
-					this.$app.popup.confirm("您有一个进行中充电订单,不可再次启动。", null, {
-						showCancel: false,
-						confirmText: "查看订单"
-					}).then(cres => {
-						this.$app.url.goto('/subPackages/charging/charging/charging?chargeOrderNo=' + res.data.chargeOrderNo +
-							"&deviceId=" + this.deviceInfo.id, false);
-					});
-				}
-			})
-		},
 	}
 }
 </script>

Fișier diff suprimat deoarece este prea mare
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/subPackages/charging/terminal/terminal.js.map


+ 1 - 47
unpackage/dist/dev/mp-weixin/subPackages/charging/terminal/terminal.js

@@ -450,32 +450,6 @@ var _default = {
         }
       });
     },
-    // get_paymentMsg() {
-    // 	// maspStatus(1:待补缴,2:已补缴)realPredictServiceCost平台;maspAmount第三方
-    // 	this.$api.base("post", "/chargeApi/queryOrderList-arrearage", {}, {}).then(res => {
-    // 		this.payment_msg = res.data
-    // 	})
-    // },
-    //获取账户信息
-    // getAccountInfo() {
-    // 	if (this.personal == 1) {
-    // 		//获取个人账户信息
-    // 		this.$api.base("post", "/chargeApi/getUserAccount", {}, {}).then(res => {
-    // 			this.accountInfo.balance = res.userAccount.balance;
-    // 		})
-    // 	} else {
-    // 		//获取集团账户信息
-    // 		this.$api.base("post", "/chargeApi/getEcUserAccount", {}, {
-    // 			error: false
-    // 		}).then(res => {
-    // 			this.ecInfo = res.ecInfo;
-    // 			this.accountInfo.balance = res.ecUserAccount.balance;
-    // 		}).catch(err => {
-    // 			this.accountInfo.balance = 0;
-    // 			this.$app.popup.alert(err.msg, "温馨提示");
-    // 		})
-    // 	}
-    // },
     //切换账户
     changeAccount: function changeAccount(type) {
       if (this.personal == type) {
@@ -533,12 +507,6 @@ var _default = {
     },
     get_subMessage: function get_subMessage() {
       var _this = this;
-      // uni.requestSubscribeMessage({
-      // 	tmplIds: ['03bv7QSrzH4DSjmNsI9P0lq0Vj3sBwpN5mgfZln7Rc4'],
-      // 	success(res) {
-      // 		_this.startChangeAndOrder();
-      // 	}
-      // })
       _this.startChangeAndOrder();
     },
     // 主动发起购券操作
@@ -549,7 +517,7 @@ var _default = {
     startChangeAndOrder: function startChangeAndOrder() {
       var _this5 = this;
       var obj = {
-        orderType: this.deviceInfo.isEcUser ? 1 : 0,
+        orderType: this.deviceInfo.isFirmUser ? 1 : 0,
         //订单类型 0-平台 1-企业
         equipmentId: this.deviceInfo.equipmentId,
         stationId: this.deviceInfo.stationId,
@@ -575,20 +543,6 @@ var _default = {
           _this5.$app.popup.alert(res.msg, "温馨提示");
         }
       });
-    },
-    // 查询订单
-    checkedStartStatus: function checkedStartStatus() {
-      var _this6 = this;
-      this.$api.base("get", "/applet/v1/station/charging-cost", {}, {}).then(function (res) {
-        if (res.data.orderStatus == 2) {
-          _this6.$app.popup.confirm("您有一个进行中充电订单,不可再次启动。", null, {
-            showCancel: false,
-            confirmText: "查看订单"
-          }).then(function (cres) {
-            _this6.$app.url.goto('/subPackages/charging/charging/charging?chargeOrderNo=' + res.data.chargeOrderNo + "&deviceId=" + _this6.deviceInfo.id, false);
-          });
-        }
-      });
     }
   }
 };

Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff