baipiao 2 veckor sedan
förälder
incheckning
5406d2d814

+ 12 - 0
pages.json

@@ -687,6 +687,18 @@
 						"style": {
 							"navigationBarTitleText": "提现"
 						}
+					},
+					{
+						"path": "extractSuccess",
+						"style": {
+							"navigationBarTitleText": "提现成功"
+						}
+					},
+					{
+						"path": "extractFail",
+						"style": {
+							"navigationBarTitleText": "提现失败"
+						}
 					}
 					
 					

+ 182 - 18
pages/referral/extractList.vue

@@ -2,27 +2,50 @@
 <view class="box">
 	<view style="height: 20rpx;"></view>
  <view class="line" v-for="(item,index) in list">
-	 <view class="linetop">
-		 <view class="name">提现</view>
+	 <view class="linetop" v-if="type!=2">
+		 
 		 <view class="nickNameBox">
-			 <view class="amount">¥{{item.money}}</view>
+			 <view class="amount" >¥{{item.money}}</view>
 		 </view>
 	 </view>
-	 <view class="lineCOnt">
-		 <view class="lineline">
-		 	<view class="lineContLeft">
-				 <view class="lineContLeftMs">申请时间:{{item.applyTime}}</view>
-		 	</view>
-			<view class="lineTIme">{{stateMap[~~item.auditState]}}</view>
-		 </view>
-		
+	 <view class="lineCOnt"  v-if="type!=2">
+	 		 <view class="lineline">
+	 		 	<view class="lineContLeft">
+	 				 <view class="lineContLeftMs">申请时间:{{item.applyTime}}</view>
+	 		 	</view>
+	 			<view class="lineTIme" >{{jkstateMap[~~item.applyState]}}</view>
+	 			<view class="lineTIme">{{stateMap[~~item.auditState]}}</view>
+	 		 </view>
 	 </view>
+	 <view class="linetop" v-if="type==2">
+		 <view class="name">提现金额:{{item.applyMoney}}</view>
+		 <view class="lineTIme" style="color: rgb(255,102,0);font-size: 28rpx;">{{jkstateMap[~~item.applyState]}}</view>
+	 </view>
+	 
+	 <view class="lineCOnt" v-if="type==2">
+	 		 <view class="lineline">
+	 		 	<view class="lineContLeft">
+	 				 <view class="lineContLeftMs">申请时间:{{item.applyTime}}</view>
+	 		 	</view>
+	 			<view class="lineTIme jkButton" @click="getMoney(item)" v-if="item.applyState == 2 && item.cashState == 0 && item.cashType == 0">去提现</view>
+				<view class="lineTIme jkButton"  v-if="item.applyState == 2 && item.cashState == 1 && item.cashType == 0">提现中</view>
+				<view class="lineTIme jkButton"  v-if="item.applyState == 2 && item.cashState == 2 && item.cashType == 0">提现失败</view>
+				<view class="lineTIme jkButton"  v-if="item.applyState == 2 && item.cashState == 3 && item.cashType == 0">已提现</view>
+				<view class="lineTIme jkButton"  v-if="item.applyState == 2 && item.cashType == 1">线下打款</view>
+				
+	 		 </view>
+	 		
+	 </view>
+	 
+	 
+	 
  </view>
  <nodata v-if="list.length==0"></nodata>
 </view>
 </template>
 
 <script>
