zhengkaixin 1 год назад
Родитель
Сommit
a618dc3973

+ 1 - 1
README.md

@@ -1,5 +1,5 @@
 [](https://modao.cc/proto/s1QFMhkss7n1emgHHRAr0E/sharing?view_mode=read_only)
 
-[](https://youdian.hbjp.com.cn/charging-prod/jp-housekeep-hall/#/)
+[](https://dgj.hbjp.com.cn/charging-prod/jp-housekeep-hall/#/)
 [](https://charging.xiaoxinda.com/electric-manager-portal/)
 [](http://dgj.hbjp.com.cn/electric-manager-portal/)

+ 6 - 2
components/Tabbar.vue

@@ -17,7 +17,8 @@
 		name: "Tabbar",
 		props: {
 			current: 0,
-			elderStatus: false
+			elderStatus: false,
+			prefetchNum:0,
 		},
 		data() {
 			return {
@@ -32,6 +33,7 @@
 					},
 					 
 					{
+						count:this.prefetchNum,
 						iconPath: img3,
 						selectedIconPath: img4,
 						text: '消息',
@@ -50,6 +52,7 @@
 
 		},
 		methods: {
+			
 			setcount(c) {
 				this.myCurrent = c
 			},
@@ -74,8 +77,9 @@
 			},
 
 		},
+		
 		mounted() {
-
+			//this.tabbarList[1].count=this.prefetchNum;
 		},
 		destroyed() {
 

+ 5 - 5
config/.env.dev.js

@@ -2,20 +2,20 @@ const UNI_APP = {
 	ProjectName :"荆鹏电管家",
 	BASE_URL: 'https://charging.xiaoxinda.com/electric-manager-api/',
 
-	//BASE_URL: 'https://dgj.hbjp.com.cn/electric-manager-api/',
+	BASE_URL: 'https://dgj.hbjp.com.cn/electric-manager-api/',
 	
-	BASE_URL:'http://192.168.77.162:8081/electric-manager-api/',
+	//BASE_URL:'http://192.168.77.162:8081/electric-manager-api/',
 	
 	
 	NODE_ENV :"dev",
 	SIMPLE_RUN:true,// 无视权限控制跳转页面   , 用于样式人员快速访问各种功能 ,快速测试等
 	openId:"111111",//zq
 	openId:"123",//zq
-	openId:"oLowyuNkSxqovYoobKbeHB1nSkm0",//测试人员 开发环境
-	//openId:"oK9Wr57rAcNzihDN2PEdptprT0As", 
+	//openId:"oLowyuNkSxqovYoobKbeHB1nSkm0",//测试人员 开发环境
+	openId:"oLowyuAJ1Ld0ivnLj4qp1k5Vy_l4", //王晓春
 	// openId:"oK9Wr54VbEh3xvWYmD_zT5NbH4AY",
 	//openId:"oLowyuOJvTszgk96C0f8j0XfcEXg",//zkx
-	//openId:"oLowyuAJ1Ld0ivnLj4qp1k5Vy_l4",
+	//openId:"oLowyuHCGgMomNBQEXZSbb5SJxfQ",//ys
 	//openId:"oLowyuB1PliW0qAnJJ56axydeUOM",
 	//appid
 	VUE_APP_WXAPPID:"wx0b3c41a903053808",

+ 548 - 47
pages/deductionRecord/billPush.vue

@@ -105,52 +105,156 @@
 				
 				
 			</view>
-			
-			<view class="details " style="margin-top: 40rpx;" v-if="detail.accountInfo&&detail.accountInfo.bankName">
-				<view class="item"   >
-					<view class="item-title" style=" font-size: 36rpx;">
-						对公转账
-					</view>
-					<view class="item-value  " style="display: flex;">
-						<view class="item-value-btn1" @click="copyUrl" >复&nbsp;制<u-icon name="file-text"></u-icon> </view>
-						<view class="item-value-btn2" @click="accountInfoShow=!accountInfoShow" >
-						{{accountInfoShow?'收&nbsp;起':'展&nbsp;开'}}
-						<u-icon name="arrow-up"
-								v-if="accountInfoShow"></u-icon><u-icon v-else name="arrow-down"></u-icon>
+			<!--  -->
+			<view  class="main" v-if="!detail.payTime&&detail.payStatus==1" >
+				
+				<!-- 缴费金额 -->
+						<view class="payment-amount" v-show="detail.billAmount<=5000">
+							<view class="title">
+								缴费金额
+							</view>
+							<view class="amount-options">
+								<view  v-for="(item,i) in amountList" :key="i"
+								 class="options-item " :class="{
+									 chosen:selectNum==item
+								 }" @click="otherNum=item,selectNum=item"   >
+									{{item}}元
+								</view>
+							</view>
 						</view>
+						
+						<!-- 支付方式 -->
+						<view class="payment-way">
+							<view class="title">
+								支付方式
+							</view>
+							<view class="way">
+								<radio-group  @change="radioChange">
+								<view class="way-item" v-if="companyInfo.paymentMethod.indexOf('2')>-1"  v-show="detail.billAmount<=5000" >
+									<view class="way-name">
+										<view class="icon">
+											<image class="img" src="@/assets/img/riFill-wechat-pay-fill fTAsMwS.svg" mode="">
+											</image>
+										</view>
+										<view class="text">
+											微信支付
+										</view>
+									</view>
+									<view class="way-radio">
+										<label class="radio">
+											<radio value="0" name="selectType"  :checked="submitType === '0'"  /><text></text>
+											
+										</label>
+										
+									</view>
+								</view>
+				
+								<view class="way-item"  v-if="companyInfo.paymentMethod.indexOf('1')>-1"  v-show="detail.billAmount<=5000" >
+									<view class="way-name">
+										<view class="icon">
+											<image class="img2" src="@/assets/img/antOutline-alipay-circle bQiHn7m.svg" mode="">
+											</image>
+										</view>
+										<view class="text">
+											支付宝
+										</view>
+									</view>
+									<view class="way-radio">
+										<label class="radio">
+											<radio value="1"  name="selectType"  :checked="submitType === '1'"  /><text></text>
+										</label>
+									</view>
+								</view>
+				
+								<view class="way-item"  v-if="companyInfo.paymentMethod.indexOf('3')>-1"  >
+									<view class="way-name">
+										<view class="icon">
+											<image   class="img3"
+												src="@/assets/img/riFill-exchange-cny-fill@1x.png" mode=""></image>
+										</view>
+										<view class="text">
+											对公转账
+										</view>
+									</view>
+									<view class="way-radio" >
+										<label class="radio">
+											<radio value="2"  name="selectType"   :checked="submitType === '2'"  /><text></text>
+										</label>
+									</view>
+								</view>
+								</radio-group>
+								<!-- 对公转账弹窗 -->
+								<u-modal v-model="show" :show-cancel-button="true"
+								 @confirm="copyUrl()"
+								 :show-title="false" confirm-text="复制"
+									cancel-text="关闭">
+									<view class="modal-content">
+										<view class="title-icon">
+											<image class="img" src="@/assets/img/modalIcon.svg" mode=""></image>
+										</view>
+										<view class="title">
+											对公转账信息
+										</view>
+										<view class="infos-group">
+											<view class="item" >
+												<view class="item-title">
+													收款户名
+												</view>
+												<view class="item-value">
+													{{transferAccountsInfo.accountName}}
+												</view>
+											</view>
+											<view class="item" >
+												<view class="item-title">
+													开户银行
+												</view>
+												<view class="item-value">
+													{{transferAccountsInfo.bankName}}
+												</view>
+											</view>
+											<view class="item" >
+												<view class="item-title">
+													收款账户
+												</view>
+												<view class="item-value">
+													{{transferAccountsInfo.accountNo}}
+												</view>
+											</view>
+											<view class="item" >
+												<view class="item-title">
+													联系电话
+												</view>
+												<view class="item-value">
+													{{transferAccountsInfo.telephone}}
+												</view>
+											</view>
+											
+										</view>
+									</view>
+				
+								</u-modal>
+				
+							</view>
+						</view>
+						<!-- 按钮 -->
+						<button class="btn" @click="submit">{{submitType==2?'查看对公转账信息':'立即支付'}}</button>
+				
+				
+				<u-modal v-model="showModel" :show-cancel-button="true" @cancel="getUserInfo()" @confirm="confirm"
+					confirm-text="支付成功?" title="扫码支付">
+					<view style="
+										text-align: center;
+									">
+						<img id="qrcode2" :src="qrCodeImg">
 					</view>
-				</view>
-			</view>
-			<view class="details " v-show="accountInfoShow">
-				<view class="item"  v-if="detail.accountInfo&&detail.accountInfo.bankName" >
-					<view class="item-title">
-						收款户名
-					</view>
-					<view class="item-value">
-						{{detail.accountInfo.bankName}}
-					</view>
-				</view>
-				<view class="item"  v-if="detail.accountInfo&&detail.accountInfo.bank" >
-					<view class="item-title">
-						开户银行
-					</view>
-					<view class="item-value">
-						{{detail.accountInfo.bank}}
-					</view>
-				</view>
-				<view class="item"  v-if="detail.accountInfo&&detail.accountInfo.account" >
-					<view class="item-title">
-						收款账户
-					</view>
-					<view class="item-value">
-						{{detail.accountInfo.account}}
-					</view>
-				</view>
-				<view class="item"   >
-					<u-button @click="copyUrl" type="primary">复&nbsp;&nbsp;制<u-icon name="file-text"></u-icon></u-button>
-				</view>
+					<view style="
+										text-align: center;
+									">请使用支付宝扫码</view>
+				
+				</u-modal>
 			</view>
 			
+			
 			<u-divider   nonetext="没有找到相关内容" style="margin-top: 20rpx;"
 				border-color="#CFD2D5">已经到底了</u-divider>
 		</view>
@@ -158,7 +262,11 @@
 			<view class="cashier-btn-amount">合计
 				<span  class="cashier-btn-span">¥{{detail.billAmount}}元</span>
 			</view>
-			<view class="cashier-btn-go"  @click="gotoUrl('/pages/recharge/accountRecharge')" >账户充值</view>
+			<view class="cashier-btn-go" @click="submit" v-if="!detail.payTime&&detail.payStatus==1" >{{submitType==2?'对公转账':'立即支付'}}</view>
+			 
+			 <view class="cashier-btn-go1"  
+			   v-if="!detail.payTime&&detail.payStatus==0"
+			   >线下支付</view>
 		</view>
 		
 		
@@ -167,8 +275,20 @@
 </template>
 
 <script>
-	import * as API from '@/apis/pagejs/message.js'
+	import * as API_index from '@/apis/pagejs/index.js'
+	import * as API from '@/apis/pagejs/wxPay.js'
 	
+	import * as API_message from '@/apis/pagejs/message.js'
+	import * as API_weixin from '@/apis/weixin.js'
+	import * as Pay from '@/apis/weixin.js'
+	import QRCode from 'qrcodejs2'
+	import {
+		newDate,
+		convertCanvasToImage,
+	} from '@/apis/utils'
+	import {
+		wxPayJs
+	} from '@/apis/utils/wxpay'
 	export default {
 		data() {
 			return {
@@ -181,6 +301,26 @@
 				isBack:false,
 				accountInfoShow:false,
 				
+				amountList:[
+					
+				],
+				show: false,
+				showModel: false,
+				qrCodeImg: "",
+				submitType:"0",
+				submitForm:{
+					companyId: '',
+					amount: '',
+				},
+				personInfo:{
+					balance:0,
+				},
+				companyInfo:{
+					paymentMethod:''
+				},
+				selectNum:'100',
+				otherNum:'',
+				
 			}
 		},
 		onLoad(op) {
@@ -192,10 +332,40 @@
 				this.getDetail()
 			}
 		},
+		onShow(){
+			this.homePage()
+		},
 		methods: {
+			homePage(){
+				// uni.showLoading({
+				// 	title: "加载中",
+				// 	mask: true,
+				// })
+				
+				API_index.homePage({
+					
+				}).then((response) => {
+					//uni.hideLoading();
+					this.submitForm.companyId=response.data.companyInfo.id;
+					//this.carhelp.getPersonInfoPlus().companyInfo.id
+					this.personInfo=response.data.tenantInfo;
+					this.companyInfo=response.data.companyInfo;
+					if(this.companyInfo.transferAccountsInfo){
+						this.transferAccountsInfo=JSON.parse(this.companyInfo.transferAccountsInfo)
+					}
+					
+					var sz=this.companyInfo.paymentMethod.split(',');
+					// if(sz.length==1){
+					// 	this.submitType=sz[0]
+					// }
+				}).catch(error => {
+					//uni.hideLoading();
+					
+				})
+			},
 			copyUrl(){
 				var transferAccountsInfo=this.transferAccountsInfo
-				  var textToCopy = `收款户名${transferAccountsInfo.bankName}\n开户银行${transferAccountsInfo.bank}\n收款账户${transferAccountsInfo.account}`;  
+				  var textToCopy = `收款户名${transferAccountsInfo.accountName}\n开户银行${transferAccountsInfo.bankName}\n收款账户${transferAccountsInfo.accountNo}\n联系电话${transferAccountsInfo.telephone}`;  
 					uni.setClipboardData({
 						data: textToCopy,
 						success: function () {
@@ -207,17 +377,160 @@
 					});
 					
 				 
+			},
+			radioChange: function(evt) {
+				 
+				this.submitType=evt.detail.value
+			    
+			},
+			ckInput(e){
+				
+				var text=e.detail.value
+				if(text.indexOf('.')>0){
+					var k =text.split(".")[1]
+					if(k.length>=3){
+						this.$nextTick(()=>{
+							text=parseFloat(text).toFixed(2);
+							this.otherNum= text
+						})
+					}
+					
+				}
+				var t	=Number(text);
+				if(t<1){
+					this.$nextTick(()=>{
+						this.otherNum='';
+					})
+						
+				}
+				if(t>5000){
+					this.$nextTick(()=>{
+						this.otherNum=5000;
+					})	
+				}
+				
+			},
+			focus(){
+				console.log(0)
+				uni.pageScrollTo({
+					scrollTop:999999,
+					duration:0
+				})
+			},
+			open() {
+				this.show = true;
+			},
+			submit() {
+				if (this.submitType == 2) {
+					this.show = true;
+				}else{
+					
+					if(!this.otherNum){
+						this.otherNum=this.selectNum;
+					}
+					this.submitForm.amount=this.otherNum
+					
+					if(!this.otherNum){
+						uni.showToast({
+									
+							title: "请输入缴费金额"
+						})
+						return
+					}
+					if (this.submitType == 0) {
+						this.wxpy()
+					}
+					if (this.submitType == 1) {
+						this.alpy()
+					}
+				}
+				
+			
+			},
+			alpy() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				var listcanvas = document.getElementsByTagName('canvas')
+			
+				if (listcanvas.length > 0) {
+					document.getElementById("qrcode").removeChild(document.getElementsByTagName('canvas')[0]);
+				}
+				Pay.alpay(this.submitForm).then((response) => {
+			
+					let qrcode = new QRCode('qrcode', {
+						width: 200,
+						height: 200,
+						text: response.data.qr_code,
+						correctLevel: QRCode.CorrectLevel.M,
+			
+					})
+					this.outOrderNo = response.data.outOrderNo;
+					var canvas = document.getElementsByTagName('canvas')[0];
+					this.qrCodeImg = convertCanvasToImage(canvas);
+					uni.hideLoading()
+					this.showModel = true
+			
+				}).catch(error => {
+					uni.showToast({
+			
+						title: error
+					})
+				})
+			},
+			wxpy() {
+			
+				Pay.wxpay(this.submitForm).then((response) => {
+			
+					if (!response.result) {
+						uni.showToast({
+							title: response.message
+						})
+						return
+					}
+					var data = response.data
+					uni.hideLoading()
+					//("Pay+"+new Date().getTime())		
+					wxPayJs(data);
+			
+				}).catch(error => {
+					uni.showToast({
+			
+						title: error
+					})
+			
+				})
 			},
 			getDetail(){
 				uni.showLoading({
 					mask:true,title:'加载中...'
 				})
-				API.billDetails({
+				API_message.billDetails({
 					id:this.id
 				}).then((response) => {
 					uni.hideLoading();
 					this.detail=response.data;
-					this.transferAccountsInfo=this.detail.accountInfo;
+					// this.detail.billAmount=800
+					// this.detail.payTime=null;
+					//this.detail.payStatus=1
+					if(this.detail.billAmount>5000){
+						this.submitType="2";
+						//this.$forceUpdate()
+					}else{
+						this.amountList.push(this.detail.billAmount)
+						this.selectNum=this.detail.billAmount;
+						var amountList=[1000,2000,3000,4000,5000]
+						for(var i =0 ;i<amountList.length;i++){
+							var num=amountList[i]
+							if(num>this.detail.billAmount){
+								this.amountList.push(num)
+								
+							}
+						}
+					}
+					
+					//this.transferAccountsInfo=this.detail.accountInfo;
 				}).catch(error => {
 					uni.hideLoading();
 					
@@ -257,6 +570,12 @@
 			background: #4586f7; 
 			color: white;
 		 }
+		 .cashier-btn-go1{
+		 			  padding:32rpx ;
+		 			// background: #4586f7; 
+		 			// color: white;
+		 }
+		
 	}
 	
 	
@@ -347,4 +666,186 @@
 		
 	}
  
+ 
+ 
+
+ 
+ 	.main {
+ 		margin: 24rpx 0;
+		padding: 24rpx;
+ 		overflow: hidden;
+		background: white;
+ 
+ 			// 缴费金额
+ 			.payment-amount {
+ 				margin-top: 32rpx;
+ 
+ 				.title {
+ 					color: rgb(48, 48, 48);
+ 					font-size: 36rpx;
+ 				}
+ 
+ 				.amount-options {
+ 					margin-top: 32rpx;
+ 					display: flex;
+ 					flex-wrap: wrap;
+ 					justify-content: space-between;
+ 
+ 					.options-item {
+ 						width: 200rpx;
+ 						height: 80rpx;
+ 						line-height: 80rpx;
+ 						border-radius: 4px;
+ 						text-align: center;
+ 						background-color: rgba(242, 242, 242, 1);
+ 						color: rgba(16, 16, 16, 1);
+ 						font-size: 32rpx;
+ 						margin-bottom: 20rpx;
+ 					}
+ 
+ 					.chosen {
+ 						background-color: rgba(22, 119, 255, 1);
+ 						color: rgba(255, 255, 255, 1);
+ 					}
+ 				}
+ 			}
+ 
+ 			// 输入金额
+ 			.input-amount {
+ 				margin-top: 24rpx;
+ 				display: flex;
+ 				font-size: 48rpx;
+ 				height: 100rpx;
+ 				line-height: 100rpx;
+ border-bottom: 1px solid rgba(242,242,242,1);
+ 				.symbol {
+ 					margin-right: 32rpx;
+ 				}
+                
+ 				.input {
+ 					height: 100rpx;
+ 					font-size: 40rpx;
+ 					 
+ 					 
+ 				}
+ 
+ 				/deep/.uni-input-placeholder {
+ 					color: rgba(204, 204, 204, 1);
+ 				}
+ 			}
+ 
+ 
+ 			// 支付方式
+ 			.payment-way {
+ 				margin-top: 24rpx;
+ 
+ 				.title {
+ 					color: rgb(48, 48, 48);
+ 					font-size: 36rpx;
+ 				}
+ 
+ 				.way {
+ 					margin-top: 24rpx;
+ 
+ 					.way-item {
+ 						display: flex;
+ 						justify-content: space-between;
+ 						align-items: center;
+ 						margin-bottom: 24rpx;
+ 
+ 						.way-name {
+ 							display: flex;
+ 							align-items: center;
+ 							color: rgb(51, 51, 51);
+                             
+ 							.img {
+ 								width: 48rpx;
+ 								height: 48rpx;
+ 								vertical-align: middle;
+ 								margin-right: 16rpx;
+ 								margin-left: -3rpx;
+ 							}
+ 							.img2{
+ 								width: 40rpx;
+ 								height: 40rpx;
+ 								vertical-align: middle;
+ 								margin-right: 20rpx;
+ 							}
+ 							.img3{
+ 								background-color: #1677FF;
+ 								 width: 40rpx;
+ 								 height: 40rpx;
+ 								 vertical-align: middle;
+ 								 margin-right: 20rpx;
+ 								 border-radius: 999px;
+ 							}
+ 						}
+ 
+ 						/deep/.uni-radio-input {
+ 							width: 40rpx;
+ 							height: 40rpx;
+ 						}
+ 					}
+ 				}
+ 			}
+ 
+ 			// 按钮
+ 			.btn {
+ 				height: 96rpx;
+ 				border-radius: 50px;
+ 				background-color: rgba(51, 133, 255, 1);
+ 				color: rgba(255, 255, 255, 1);
+ 				font-size: 36rpx;
+ 				margin-top: 48rpx;
+ 			}
+ 
+ 		
+ 	}
+ 
+ 
+ 	// 对公转账弹窗
+ 	.modal-content {
+ 
+ 		padding: 40rpx 0;
+ 
+ 		.title-icon {
+ 			text-align: center;
+ 		}
+ 
+ 		.img {
+ 			width: 96rpx;
+ 			height: 96rpx;
+ 
+ 		}
+ 
+ 		.title {
+ 			text-align: center;
+ 			color: rgba(16, 16, 16, 1);
+ 			font-size: 36rpx;
+ 			font-weight: 600;
+ 			margin-top: 8rpx;
+ 		}
+ 
+ 		.infos-group {
+ 			margin: 40rpx 32rpx 0;
+ 
+ 			.item {
+ 				display: flex;
+ 				justify-content: space-between;
+ 				margin-bottom: 16rpx;
+ 
+ 				.item-title {
+ 					color: rgba(119, 119, 119, 1);
+ 					font-size: 32rpx;
+ 					 white-space: pre;
+ 				}
+ 
+ 				.item-value {
+ 					color: rgba(51, 51, 51, 1);
+ 					font-size: 32rpx;
+ 					margin-left: 16rpx;
+ 				}
+ 			}
+ 		}
+ 	}
 </style>

+ 1 - 1
pages/deductionRecord/deductionRecord.vue

@@ -61,7 +61,7 @@
 					</view>
 				</view>
 				<view class="sum">
-					{{jpAmount(item.amount*-1)}}元
+					{{jpAmount(item.amount)}}元
 				</view>
 			</view>
 			

+ 18 - 7
pages/index/index.vue

@@ -56,21 +56,21 @@
 						<view class="grid-text">计费规则
 						</view>
 					</u-grid-item>
-					<u-grid-item   @click="gotoUrl('/pages/message/messageList?type=1')">
+					<u-grid-item   @click="gotoUrl('/pages/message/messageList?type=AA')">
 						<view class="icon icon3">
 							<image class="img" src="@/assets/img/antFill-account-book.svg" mode=""></image>
 						</view>
 						<view class="grid-text">账单提醒
 						</view>
 					</u-grid-item>
-					<u-grid-item   @click="gotoUrl('/pages/message/messageList?type=4')">
+					<u-grid-item   @click="gotoUrl('/pages/message/messageList?type=3')">
 						<view class="icon icon9">
 							<image class="img" src="@/assets/img/fas fa-exclamation-triangle.svg" mode=""></image>
 						</view>
 						<view class="grid-text">断电提醒
 						</view>
 					</u-grid-item>
-					<u-grid-item   @click="gotoUrl('/pages/message/messageList?type=2')">
+					<u-grid-item   @click="gotoUrl('/pages/message/messageList?type=5')">
 						<view class="icon icon5">
 							<image class="img" src="@/assets/img/antFill-notification.svg" mode=""></image>
 						</view>
@@ -78,7 +78,7 @@
 
 						</view>
 					</u-grid-item>
-					<u-grid-item   @click="gotoUrl('/pages/message/messageList?type=3')">
+					<u-grid-item   @click="gotoUrl('/pages/message/messageList?type=4')">
 						<view class="icon icon6">
 							<image class="img" src="@/assets/img/fas fa-exclamation-triangle.svg" mode=""></image>
 						</view>
@@ -126,7 +126,7 @@
 		 @click="openModalBl=true"
 		 color="#777777">荆鹏电管家 服务热线 <text
 				class="tel">400-8899-619</text></u-divider>
-		<Tabbar :current="0"></Tabbar>
+		<Tabbar :current="0"  :prefetchNum="prefetchNum" ></Tabbar>
 	</view>
 
 </template>
@@ -146,15 +146,26 @@
 				personInfo:{},
 				background: {
 					backgroundColor: '#3D86FF',
-				}
+				},
+				prefetchNum:0
 
 			}
 		},
 		onLoad() {
 			this.homePage()
-		
+			this.prefetch()
 		},
 		methods: {
+			prefetch(){
+				API_message.prefetch({
+					
+				}).then((response) => {
+					//this.prefetchNum=response.data
+				}).catch(error => {
+					//uni.hideLoading();
+					
+				})
+			},
 			confirmPhone() {
 				this.openModalBl = false;
 				uni.makePhoneCall({

+ 50 - 22
pages/message/message.vue

@@ -7,52 +7,53 @@
 				<view class="message-item"  @click="messageList1()" >
 					<view class="icon icon2">
 						<image class="img" src="@/assets/img/antFill-account-book.svg" mode=""></image>
-						<view class="dot">
+						<view class="dot" >
 							
 						</view>
 					</view>
 					<view class="content">
 						<view class="title">
 							<view class="title-name">
-								{{list[0].name}}
+								账单提醒
 							</view>
 							<view class="title-time">
-								{{list[0].pushTime}}
+								{{list[0].createTime}}
 							</view>
 						</view>
 						<view class="value">
-							账单提醒
+							{{list[0].name}}
 						</view>
 					</view>
 				</view>
 				
 			</view>
-			<u-divider :isnone="list.length==0"  nonetext="没有找到相关内容"
-				border-color="#CFD2D5">已经到底了</u-divider>
-		<view class="message-list" v-if="false" >
-			<view class="message-item"   @click="gotoUrl('/pages/message/messageList')" >
+			
+		<view class="message-list"  v-if="messageList.length"  >
+			<view class="message-item"  v-for="(item,i) in messageList"  :key="i"
+			v-show="item.message"
+			  @click="gotoUrl('/pages/message/messageList?type='+item.typeId)" >
 				<view class="icon">
 					<image class="img" src="@/assets/img/antFill-notification.svg" mode=""></image>
-				<view class="dot">
+				<view class="dot" v-if="item.unReadtNum">
 					
 				</view>
 				</view>
 				<view class="content">
 					<view class="title">
 						<view class="title-name">
-							停电通知
+							{{item.typeName}}
 						</view>
-						<view class="title-time">
-							01-02
+						<view class="title-time" v-if="item.message">
+							{{item.message.createTime}}
 						</view>
 					</view>
-					<view class="value">
-						接电力部门通知,明天(1月25日)因台区用电调调调调调调调调调
+					<view class="value" v-if="item.message">
+						{{item.message.content}}
 					</view>
 				</view>
 			</view>
 			
-			<view class="message-item">
+			<!-- <view class="message-item">
 				<view class="icon icon2">
 					<image class="img" src="@/assets/img/antFill-account-book.svg" mode=""></image>
 				
@@ -70,8 +71,8 @@
 						租户您好,贵司账户余额不足100元,请尽快充值充值
 					</view>
 				</view>
-			</view>
-			
+			</view> -->
+			<!-- 
 			<view class="message-item">
 				<view class="icon icon3">
 					<image class="img" src="@/assets/img/fas fa-bell.svg" mode=""></image>
@@ -148,11 +149,12 @@
 					<view class="value">
 						用户您好,您的租约即将于2月14日到期,如需续续续
 					</view>
-				</view>
-			</view>
+				</view> 
+			</view>-->
 		</view>
-		
-		<Tabbar :current="1" ></Tabbar>
+		<u-divider :isnone="list.length==0&&messageList.length==0"  nonetext="没有找到相关内容"
+			border-color="#CFD2D5">已经到底了</u-divider>
+		<Tabbar :current="1"  :prefetchNum="prefetchNum" ></Tabbar>
 	</view>
 </template>
 
@@ -167,12 +169,27 @@
 		data() {
 			return {
 				list:[],
+				messageList:[],
+				prefetchNum:0
 			}
 		},
 		onLoad() {
 			this.getBillList()
+			this.prefetch()
+			
 		},
 		methods: {
+			prefetch(){
+				API.prefetch({
+					
+				}).then((response) => {
+					//this.prefetchNum=response.data
+					this.getMessageTypeList()
+				}).catch(error => {
+					//uni.hideLoading();
+					
+				})
+			},
 			messageList1(){
 				if(this.list.length==1){
 					this.gotoUrl('/pages/deductionRecord/billPush?site=1&id='+this.list[0].id)
@@ -181,7 +198,18 @@
 					this.gotoUrl('/pages/message/messageList?type=1')
 				}
 			},
-			
+			getMessageTypeList(){
+				uni.showLoading({
+					mask:true,title:'加载中...'
+				})
+				API.messageTypeList().then((response) => {
+					uni.hideLoading();
+					this.messageList=response.data.typeList;
+				}).catch(error => {
+					uni.hideLoading();
+					
+				})
+			},
 			getBillList(){
 				uni.showLoading({
 					mask:true,title:'加载中...'

+ 54 - 13
pages/message/messageList.vue

@@ -1,7 +1,7 @@
 <template>
 	<view>
 		<u-navbar :title="title"  title-color="#101010" ></u-navbar>
-		<view class="main">
+		<view class="main" v-if="type=='aa'">
 			<view class="item" v-for="(item,i) in list"
 			 
 			  @click="gotoUrl('/pages/deductionRecord/billPush?site=1&id='+item.id)"
@@ -18,7 +18,19 @@
 			<u-divider :isnone="list.length==0"   nonetext="没有找到相关内容"
 				border-color="#CFD2D5">已经到底了</u-divider>
 		</view>
-		
+		<view class="main" v-else >
+			<view class="item" v-for="(item,i) in list" :key="i">
+				<view class="item-message">
+					<view>{{item.content}}</view>
+					<view class="billAmount"></view>
+				</view>
+				<view class="item-time">
+					{{item.createTime}}  <!-- {{item.tenantName}} -->
+				</view>
+			</view>
+			<u-divider :isnone="list.length==0"   nonetext="没有找到相关内容"
+				border-color="#CFD2D5">已经到底了</u-divider>
+		</view>
 	</view>
 </template>
 
@@ -39,16 +51,14 @@
 		},
 		computed:{
 			title(){
-				if(this.type==1){
+				if(this.type=='AA'){
 					return  '账单提醒'
-				}else if(this.type==2){
+				}else if(this.type==5){
 					return  '停电通知'
-				}else if(this.type==3){
-					return  '故障警报'
 				}else if(this.type==4){
+					return  '故障警报'
+				}else if(this.type==3){
 					return  '断电通知'
-				}else if(this.type==5){
-					return  '账单提醒'
 				}else{
 					return  '消息提醒'
 				}
@@ -57,12 +67,10 @@
 		onLoad(op) {
 			if(op.type){
 				this.type=op.type;
+				this.formData.type=op.type;
 			}
-			if(op.type==1){
-				this.getBillList()
-			}
-			
 			
+			this.getList()
 		},
 		onReachBottom() {
 			
@@ -71,9 +79,42 @@
 			}
 		},
 		methods: {
+			getList(){
+				if(this.type=='AA'){
+					this.getBillList()
+				}else{
+					this.getMessageList()
+				}
+				
+			},
 			myLoadmore() {
 				this.formData.pageIndex += 1;
-				this.getBillList();
+				this.getList()
+			},
+			getMessageList(){
+				uni.showLoading({
+					mask:true,title:'加载中...'
+				})
+				API.messageList(this.formData).then((res) => {
+					uni.hideLoading();
+					if(this.formData.pageIndex==1){
+						this.list = [
+							
+							...res.data.data
+						];
+					}else{
+						this.list = [
+							...this.list,
+							...res.data.data
+						];
+					}
+					this.recordsTotal = res.data.recordsTotal;
+					
+					//this.list=response.data.data;
+				}).catch(error => {
+					uni.hideLoading();
+					
+				})
 			},
 			getBillList(){
 				uni.showLoading({

+ 16 - 3
pages/mine/mine.vue

@@ -135,7 +135,7 @@
 			
 		</view>
 		
-		<Tabbar :current="2" ></Tabbar>
+		<Tabbar :current="2" :prefetchNum="prefetchNum" ></Tabbar>
 	</view>
 </template>
 
@@ -143,6 +143,8 @@
 	import * as API from '@/apis/pagejs/index.js'
 	import * as API_user from '@/apis/pagejs/user.js'
 	
+	import * as API_message from '@/apis/pagejs/message.js'
+	
 	import Tabbar from '@/components/Tabbar.vue'
 	export default {
 		components: {
@@ -155,6 +157,7 @@
 				userList:[],
 				changeUserShow:false,
 				defaultIndex:0,
+				prefetchNum:0,
 				personInfo:{
 					
 				}
@@ -165,10 +168,20 @@
 			this.homePage()
 			
 			this.userList=this.carhelp.getPersonInfoPlus().userList
-			
+			this.prefetch()
 			//this.personalCenter()
 		},
 		methods: {
+			prefetch(){
+				API_message.prefetch({
+					
+				}).then((response) => {
+					//this.prefetchNum=response.data
+				}).catch(error => {
+					//uni.hideLoading();
+					
+				})
+			},
 			query(){
 				uni.showLoading({
 					title: "加载中",
@@ -192,7 +205,7 @@
 					this.regUser=response.data.regUser;
 					
 					this.personInfo=response.data.tenantInfo;
-					
+					this.prefetch();
 					//this.homePage()
 				
 				}).catch(error => {

+ 2 - 2
pages/recharge/accountRecharge.vue

@@ -94,7 +94,7 @@
 						缴费金额
 					</view>
 					<view class="amount-options">
-						<view  v-for="(item,i) in amountList"
+						<view  v-for="(item,i) in amountList" :key="i"
 						 class="options-item " :class="{
 							 chosen:selectNum==item
 						 }" @click="otherNum=item,selectNum=item"   >
@@ -224,7 +224,7 @@
 					</view>
 				</view>
 				<!-- 按钮 -->
-				<button class="btn" @click="submit">立即支付</button>
+				<button class="btn" @click="submit">{{submitType==2?'查看对公转账信息':'立即支付'}}</button>
 			</view>
 		</view>