Browse Source

修改页面上支付重定向url和增加退款说明、停车规则

CarlYang 3 years ago
parent
commit
3addfc29e5

+ 7 - 7
common/http.api.js

@@ -8,9 +8,9 @@ const install = (Vue, vm) => {
 	
 	let getuseinfo = (params = {}) => vm.$u.get(apiurl.getuseinfourl+'/'+params);
 	
-	let createOrder = (params = {}) => vm.$u.post(apiurl.createOrderurl, params);//
+	let createOrder = (params = {}) => vm.$u.post(apiurl.createOrderurl, params);
 	
-	let bindphone = (params = {}) => vm.$u.post(apiurl.bindphoneurl, params);//
+	let bindphone = (params = {}) => vm.$u.post(apiurl.bindphoneurl, params);
 	
 	let getPhoneLoginCode = (params = {}) => vm.$u.post(apiurl.phoneLoginCodeUrl, params);
 	
@@ -58,13 +58,13 @@ const install = (Vue, vm) => {
 	// 订单退款操作
 	let updateOrderRefund = (params = {}) => vm.$u.post(apiurl.updateOrderRefundApi, params);
 	// 获取订单退款详情
-	let getOrderRefundDetails = (params = {}) => vm.$u.get(apiurl.getOrderRefundDetailsApi + params.orderId)
+	let getOrderRefundDetails = (params = {}) => vm.$u.get(apiurl.getOrderRefundDetailsApi + params.orderId);
 	// 普通微信支付
-	let ordinaryWxPay = (params = {}) => vm.$u.post(apiurl.ordinaryWxPayApi, params)
+	let ordinaryWxPay = (params = {}) => vm.$u.post(apiurl.ordinaryWxPayApi, params);
 	// 包月微信支付
-	let monthlyWxPay = (params = {}) => vm.$u.post(apiurl.monthlyWxPayApi, params)
-	// 获取条款须知
-	let getSysterms = (params = {}) => vm.$u.get(apiurl.getSystermsApi + params.termsType)
+	let monthlyWxPay = (params = {}) => vm.$u.post(apiurl.monthlyWxPayApi, params);
+	// 获取自定义富文本内容: 0-包月须知 1-用户服务条款 2-隐私权政策信息 3-收费标准 4-退款温馨提示
+	let getSysterms = (params = {}) => vm.$u.get(apiurl.getSystermsApi + params.termsType);
 	// 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
 	vm.$u.api = {
 		feedbackAdd,

+ 8 - 5
pages/applyRefund/applyRefund.scss

@@ -1,15 +1,14 @@
 .apply-refund {
 	background-color: #F6F6FF;
-	// height: calc(100vh - 44px);
+	min-height: calc(100vh - 44px);
 	.apply-refund-form {
 		background-color: #fff;
 		font-size: 28rpx;
 		.apply-refund-form-item {
 			display: flex;
 			flex-wrap: wrap;
-			// height: 100rpx;
 			line-height: 100rpx;
-			padding: 0 17px;
+			padding: 0 34rpx;
 			border-bottom: solid 2px #f5f5f5;
 			.apply-refund-form-label {
 				width: 150rpx;
@@ -46,8 +45,12 @@
 		}
 	}
 	.apply-refund-form-submit {
-		padding: 0 50rpx;
-		margin-top: 50rpx;
+		padding: 0 34rpx;
+		margin: 50rpx 0;
+	}
+	.refund-tips {
+		padding: 34rpx;
+		background-color: #fff;
 	}
 	.pop-warp {
 		display: flex;

+ 31 - 6
pages/applyRefund/applyRefund.vue

@@ -32,6 +32,9 @@
 		<view class="apply-refund-form-submit">
 			<u-button type="primary" @click="submit">提交</u-button>
 		</view>
+		<view class="refund-tips" v-if="refundTipsContent">
+			<u-parse :html="refundTipsContent"></u-parse>
+		</view>
 		<u-mask :show="successPop" :zoom="true" :custom-style="{background: 'rgba(255, 255, 255, 0.8)'}">
 			<view class="pop-warp">
 				<view class="pop-warp-icon">
@@ -59,7 +62,9 @@
 					images: []
 				},
 				action: config.baseUrl + '/file/tencent/upload',
-				successPop: false
+				successPop: false,
+				// 退款温馨提示
+				refundTipsContent: ''
 			}
 		},
 		computed: {  
@@ -68,6 +73,7 @@
 		onLoad(page) {
 			this.refundForm.orderId = page.orderId
 			this.refundForm.refundAmount = Number(page.payAmount)
+			this.getSysterms(4)
 		},
 		methods: {
 			submit() {
@@ -114,17 +120,36 @@
 						title: '请填写申请退款原因',
 						type: 'warning'
 					})
-				// } else if (files.length === 0) {
-				// 	this.$refs.uToast.show({
-				// 		title: '请至少选择一张图片',
-				// 		type: 'warning'
-				// 	})
 				} else  if (isHas) {
 					this.$refs.uToast.show({
 						title: '还有图片未完成上传,请稍等!',
 						type: 'warning'
 					})
 				}
+			},
+			/**
+			 * 获取收费标准
+			 * */
+			getSysterms(termsType) {
+				this.$u.api.getSysterms({
+						termsType: Number(termsType)
+					})
+					.then(res => {
+						if (res.code === 200) {
+							this.refundTipsContent = res.data?.content
+						} else {
+							this.$refs.uToast.show({
+								title: res.msg,
+								type: 'error',
+							})
+						}
+					})
+					.catch(err => {
+						this.$refs.uToast.show({
+							title: '系统错误!',
+							type: 'error',
+						})
+					})
 			}
 		}
 	}