+	import { requestTransfer } from '@/utils/transfer';
 	import nodata from '../../components/nodata/nodata.vue'
 	export default {
 		components: {
@@ -34,18 +57,43 @@
 				list:'',
 				themeColor:'',
 				userInfo:'',
+				type:0,
 				stateMap: ['待审核', '审核通过', '审核拒绝'],
+				jkstateMap: ['待审核', '审核拒绝', '审核通过'],
+				outBatchNo:'',
+				packageInfo:'',
+				state:'',
+				mchId:'',
+				appId:'',
+				timer:'',
+				jkcashid:'',
+				cashState:2,
+				showGet:1,
+				money:0,
+				 intervalId: null
 			}
 		},
 		onLoad(opt) {
 			this.themeColor = uni.getStorageSync("themeColor");
 			this.userInfo = uni.getStorageSync("userInfo");
-			this.getList()
+			  this.type = opt.type;
+			 if(this.type==2){
+				 this.getListByJkCashout()
+			 }else{
+				 this.getList()
+			 }
+			 
+			
 		},
 		onShow() {
 			
 		},
 		methods: {
+			goRouter(url){
+				uni.navigateTo({
+					url:url
+				})
+			},
 			getList(){
 				uni.showLoading({
 					title: '加载中'
@@ -55,27 +103,132 @@
 				}, 'GET').then(res => {
 					uni.hideLoading();
 					this.list = res.data;
-					//var data=res.data.Items;
-					//this.list=this.list.concat(data);
-					//console.log('list+=', this.queryShopList);
+				})
+			},
+			//推广
+			getListByJkCashout(){
+				uni.showLoading({
+					title: '加载中'
+				})
+				this.$http('jkCashout/getJkCashoutDetail', {
+				    
+				}, 'GET').then(res => {
+					uni.hideLoading();
+					this.list = res.data;
+					
+				})
+			},
+			//提现
+			getMoney(jk){
+				uni.showLoading({
+					title: '加载中'
+				})
+				if(jk.cashState == 0){
+					this.money = jk.applyMoney
+					this.$http('jkCashout/jkCashout', {
+					    jkcashid:jk.id
+					}, 'POST').then(res => {
+						uni.hideLoading();
+						if(res.code == 0){
+							this.outBatchNo = res.data.outBatchNo
+							this.packageInfo = res.data.packageInfo
+							this.state = res.data.state
+							this.mchId = res.data.mchId
+							this.appId = res.data.appId
+							this.jkcashid = jk.id
+							uni.showLoading({
+								title: '请稍候...'
+							})
+							this.stopInterval()
+							 this.intervalId = setInterval(() => {
+							      this.checkJkCashoutState()
+							    }, 2000)
+						}else{
+							uni.showLoading({
+								title: res.msg
+							})
+						}
+					})
+				}else{
+					uni.hideLoading();
+				}
 				
+			},
+			stopInterval() {
+			    if (this.intervalId) {
+			      clearInterval(this.intervalId);
+			      this.intervalId = null;
+			    }
+			},
+			//查询状态
+			checkJkCashoutState(){
+				this.$http('jkCashout/checkJkCashoutState', {
+				    outBatchNo:this.outBatchNo,
+					 jkcashid:this.jkcashid
+				}, 'POST').then(res => {
+					console.log(res);
+					if(res.code == 0 && res.data.state =='WAIT_USER_CONFIRM'){
+						uni.hideLoading();
+						this.stopInterval();
+						this.getWechatMoney();
+					}
+					if(res.code == 0 && res.data.state =='SUCCESS'){
+						//成功页面
+						console.log("领取成功-跳转成功页面");
+						this.goRouter('../subPack/extractSuccess?money='+this.money);
+					}
+					if(res.code == 0 && res.data.state =='FAIL'){
+						//失败页面
+						console.log("领取失败-跳转失败页面");
+						this.goRouter('../subPack/extractFail?money='+this.money)
+					}
 				})
+			},
+			getWechatMoney(){
+				if (wx.canIUse('requestMerchantTransfer')) {
+				  wx.requestMerchantTransfer({
+				      mchId: this.mchId,
+				      appId: this.appId,
+				      package: this.packageInfo,
+				      success: (res) => {
+				        // res.err_msg将在页面展示成功后返回应用时返回ok,并不代表付款成功
+						console.log(res);
+						 if (res.errMsg === 'requestMerchantTransfer:ok') {
+						              // res.err_msg将在页面展示成功后返回应用时返回success,并不代表付款成功
+									  this.checkJkCashoutState();
+						}
+						
+				      },
+				      fail: (res) => {
+						 
+				      }
+				    });
+				}
 			}
-			
 		},
 		onReachBottom(){
 			//this.page++;
-			this.getList()
+			if(this.type==2){
+				this.getListByJkCashout()
+			}else{
+				this.getList()
+			}
 			//console.log("shanglas")
 		},
 		onPullDownRefresh(){
 		    //this.page=1;
 			//this.list=[];
-			this.getList();
+			if(this.type==2){
+				this.getListByJkCashout()
+			}else{
+				this.getList()
+			}
+			//this.getList();
 			setTimeout(() => {
 					uni.stopPullDownRefresh(); // 关闭下拉刷新 
 			}, 2000);
 		}
