Sfoglia il codice sorgente

1.提现,加提示

guo 3 anni fa
parent
commit
c11bc9b716
3 ha cambiato i file con 101 aggiunte e 65 eliminazioni
  1. BIN
      .DS_Store
  2. 99 65
      pages/me/extract.vue
  3. 2 0
      pages/me/me.vue

BIN
.DS_Store


+ 99 - 65
pages/me/extract.vue

@@ -5,7 +5,7 @@
 			<view class="moneyView">
 				<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">可提现金额:¥{{okMoney}}</view>
@@ -28,12 +28,12 @@
 
 		<view class="tishi" style="padding: 20rpx 44rpx;">支付宝账号或姓名输入错误将无法提现到账</view>
 
-		<view class="sureBtn" @click="sure">确认提现</view>
-		
-		<view class="tishi">
-			<rich-text :nodes="couContent" ></rich-text>
+		<view class="sureBtn" @click="sure">确认提现</view>
+
+		<view class="tishi">
+			<rich-text :nodes="couContent"></rich-text>
 		</view>
-		
+
 
 	</view>
 </template>
@@ -45,63 +45,63 @@
 				okMoney: '',
 				money: '',
 				name: '',
-				account: '',
-				detailData:{},
-				couContent:'',//提现规则
+				account: '',
+				detailData: {},
+				couContent: '', //提现规则
 			}
 		},
-		onLoad() {
-			this.getDetailData()
+		onLoad() {
+			this.getDetailData()
 		},
-		methods: {
-			getDetailData() {
-				uni.showLoading({
-					title: '加载中'
-				})
-				let url = 'worldKeepCar/worldDistribution/queryDistributionIndexDetail',
-					params = {
-			
-					}
-				this.$http(url, params, 'GET').then(res => {
-					uni.hideLoading();
-					var data = res.data
-			
-			
-					// 处理 undefined和null转为空白字符串
-			
-					for (const key in data) {
-						data[key] = this.$praseStrEmpty(data[key])
-					}
-			
-					this.detailData = data
-					this.okMoney = this.detailData.cantidatMoney
-					if (this.detailData.tSSetting.withdrawalRules) {
-						this.couContent = this.detailData.tSSetting.withdrawalRules.replace(/\<p/gi, '<p style="display: inline-block"');
-					}
-					
-					
-			
-				})
-			},
-			inputValue(event){
-				if (event.detail.value < 0){
-					setTimeout(() => {
-						this.money = 0;    // 解决
-					}, 0)
-				}
-				else{
-					this.money = event.detail.value;
-				}
-			},
-
-			allBtn() {
-				
-				setTimeout(() => {
-				      this.money = this.okMoney;    // 解决
-				    }, 0)
-				
-				
-				console.log('money,allmoney',this.money,this.okMoney);
+		methods: {
+			getDetailData() {
+				uni.showLoading({
+					title: '加载中'
+				})
+				let url = 'worldKeepCar/worldDistribution/queryDistributionIndexDetail',
+					params = {
+
+					}
+				this.$http(url, params, 'GET').then(res => {
+					uni.hideLoading();
+					var data = res.data
+
+
+					// 处理 undefined和null转为空白字符串
+
+					for (const key in data) {
+						data[key] = this.$praseStrEmpty(data[key])
+					}
+
+					this.detailData = data
+					this.okMoney = this.detailData.cantidatMoney
+					if (this.detailData.tSSetting.withdrawalRules) {
+						this.couContent = this.detailData.tSSetting.withdrawalRules.replace(/\<p/gi,
+							'<p style="display: inline-block"');
+					}
+
+
+
+				})
+			},
+			inputValue(event) {
+				if (event.detail.value < 0) {
+					setTimeout(() => {
+						this.money = 0; // 解决
+					}, 0)
+				} else {
+					this.money = event.detail.value;
+				}
+			},
+
+			allBtn() {
+
+				setTimeout(() => {
+					this.money = this.okMoney; // 解决
+				}, 0)
+
+
+				console.log('money,allmoney', this.money, this.okMoney);
 			},
 			sure() {
 				if (this.money > this.okMoney) {
@@ -112,6 +112,30 @@
 					});
 					return;
 				}
+				if (this.money <= 0) {
+					uni.showToast({
+						title: '提现金额不能为空',
+						icon: 'none',
+						duration: 3000,
+					});
+					return;
+				}
+				if (!this.name) {
+					uni.showToast({
+						title: '姓名不能为空',
+						icon: 'none',
+						duration: 3000,
+					});
+					return;
+				}
+				if (!this.account) {
+					uni.showToast({
+						title: '支付宝账户不能为空',
+						icon: 'none',
+						duration: 3000,
+					});
+					return;
+				}
 
 				this.postData();
 			},
@@ -127,9 +151,19 @@
 					}
 				this.$http(url, params, 'POST').then(res => {
 					uni.hideLoading();
-					uni.navigateBack({
+					uni.showModal({
+						title: '提交成功',
+						content: '请耐心等待平台审核',
+						showCancel:false,
+						confirmText:'知道了',
+						success: function(res) {
+
+							uni.navigateBack({
+
+							})
+						}
+					});
 
-					})
 
 
 				})
@@ -177,8 +211,8 @@
 		color: #222222;
 		font-weight: bold;
 		/* flex-grow: 1; */
-		height: 98rpx;
-		width: 100%;
+		height: 98rpx;
+		width: 100%;
 	}
 
 	.allBtn {
@@ -187,7 +221,7 @@
 		width: 200rpx;
 		height: 50rpx;
 		line-height: 50rpx;
-		margin-left: 10rpx;
+		margin-left: 10rpx;
 		text-align: right;
 	}
 

+ 2 - 0
pages/me/me.vue

@@ -113,6 +113,8 @@
 				</view>
 				<image src="../../static/img/rightArrow.png" mode="" class="rightArrow"></image>
 			</view>
+			<view class="grayline"></view>
+			
 			<view class="rowBox" v-if="numList.activityState == 1" @click="gonavigateTo('invite')">
 				<view class="leftView">
 					<image src="../../static/img/icon_yaoqing.png" mode="" class="liftIcon"></image>