You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							301 lines
						
					
					
						
							8.1 KiB
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							301 lines
						
					
					
						
							8.1 KiB
						
					
					
				
								<template>
							 | 
						|
									<view>
							 | 
						|
										<lf-nav title="提现" :showIcon="true" bgColor="#fff"></lf-nav>
							 | 
						|
										<view class="tabs">
							 | 
						|
											<view class="tab">
							 | 
						|
												<view class="name" :class="{'active-tab': current == 0}" @click="current = 0">支付宝</view>
							 | 
						|
											</view>
							 | 
						|
											<view class="tab">
							 | 
						|
												<view class="name" :class="{'active-tab': current == 1}" @click="current = 1">银行卡</view>
							 | 
						|
											</view>
							 | 
						|
										</view>
							 | 
						|
										<view class="content">
							 | 
						|
											<!-- 店铺信息 -->
							 | 
						|
											<view class="card">
							 | 
						|
												<view class="lf-flex">
							 | 
						|
													<image class="shop-avatar" mode="aspectFill" src="https://picsum.photos/id/237/200/300"></image>
							 | 
						|
													<view class="shop-name">雅诗兰黛专卖店</view>
							 | 
						|
												</view>
							 | 
						|
											</view>
							 | 
						|
											<!-- 收款信息 - 提现到支付宝 -->
							 | 
						|
											<view class="card" v-if="current == 0">
							 | 
						|
												<view class="lf-font-28 lf-color-222">支付宝姓名</view>
							 | 
						|
												<view class="list">
							 | 
						|
													<view class="lf-flex">
							 | 
						|
														<input class="input" placeholder="请输入您的姓名" v-model="alipay_name" />
							 | 
						|
													</view>
							 | 
						|
													<view class="clear" v-if="alipay_name.length" @click="alipay_name = ''">
							 | 
						|
														<text class="lf-iconfont icon-cuo1"></text>
							 | 
						|
													</view>
							 | 
						|
												</view>
							 | 
						|
												<view class="lf-font-28 lf-color-222 lf-m-t-50">支付宝账号</view>
							 | 
						|
												<view class="list">
							 | 
						|
													<view class="lf-flex">
							 | 
						|
														<input class="input" placeholder="请输入支付宝账号" v-model="alipay_account" />
							 | 
						|
													</view>
							 | 
						|
													<view class="clear" v-if="alipay_account.length" @click="alipay_account = ''">
							 | 
						|
														<text class="lf-iconfont icon-cuo1"></text>
							 | 
						|
													</view>
							 | 
						|
												</view>
							 | 
						|
											</view>
							 | 
						|
											<!-- 收款信息 - 提现到银行卡 -->
							 | 
						|
											<view class="card" v-else-if="current == 1">
							 | 
						|
												<view class="lf-font-28 lf-color-222">银行名称</view>
							 | 
						|
												<view class="list">
							 | 
						|
													<view class="lf-flex">
							 | 
						|
														<input class="input" placeholder="请输入您的银行名称" v-model="bank_name" />
							 | 
						|
													</view>
							 | 
						|
													<view class="clear" v-if="bank_name.length" @click="bank_name = ''">
							 | 
						|
														<text class="lf-iconfont icon-cuo1"></text>
							 | 
						|
													</view>
							 | 
						|
												</view>
							 | 
						|
												<view class="lf-font-28 lf-color-222 lf-m-t-50">所属支行</view>
							 | 
						|
												<view class="list">
							 | 
						|
													<view class="lf-flex">
							 | 
						|
														<input class="input" placeholder="请输入银行卡所属支行" v-model="bank_sub_branch" />
							 | 
						|
													</view>
							 | 
						|
													<view class="clear" v-if="bank_sub_branch.length" @click="bank_sub_branch = ''">
							 | 
						|
														<text class="lf-iconfont icon-cuo1"></text>
							 | 
						|
													</view>
							 | 
						|
												</view>
							 | 
						|
												<view class="lf-font-28 lf-color-222 lf-m-t-50">银行卡号</view>
							 | 
						|
												<view class="list">
							 | 
						|
													<view class="lf-flex">
							 | 
						|
														<input class="input" placeholder="请输入银行卡号码" v-model="bank_number" />
							 | 
						|
													</view>
							 | 
						|
													<view class="clear" v-if="bank_number.length" @click="bank_number = ''">
							 | 
						|
														<text class="lf-iconfont icon-cuo1"></text>
							 | 
						|
													</view>
							 | 
						|
												</view>
							 | 
						|
												<view class="lf-font-28 lf-color-222 lf-m-t-50">开户名</view>
							 | 
						|
												<view class="list">
							 | 
						|
													<view class="lf-flex">
							 | 
						|
														<input class="input" placeholder="请输入银行卡开户名" v-model="bank_account_name" />
							 | 
						|
													</view>
							 | 
						|
													<view class="clear" v-if="bank_account_name.length" @click="bank_account_name = ''">
							 | 
						|
														<text class="lf-iconfont icon-cuo1"></text>
							 | 
						|
													</view>
							 | 
						|
												</view>
							 | 
						|
											</view>
							 | 
						|
											<!-- 提现金额 -->
							 | 
						|
											<view class="card">
							 | 
						|
												<view class="lf-font-28 lf-color-222">提现金额</view>
							 | 
						|
												<view class="list money-list">
							 | 
						|
													<view class="lf-flex">
							 | 
						|
														<view class="symbol">¥</view>
							 | 
						|
														<input class="input" type="number" v-model="money" />
							 | 
						|
													</view>
							 | 
						|
													<view class="clear" v-if="money.length" @click="money = ''">
							 | 
						|
														<text class="lf-iconfont icon-cuo1"></text>
							 | 
						|
													</view>
							 | 
						|
												</view>
							 | 
						|
												<view class="lf-font-28 lf-m-t-30" style="color: #F63434;" v-if="isMoney">输入金额超过可用余额</view>
							 | 
						|
											</view>
							 | 
						|
											<!-- 提现说明 -->
							 | 
						|
											<view class="card">
							 | 
						|
												<view class="lf-font-28 lf-color-555 lf-m-b-20">提现说明</view>
							 | 
						|
												<view class="lf-font-28 lf-color-222">
							 | 
						|
													<view>1、提现到账时间为T+1;</view>
							 | 
						|
													<view>2、提现最高单笔为10000元;</view>
							 | 
						|
													<view>3、提现手续单笔收费10%;</view>
							 | 
						|
												</view>
							 | 
						|
											</view>
							 | 
						|
											<button class="confirm" hover-class="lf-opacity" @click="confirm">确认提现</button>
							 | 
						|
										</view>
							 | 
						|
									</view>
							 | 
						|
								</template>
							 | 
						|
								
							 | 
						|
								<script>
							 | 
						|
									export default {
							 | 
						|
										data(){
							 | 
						|
											return {
							 | 
						|
												current: 0, // 支付宝0、银行卡1
							 | 
						|
												alipay_name: '', // 支付宝姓名
							 | 
						|
												alipay_account: '', // 支付宝账号
							 | 
						|
												bank_name: '', // 银行名称
							 | 
						|
												bank_sub_branch: '', // 银行卡所属支行
							 | 
						|
												bank_number: '', // 银行卡号
							 | 
						|
												bank_account_name: '', // 银行卡开户名
							 | 
						|
												money: '' // 提现金额
							 | 
						|
											}
							 | 
						|
										},
							 | 
						|
										computed: {
							 | 
						|
											isMoney(){
							 | 
						|
												// TODO 假设我现在的余额为10块钱
							 | 
						|
												return Number(this.money) > 10;
							 | 
						|
											}
							 | 
						|
										},
							 | 
						|
										onLoad(){
							 | 
						|
											
							 | 
						|
										},
							 | 
						|
										methods: {
							 | 
						|
											confirm(){
							 | 
						|
												if(this.current == 0){
							 | 
						|
													// 提现到支付宝
							 | 
						|
													if(!this.alipay_name) return this.$msg('请输入支付宝姓名');
							 | 
						|
													if(!this.alipay_account) return this.$msg('请输入支付宝账号');
							 | 
						|
													if(!this.money) return this.$msg('请输入提现金额');
							 | 
						|
													if(this.isMoney) return this.$msg('提现金额超出当前余额');
							 | 
						|
													if(this.money <= 0) return this.$msg('提现金额需大于0');
							 | 
						|
													this.launch();
							 | 
						|
												}else if(this.current == 1){
							 | 
						|
													// 提现到银行卡
							 | 
						|
													if(!this.bank_name) return this.$msg('请输入银行名称');
							 | 
						|
													if(!this.bank_sub_branch) return this.$msg('请输入银行卡所属支行');
							 | 
						|
													if(!this.bank_number) return this.$msg('请输入银行卡号');
							 | 
						|
													if(!this.bank_account_name) return this.$msg('请输入银行卡开户名');
							 | 
						|
													if(!this.money) return this.$msg('请输入提现金额');
							 | 
						|
													if(this.isMoney) return this.$msg('提现金额超出当前余额');
							 | 
						|
													if(this.money <= 0) return this.$msg('提现金额需大于0');
							 | 
						|
													this.launch();
							 | 
						|
												}
							 | 
						|
											},
							 | 
						|
											launch(){
							 | 
						|
												// TODO 在此发起网络请求
							 | 
						|
												console.log("发起提现");
							 | 
						|
											}
							 | 
						|
										}
							 | 
						|
									}
							 | 
						|
								</script>
							 | 
						|
								
							 | 
						|
								<style>
							 | 
						|
									page{
							 | 
						|
										background-color: #F8F8F8;
							 | 
						|
									}
							 | 
						|
								</style>
							 | 
						|
								<style lang="scss" scoped="scoped">
							 | 
						|
									.tabs{
							 | 
						|
										height: 80rpx;
							 | 
						|
										width: 750rpx;
							 | 
						|
										display: flex;
							 | 
						|
										border-bottom: 1rpx solid #e5e5e5;
							 | 
						|
										background-color: #FFFFFF;
							 | 
						|
										align-items: center;
							 | 
						|
										.tab{
							 | 
						|
											width: 50%;
							 | 
						|
											height: 100%;
							 | 
						|
											display: flex;
							 | 
						|
											justify-content: center;
							 | 
						|
											align-items: center;
							 | 
						|
											.name{
							 | 
						|
												width: max-content;
							 | 
						|
												height: 100%;
							 | 
						|
												font-size: 28rpx;
							 | 
						|
												color: #777777;
							 | 
						|
												display: flex;
							 | 
						|
												align-items: center;
							 | 
						|
											}
							 | 
						|
											.active-tab{
							 | 
						|
												color: #0D2E9A;
							 | 
						|
												font-weight: bold;
							 | 
						|
												position: relative;
							 | 
						|
												&::after{
							 | 
						|
													content: '';
							 | 
						|
													position: absolute;
							 | 
						|
													bottom: 0;
							 | 
						|
													left: calc(50% - 40rpx);
							 | 
						|
													width: 80rpx;
							 | 
						|
													height: 10rpx;
							 | 
						|
													background: #0D2E9A;
							 | 
						|
													border-radius: 8rpx 8rpx 0rpx 0rpx;
							 | 
						|
												}
							 | 
						|
											}
							 | 
						|
										}
							 | 
						|
									}
							 | 
						|
									
							 | 
						|
									.content{
							 | 
						|
										padding: 30rpx 32rpx;
							 | 
						|
									}
							 | 
						|
									.card{
							 | 
						|
										padding: 30rpx;
							 | 
						|
										box-sizing: border-box;
							 | 
						|
										width: 686rpx;
							 | 
						|
										height: max-content;
							 | 
						|
										background: #FFFFFF;
							 | 
						|
										border-radius: 20rpx;
							 | 
						|
										transition: all 1s;
							 | 
						|
										&:nth-child(n+2){
							 | 
						|
											margin-top: 30rpx;
							 | 
						|
										}
							 | 
						|
										.shop-avatar{
							 | 
						|
											width: 100rpx;
							 | 
						|
											height: 100rpx;
							 | 
						|
											border-radius: 50%;
							 | 
						|
											margin-right: 20rpx;
							 | 
						|
										}
							 | 
						|
										.shop-name{
							 | 
						|
											width: 502rpx;
							 | 
						|
											height: max-content;
							 | 
						|
											font-size: 36rpx;
							 | 
						|
											color: #222222;
							 | 
						|
											font-weight: bold;
							 | 
						|
										}
							 | 
						|
										.list{
							 | 
						|
											height: 90rpx;
							 | 
						|
											width: 100%;
							 | 
						|
											border-bottom: 1rpx solid #e5e5e5;
							 | 
						|
											display: flex;
							 | 
						|
											justify-content: space-between;
							 | 
						|
											align-items: center;
							 | 
						|
											margin-top: 10rpx;
							 | 
						|
											.input{
							 | 
						|
												width: 540rpx;
							 | 
						|
												height: 80rpx;
							 | 
						|
												font-size: 28rpx;
							 | 
						|
											}
							 | 
						|
											.input-code{
							 | 
						|
												width: 430rpx;
							 | 
						|
											}
							 | 
						|
											.clear{
							 | 
						|
												padding: 20rpx;
							 | 
						|
											}
							 | 
						|
											.code{
							 | 
						|
												min-width: 180rpx;
							 | 
						|
												max-width: 220rpx;
							 | 
						|
												height: 64rpx;
							 | 
						|
												padding: 0 4rpx;
							 | 
						|
												font-size: 24rpx;
							 | 
						|
												color: #15716E;
							 | 
						|
												display: flex;
							 | 
						|
												justify-content: center;
							 | 
						|
												align-items: center;
							 | 
						|
												border-radius: 32rpx;
							 | 
						|
												border: 2rpx solid #15716E;
							 | 
						|
											}
							 | 
						|
											.active-bg{
							 | 
						|
												background: #efefef;
							 | 
						|
											}
							 | 
						|
											.symbol{
							 | 
						|
												width: 30rpx;
							 | 
						|
												height: 90rpx;
							 | 
						|
												font-size: 36rpx;
							 | 
						|
												color: #222222;
							 | 
						|
												display: flex;
							 | 
						|
												align-items: flex-end;
							 | 
						|
											}
							 | 
						|
										}
							 | 
						|
										.money-list{
							 | 
						|
											height: 140rpx;
							 | 
						|
											.input{
							 | 
						|
												width: 500rpx;
							 | 
						|
												height: 130rpx;
							 | 
						|
												font-size: 72rpx;
							 | 
						|
												font-weight: bold;
							 | 
						|
												margin-left: 20rpx;
							 | 
						|
											}
							 | 
						|
										}
							 | 
						|
									}
							 | 
						|
									
							 | 
						|
									.confirm{
							 | 
						|
										width: 550rpx;
							 | 
						|
										height: 100rpx;
							 | 
						|
										background: #0D2E9A;
							 | 
						|
										border-radius: 50rpx;
							 | 
						|
										color: #FFFFFF;
							 | 
						|
										line-height: 100rpx;
							 | 
						|
										margin-top: 50rpx;
							 | 
						|
										font-size: 32rpx;
							 | 
						|
									}
							 | 
						|
									
							 | 
						|
									
							 | 
						|
								</style>
							 |