+		
 	}
 </script>
 
@@ -138,4 +291,15 @@
 	width: 30rpx;
 	height: 30rpx;
 }
+.jkButton{
+	color: #ffffff;
+	font-size: 28rpx;
+	border: 1rpx solid rgb(  7,183, 91);
+	background-color: rgb(  7,183, 91);
+	width: 120rpx;
+	height: 40rpx;
+	text-align: center;
+	line-height: 40rpx;
+	border-radius: 50rpx;
+}
 </style>

+ 113 - 0
pages/subPack/extractFail.vue

@@ -0,0 +1,113 @@
+<template>
+	<view class="box">
+	
+	<view class="head-icon">
+		<uni-icons type="closeempty" size="28" color="#ffffff"></uni-icons>
+	</view>
+	<view class="box-title">
+		提现失败
+	</view>	
+	<view class="box-money">
+		<span class="box-money-icon">¥</span>
+		<span class="box-money-num">{{money}}</span>
+	</view>
+	<view class="box-sm">
+		请联系管理员
+	</view>
+		
+	<view class="backButton" style="display: none;" @click="goRouter('promotion')">
+		返回活动页
+	</view>	
+		
+
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				money:0
+			}
+		},
+		onLoad(opt) {
+			this.money = opt.money
+		},
+		methods: {
+			goRouter(url){
+				uni.navigateTo({
+					url:url
+				})
+			}
+		}
+	}
+</script>
+
+<style>
+	.box {
+		min-height: 100vh;
+		background: #F4F5F7;
+		padding-top: 20rpx;
+		background-color: #ffffff;
+	}
+	.box-title {
+		font-size: 30rpx;
+		font-weight: 400;
+		width: 100%;
+		height: 100rpx;
+		line-height: 100rpx;
+		text-align: center;
+		padding-top: 20rpx;
+	}
+	.box-money{
+		width: 100%;
+		height: 80rpx;
+		line-height: 80rpx;
+		text-align: center;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+	}
+	.box-money-icon{
+		font-size: 45rpx;
+		font-weight: 550;
+
+	}
+	.box-money-num{
+		font-size: 75rpx;
+		font-weight: 550;
+
+	}
+	.box-sm{
+		font-size: 22rpx;
+		width: 100%;
+		height: 50rpx;
+		line-height: 50rpx;
+		text-align: center;
+		color: #999999;
+		margin-top: 20rpx;
+	}
+	.head-box{
+		width: 100%;
+	}
+	.head-icon{
+		width: 90rpx;
+		height: 90rpx;
+		text-align: center;
+		background-color: #F14D42;
+		line-height: 90rpx;
+		border-radius: 90rpx;
+		margin: 150rpx auto 10rpx;
+	}
+	.backButton{
+		width: 300rpx;
+		height: 80rpx;
+		background-color: #F2F2F2;
+		line-height: 80rpx;
+		text-align: center;
+		margin: 150rpx auto;
+		font-size: 28rpx;
+		font-weight: 650;
+		border-radius: 10rpx;
+	}
+</style>

+ 114 - 0
pages/subPack/extractSuccess.vue

