瀏覽代碼

信息中心详情,包月取消订单

tianhui 3 年之前
父節點
當前提交
6995277c8a

+ 2 - 0
common/apiurl.js

@@ -51,6 +51,8 @@ const apiurl = {
 	getMonthPayUrl:'/monthpay/query/',
 	//包月列表
 	getMonthListUrl:'/memberinfo/monthList',
+	//取消包月订单
+	cancelMonthUrl:'/memberinfo/cancelMonth/',
 	
 	//贵州银行快捷支付
 	payGzbankUrl: '/pay/gzbank/quick',

+ 3 - 1
common/http.api.js

@@ -44,6 +44,7 @@ const install = (Vue, vm) => {
 	let monthPay = (params = {}) => vm.$u.post(apiurl.monthPayUrl, params);
 	let getMonthPay = (params = {}) => vm.$u.get(apiurl.getMonthPayUrl + params.id);
 	let getMonthList= (params = {}) => vm.$u.get(apiurl.getMonthListUrl,params);
+	let cancelMonth= (params = {}) => vm.$u.put(apiurl.cancelMonthUrl+params.monthId);
 	
 	let payGzbank = (params = {}) => vm.$u.post(apiurl.payGzbankUrl, params);
 	
@@ -79,7 +80,8 @@ const install = (Vue, vm) => {
 		createMonth,
 		monthPay,
 		getMonthPay,
-		getMonthList
+		getMonthList,
+		cancelMonth
 	};
 }
 

+ 7 - 0
pages.json

@@ -83,6 +83,13 @@
 				"navigationBarTitleText":"消息中心"
 			}
 		},
+		{
+			"path": "pages/message/messageInfo",
+			"style": {
+				"navigationStyle":"custom",// 隐藏系统导航栏
+				"navigationBarTitleText":"消息中心"
+			}
+		},
 		{
 			"path": "pages/payLists/payLists",
 			"style": {

+ 13 - 2
pages/center/monthly/monthly.scss

@@ -34,13 +34,21 @@
 				}
 				.mlit-right {
 					width: 104rpx;
-					height: 50rpx;
+					height: 120rpx;
 					line-height: 50rpx;
 					text-align: center;
-					border: solid 1px #BDBDBD;
 					border-radius: 5rpx;
 					color: #858585;
 					font-size: 24rpx;
+					.mlit-right-items{
+						border: solid 1px red;
+						color:red;
+						margin-bottom: 10rpx;
+						
+					}
+					.mlit-right-item{
+						border: solid 1px #BDBDBD
+					}
 				}
 			}
 			.monthly-list-item-bottom {
@@ -73,5 +81,8 @@
 				}
 			}
 		}
+		.rem{
+			float: right;
+		}
 	}
 }

+ 26 - 2
pages/center/monthly/monthly.vue

@@ -10,8 +10,12 @@
 								<view>{{monthlyItem.vehicleNo}}</view>
 								<view>{{monthlyItem.roadName}}</view>
 							</view>
-							<view class="mlit-right" v-if="monthlyItem.energyType === 1">汽油车</view>
-							<view class="mlit-right" v-if="monthlyItem.energyType === 3">新能源</view>
+							<view class="mlit-right">
+							<view class="mlit-right-items" v-if="monthlyItem.feeStatus === 0">未缴费</view>
+							<view class="mlit-right-items" v-if="monthlyItem.feeStatus === 1">已缴费</view>
+							<view class="mlit-right-item" v-if="monthlyItem.energyType === 1">汽油车</view>
+							<view class="mlit-right-item" v-if="monthlyItem.energyType === 2">新能源</view>
+							</view>
 						</view>
 						<view class="monthly-list-item-bottom" >
 							<view class="mlib-item">
@@ -24,6 +28,7 @@
 							</view>
 						</view>
 					</view>
+					<u-button class="rem" type="error" size="mini" @click="cancelMonth(monthlyItem.monthId)">取消缴费</u-button>
 				</view>
 			</scroll-view>
 		</mescroll-body>
@@ -111,6 +116,25 @@
 				});
 				
 			},
+			cancelMonth(monthId){
+				console.log('monthId',monthId)
+				this.$u.api.cancelMonth({monthId: monthId})
+				.then(res=>{
+					if(res.code === 200){
+					this.$refs.uToast.show({
+						title: err.msg,
+						type: 'success',
+					});
+					}else{
+						this.$refs.uToast.show({
+							title: err.msg,
+							type: 'error',
+						});
+					}
+				}).catch(err=>{
+					
+				})
+			}
 		}
 	}
 </script>

+ 5 - 0
pages/message/message.scss

@@ -48,6 +48,11 @@
 				color: #595959;
 				line-height: 37rpx;
 				letter-spacing: 1px;
+				overflow : hidden;
+				text-overflow: ellipsis;
+				display: -webkit-box;
+				-webkit-line-clamp: 2;
+				-webkit-box-orient: vertical;
 			}
 		}
 		.u-cell_title{

+ 4 - 4
pages/message/message.vue

@@ -5,7 +5,7 @@
 			<scroll-view scroll-y style="height: 100%; width: 100%;" v-for="(messageItem, index) in  messageList" :key="messageItem.id">
 				<view class="time">{{messageItem.createTime}}</view>
 				<view class="page-box">
-					<view class="message" @click="goDetails(messageItem.id)" >
+					<view class="message" @click="goDetails(messageItem.content)" >
 						<view class="message-top u-flex">
 							<view class="message-top-left u-flex-1">
 								<view class="car">{{messageItem.title}}</view>
@@ -99,11 +99,11 @@
 				});
 				
 			},
-			goDetails(id){
+			goDetails(content){
 				this.$u.route({
-					url: 'pages/center/message/messageDetails/messageDetails',
+					url: 'pages/message/messageInfo',
 					params: {
-						messageId: id
+						content:JSON.stringify(content)
 					}
 				});
 			}

+ 43 - 0
pages/message/messageInfo.vue

@@ -0,0 +1,43 @@
+<template>
+	<view><u-navbar title-color="#fff" :custom-back="customBack" :border-bottom="false" back-icon-color="#CCE8FF" :background="{background: '#008CFF' }" title="消息中心"></u-navbar>
+	<view class="content">{{this.content}}</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				content: "",
+			};
+		},
+		onLoad(page) {
+			this.content = JSON.parse(page.content);
+		},
+		methods: {
+			customBack(){
+				this.$u.route({
+					type:'switchTab',
+					url: 'pages/center/index'
+				});
+			}
+		}
+		
+	}
+</script>
+
+<style>
+/* #ifndef H5 */
+page {
+	height: 100%;
+	background-color: #F6F6FF;
+}
+/* #endif */
+</style>
+
+<style lang="scss" scoped>
+	.content{
+		padding: 20rpx 40rpx;
+		line-height: 44rpx;
+	}
+</style>