+ 267 - 245
pages/center/order/order.vue

@@ -1,261 +1,283 @@
 <template>
-	<view>
-		<view class="swiper-wrap">
-			<view class="u-tabs-box">
-				<u-tabs-swiper activeColor="#008CFF" ref="tabs" :list="list" :current="current" @change="change" :is-scroll="false" swiperWidth="100%"></u-tabs-swiper>
-			</view>
-			<swiper class="swiper-box" :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish">
-				<swiper-item class="swiper-item" v-for="(item, index) in list" :key="index">
-					<scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="reachBottom">
-						<view class="page-box">
-							<view class="order" @click="goDetails(orderItem)" v-for="(orderItem, index) in  orderList[index]" :key="orderItem.id">
-								<view class="order-top u-flex">
-									<view class="order-top-left u-flex-1">
-										<view class="car">{{orderItem.vehicleNo}}</view>
-										<view class="addr">{{orderItem.roadName}}</view>
-									</view>
-									<!-- 
-									    显示申请退款按钮满足一下条件:
-										1.允许退款allowRefund等于1 并且
-										2.退款状态auditStatus等于2 已驳回 或者
-										3.退款状态auditStatus不能为空 并且不能等于0
-									-->
-									<view
-										class="order-top-right apply-refund"
-										v-show="orderItem.allowRefund == 1 &&
-										(orderItem.auditStatus == 2 || !orderItem.auditStatus && orderItem.auditStatus != 0)"
-										@click.stop="applyRefund(orderItem)"
-										>申请退款</view>
-									<!--
-									    显示申请状态满足以下条件
-										申请状态存在或者审核状态存在(由于0比较特殊,所以单独拉出来判断)
-									-->
-									<view
-										class="order-top-right apply-refund"
-										@click.stop="applyRefundDetails(orderItem)"
-										v-if="orderItem.refundStatus ||
-										orderItem.refundStatus == 0 ||
-										orderItem.auditStatus ||
-										orderItem.auditStatus == 0">
-										{{orderItem | verifyRefundStatus}}
-									</view>
-									<view
-										class="order-top-right"
-										v-else
-										:class="{'order-top-right-finished': orderItem.orderStatus == '4'}">
-										{{orderItem.orderStatus | verifyStatusFilter}}
-									</view>
-								</view>
-								<view class="order-center">
-									<view class="order-center-item">订单编号:{{orderItem.orderId}}</view>
-									<view class="order-center-item">入场时间:{{orderItem.inTime}}</view>
-									<view class="order-center-item" v-if="orderItem.orderStatus !== 1">出场时间:{{orderItem.outTime}}</view>
-									<view class="order-center-item" v-if="orderItem.orderStatus !== 1">停留时间:{{orderItem.duration}}</view>
-									<view class="order-center-item">应付金额:<span class="pay-amount">{{orderItem.payAmount}}</span></view>
-									<view class="order-center-item" v-if="orderItem.actualAmount">实际金额:<span class="pay-amount">{{orderItem.actualAmount}}</span></view>
-								</view>
-								<view class="order-bottom">
-									<u-cell-item title="收费标准" @click.native.stop="jumpChargeStandard(orderItem)"></u-cell-item>
-								</view>
-							</view>
-							<u-loadmore :status="loadStatus[index]" bgColor="#F6F6FF"></u-loadmore>
-						</view>
-					</scroll-view>
-				</swiper-item>
-			</swiper>
-		</view>
-		
-		<u-toast ref="uToast" />
-	</view>
+  <view>
+    <view class="swiper-wrap">
+      <view class="u-tabs-box">
+        <u-tabs-swiper
+          activeColor="#008CFF"
+          ref="tabs"
+          :list="list"
+          :current="current"
+          @change="change"
+          :is-scroll="false"
+          swiperWidth="100%"
+        ></u-tabs-swiper>
+      </view>
+      <swiper
+        class="swiper-box"
+        :current="swiperCurrent"
+        @transition="transition"
+        @animationfinish="animationfinish"
+      >
+        <swiper-item class="swiper-item" v-for="(item, index) in list" :key="index">
+          <scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="reachBottom">
+            <view class="page-box">
+              <view
+                class="order"
+                @click="goDetails(orderItem)"
+                v-for="(orderItem, index) in  orderList[index]"
+                :key="'o-' + index"
+              >
+                <view class="order-top u-flex">
+                  <view class="order-top-left u-flex-1">
+                    <view class="car">{{ orderItem.vehicleNo }}</view>
+                    <view class="addr">{{ orderItem.roadName }}</view>
+                  </view>
+                  <!--
+                    显示申请退款按钮满足一下条件:
+                    1.允许退款allowRefund等于1 并且
+                    2.退款状态auditStatus等于2 已驳回 或者
+                    3.退款状态auditStatus不能为空 并且不能等于0
+                  -->
+                  <view
+                    class="order-top-right apply-refund"
+                    v-show="orderItem.allowRefund == 1 &&
+                    (orderItem.auditStatus == 2 || !orderItem.auditStatus && orderItem.auditStatus != 0)"
+                    @click.stop="applyRefund(orderItem)"
+                  >申请退款</view>
+                  <!--
+                    显示申请状态满足以下条件
+                    申请状态存在或者审核状态存在(由于0比较特殊,所以单独拉出来判断)
+                  -->
+                  <view
+                    class="order-top-right apply-refund"
+                    @click.stop="applyRefundDetails(orderItem)"
+                    v-if="orderItem.refundStatus ||
+                    orderItem.refundStatus == 0 ||
+                    orderItem.auditStatus ||
+                    orderItem.auditStatus == 0"
+                  >{{ orderItem | verifyRefundStatus }}</view>
+                  <view
+                    class="order-top-right"
+                    v-else
+                    :class="{ 'order-top-right-finished': orderItem.orderStatus == '4' }"
+                  >{{ orderItem.orderStatus | verifyStatusFilter }}</view>
+                </view>
+                <view class="order-center">
+                  <view class="order-center-item">订单编号:{{ orderItem.orderId }}</view>
+                  <view class="order-center-item">入场时间:{{ orderItem.inTime }}</view>
+                  <view
+                    class="order-center-item"
+                    v-if="orderItem.orderStatus !== 1"
+                  >出场时间:{{ orderItem.outTime }}</view>
+                  <view
+                    class="order-center-item"
+                    v-if="orderItem.orderStatus !== 1"
+                  >停留时间:{{ orderItem.duration }}</view>
+                  <view class="order-center-item">
+                    应付金额:
+                    <span class="pay-amount">{{ orderItem.payAmount }}</span>
+                  </view>
+                  <view
+                    class="order-center-item"
+                    v-if="(orderItem.actualAmount || orderItem.actualAmount === 0) && orderItem.orderStatus !== 2"
+                  >
+                    实缴金额:
+                    <span class="pay-amount">{{ orderItem.actualAmount }}</span>
+                  </view>
+                </view>
+                <view class="order-bottom">
+                  <u-cell-item title="收费标准" @click.native.stop="jumpChargeStandard(orderItem)"></u-cell-item>
+                </view>
+              </view>
+              <u-loadmore :status="loadStatus[index]" bg-color="#F6F6FF"></u-loadmore>
+            </view>
+          </scroll-view>
+        </swiper-item>
+      </swiper>
+    </view>
+
+    <u-toast ref="uToast" />
+  </view>
 </template>
 
 <script>
 export default {
-	data() {
-		return {
-			orderList: [[], [], [], []],
-			list: [
-				{index:0,name: '全部',orderStatu:null,pageNum:1,total:null},
-				{index:1,name: '停放中',orderStatu:1,pageNum:1,total:null},
-				{index:2,name: '欠费未缴',orderStatu:2,pageNum:1,total:null},
-				{index:3,name: '已完成',orderStatu:4,pageNum:1,total:null}
-			],
-			current: 0,
-			swiperCurrent: 0,
-			tabsHeight: 0,
-			dx: 0,
-			loadStatus: ['loadmore','loadmore','loadmore','loadmore'],
-		};
-	},
-	onLoad() {
-		// this.getOrderList(this.list[0]);
-		// this.getOrderList(this.list[1]);
-		// this.getOrderList(this.list[2]);
-		// this.getOrderList(this.list[3]);
-	},
-	onShow(){
-		// onShow 刷新数据
-		this.list[this.current].pageNum = 1;
-		this.orderList=[[], [], [], []];
-		this.getOrderList(this.list[this.current]);
-	},
-	computed: {
-		// 价格小数
-		priceDecimal() {
-			return val => {
-				if (val !== parseInt(val)) return val.slice(-2);
-				else return '00';
-			};
-		},
-		// 价格整数
-		priceInt() {
-			return val => {
-				if (val !== parseInt(val)) return val.split('.')[0];
-				else return val;
-			};
-		}
-	},
-	methods: {
-		reachBottom() {
-			// console.log('this.list[this.current]',this.list[this.current]);
-			if(this.orderList[this.current].length>=this.list[this.current].total){
-				this.loadStatus.splice(this.list[this.current].index,1,"nomore");
-				return;
-			};
-			this.loadStatus.splice(this.list[this.current].index,1,"loading");
-			this.getOrderList(this.list[this.current]);
-		},
-		// 页面数据
-		
-		getOrderList(orderType) {			
-			let param = {
-				pageNum:orderType.pageNum,
-				orderStatus:orderType.orderStatu,
-			};
-			// 未出场: orderStatu = 1-停放中
-			// 缴费中: orderStatu = 2-出场中  && payStatus = 2-支付中 
-			// 完成:   orderStatu = 4-完成
-			this.$u.api.getOrderList(param)
-			.then(res=>{
-				for(let item of res.data.rows){
-					this.orderList[orderType.index].push(item);
-				}
-				// console.log('this.list[orderType.index]',this.list[orderType.index]);
-				this.list[this.current].total = res.data.total;
-				this.list[orderType.index].pageNum++;
-				if(this.orderList[this.current].length>=this.list[this.current].total){
-					this.loadStatus.splice(this.list[orderType.index].index,1,"nomore");
-				};
-				// console.log(JSON.parse(JSON.stringify(this.orderList[this.swiperCurrent])));
-				// console.log('this.list[this.current]',this.list[this.current]);
-			}).catch(err=>{
-				this.$refs.uToast.show({
-					title: err.msg,
-					type: 'error',
-				});
-				// console.log('getOrderList ',err)
-			});
-			
-			this.loadStatus.splice(this.current,1,"loadmore")
-		},
-		// tab栏切换
-		change(index) {
-			// this.swiperCurrent = this.list[index].orderStatu;
-			this.swiperCurrent = index;
-			this.getOrderList(this.list[index]);
-		},
-		transition({ detail: { dx } }) {
-			this.$refs.tabs.setDx(dx);
-		},
-		animationfinish({ detail: { current } }) {
-			this.$refs.tabs.setFinishCurrent(current);
-			this.swiperCurrent = current;
-			this.current = current;
-		},
-		/**
-		 * 跳转详情
-		 * 未发起退款或者未退款成功的
-		 * */
-		goDetails(item){
-			this.$u.route({
-				url: 'pages/center/order/orderDetails/orderDetails',
-				params: {
-					orderId: item.id
-				}
-			});
-		},
-		jumpChargeStandard(item) {
-			this.$u.route({
-				url: 'pages/chargeStandard/chargeStandard',
-				params: {
-					roadNo: item.roadNo
-				}
-			});
-		},
-		// 申请退款
-		applyRefund(item) {
-			this.$u.route('pages/applyRefund/applyRefund', {
-				orderId: item.orderId,
-				payAmount: item.actualAmount
-			})
-		},
-		/**
-		 * 申请退款详情
-		 * 只要申请退款状态等于1并且审批状态等于1跳转到退款完成详情页
-		 * 否则跳转到退款过程页
-		 * */
-		applyRefundDetails(item) {
-			if (item.refundStatus === 1 && item.auditStatus === 1) {
-				this.$u.route('pages/applyRefundDetails/applyRefundAchieveDetails', {
-					orderId: item.orderId
-				})
-			} else {
-				this.$u.route('pages/applyRefundDetails/applyRefundDetails', {
-					orderId: item.orderId
-				})
-			}
-		}
-	},
-	filters:{
-		verifyStatusFilter(value) {
-			if (value === 0) {
-			  return '';
-			} else if(value === 1){
-				return '停放中';				
-			} else if(value === 2){
-				return '欠费未缴';				
-			} else if(value === 4){
-				return '已完成';		
-			} else {
-			  return '';
-			}
-		},
-		verifyRefundStatus(item) {
-			if (item.auditStatus === 0) {
-				return '申请退款中';
-			} else if (item.auditStatus === 1) {
-				if (item.refundStatus === 0) {
-					return '退款失败'
-				} else if (item.refundStatus === 1) {
-					return '退款成功'
-				}
-			} else if (item.auditStatus === 2) {
-				return '已驳回'
-			}
-		}
-	}
-};
+  data () {
+    return {
+      orderList: [[], [], [], []],
+      list: [
+        { index: 0, name: '全部', orderStatu: null, pageNum: 1, total: null },
+        { index: 1, name: '停放中', orderStatu: 1, pageNum: 1, total: null },
+        { index: 2, name: '欠费未缴', orderStatu: 2, pageNum: 1, total: null },
+        { index: 3, name: '已完成', orderStatu: 4, pageNum: 1, total: null }
+      ],
+      current: 0,
+      swiperCurrent: 0,
+      tabsHeight: 0,
+      dx: 0,
+      loadStatus: ['loadmore', 'loadmore', 'loadmore', 'loadmore']
+    }
+  },
+  onShow () {
+    // onShow 刷新数据
+    this.list[this.current].pageNum = 1
+    this.orderList = [[], [], [], []]
+    this.getOrderList(this.list[this.current])
+  },
+  computed: {
+    // 价格小数
+    priceDecimal () {
+      return val => {
+        if (val !== parseInt(val)) return val.slice(-2)
+        else return '00'
+      }
+    },
+    // 价格整数
+    priceInt () {
+      return val => {
+        if (val !== parseInt(val)) return val.split('.')[0]
+        else return val
+      }
+    }
+  },
+  methods: {
+    reachBottom () {
+      // console.log('this.list[this.current]',this.list[this.current]);
+      if (this.orderList[this.current].length >= this.list[this.current].total) {
+        this.loadStatus.splice(this.list[this.current].index, 1, 'nomore')
+        return
+      };
+      this.loadStatus.splice(this.list[this.current].index, 1, 'loading')
+      this.getOrderList(this.list[this.current])
+    },
+    // 页面数据
+
+    getOrderList (orderType) {
+      const param = {
+        pageNum: orderType.pageNum,
+        orderStatus: orderType.orderStatu
+      }
+      // 未出场: orderStatu = 1-停放中
+      // 缴费中: orderStatu = 2-出场中  && payStatus = 2-支付中
+      // 完成:   orderStatu = 4-完成
+      this.$u.api.getOrderList(param)
+        .then(res => {
+          for (const item of res.data.rows) {
+            this.orderList[orderType.index].push(item)
+          }
+          this.list[this.current].total = res.data.total
+          this.list[orderType.index].pageNum++
+          if (this.orderList[this.current].length >= this.list[this.current].total) {
+            this.loadStatus.splice(this.list[orderType.index].index, 1, 'nomore')
+          };
+        }).catch(err => {
+          this.$refs.uToast.show({
+            title: err.msg,
+            type: 'error'
+          })
+          // console.log('getOrderList ',err)
+        })
+
+      this.loadStatus.splice(this.current, 1, 'loadmore')
+    },
+    // tab栏切换
+    change (index) {
+      // this.swiperCurrent = this.list[index].orderStatu;
+      this.swiperCurrent = index
+      this.getOrderList(this.list[index])
+    },
+    transition ({ detail: { dx } }) {
+      this.$refs.tabs.setDx(dx)
+    },
+    animationfinish ({ detail: { current } }) {
+      this.$refs.tabs.setFinishCurrent(current)
+      this.swiperCurrent = current
+      this.current = current
+    },
+    /**
+     * 跳转详情
+     * 未发起退款或者未退款成功的
+     * */
+    goDetails (item) {
+      this.$u.route({
+        url: 'pages/center/order/orderDetails/orderDetails',
+        params: {
+          orderId: item.id
+        }
+      })
+    },
+    jumpChargeStandard (item) {
+      this.$u.route({
+        url: 'pages/chargeStandard/chargeStandard',
+        params: {
+          roadNo: item.roadNo
+        }
+      })
+    },
+    // 申请退款
+    applyRefund (item) {
+      this.$u.route('pages/applyRefund/applyRefund', {
+        orderId: item.orderId,
+        payAmount: item.actualAmount
+      })
+    },
+    /**
+     * 申请退款详情
+     * 只要申请退款状态等于1并且审批状态等于1跳转到退款完成详情页
+     *  否则跳转到退款过程页
+     * */
+    applyRefundDetails (item) {
+      if (item.refundStatus === 1 && item.auditStatus === 1) {
+        this.$u.route('pages/applyRefundDetails/applyRefundAchieveDetails', {
+          orderId: item.orderId
+        })
+      } else {
+        this.$u.route('pages/applyRefundDetails/applyRefundDetails', {
+          orderId: item.orderId
+        })
+      }
+    }
+  },
+  filters: {
+    verifyStatusFilter (value) {
+      if (value === 0) {
+        return ''
+      } else if (value === 1) {
+        return '停放中'
+      } else if (value === 2) {
+        return '欠费未缴'
+      } else if (value === 4) {
+        return '已完成'
+      } else {
+        return ''
+      }
+    },
+    verifyRefundStatus (item) {
+      if (item.auditStatus === 0) {
+        return '申请退款中'
+      } else if (item.auditStatus === 1) {
+        if (item.refundStatus === 0) {
+          return '退款失败'
+        } else if (item.refundStatus === 1) {
+          return '退款成功'
+        }
+      } else if (item.auditStatus === 2) {
+        return '已驳回'
+      }
+    }
+  }
+}
 </script>
 
 <style>
 /* #ifndef H5 */
 page {
-	height: 100%;
-	background-color: #F6F6FF;
+  height: 100%;
+  background-color: #f6f6ff;
 }
 /* #endif */
 </style>
 
 <style lang="scss" scoped>
