Browse Source

commit -m 支付

zhengjinyi 3 years ago
parent
commit
c123fb4a98
2 changed files with 32 additions and 32 deletions
  1. 29 29
      pages/user/account/account.vue
  2. 3 3
      services/pay.service.js

+ 29 - 29
pages/user/account/account.vue

@@ -53,11 +53,11 @@
 						<view class="t-t">{{item.type =='1'? '收入' : '支出'}}</view>
 					</view>
 				</view>
-				<!--加载loadding-->
-				<tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
-				<tui-nomore :visible="!pullUpOn" bgcolor="#FFFFFF" :text='nomoreText'></tui-nomore>
-				<!--加载loadding-->
 			</view>
+			<!--加载loadding-->
+			<tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
+			<tui-nomore :visible="!pullUpOn" bgcolor="#FFFFFF" :text='nomoreText'></tui-nomore>
+			<!--加载loadding-->
 		</scroll-view>
 		<view class="showAccounExp" v-if="isShowAccounExp" :class="[isShowAccounExp == true ? 'show':'hide']" @tap="hideAccounExp">
 			<image src="https://img.caimei365.com/group1/M00/03/95/Cmis216Sk_SAZeZlAA2oDvspRRU204.png" mode=""></image>
@@ -66,10 +66,10 @@
 	</view>
 </template>
 <script>
-	import tuiLoadmore from "@/components/tui-components/loadmore/loadmore"
-	import tuiNomore from "@/components/tui-components/nomore/nomore"
+	import tuiLoadmore from '@/components/tui-components/loadmore/loadmore'
+	import tuiNomore from '@/components/tui-components/nomore/nomore'
 	import uniCalendar from '@/components/uni-calendar/uni-calendar.vue'
-	var date = new Date();
+	var date = new Date()
 	export default{
 		components: {
 			uniCalendar,
@@ -160,10 +160,10 @@
 						let infoData = response.data
 						this.initAbleUserMoney(infoData.ableUserMoney)
 						let resultsData = infoData.pageDate.results
-						this.hasNextPage =  infoData.pageDate.hasNextPage;
+						this.hasNextPage =  infoData.pageDate.hasNextPage
 						if(resultsData && resultsData.length > 0){
-							this.isEmpty = false;
-							this.accountList = [...resultsData];
+							this.isEmpty = false
+							this.accountList = [...resultsData]
 						}else{
 							this.isEmpty = true
 						}
@@ -171,7 +171,7 @@
 							this.pullUpOn = false
 							this.nomoreText = '上拉显示更多'
 						}else{
-							if(this.accountList.length < 2){
+							if(this.accountList.length < 8){
 								this.pullUpOn = true
 							}else{
 								this.pullUpOn = false
@@ -197,10 +197,10 @@
 					let infoData = response.data
 					this.initAbleUserMoney(infoData.ableUserMoney)
 					let resultsData = infoData.pageDate.results
-					this.hasNextPage =  infoData.pageDate.hasNextPage;
+					this.hasNextPage =  infoData.pageDate.hasNextPage
 					this.accountList = this.accountList.concat(resultsData)
-					this.pullFlag = false;// 防上拉暴滑
-					setTimeout(()=>{this.pullFlag = true;},500)
+					this.pullFlag = false// 防上拉暴滑
+					setTimeout(()=>{this.pullFlag = true},500)
 					if(this.hasNextPage){
 						this.pullUpOn = false
 						this.nomoreText = '上拉显示更多'
@@ -215,34 +215,34 @@
 			},
 			initAbleUserMoney(money){//拆分金额并转千分位格式显示
 				if(money == 0){
-					this.showIndexOfMoney ='0';
-					this.smallMoney=".00"
+					this.showIndexOfMoney ='0'
+					this.smallMoney='.00'
 				}else{
-					this.ableUserMoney = this.$api.FormatMoney(money) ;
-					let i =  this.ableUserMoney.toString().lastIndexOf('.');
+					this.ableUserMoney = this.$api.FormatMoney(money) 
+					let i =  this.ableUserMoney.toString().lastIndexOf('.')
 					if(i==-1){
 						this.showIndexOfMoney=this.$api.FormatMoney( this.ableUserMoney)
-						this.smallMoney=".00"
+						this.smallMoney='.00'
 					}else{
-						this.smallMoney = this.ableUserMoney.toString().substring(i);
+						this.smallMoney = this.ableUserMoney.toString().substring(i)
 						this.showIndexOfMoney= this.$api.FormatMoney(this.ableUserMoney.toString().substring(0,i))
 					}
 				}
 			},
 			tabClick(index){//tab点击
-				this.tabCurrentIndex = index;
+				this.tabCurrentIndex = index
 				this.pageNum = 1
 				this.accountList = []
 				this.pullUpOn = true //隐藏
-				this.getAccountInitData(this.tabCurrentIndex,this.year,this.month);
+				this.getAccountInitData(this.tabCurrentIndex,this.year,this.month)
 			},			
 			bindDateChange: function(e) {
 				this.date = e.target.value
 			},
 			monthSwitch(e) {
-				this.year = e.year;
-				this.month = e.month;
-				this.getAccountInitData(this.tabCurrentIndex,this.year,this.month);
+				this.year = e.year
+				this.month = e.month
+				this.getAccountInitData(this.tabCurrentIndex,this.year,this.month)
 			},
 			cheakType(type){
 				let typeTextHtml,
@@ -256,18 +256,18 @@
 						7:'余额订单充值',
 						8:'订金订单退款',
 						9:'余额订单退款'
-					};
+					}
 				Object.keys(typeObject).forEach(function(key){
 					if(key == type){
 						typeTextHtml = typeObject[key]
 					}
-				});	
-				return typeTextHtml;
+				})	
+				return typeTextHtml
 			},
 			hanldNavigateBack(){
 				uni.navigateBack({
 					delta: 1
-				});
+				})
 			},
 			showAccounExp(){
 				this.isShowAccounExp = true

+ 3 - 3
services/pay.service.js

@@ -26,9 +26,9 @@ export default class PayService {
     }
     /**
 	 *小程序支付-微信支付
-	 *@param  amount支付金额,单位分,必须大于2
-	 *@param  payWay银联:UNIONPAY,微信:WEIXIN,支付宝:ALIPAY
-	 *@param  payType 微信小程序支付: MINIAPP_WEIXIN ,微信公众号支付: JSAPI_WEIXIN
+	 *@param  amount 支付金额,必须大于2
+	 *@param  payWay 银联:YL,公众号:GZH,小程序:XCX 支付宝:ZFBEWM
+	 *@param  payType 微信小程序支付: XCX ,微信公众号支付: GZH
 	 *@param  code  微信小程序code,微信小程序支付使用
 	 *@param  orderId  主订单ID
 	 */