wangzizhong 2 years ago
parent
commit
9bbf81c8d9
4 changed files with 47 additions and 10 deletions
  1. 3 4
      App.vue
  2. 5 0
      components/uni-popup/uni-popup.vue
  3. 16 2
      pages/heatingPage/pay.vue
  4. 23 4
      pages/index/index.vue

+ 3 - 4
App.vue

@@ -22,7 +22,6 @@ export default {
 	company_logo:'',
 	isAndroid:false,
 	nowTime:'',
-	
 	statusObj:{
 			  '0':'未缴费',
 			  '1':'已缴费',
@@ -177,7 +176,7 @@ page {
 .items-center {
   align-items: center;
 }
-.uni-popup__wrapper.uni-custom.center .uni-popup__wrapper-box {
-  max-height: 38%!important;
-}
+// .uni-popup__wrapper.uni-custom.center .uni-popup__wrapper-box {
+//   max-height: 65%!important;
+// }
 </style>

+ 5 - 0
components/uni-popup/uni-popup.vue

@@ -12,6 +12,7 @@
       @click="close(true)">
       <view
         class="uni-popup__wrapper-box"
+		:style="{height:popHeight}"
         @click.stop="clear">
         <slot />
       </view>
@@ -33,6 +34,10 @@ export default {
       type: String,
       default: 'center'
     },
+	popHeight:{
+	  type: String,
+	  default: '38%'
+	},
     // 是否开启自定义
     custom: {
       type: Boolean,

+ 16 - 2
pages/heatingPage/pay.vue

@@ -52,7 +52,7 @@
     </view>
     <button class="submit" style="margin-bottom:20rpx" @tap="paySubmit" v-if="needPay">{{payStatusStr}}</button>
 	<button class="submit" style="margin-top:20rpx" @tap="openPopup" v-if="needInvoice">申请开票</button>
-	<uni-popup ref="popup" :mask-click="false">
+	<uni-popup ref="popup" :mask-click="false" popHeight="55%">
 		  <view class="popup-box">
 			  <view>
 				  <view class="popup-title">申请开票</view>
@@ -62,6 +62,12 @@
 				  			  	  <view>开票抬头:</view><input class="card input" style="width: 75%;" type="text" v-model="invoiceName" />
 				  			  </view>
 				  			  <view class="popup-type">
+				  			  	  <view>手机号:</view><input class="card input" style="width: 75%;" type="tel" v-model="invoicePhone" />
+				  			  </view>
+				  			  <view class="popup-type">
+				  			  	  <view>邮箱:</view><input class="card input" style="width: 75%;" type="text" v-model="invoiceEmail" />
+				  			  </view>															
+				  			  <view class="popup-type">
 				  			  	  <view>备注:</view><input  class="card input" style="width: 75%;" type="text" v-model="invoiceRemark" />
 				  			  </view>
 				  		  </view>
@@ -92,6 +98,8 @@ export default {
 	  statusColor:getApp().globalData.statusColor,
 	  invoiceName : '',
 	  invoiceRemark : '',
+	  invoicePhone:'',
+	  invoiceEmail:''
     };
   },
   onLoad(option) {
@@ -262,6 +270,8 @@ export default {
 		    code:this.pay_code,
 			invoice : this.invoiceName,
 			remark : this.invoiceRemark,
+			phone:this.invoicePhone,
+			email:this.invoiceEmail,
 		    openId: getApp().globalData.open_id,
 		  };
 		  uni.request({
@@ -353,7 +363,7 @@ export default {
   }
 }
  .popup-box {
-	  height: 90%;
+	  height: 95%;
 	  display: flex;
 	  flex-direction: column;
 	  justify-content: space-between;
@@ -368,6 +378,9 @@ export default {
 	  font-size: 28rpx;
 	  padding: 10rpx 0 10rpx 0;
   }
+  .uni-popup__wrapper-box {
+   height: 65%!important;
+  }
   .popup-type {
 	  display: flex;
 	  height: 80rpx;
@@ -393,4 +406,5 @@ export default {
   .popup-submit {
 	  background-color: #249CD3;
   }
+
 </style>

+ 23 - 4
pages/index/index.vue

@@ -95,8 +95,10 @@
         </view>
       </view>
 	 <view class="noLogin-box" v-if="owner_id == 0">
-		 <view>尚未关联业主信息,</view>
-		 <view>请前往"我的"登录后完成关联!</view>
+		 <view>{{!isAuth ? '未登录': '未关联'}}</view>
+		 <view>{{!isAuth ? '请先完成授权登录': '请先完成关联住房'}}</view>
+		 <view class="withHouseBtn" @click="goHouse" v-show="isAuth">关联住房</view>
+		 <view class="withHouseBtn" @click="goAuth" v-show="!isAuth">授权登录</view>
 	 </view>
     </view>
    
@@ -117,6 +119,7 @@ export default {
   data() {
     return {
       title: "",
+	  isAuth: true,
       scrollVal: Number,
       footFlag: true,
 	  btnPos:uni.getMenuButtonBoundingClientRect().top + 6,
@@ -152,6 +155,7 @@ export default {
   },
   onShow() {
     uni.hideTabBar({});
+	this.isAuth = getApp().globalData.isAuth;
 	this.getHeatList()
   },
   onLoad() {
@@ -258,7 +262,16 @@ export default {
         url: "/pages/heatingPage/pay?id=" + id,
       });
     },
-
+  goHouse(){
+	uni.navigateTo({
+	  url: "/pages/selfCenter/with_house",
+	}); 
+  },
+  goAuth() {
+    uni.navigateTo({
+      url: "/pages/auth/index",
+    });
+  },
     goPayList() {
       uni.navigateTo({
         url: "/pages/heatingPage/list",
@@ -273,7 +286,7 @@ export default {
   },
   onReachBottom(e) {
     this.footFlag = false;
-  },
+  }
 };
 </script>
 
@@ -542,5 +555,11 @@ export default {
 	align-items: center;
 	margin-top: 160rpx;
 	color: #a7adba;
+}
+
+.withHouseBtn {
+	color: #589cff;
+	cursor: pointer;
+	margin-top: 40rpx;
 }	
 </style>