-	@import "./order.scss";
+@import "./order.scss";
 </style>

+ 190 - 123
pages/center/order/orderDetails/orderDetails.vue

@@ -1,131 +1,198 @@
 <template>
-	<view class="wrap">
-		<view class="order-info">
-			<u-image class="order-info-img" width="90rpx" height="90rpx" src="../../../../static/img/position.png"></u-image>
-			<view class="addr">{{orderInfo.roadName}}</view>
-			<view class="pay-amount" v-if="orderInfo.payAmount">-{{orderInfo.payAmount}}</view>
-			<view class="pay-amount" v-else>{{orderInfo.payAmount}}</view>
-			<u-cell-group :border="false">
-				<u-cell-item title="车牌号" :arrow="false" :border-bottom="false" :border-top="false" :value="orderInfo.vehicleNo"></u-cell-item>
-				<u-cell-item title="优惠总金额" :arrow="false" :border-bottom="false" :border-top="false" :value="orderInfo.preferentialAmount+'元'"></u-cell-item>
-			</u-cell-group>
-			<u-cell-group>
-				<u-cell-item title="订单编号 " :arrow="false" :border-bottom="false" :border-top="false" :value="orderInfo.orderId"></u-cell-item>
-				<u-cell-item title="入场时间 " :arrow="false" :border-bottom="false" :border-top="false" :value="orderInfo.inTime"></u-cell-item>
-				<u-cell-item title="停车时长 " :arrow="false" :border-bottom="false" :border-top="false" :value="orderInfo.duration"></u-cell-item>
-				<u-cell-item title="出场时间 " :arrow="false" :border-bottom="false" :border-top="false" :value="orderInfo.outTime"></u-cell-item>
-				<u-cell-item v-if="orderInfo.createTime" title="订单创建时间 " :arrow="false" :border-bottom="false" :border-top="false" :value="orderInfo.createTime"></u-cell-item>
-				<u-cell-item v-if="orderInfo.payTime" title="支付时间 " :arrow="false" :border-bottom="false" :border-top="false" :value="orderInfo.payTime"></u-cell-item>
-				<u-cell-item title="缴费方式 " :arrow="false" :border-bottom="false" :border-top="false" :value="orderInfo.paySource | verifyPaySource"></u-cell-item>
-			</u-cell-group>
-		</view>
-		<view class="bottom-btn-wrap" v-if="orderInfo.payStatus!=1">
-			<view class="bottom-btn" @click="goPay(orderId)">去支付</view>
-		</view>
-		<!-- 支付方式 -->
-		<PaymentMethod
-			:payWayPop="payWayPop"
-			:curOrderList="orderList"
-			@closePaymentMethod="closePaymentMethod"></PaymentMethod>
-		<u-toast ref="uToast" />
-	</view>
+  <view class="wrap">
+    <view class="order-info">
+      <u-image
+        class="order-info-img"
+        width="90rpx"
+        height="90rpx"
+        src="../../../../static/img/position.png"
+      ></u-image>
+      <view class="addr">{{ orderInfo.roadName }}</view>
+      <view class="pay-amount" v-if="orderInfo.payAmount">-{{ orderInfo.payAmount }}</view>
+      <view class="pay-amount" v-else>{{ orderInfo.payAmount }}</view>
+      <u-cell-group :border="false">
+        <u-cell-item
+          title="车牌号"
+          :arrow="false"
+          :border-bottom="false"
+          :border-top="false"
+          :value="orderInfo.vehicleNo"
+        ></u-cell-item>
+        <u-cell-item
+          title="优惠总金额"
+          :arrow="false"
+          :border-bottom="false"
+          :border-top="false"
+          :value="(orderInfo.preferentialAmount ? orderInfo.preferentialAmount.toFixed(2) : 0) + ' 元'"
+        ></u-cell-item>
+      </u-cell-group>
+      <u-cell-group>
+        <u-cell-item
+          title="订单编号 "
+          :arrow="false"
+          :border-bottom="false"
+          :border-top="false"
+          :value="orderInfo.orderId"
+        ></u-cell-item>
+        <u-cell-item
+          title="入场时间 "
+          :arrow="false"
+          :border-bottom="false"
+          :border-top="false"
+          :value="orderInfo.inTime"
+        ></u-cell-item>
+        <u-cell-item
+          title="停车时长 "
+          :arrow="false"
+          :border-bottom="false"
+          :border-top="false"
+          :value="orderInfo.duration"
+        ></u-cell-item>
+        <u-cell-item
+          title="出场时间 "
+          :arrow="false"
+          :border-bottom="false"
+          :border-top="false"
+          :value="orderInfo.outTime"
+        ></u-cell-item>
+        <u-cell-item
+          v-if="orderInfo.createTime"
+          title="订单创建时间 "
+          :arrow="false"
+          :border-bottom="false"
+          :border-top="false"
+          :value="orderInfo.createTime"
+        ></u-cell-item>
+        <u-cell-item
+          v-if="orderInfo.payTime"
+          title="支付时间 "
+          :arrow="false"
+          :border-bottom="false"
+          :border-top="false"
+          :value="orderInfo.payTime"
+        ></u-cell-item>
+        <u-cell-item
+          v-if="orderInfo.payStatus == 1"
+          title="缴费方式 "
+          :arrow="false"
+          :border-bottom="false"
+          :border-top="false"
+          :value="orderInfo.paySource | verifyPaySource"
+        ></u-cell-item>
+      </u-cell-group>
+    </view>
+    <view
+      class="bottom-btn-wrap"
+      v-if="orderInfo.payStatus == 0 || orderInfo.payStatus == 2 || orderInfo.payStatus == 3"
+    >
+      <view class="bottom-btn" @click="goPay(orderId)">去支付</view>
+    </view>
+    <!-- 支付方式 -->
+    <PaymentMethod
+      :payWayPop="payWayPop"
+      :curOrderList="orderList"
+	  :jumpUrl="jumpUrl"
+      @closePaymentMethod="closePaymentMethod"
+    ></PaymentMethod>
+    <u-toast ref="uToast" />
+  </view>
 </template>
 
 <script>
