gcz vor 3 Jahren
Ursprung
Commit
98d9058604
2 geänderte Dateien mit 19 neuen und 6 gelöschten Zeilen
  1. 1 0
      pages.json
  2. 18 6
      pages/center/monthly/monthly.vue

+ 1 - 0
pages.json

@@ -134,6 +134,7 @@
             "path" : "pages/center/monthly/monthly",
             "style" :                                                                                    
             {
+				 "navigationStyle":"custom",// 隐藏系统导航栏
                 "navigationBarTitleText": "我的包月",
                 "enablePullDownRefresh": false,
                 "navigationBarBackgroundColor": "#008CFF",

+ 18 - 6
pages/center/monthly/monthly.vue

@@ -1,6 +1,12 @@
 <template>
 	<!-- 包月 -->
 	<view class="monthly">
+		<u-navbar
+		 title-color="#fff" 
+		 :custom-back="customBack" 
+		 :border-bottom="false" 
+		 back-icon-color="#CCE8FF" 
+		 :background="{background: '#008CFF' }" title="我的包月"></u-navbar>
 		<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" >
 			<scroll-view scroll-y style="height: 100%; width: 100%;" v-for="(monthlyItem, index) in  monthlyList" :key="monthlyItem.id">
 				<view class="monthly-list">
@@ -28,7 +34,7 @@
 							</view>
 						</view>
 					</view>
-					<u-button class="rem" type="error" size="mini" @click="cancelMonth(monthlyItem.monthId)">取消缴费</u-button>
+					<u-button class="rem" v-if="monthlyItem.feeStatus=='0'" type="error" size="mini" @click="cancelMonth(monthlyItem.monthId)">取消缴费</u-button>
 				</view>
 			</scroll-view>
 		</mescroll-body>
@@ -53,6 +59,12 @@
 			}
 		},
 		methods: {
+			customBack(){
+				this.$u.route({
+					type:'switchTab',
+					url: 'pages/center/index'
+				});
+			},
 			/*下拉刷新的回调*/
 			downCallback(){
 				// 第2种: 下拉刷新和上拉加载调同样的接口, 则不用第1种, 直接mescroll.resetUpScroll()即可
@@ -116,11 +128,11 @@
 						this.mescroll.endErr()
 					}
 				}).catch(err=>{
-					console.log('err',err);
-					this.$refs.uToast.show({
-						title: err.msg,
-						type: 'error',
-					});
+					// console.log('err',err);
+					// this.$refs.uToast.show({
+					// 	title: err.msg,
+					// 	type: 'error',
+					// });
 				});
 				
 			},