@@ -0,0 +1,114 @@
+<template>
+	<view class="box">
+	
+	<view class="head-icon">
+		<uni-icons type="checkmarkempty" size="28" color="#ffffff"></uni-icons>
+	</view>
+	<view class="box-title">
+		提现成功
+	</view>	
+	<view class="box-money">
+		<span class="box-money-icon">¥</span>
+		<span class="box-money-num">{{money}}</span>
+	</view>
+	<view class="box-sm">
+		可在"微信支付-服务-钱包-账单" 查看明细
+	</view>
+		
+	<view class="backButton" @click="goRouter('promotion')">
+		
+		返回活动页
+	</view>	
+		
+
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				money:0
+			}
+		},
+		onLoad(opt) {
+			this.money = opt.money
+		},
+		methods: {
+			goRouter(url){
+				uni.navigateTo({
+					url:url
+				})
+			}
+		}
+	}
+</script>
+
+<style>
+	.box {
+		min-height: 100vh;
+		background: #F4F5F7;
+		padding-top: 20rpx;
+		background-color: #ffffff;
+	}
+	.box-title {
+		font-size: 30rpx;
+		font-weight: 400;
+		width: 100%;
+		height: 100rpx;
+		line-height: 100rpx;
+		text-align: center;
+		padding-top: 20rpx;
+	}
+	.box-money{
+		width: 100%;
+		height: 80rpx;
+		line-height: 80rpx;
+		text-align: center;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+	}
+	.box-money-icon{
+		font-size: 45rpx;
+		font-weight: 550;
+
+	}
+	.box-money-num{
+		font-size: 75rpx;
+		font-weight: 550;
+
+	}
+	.box-sm{
+		font-size: 22rpx;
+		width: 100%;
+		height: 50rpx;
+		line-height: 50rpx;
+		text-align: center;
+		color: #999999;
+		margin-top: 20rpx;
+	}
+	.head-box{
+		width: 100%;
+	}
+	.head-icon{
+		width: 90rpx;
+		height: 90rpx;
+		text-align: center;
+		background-color: #08C261;
+		line-height: 90rpx;
+		border-radius: 90rpx;
+		margin: 150rpx auto 10rpx;
+	}
+	.backButton{
+		width: 300rpx;
+		height: 80rpx;
+		background-color: #F2F2F2;
+		line-height: 80rpx;
+		text-align: center;
+		margin: 150rpx auto;
+		font-size: 28rpx;
+		font-weight: 650;
+		border-radius: 10rpx;
+	}
+</style>

+ 96 - 24
pages/subPack/promotion.vue

@@ -1,28 +1,40 @@
 <template>
 <view class="box">
   <view class="contBox">
-  	<view class="top">
+  	<view class="top ">
 		<view class="topLeft">
 			<view class="topLeftTitle">未提现返利</view>
-			<view class="topLeftNum">11</view>
+			<view class="topLeftNum">{{canMoney}}</view>
 		</view>
 		<view class="topRight" @click="goRouter('promotionExtract')">提现</view>
 	</view>
 	<view class="numBox">
-		<view class="numLine">总收益:120.34</view>
-		<view class="numLine">已到账:78.99</view>
+		<view class="numLine">总收益:{{sumMoney}}</view>
+		<view class="numLine">提现中:{{inMoney}}</view>
+		<view class="numLine">已到账:{{alreadyMoney}}</view>
 	</view>
 	
-	<view class="jlLine">
+	
+	<view class="jlLine" v-for="item in records" :key="item.id">
+		<view class="lineTop">
+			<view class="lineMs">集客活动名称</view>
+			<view class="lineNum">收益:<span class="spanNum">{{item.money}}</span></view>
+		</view>
+		<view class="lineBottom">
+			<view class="time">{{item.createTime}}</view>
+			<view class="nickName">微信昵称:{{item.customerName}}</view>
+		</view>
+	</view>
+	<!-- <view class="jlLine">
 		<view class="lineTop">
 			<view class="lineMs">集客活动名称</view>
 			<view class="lineNum">收益:<span class="spanNum">50.54</span></view>
 		</view>
 		<view class="lineBottom">
 			<view class="time">2020-07-20 19:08</view>