-	import getUrlParams from "../../../../utils/getUrlParams.js";
-	import PaymentMethod from '@/pages/paymentMethod/paymentMethod.vue'
-	export default{
-		components: {
-			PaymentMethod
-		},
-		data(){
-			return{
-				orderId: null,
-				orderInfo: [],
-				// 立即支付弹框
-				payWayPop: false,
-				// 订单列表,一般长度为1的数组
-				orderList: []
-			}
-		},
-		onLoad(){
-			let locationLocaturl = window.location.hash;
-			this.orderId = getUrlParams(locationLocaturl,"orderId"); // 截取orderId
-			console.log('this.orderId',this.orderId);
-			this.handleGetOrderinfo(this.orderId);
-			
-		},
-		methods:{
-			handleGetOrderinfo(orderId){
-				this.$u.api.getOrderDetail({id:orderId})
-				.then(res=>{
-					// this.$refs.uToast.show({
-					// 	title: res.msg,
-					// 	type: 'success',
-					// });
-					this.orderInfo = res.data;
-					console.log('handleGetOrderinfo',JSON.parse(JSON.stringify(res.data)));
-				}).catch(err=>{
-					this.$refs.uToast.show({
-						title: err.msg,
-						type: 'error',
-					});
-					console.log('handleGetOrderinfo ',err)
-				});
-				
-			},
-			goPay(orderId){
-				this.orderList = []
-				this.orderList.push(orderId)
-				this.payWayPop = true
-				// let orderList=[];
-				// orderList.push(orderId);
-				// this.$u.api.payGzbank({orderList: orderList}).then(res=>{
-				// 	let payUrl = res.data.url;
-				// 	window.open(payUrl);
-				// }).catch(err=>{
-				// 	this.$refs.uToast.show({
-				// 		title: err.msg,
-				// 		type: 'error',
-				// 	});
-				// });
-				// this.$u.route({
-				// 	url: 'pages/payPage/payPage',
-				// 	params: {
-				// 		orderId: orderId
-				// 	}
-				// });
-			},
-			/**
-			 * 关闭支付方式弹框
-			 * */
-			closePaymentMethod() {
-				this.payWayPop = false
-			}
-			
-		},
-		filters:{
-			verifyPaySource(value) {
-				if (value === 0) {
-				  return '现金支付';
-				}else if(value === 1){
-					return '微信支付';				
-				} else if(value === 2){
-					return '支付宝支付';				
-				}else if(value === 3){
-					return '贵州银行快捷支付';				
-				}else if(value === 4){
-					return '贵州银行扫码支付';				
-				}else if(value === 5){
-					return '贵州银行被扫支付';				
-				}else {
-				  return '';
-				}
-			},
-		}
-	}
+import PaymentMethod from '@/pages/paymentMethod/paymentMethod.vue'
+export default {
+  components: {
+    PaymentMethod
+  },
+  data () {
+    return {
+      orderId: null,
+      // 订单信息
+      orderInfo: {},
+      // 立即支付弹框
+      payWayPop: false,
+      // 订单列表,一般长度为1的数组
+      orderList: [],
+	  // 重定向页面
+	  jumpUrl: location.href
+    }
+  },
+  onLoad (page) {
+    const orderId = page?.orderId
+    uni.showLoading({
+      title: '加载中',
+      mask: true
+    })
+    setTimeout(() => {
+      if (orderId) {
+        this.orderId = orderId
+        this.handleGetOrderinfo(orderId)
+      }
+    }, 1000)
+  },
+  methods: {
+    handleGetOrderinfo (orderId) {
+      this.$u.api.getOrderDetail({ id: orderId })
+        .then(res => {
+          if (res.code === 200) {
+            uni.hideLoading()
+            this.orderInfo = res.data
+          } else {
+            this.$refs.uToast.show({
+              title: res.msg,
+              type: 'error'
+            })
+          }
+        })
+        .catch(() => {
+          this.$refs.uToast.show({
+            title: '程序错误!',
+            type: 'error'
+          })
+        })
+    },
+    goPay (orderId) {
+      this.orderList = []
+      this.orderList.push(orderId)
+      if (this.orderList.length > 0) {
+        this.payWayPop = true
+      } else {
+        this.$refs.uToast.show({
+          title: '当前订单编号不存在,请重新进入当前页面!',
+          type: 'warning'
+        })
+      }
+    },
+    /**
+       * 关闭支付方式弹框
+       * */
+    closePaymentMethod () {
+      this.payWayPop = false
+    }
+
+  },
+  filters: {
+    verifyPaySource (value) {
+      if (value === 0) {
+        return '现金支付'
+      } else if (value === 1) {
+        return '微信支付'
+      } else if (value === 2) {
+        return '支付宝支付'
+      } else if (value === 3) {
+        return '贵州银行快捷支付'
+      } else if (value === 4) {
+        return '贵州银行扫码支付'
+      } else if (value === 5) {
+        return '贵州银行被扫支付'
+      } else {
+        return ''
+      }
+    }
+  }
+}
 </script>
 
 <style lang="scss" scoped>
