ソースを参照

bannerDetails样式,首页订单合计样式,车辆管理返回按钮逻辑,订单查找获取数据更改

gcz 3 年 前
コミット
cca2532773

+ 4 - 4
common/config.js

@@ -1,9 +1,9 @@
 const config = {
-	wxAppid:'wxbe90cc7c5233dd84',// 测试wxAppid 
-	// wxAppid: 'wx45c3cf2b632f5fd5', // 正式wxAppid
+	// wxAppid:'wxbe90cc7c5233dd84',// 测试wxAppid 
+	wxAppid: 'wx45c3cf2b632f5fd5', // 正式wxAppid
 	
-	baseUrl:'https://wx.hw.hongweisoft.com/parking',// 64服务器
-	// baseUrl: 'https://parking.pdzhtc.com', //正式接口访问地址
+	// baseUrl:'https://wx.hw.hongweisoft.com/parking',// 64服务器
+	baseUrl: 'https://parking.pdzhtc.com', //正式接口访问地址
 }
 export {
 	config

+ 1 - 1
pages/bannerDetails/bannerDetails.vue

@@ -49,5 +49,5 @@
 </script>
 
 <style>
-
+page{padding: 24rpx;}
 </style>

+ 16 - 0
pages/index/index.scss

@@ -296,4 +296,20 @@ page{background-color: $my-page-bg-color;}
 	margin: 0 auto;
 	border-radius: 16rpx;
 	margin-top: 20rpx;
+}
+
+.myorders-item{
+	position: relative;
+	margin-bottom: 8rpx;
+	padding-left: 30rpx;
+	&::before{
+		content: '';
+		width: 9rpx;
+		height: 9rpx;
+		border-radius: 50%;
+		background-color: #626262;
+		position: absolute;
+		left: 0;
+		top: 17rpx;
+	}
 }

+ 22 - 14
pages/index/index.vue

@@ -83,9 +83,9 @@
 		border-radius="16"
 		margin="20rpx 40rpx"
 		padding="30">
-		<view slot="body" class="">
-			<view>已缴费{{totalCount}}笔,合计{{totalActualAmount}}元</view>
-			<view>当前欠费{{totalPayCount}}笔,合计{{totalPayAmount}}元</view>
+		<view slot="body" class="myorders">
+			<view class="myorders-item">当前已缴费<text style="color: #008CFF;">{{totalCount||'0'}}</text>笔,合计<text style="color: #008CFF;">{{totalActualAmount||'0'}}</text>元</view>
+			<view class="myorders-item">当前欠费<text style="color: #FF482B;">{{totalPayCount||'0'}}</text>笔,合计<text style="color: #FF482B;">{{totalPayAmount||'0'}}</text>元</view>
 		</view>
 	</u-card>
 		<!-- ===================================== 无停车信息 ===================================== -->
@@ -394,19 +394,26 @@ export default {
     orderNavclick () {
       uni.showLoading({
         title: '加载中'
-      })
+      });
+	  console.log('this.recordList[1]',this.recordList[1]);
+	  console.log('orderNav',this.orderNav)
+	  if(!this.recordList[1]){return}
       this.$u.api.feePay({ vehicleId: this.recordList[1] })
         .then(res => {
-          if (res.code == 200) {
+			console.log('res',res);
+          if (res?.code == 200) {
             this.handleGetIndexData()
           } else {
-						this.$refs.uToast.show({
-						  title: res.msg,
-						  type: 'error'
-						})
+			  
+						// this.$refs.uToast.show({
+						//   title: res?.msg,
+						//   type: 'error'
+						// })
 					}
           uni.hideLoading()
-        })
+        }).catch(err =>{
+			console.log('orderNavclick err',err)
+		})
     },
     /**
      * 跳转页面
@@ -488,10 +495,10 @@ export default {
                 enableFeepay.push(0)
               }
             })
-			this.totalActualAmount = res.data.payedInfo.totalActualAmount
-			this.totalCount = res.data.payedInfo.totalCount
-			this.totalPayAmount = res.data.payingInfo.totalPayAmount
-			this.totalPayCount = res.data.payingInfo.totalCount
+			this.totalActualAmount = res.data?.payedInfo?.totalActualAmount
+			this.totalCount = res.data?.payedInfo?.totalCount
+			this.totalPayAmount = res.data?.payingInfo?.totalPayAmount
+			this.totalPayCount = res.data?.payingInfo?.totalCount
             this.recordList = enableFeepay
             this.orderNav = enableFeepay[0]
             this.contractStatus = enableFeepay[2]
@@ -512,6 +519,7 @@ export default {
             uni.hideLoading()
           }
         }).catch(err => {
+			console.log('err',err)
           this.$refs.uToast.show({
             title: '系统异常',
             type: 'error'

+ 7 - 1
pages/myCars/myCars.vue

@@ -78,7 +78,13 @@
 								type: 'switchTab',
 								url: res.data
 							})
-				    }
+				    },
+					fail:()=> {
+						this.$u.route({
+							type: 'switchTab',
+							url: 'pages/index/index'
+						})
+					}
 				})
 			},
 			// 获取车辆列表

+ 2 - 2
pages/searchparking/searchparking.vue

@@ -73,10 +73,10 @@
 					// 	type: 'success',
 					// });
 					//设置列表数据
-					let curPageData = res.data.rows; 
+					let curPageData = res.data.pageInfo.rows; 
 					// 接口返回的当前页数据长度 (如列表有26个数据,当前页返回8个,则curPageLen=8)
 					let curPageLen = curPageData.length; 
-					let totalPage = res.data.pages; 
+					let totalPage = res.data.pageInfo.pages; 
 					
 					if(page.num == 1) this.parkinglist = []; //如果是第一页需手动置空列表
 					this.parkinglist = this.parkinglist.concat(curPageData); //追加新数据