-			<view class="nickName"></view>
+			<view class="nickName">微信昵称:张三李四玩大炮呢突然不见了</view>
 		</view>
-	</view>
+	</view> -->
 	
 	
   </view>
@@ -40,12 +52,17 @@
 				detail:'',
 				themeColor:'',
 				userInfo:'',
+				alreadyMoney: 0,
+				canMoney: 0,
+				inMoney: 0,
+				sumMoney: 0,
+				records: []
 			}
 		},
 		onLoad(opt) {
 			this.themeColor = uni.getStorageSync("themeColor");
 			this.userInfo = uni.getStorageSync("userInfo");
-			//this.getData();
+			this.getData();
 			//this.getExplain();
 		},
 		onShow() {
@@ -56,13 +73,18 @@
 				uni.showLoading({
 					title: '加载中'
 				})
-				this.$http('openMCustomer/getIndexData', {
+				this.$http('jkCashout/getIndexData', {
 				    
 				}, 'GET').then(res => {
 					uni.hideLoading();
-					this.detail = res.data
+					//this.detail = res.data
+					this.alreadyMoney = res.data.AlreadyMoney
+					this.canMoney = res.data.CanMoney
+					this.inMoney = res.data.InMoney
+					this.sumMoney = res.data.SumMoney
+					this.records = res.data.records
 					//console.log('list+=', this.queryShopList);
-				
+					
 				})
 			},
 			getExplain(){
@@ -88,11 +110,15 @@
 
 <style scoped lang="less">
 .numBox{
-	display: flex;color: #666666;
-	padding-top: 20rpx;font-size: 26rpx;
+	display: flex;
+	color: #666666;
+	padding: 20rpx 0 30rpx 0;
+	font-size: 26rpx;
 }
 .numLine{
 	padding-right: 20rpx;
+	color: black;
+	font-weight: bold;
 }
 .box {
 	width: 100vw;
@@ -103,35 +129,81 @@
 	padding: 20rpx 24rpx;
 }
 .top{
-	background: #FFFFFF;
+	background: rgb(255,102,0);
 	border-radius: 10rpx;
 	padding: 24rpx 20rpx;
 	display: flex;
 	justify-content: space-between;
 }
+.fontColor{
+	color: #ffffff;
+}
 .topLeftTitle{
 	font-size: 30rpx;
 	font-family: PingFangSC-Medium, PingFang SC;
 	font-weight: 500;
-	color: #333333;
+	color: #ffffff;
 }
 .topLeftNum{
 	font-size: 40rpx;
 	font-family: PingFangSC-Semibold, PingFang SC;
 	font-weight: 600;
-	color: #EC0F0A;
+	color: #ffffff;
 	padding-top: 24rpx;
 }
 .topRight{
-	width: 138rpx;
-	height: 64rpx;
-	background: #EC0F0A;
-	border-radius: 10rpx;
-	line-height: 64rpx;
-	text-align: center;
+	// width: 138rpx;
+	// height: 64rpx;
+	//background: #EC0F0A;
+	//border-radius: 10rpx;
+	// line-height: 152rpx;
+	// padding-right: 10rpx;
+	// text-align: center;
+	// color: #FFFFFF;
+	// font-size: 28rpx;
 	color: #FFFFFF;
-	font-size: 28rpx;
-	margin-top: 34rpx;
+	padding: 70rpx 20rpx 20rpx 0;
+	
+}
+.jlLine{
+	margin: 15rpx 0;
+	display: flex;
+	flex-direction: column;
+	background-color: #FFFFFF;
+	font-size: 25rpx;
+	.lineTop{
+		display: flex;
+		justify-content: space-between;
+		height: 70rpx;
+		line-height: 70rpx;
+		padding: 0 50rpx 0 20rpx;
+		border-bottom: solid 3rpx #666666;
+		color: #666666;
+		.lineNum{
+			width: 228rpx;
+			.spanNum{
+				color:rgb(255,102,0)
+			}
+		}
+	}
+	.lineBottom{
+		display: flex;
+		justify-content: space-between;
+		height: 70rpx;
+		line-height: 70rpx;
+		padding: 0 50rpx 0 20rpx;
+		.time{
+			color: black;
+			font-weight: 500;
+		}
+		.nickName{
+			width: 228rpx;
+			overflow: hidden;
+			white-space: nowrap;
+			text-overflow: ellipsis;
+			color: #666666;
+		}
+	}
 }
 .xffl{
 	background: #FFFFFF;

+ 164 - 48
pages/subPack/promotionExtract.vue

@@ -1,38 +1,46 @@
 <template>
 	<view class="box">
 		<view class="tixiancs">
-			<view class="tixiancsLeft">本月已提现{{detail.count}}次</view>
-			<view class="tixiancsRight" @click="goRouter('../referral/extractList')">提现明细</view>
+			<view class="tixiancsLeft"></view>
+			<view class="tixiancsRight" @click="goRouter('../referral/extractList?type=2')">提现明细</view>
 		</view>
 		<view class="header">
 			<view class="title">提现金额</view>
 			<view class="moneyView">
-				<text class="icon"></text>
+				<text class="icon"></text>
 				<input type="digit" class="moneyInput" placeholder-style="color:#999999; font-size:30rpx"
-					placeholder="请输入提现金额" v-model="money" @input="inputValue" />
+					placeholder="请输入" v-model="money"  @input="inputValue" />
 				<view class="allBtn" @click="allBtn">全部提现</view>
 			</view>
-			<view class="zongMoney">可提现金额: <span style="color: #EC0F0A;padding-right: 10rpx;">¥{{detail.canMoney}}  </span>  (冻结金额:{{detail.freezeMoney}}) </view>
+			<view class="zongMoney">可提现金额: <span style="color: rgb(255,102,  0);padding-right: 10rpx;">¥{{canMoney}}  </span> </view>
 
 			
 		</view>
 
+		<view class="sureBtn" @click="sure">申请提现</view>
+
 		<view class="tishi" style="padding:20rpx 20rpx 100rpx 20rpx ; ">
+			<view class="tishi-title" style="color: rgb(255,102,  0);padding-left: 18rpx;">
+				提现说明:
+			</view>
 			<view class="tishiLine">
-				<view class="tishiY"></view>
-				<view class="tishiTxt">提现冻结天数:{{detail.explain&&detail.explain.freezeDay}}天</view>
+				<view class="tishiTxt">1.最小提现金额:<span class="tishiTxtColor">{{minCash}}</span>元</view>
 			</view>
 			<view class="tishiLine">
-				<view class="tishiY"></view>
-				<view class="tishiTxt">最小提现金额:{{detail.explain&&detail.explain.singleLow}}元</view>
+				<view class="tishiTxt">2.只允许一笔提现在途</view>
+			</view>
+			<!-- <view class="tishiLine">
+				<view class="tishiTxt">1.提现冻结天数:<span class="tishiTxtColor">{{detail.explain&&detail.explain.freezeDay}}</span>天</view>
 			</view>
 			<view class="tishiLine">
-				<view class="tishiY"></view>
-				<view class="tishiTxt">每月可提现次数:{{detail.explain&&detail.explain.monthlyMost}}次</view>
+				<view class="tishiTxt">2.最小提现金额:<span class="tishiTxtColor">{{detail.explain&&detail.explain.singleLow}}</span>元</view>
 			</view>
+			<view class="tishiLine">
+				<view class="tishiTxt">3.每月可提现次数:<span class="tishiTxtColor">{{detail.explain&&detail.explain.monthlyMost}}</span>次</view>
+			</view> -->
 		</view>
 
-		<view class="sureBtn" @click="sure">申请提现</view>
+		
 
 		
 
@@ -48,7 +56,20 @@
 				name: '',
 				account: '',
 				detail: {},
+				alreadyMoney: 0,
+				canMoney: 0,
+				inMoney: 0,
+				sumMoney: 0,
+				minCash: 0.1,
 				couContent: '', //提现规则
+				cashState:null,
+				timer :null,
+				appId:'',
+				mchId:'',
+				outBatchNo:'',
+				packageInfo:'',
+				state:'',
+				jkcashid:'',
 			}
 		},
 		onLoad() {
@@ -65,10 +86,14 @@
 					title: '加载中'
 				})
 				
-				this.$http('openMCustomer/getWithdrawalInfo', {}, 'GET').then(res => {
+				this.$http('jkCashout/getCashoutData', {}, 'GET').then(res => {
 					uni.hideLoading();
-					this.detail = res.data;
-					this.okMoney=this.detail.canMoney
+					this.alreadyMoney = res.data.AlreadyMoney
+					this.canMoney = res.data.CanMoney
+					this.inMoney = res.data.InMoney
+					this.sumMoney = res.data.SumMoney
+					this.minCash = res.data.MinCash
+					this.cashState = res.data.CashState
 
 				})
 			},
@@ -85,14 +110,12 @@
 			allBtn() {
 
 				setTimeout(() => {
-					this.money = this.okMoney; // 解决
+					this.money = this.canMoney; // 解决
 				}, 0)
 
-
-				console.log('money,allmoney', this.money, this.okMoney);
 			},
 			sure() {
-				 if (this.money > this.okMoney) {
+				 if (this.money > this.canMoney) {
 				 	uni.showToast({
 				 		title: '提现金额不能大于可提现金额',
 				 		icon: 'none',
@@ -108,47 +131,134 @@
 				 	});
 				 	return;
 				 }
-				
-
+				 if (this.money < this.minCash) {
+				 	uni.showToast({
+				 		title: '提现金额最低为'+this.minCash,
+				 		icon: 'none',
+				 		duration: 3000,
+				 	});
+				 	return;
+				 }
 				this.postData();
 			},
 			postData() {
-				// uni.showLoading({
-				// 	title: '提现中'
-				// })
-				let url = 'openMCustomer/applyWithdrawal',
+				uni.showLoading({
+					title: '提现申请..'
+				})
+				let url = 'jkCashout/applyJkCashout',
 					params = {
 						money: this.money,
 						
 					}
 				this.$http(url, params, 'POST').then(res => {
 					//uni.hideLoading();
-					if(res.code==0){
+					console.log(res)
+					if(res.code ==0){
+						this.canMoney = this.canMoney - this.money
+					}
+					//人工审核
+					if(res.code==0 && this.cashState==1){
 						uni.showModal({
 							title: '提交成功',
 							content: '请耐心等待平台审核',
 							showCancel:false,
 							confirmText:'知道了',
 							success: function(res) {
-						
-								uni.navigateBack({
-						
-								})
+								uni.hideLoading();
 							}
 						});
-					}else{
-						// uni.showToast({
-						//  		title: '提现金额不能为空',
-						//  		icon: 'none',
-						//  		duration: 3000,
-						//  	});
+					}else if(res.code==0 && this.cashState==0){
+						//自动审核
+						//轮询查询状态 
+						uni.showToast({
+							title: '审核成功请等待..',
+							icon: 'success',
+							duration: 3000,
+						});
+						this.appId = res.data.appId
+						this.mchId = res.data.mchId
+						this.outBatchNo = res.data.outBatchNo
+						this.packageInfo = res.data.packageInfo
+						this.state = res.data.state
+						this.jkcashid = res.data.jkcashid
+						if(res.data.state =='WAIT_USER_CONFIRM'){
+							this.getWechatMoney()
+						}else{
+							this.checkOrderStatus()
+						}
+					}else if(res.code==0 && this.cashState==2){
+						//线下
+						uni.showToast({
+							title: '申请成功请等待平台审核',
+							icon: 'success',
+							duration: 3000,
+						});
+						
 					}
-					
-
-
-
 				})
 			},
+			async checkOrderStatus() {
+			      try {
+			       this.$http('jkCashout/checkJkCashoutState', {
+			           outBatchNo:this.outBatchNo,
+			       	 jkcashid:this.jkcashid
+			       }, 'POST').then(res => {
+			       	console.log(res);
+			       	if(res.code == 0 && res.data.state =='WAIT_USER_CONFIRM'){
+			       		uni.hideLoading();
+						clearTimeout(this.timer);
+			       		this.getWechatMoney();
+			       	}
+			       	 else if(res.code == 0 && res.data.state =='SUCCESS'){
+			       		//成功页面
+			       		console.log("领取成功-跳转成功页面");
+						clearTimeout(this.timer);
+			       		this.goRouter('../subPack/extractSuccess?money='+this.money);
+			       	}
+			       	else if(res.code == 0 && res.data.state =='FAIL'){
+			       		//失败页面
+			       		console.log("领取失败-跳转失败页面");
+						clearTimeout(this.timer);
+			       		this.goRouter('../subPack/extractFail?money='+this.money)
+			       	}else if(res.code == 1){
+						clearTimeout(this.timer);
+					}
+					else{
+						this.timer = setTimeout(this.checkOrderStatus, 2000);
+					}
+			       })
+			      } catch (error) {
+			        console.error('查询订单状态失败:', error);
+			        // 出错时也继续轮询
+			        clearTimeout(this.timer);
+			      }
+			},
+			  checkOrderStatusMounted() {
+			    this.checkOrderStatus(); // 立即执行第一次查询
+			  },
+			  beforeDestroy() {
+			    clearTimeout(this.timer);
+			  },
+			  getWechatMoney(){
+			  	if (wx.canIUse('requestMerchantTransfer')) {
+			  	  wx.requestMerchantTransfer({
+			  	      mchId: this.mchId,
+			  	      appId: this.appId,
+			  	      package: this.packageInfo,
+			  	      success: (res) => {
+			  	        // res.err_msg将在页面展示成功后返回应用时返回ok,并不代表付款成功
+			  			console.log(res);
+			  			 if (res.errMsg === 'requestMerchantTransfer:ok') {
+			  					this.checkOrderStatusMounted();
+			  			}
+			  			
+			  	      },
+			  	      fail: (res) => {
+			  			 
+			  	      }
+			  	    });
+			  	}
+			  }
 		}
 	}
 </script>
@@ -171,6 +281,7 @@
 	}
 	.tishiTxt{
 		padding-left: 18rpx;
+		color: #222222;
 	}
 .tixiancs{
 	display: flex;
@@ -184,7 +295,10 @@
 	color: #999999;
 }
 .tixiancsRight{
-	color: #1677FF;
+	 color:rgb(255,102,  0);
+}
+.tishiTxtColor{
+	color: rgb(255,102,  0);
 }
 	.header {
 		background-color: #FFFFFF;
@@ -223,8 +337,8 @@
 	}
 
 	.allBtn {
-		font-size: 26rpx;
-		color: #EC0F0A;
+		font-size: 30rpx;
+		color: rgb(255,102,  0);
 		width: 200rpx;
 		height: 50rpx;
 		line-height: 50rpx;
@@ -234,8 +348,9 @@
 
 	.zongMoney {
 		font-size: 26rpx;
-		color: #999999;
-		
+		color: #222222;
+		border-top: solid 3rpx #999999;
+		padding-top: 15rpx;
 	}
 
 	.line {
@@ -267,16 +382,17 @@
 		font-size: 26rpx;
 		color: #999999;
 		line-height: 1.5;
+		
 	}
 
 	.sureBtn {
 		width: 690rpx;
 		margin: 20rpx 30rpx;
-		border-radius: 37rpx;
+		border-radius: 15rpx;
 		height: 74rpx;
-        background: #EC0F0A;
+        background: rgb(255,102,  0);
 		color: #FFFFFF;
-		font-size: 30rpx;
+		font-size: 25rpx;
 		text-align: center;
 		line-height: 74rpx;
 	}