-	@import "./orderDetails.scss";
+@import "./orderDetails.scss";
 </style>

+ 1 - 0
pages/chargeStandard/chargeStandard.scss

@@ -1,5 +1,6 @@
 .charge {
 	background-color: #F6F6FF;
+	padding-bottom: 20rpx;
 	.charge-rules-container {
 		margin-bottom: 20rpx;
 		.charge-list {

+ 31 - 3
pages/chargeStandard/chargeStandard.vue

@@ -47,7 +47,7 @@
 			</view>
 		</view>
 		<view class="charge-instructions">
-			<view class="charge-instructions-title">相关说明</view>
+			<!-- <view class="charge-instructions-title">相关说明</view>
 			<view class="charge-instructions-item">1、全天任何时段,封停必须扫码;</view>
 			<view class="charge-instructions-item">2、停车5分钟未扫码启动缴费程序,将按违法停车处罚;</view>
 			<view class="charge-instructions-item">3、停车时间在30分钟内不收费;超过30分钟按1小时收费;</view>
@@ -61,7 +61,8 @@
 			<view class="charge-telphone">
 				<view>监督电话</view>
 				<view>0851-8888888</view>
-			</view>
+			</view> -->
+			<u-parse :html="chargeContent"></u-parse>
 		</view>
 	</view>
 </template>
@@ -76,7 +77,9 @@
 					freeTime: '',
 					topAmt: ''
 				},
-				chargeRulesInfo: []
+				chargeRulesInfo: [],
+				// 收费标准说明
+				chargeContent: ''
 			}
 		},
 		onLoad() {
@@ -84,6 +87,7 @@
 			const roadNo = getUrlParams(locationLocaturl, "roadNo"); // 截取roadId
 			if (roadNo) {
 				this.roadNo = roadNo
+				this.getSysterms(3)
 				this.getChargeRulesInfo(roadNo)
 			} else {
 				uni.showToast({
@@ -166,6 +170,30 @@
 							})
 						}
 					})
+			},
+			/**
+			 * 获取收费标准
+			 * */
+			getSysterms(termsType) {
+				this.$u.api.getSysterms({
+						termsType: Number(termsType)
+					})
+					.then(res => {
+						if (res.code === 200) {
+							this.chargeContent = res.data?.content
+						} else {
+							this.$refs.uToast.show({
+								title: res.msg,
+								type: 'error',
+							})
+						}
+					})
+					.catch(err => {
+						this.$refs.uToast.show({
+							title: '系统错误!',
+							type: 'error',
+						})
+					})
 			}
 		}
 	}

+ 8 - 7
pages/handleMonthly/handleMonthly.vue

@@ -115,7 +115,7 @@
 				this.vehicleNo = page.vehicleNo
 			}
 			const baseUrl = window.location.href.split('#')[0]
-			let jumpUrl = baseUrl + '#' + '/pages/center/monthly/monthly'
+			let jumpUrl = baseUrl + '#/pages/center/monthly/monthly'
 			this.jumpUrl = jumpUrl
 		},
 		mounted(){
@@ -188,8 +188,6 @@
 				this.form.dateRange = this.getMonthRange(new Date, this.form.month)
 			},
 			carLicenseListConfirm (item) {
-				console.log('this.carLicenseList',this.carLicenseList);
-				console.log('item',item);
 				this.form.carLicense = item[0]
 			},
 			getMonthInfo(roadNo){
@@ -238,14 +236,18 @@
 						}else{
 							this.$refs.uToast.show({
 								title: res.msg,
-								type: 'warning',
+								type: 'error',
 							});
 						}
 					}).catch(err=>{
-						
+						this.$refs.uToast.show({
+							title: '程序错误!',
+							type: 'error',
+						});
 					});
 			},
 			gyBankPay() {
+				console.log(this.jumpUrl)
 				this.$u.api.monthPay({
 					monthId: this.monthId,
 					jumpUrl: this.jumpUrl
@@ -317,12 +319,11 @@
 			 * @param {Number} deviceNo 设备编号(在停车锁部分需要)
 			 * */
 			getWXPayByJava(orderList, deviceNo) {
-				const jumpUrl = window.location.href.split('#')[0] + '#/pages/center/monthly/monthly'
 				// 支付成功跳转到包月页面
 				let params = {
 					monthId: this.monthId,
 					openid: '',
-					jumpUrl: jumpUrl
+					jumpUrl: this.jumpUrl
 				};
 				this.$u.api.monthlyWxPay(params)
 					.then(res => {

+ 5 - 1
pages/index/index.vue

@@ -157,6 +157,7 @@
 		<PaymentMethod
 			:payWayPop="payWayPop"
 			:curOrderList="curOrderList"
+			:jumpUrl="jumpUrl"
 			@closePaymentMethod="closePaymentMethod"></PaymentMethod>
 		<u-toast ref="uToast" />
 	</view>
@@ -207,7 +208,8 @@
 				payWayPop: false,
 				// 订单号
 				curOrderList: [],
-				latLongItude:{}
+				latLongItude:{},
+				jumpUrl: ''
 			}
 		},
 		onShow() {
@@ -216,6 +218,8 @@
 			let locationLocaturl = window.location.search;
 			this.code = getUrlParams(locationLocaturl, "code");
 			if(this.code&&!this.$store.state.vuex_wxinfo.openId){this.handleGetWXInfo(this.code)};
+			const href = location.href.split('#')
+			this.jumpUrl = href[0] + '#/pages/center/order/order'
 		},
 		methods: {
 			// 定位

+ 1 - 1
pages/myCars/myCars.vue

@@ -23,7 +23,7 @@
 			</view>
 			<view class="add-car-btn" @click="handleAddCar">添加车辆</view>
 			<view class="mycars">
-				<view class="mycars-item" v-for="item in mycars">
+				<view class="mycars-item" v-for="(item, index) in mycars" :key="index">
 					<view class="mycars-item-name">{{item.vehicleNo}}</view>
 					<view class="mycars-item-type">{{item.energyTpye | energyTpye}}</view>
 					<view class="mycars-item-sign" v-if="item.contractStatus==1">已签约</view>

+ 4 - 2
pages/parkingLock/parkingLock.vue

@@ -79,13 +79,13 @@
 			:payWayPop="payWayPop"
 			:curOrderList="orderList"
 			:deviceNo="deviceNo"
+			:jumpUrl="jumpUrl"
 			@closePaymentMethod="closePaymentMethod"></PaymentMethod>
 		<u-toast ref="uToast" />
 	</view>
 </template>
 
 <script>
-	import { config } from './../../common/config'
 	import getUrlParams from "../../utils/getUrlParams.js";
 	import PaymentMethod from '@/pages/paymentMethod/paymentMethod.vue'
 	export default {
@@ -110,7 +110,9 @@
 				// 订单信息
 				orderInfo: {},
 				// 订单id
-				orderId: null
+				orderId: null,
+				// 重定向地址
+				jumpUrl: location.href
 			}
 		},
 		onLoad(page) {

+ 4 - 0
pages/payLists/payLists.vue

@@ -54,6 +54,7 @@
 		<PaymentMethod
 			:payWayPop="payWayPop"
 			:curOrderList="currentItem"
+			:jumpUrl="jumpUrl"
 			@closePaymentMethod="closePaymentMethod"></PaymentMethod>
 		<u-toast ref="uToast" />
 	</view>
@@ -85,6 +86,7 @@
 					price: ''
 				},
 				code: null,
+				jumpUrl: ''
 			};
 		},
 		computed: {
@@ -104,6 +106,8 @@
 			}
 		},
 		onLoad(){
+			const href = location.href.split('#')
+			this.jumpUrl = href[0] + '#/pages/center/order/order'
 		},
 		onShow() {
 			// onShow 刷新数据

+ 7 - 2
pages/paymentMethod/paymentMethod.vue

@@ -56,6 +56,11 @@
 			deviceNo: {
 				type: String,
 				default: null
+			},
+			// 跳转页面
+			jumpUrl: {
+				type: String,
+				default: null
 			}
 		},
 		data() {
@@ -71,7 +76,7 @@
 				const params = {
 					orderList: this.curOrderList,
 					deviceNo: this.deviceNo,
-					jumpUrl: window.location.href
+					jumpUrl: this.jumpUrl
 				};
 				this.$u.api.payGzbank(params).then(res=>{
 					if (res.data.needPay) {
@@ -153,7 +158,7 @@
 				let params = {
 					orderList: orderList,
 					openid: '',
-					jumpUrl: window.location.href,
+					jumpUrl: this.jumpUrl,
 					deviceNo: deviceNo ? deviceNo : null
 				};
 				this.$u.api.ordinaryWxPay(params)