Преглед на файлове

2021-5-26 提现、购物车

2312970463@qq.com преди 3 години
родител
ревизия
05a167977d
променени са 4 файла, в които са добавени 692 реда и са изтрити 531 реда
  1. 203 198
      components/uni-number-box.vue
  2. 5 3
      pages.json
  3. 126 18
      pages/cart/cart.vue
  4. 358 312
      pages/money/withdrawal.vue

+ 203 - 198
components/uni-number-box.vue

@@ -1,198 +1,203 @@
-<template>
-	<view class="uni-numbox">
-		<view class="uni-numbox-minus" 
-			@click="_calcValue('subtract')"
-		>
-			<text class="iconfont iconmove" :class="minDisabled?'uni-numbox-disabled': ''" ></text>
-		</view>
-		<input 
-			class="uni-numbox-value" 
-			type="number"  
-			:disabled="disabled"
-			:value="inputValue" 
-			@blur="_onBlur"
-		>
-		<view 
-			class="uni-numbox-plus" 
-			@click="_calcValue('add')"
-		>
-			<text class="iconfont iconadd" :class="maxDisabled?'uni-numbox-disabled': ''" ></text>
-		</view>
-	</view>
-</template>
-<script>
-	export default {
-		name: 'uni-number-box',
-		props: {
-			isMax: {
-				type: Boolean,
-				default: false
-			},
-			isMin: {
-				type: Boolean,
-				default: false
-			},
-			index: {
-				type: Number,
-				default: 0
-			},
-			value: {
-				type: Number,
-				default: 0
-			},
-			min: {
-				type: Number,
-				default: -Infinity
-			},
-			max: {
-				type: Number,
-				default: Infinity
-			},
-			step: {
-				type: Number,
-				default: 1
-			},
-			disabled: {
-				type: Boolean,
-				default: false
-			}
-		},
-		data() {
-			return {
-				inputValue: this.value,
-				minDisabled: false,
-				maxDisabled: false
-			}
-		},
-		created(){
-			this.maxDisabled = this.isMax;
-			this.minDisabled = this.isMin;
-		},
-		computed: {
-
-		},
-		watch: {
-			inputValue(number) {
-				const data = {
-					number: number,
-					index: this.index
-				}
-				this.$emit('eventChange', data);
-			}
-		},
-		methods: {
-			_calcValue(type) {
-				const scale = this._getDecimalScale();
-				let value = this.inputValue * scale;
-				let newValue = 0;
-				let step = this.step * scale;
-				
-				if(type === 'subtract'){
-					newValue = value - step;
-					if (newValue <= this.min){
-						this.minDisabled = true;
-					}
-					if(newValue < this.min){
-						newValue = this.min
-					}
-					if(newValue < this.max && this.maxDisabled === true){
-						this.maxDisabled = false;
-					}
-				}else if(type === 'add'){
-					newValue = value + step;
-					if (newValue >= this.max){
-						this.maxDisabled = true;
-					}
-					if(newValue > this.max){
-						newValue = this.max
-					}
-					if(newValue > this.min && this.minDisabled === true){
-						this.minDisabled = false;
-					}
-				}
-				if(newValue === value){
-					return;
-				}
-				this.inputValue = newValue / scale;
-			},
-			_getDecimalScale() {
-				let scale = 1;
-				// 浮点型
-				if (~~this.step !== this.step) {
-					scale = Math.pow(10, (this.step + '').split('.')[1].length);
-				}
-				return scale;
-			},
-			_onBlur(event) {
-				let value = event.detail.value;
-				if (!value) {
-					this.inputValue = 0;
-					return
-				}
-				value = +value;
-				if (value > this.max) {
-					value = this.max;
-				} else if (value < this.min) {
-					value = this.min
-				}
-
-				this.inputValue = value
-			}
-		}
-	}
-</script>
-<style>
-	.uni-numbox {
-		/* position:absolute; */
-		/* left: 30rpx; */
-		/* bottom: 0; */
-		display: flex;
-		justify-content: flex-start;
-		align-items: center;
-		width:230rpx;
-		height: 70rpx;
-		background:#f5f5f5;
-	}
-
-	.uni-numbox-minus,
-	.uni-numbox-plus {
-		margin: 0;
-		background-color: #f5f5f5;
-		width: 70rpx;
-		height: 100%;
-		line-height: 70rpx;
-		text-align: center;
-		position: relative;
-	}
-	.uni-numbox-minus .yticon,
-	.uni-numbox-plus .yticon{
-		font-size: 36rpx;
-		color: #555;
-	}
-
-	.uni-numbox-minus {
-		border-right: none;
-		border-top-left-radius: 6rpx;
-		border-bottom-left-radius: 6rpx;
-	}
-
-	.uni-numbox-plus {
-		border-left: none;
-		border-top-right-radius: 6rpx;
-		border-bottom-right-radius: 6rpx;
-	}
-
-	.uni-numbox-value {
-		position: relative;
-		background-color: #f5f5f5;
-		width: 90rpx;
-		height: 50rpx;
-		text-align: center;
-		padding: 0;
-		font-size: 30rpx;
-	}
-
-	.uni-numbox-disabled.iconfont {
-		color: #d6d6d6;
-	}
-</style>
+<template>
+	<view class="uni-numbox">
+		<view class="uni-numbox-minus" 
+			@click="_calcValue('subtract')"
+		>
+			<text class="iconfont iconmove" :class="minDisabled?'uni-numbox-disabled': ''" ></text>
+		</view>
+		<input 
+			class="uni-numbox-value" 
+			type="number"  
+			:disabled="disabled"
+			:value="inputValue" 
+			@blur="_onBlur"
+		>
+		<view 
+			class="uni-numbox-plus" 
+			@click="_calcValue('add')"
+		>
+			<text class="iconfont iconadd" :class="maxDisabled?'uni-numbox-disabled': ''" ></text>
+		</view>
+	</view>
+</template>
+<script>
+	export default {
+		name: 'uni-number-box',
+		props: {
+			isMax: {
+				type: Boolean,
+				default: false
+			},
+			isMin: {
+				type: Boolean,
+				default: false
+			},
+			index: {
+				type: Number,
+				default: 0
+			},
+			value: {
+				type: Number,
+				default: 0
+			},
+			min: {
+				type: Number,
+				default: -Infinity
+			},
+			max: {
+				type: Number,
+				default: Infinity
+			},
+			step: {
+				type: Number,
+				default: 1
+			},
+			disabled: {
+				type: Boolean,
+				default: false
+			}
+		},
+		data() {
+			return {
+				inputValue: this.value,
+				minDisabled: false,
+				maxDisabled: false
+			}
+		},
+		created(){
+			this.maxDisabled = this.isMax;
+			this.minDisabled = this.isMin;
+		},
+		computed: {
+
+		},
+		watch: {
+			inputValue(number) {
+				const data = {
+					number: number,
+					index: this.index
+				}
+				this.$emit('eventChange', data);
+			}
+		},
+		methods: {
+			_calcValue(type) {
+				const scale = this._getDecimalScale();
+				let value = this.inputValue * scale;
+				let newValue = 0;
+				let step = this.step * scale;
+				
+				if(type === 'subtract'){
+					newValue = value - step;
+					if (newValue <= this.min){
+						this.minDisabled = true;
+					}
+					if(newValue < this.min){
+						newValue = this.min
+					}
+					if(newValue < this.max && this.maxDisabled === true){
+						this.maxDisabled = false;
+					}
+				}else if(type === 'add'){
+					newValue = value + step;
+					if (newValue >= this.max){
+						this.maxDisabled = true;
+					}
+					if(newValue > this.max){
+						newValue = this.max
+					}
+					if(newValue > this.min && this.minDisabled === true){
+						this.minDisabled = false;
+					}
+				}
+				if(newValue === value){
+					return;
+				}
+				this.inputValue = newValue / scale;
+			},
+			_getDecimalScale() {
+				let scale = 1;
+				// 浮点型
+				if (~~this.step !== this.step) {
+					scale = Math.pow(10, (this.step + '').split('.')[1].length);
+				}
+				return scale;
+			},
+			_onBlur(event) {
+				let value = event.detail.value;
+				if (!value) {
+					this.inputValue = 0;
+					return
+				}
+				value = +value;
+				if (value > this.max) {
+					value = this.max;
+				} else if (value < this.min) {
+					value = this.min
+				}
+
+				this.inputValue = value
+			}
+		}
+	}
+</script>
+<style>
+	.uni-numbox {
+		/* position:absolute; */
+		/* left: 30rpx; */
+		/* bottom: 0; */
+		display: flex;
+		justify-content: flex-start;
+		align-items: center;
+		width:180rpx;
+		height: 52rpx;
+		background:#f5f5f5;
+		/* border: 1px solid #C7C7C7; */
+		/* border-radius: 4rpx 4rpx 4rpx 4rpx; */
+		z-index: 999;
+	}
+
+	.uni-numbox-minus,
+	.uni-numbox-plus {
+		border: 1px solid #C7C7C7;
+		margin: 0;
+		background-color: #f5f5f5;
+		width: 60rpx;
+		height: 52rpx;
+		line-height: 52rpx;
+		text-align: center;
+		position: relative;
+	}
+	.uni-numbox-minus .yticon,
+	.uni-numbox-plus .yticon{
+		font-size: 36rpx;
+		color: #555;
+	}
+
+	.uni-numbox-minus {
+		border-right: none;
+		border-top-left-radius: 4rpx;
+		border-bottom-left-radius: 4rpx;
+	}
+
+	.uni-numbox-plus {
+		border-left: none;
+		border-top-right-radius: 4rpx;
+		border-bottom-right-radius: 4rpx;
+	}
+
+	.uni-numbox-value {
+		position: relative;
+		background-color: #f5f5f5;
+		width: 60rpx;
+		height: 52rpx;
+		text-align: center;
+		padding: 0;
+		font-size: 30rpx;
+		border: 1px solid #C7C7C7;
+	}
+
+	.uni-numbox-disabled.iconfont {
+		color: #d6d6d6;
+	}
+</style>

+ 5 - 3
pages.json

@@ -278,7 +278,9 @@
 		}, {
 			"path": "pages/cart/cart",
 			"style": {
-				"navigationBarTitleText": "购物车"
+				"navigationBarTitleText": "购物车",
+				"navigationBarBackgroundColor": "#901b21",
+				"navigationBarTextStyle": "white"
 			}
 		},
 		
@@ -510,9 +512,9 @@
 		}
 	],
 	"globalStyle": {
-		"navigationBarTextStyle": "black",
+		"navigationBarTextStyle": "white",
 		"navigationBarTitleText": "uni-app",
-		"navigationBarBackgroundColor": "#FFFFFF",
+		"navigationBarBackgroundColor": "#901b21",
 		"backgroundColor": "#f8f8f8"
 	},
 	"tabBar": {

+ 126 - 18
pages/cart/cart.vue

@@ -30,8 +30,14 @@
 						</view>
 						<view class="item-right">
 							<text class="clamp title">{{ item.productInfo.store_name }}</text>
-							<text class="attr">{{ item.attr_val }}</text>
-							<text class="price">¥{{ item.productInfo.price }}</text>
+							<!-- <text class="attr">{{ item.attr_val }}</text> -->
+							<view class="ex-addr">
+								<image src="../../static/img/shop.png" mode="" class="name-img"></image>
+								子臣台州旗舰店
+								<image src="../../static/img/point.png" mode="" class="point-img"></image>
+								200m
+							</view>
+							<text class="price">¥{{ item.productInfo.price }} <text class="oldprice">¥{{item.productInfo.oldPrice}}</text></text>
 							<uni-number-box
 								class="step"
 								:min="1"
@@ -42,9 +48,12 @@
 								:index="index"
 								@eventChange="numberChange"
 							></uni-number-box>
+							<text class="del-btn iconfont iconclose" @click="deleteCartItem(index)"></text>
+							
 						</view>
-						<text class="del-btn iconfont iconclose" @click="deleteCartItem(index)"></text>
+						<!-- <text class="del-btn iconfont iconclose" @click="deleteCartItem(index)"></text> -->
 					</view>
+					<view class="jg"></view>
 				</block>
 			</view>
 			<!-- 底部菜单栏 -->
@@ -81,7 +90,56 @@ export default {
 			total: 0, //总价格
 			allChecked: false, //全选状态  true|false
 			empty: false, //空白页现实  true|false
-			cartList: []
+			cartList: [
+				{
+					id: '11',
+					productInfo: {
+						image: '###',
+						store_name: '鸭子总店',
+						price: 99,
+						stock: 99,
+						oldPrice: 199
+						
+					},
+					loaded: 'loaded',
+					checked: false,
+					attr_val: 1,
+					cart_num: 1
+					
+				},
+				{
+					id: '11',
+					productInfo: {
+						image: '###',
+						store_name: '鸭子总店',
+						price: 99,
+						stock: 99,
+						oldPrice: 199
+						
+					},
+					loaded: 'loaded',
+					checked: false,
+					attr_val: 1,
+					cart_num: 1
+					
+				},
+				{
+					id: '11',
+					productInfo: {
+						image: '###',
+						store_name: '鸭子总店',
+						price: 99,
+						stock: 99,
+						oldPrice: 199
+						
+					},
+					loaded: 'loaded',
+					checked: false,
+					attr_val: 1,
+					cart_num: 1
+					
+				},
+			]
 		};
 	},
 	onShow() {
@@ -270,7 +328,7 @@ export default {
 			display: flex;
 			font-size: $font-sm + 2rpx;
 			color: $font-color-disabled;
-			
+
 			.navigator {
 				// color: $uni-color-primary;
 				margin-left: 16rpx;
@@ -283,10 +341,10 @@ export default {
 .cart-item {
 	display: flex;
 	position: relative;
-	padding: 30rpx 40rpx;
+	padding: 30rpx 38rpx 27rpx 92rpx;
 	.image-wrapper {
-		width: 230rpx;
-		height: 230rpx;
+		width: 160rpx;
+		height: 160rpx;
 		flex-shrink: 0;
 		position: relative;
 		image {
@@ -295,8 +353,10 @@ export default {
 	}
 	.checkbox {
 		position: absolute;
-		left: -16rpx;
-		top: -16rpx;
+		left: -67rpx;
+		top: 57rpx;
+		// bottom: 0;
+		margin: auto 0;
 		z-index: 8;
 		font-size: 44rpx;
 		line-height: 1;
@@ -312,12 +372,41 @@ export default {
 		overflow: hidden;
 		position: relative;
 		padding-left: 30rpx;
+		.ex-addr {
+			// margin-top: 16rpx;
+			// padding-left: 22rpx;
+			height: 22rpx;
+			font-size: 22rpx;
+			font-weight: 500;
+			color: #dcb876;
+			image {
+				height: 22rpx;
+			}
+			.name-img {
+				// vertical-align: ;
+				width: 26rpx;
+				margin: 0 4rpx -3rpx 0;
+			}
+			.point-img {
+				width: 16rpx;
+				margin: 0 4rpx -3rpx 14rpx;
+			}
+		}
 		.title,
 		.price {
 			font-size: $font-base + 2rpx;
 			color: $font-color-dark;
 			height: 40rpx;
 			line-height: 40rpx;
+			font-weight: bold;
+			color: #333333;
+			.oldprice {
+				font-size: 24rpx;
+				color: #9a9a9a;
+				text-decoration:line-through;
+				display: inline-block;
+				padding-left: 10rpx;
+			}
 		}
 		.attr {
 			font-size: $font-sm + 2rpx;
@@ -326,19 +415,37 @@ export default {
 			line-height: 50rpx;
 		}
 		.price {
+			position: absolute;
+			bottom: 0;
 			height: 50rpx;
 			line-height: 50rpx;
 		}
 		.step {
-			margin-top: 20rpx;
+			position: absolute;
+			bottom: 0;
+			right: 0rpx;
+			// z-index: 999;
+			// margin-top: 20rpx;
+			// border: 1px red solid;
 		}
+		.del-btn {
+			
+			padding: 4rpx 10rpx;
+			font-size: 34rpx;
+			height: 50rpx;
+			color: $font-color-light;
+			position: absolute;
+			top: 0;
+			right: 0;
+		}
+		
 	}
-	.del-btn {
-		padding: 4rpx 10rpx;
-		font-size: 34rpx;
-		height: 50rpx;
-		color: $font-color-light;
-	}
+	// .del-btn {
+	// 	padding: 4rpx 10rpx;
+	// 	font-size: 34rpx;
+	// 	height: 50rpx;
+	// 	color: $font-color-light;
+	// }
 }
 /* 底部栏 */
 .action-section {
@@ -428,4 +535,5 @@ export default {
 .cart-item .checkbox.checked {
 	color: $base-color;
 }
-</style>
+
+</style>

+ 358 - 312
pages/money/withdrawal.vue

@@ -1,312 +1,358 @@
-<template>
-	<view class="content">
-		<uni-notice-bar single="true" text="每月25号到月底可提现上月结算余额"></uni-notice-bar>
-		<view class="content-money">
-			<view class="flex ">
-				<view class="buttom">
-					<view class="icon">{{ money | getMoneyStyle }}</view>
-					<text class="text">可提现金额</text>
-				</view>
-				<view class="interval"></view>
-				<view class="buttom">
-					<view class=" icon">{{ freeze | getMoneyStyle }}</view>
-					<text class="text">待审核提现金额</text>
-				</view>
-			</view>
-		</view>
-		<view class="row-box">
-			<view class="title">提现金额</view>
-			<view class="row">
-				<text class="tit">¥</text>
-				<input class="input" type="number" v-model="withdrawal" :placeholder="'最低提现金额' + minPrice + '元'" placeholder-class="placeholder" />
-				<view class="buttom" @click="withdrawal = money">全部提现</view>
-			</view>
-		</view>
-		<!-- #ifndef MP-WEIXIN -->
-		<view class="list" v-if="!weichatBsrowser">
-			<radio-group @change="tabRadio">
-				<label>
-					<view class="box">
-						<view class="icon iconfont iconweixin1"></view>
-						<view class="title-box">
-							<view class="title"><text>提现至微信</text></view>
-						</view>
-						<view class="right"><radio value="weixin" color="#5dbc7c" :checked="type == 'weixin'" /></view>
-					</view>
-				</label>
-				<label>
-					<view class="box">
-						<view class="icon iconfont iconzhifubao"></view>
-						<view class="title-box">
-							<view class="title">
-								<text v-if="aliData.fullname">提现至支付宝</text>
-								<text v-else>请创建支付宝账号</text>
-							</view>
-							<view class="node">
-								<text v-if="aliData.fullname">真实姓名({{ aliData.fullname }})</text>
-							</view>
-						</view>
-						<view class="right"><radio value="alipay" color="#5dbc7c" :checked="type == 'alipay'" /></view>
-					</view>
-				</label>
-				<label>
-					<view class="box">
-						<view class="icon iconfont"><image class="icon-img" src="/static/icon/i8.png" mode="aspectFit"></image></view>
-						<view class="title-box">
-							<view class="title">
-								<text v-if="bankData.bankno">{{ bankData.bank + ' ' + bankData.bankno }}</text>
-								<text v-else>请创建银行账号</text>
-							</view>
-							<view class="node">
-								<text v-if="bankData.fullname">真实姓名({{ bankData.fullname }})</text>
-							</view>
-						</view>
-						<view class="right"><radio value="bank" color="#5dbc7c" :checked="type == 'bank'" /></view>
-					</view>
-				</label>
-			</radio-group>
-		</view>
-		<!-- #endif -->
-		<button class="add-btn up" @click="confirm">提交申请</button>
-		<button class="add-btn modified" v-if="!weichatBsrowser" @click="navTo('/pages/money/account')">账号管理</button>
-	</view>
-</template>
-
-<script>
-import { getMoneyStyle } from '@/utils/rocessor.js';
-import { extractCash, extractBank, aliInfo, bankInfo } from '@/api/wallet.js';
-import uniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar.vue';
-export default {
-	filters: {
-		getMoneyStyle
-	},
-	components: {
-		uniNoticeBar
-	},
-	data() {
-		return {
-			type: 'weixin', //提现方式
-			money: '0.00', //可提现金额
-			freeze: '0.0', //冻结金额
-			withdrawal: '', //提现金额
-			minPrice: '', //最少提现金额
-			aliData: {},
-			bankData: {},
-			// #ifdef H5
-			weichatBsrowser: false
-			// #endif
-		};
-	},
-	onLoad(options) {
-		// #ifdef H5
-		this.weichatBsrowser = uni.getStorageSync('weichatBrowser');
-		// #endif
-		//加载提现信息
-		this.loadData();
-		// 加载提款账号信息
-		this.loadAli();
-		this.loadBank();
-	},
-	methods: {
-		// 更新数据
-		dataUp(){
-			this.loadAli();
-			this.loadBank();
-		},
-		//加载数据
-		async loadAli(source) {
-			aliInfo({}).then(e => {
-				this.aliData = e.data;
-			});
-		},
-		// 加载银行卡信息
-		async loadBank() {
-			bankInfo({}).then(e => {
-				this.bankData = e.data;
-			});
-		},
-		// 加载余额信息
-		async loadData() {
-			extractBank({}).then(({ data }) => {
-				this.money = data.moneyCount;//可提现余额
-				this.minPrice = data.minPrice;//最小提现
-				this.freeze =data.inmoneyCount//提现中的余额
-			});
-		},
-		// 跳转
-		navTo(url) {
-			uni.navigateTo({
-				url: url
-			});
-		},
-		// 切换选中对象
-		tabRadio(e) {
-			this.type = e.detail.value;
-		},
-		// 提交
-		confirm() {
-			let data = {
-				extract_type: this.type, //bank -银行卡 alipay-支付宝 weixin-微信
-				money: this.withdrawal, //金额
-				money_type: 1//0佣金1余额
-			}
-			if (this.type=='alipay') {
-				data.name = this.aliData.fullname;
-				data.alipay_code = this.aliData.alino;
-			}
-			if (this.type=='bank') {
-				data.name = this.bankData.fullname;
-				data.bankname = this.bankData.bank;
-				data.cardnum = this.bankData.bankno;
-			}
-			
-			
-			extractCash(data)
-				.then(e => {
-					uni.showToast({
-						title: '提交成功',
-						duration: 2000,
-						position: 'top'
-					});
-				})
-				.catch(e => {
-					console.log();
-				});
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-page {
-	height: 100%;
-}
-.content-money {
-	padding: 30rpx 0;
-	background: #ffffff;
-}
-.flex {
-	background-color: #ffffff;
-	text-align: center;
-	margin: 0 30rpx;
-	border-radius: $border-radius-sm;
-	.buttom {
-		font-size: $font-lg;
-		width: 50%;
-	}
-	.interval {
-		width: 2px;
-		height: 60rpx;
-		background-color: #eeeeee;
-	}
-	.icon {
-		background-size: 100%;
-		font-size: 42rpx;
-		color: $font-color-dark;
-		font-weight: bold;
-		background-repeat: no-repeat;
-		background-position: center;
-	}
-	.text {
-		color: $font-color-light;
-	}
-}
-
-.row-box {
-	margin-top: 30rpx;
-	padding: 20rpx 30rpx;
-	background: #fff;
-	.title {
-		font-size: $font-base + 2rpx;
-		color: $font-color-dark;
-	}
-	.row {
-		display: flex;
-		align-items: center;
-		position: relative;
-		height: 80rpx;
-		.tit {
-			flex-shrink: 0;
-			width: 40rpx;
-			font-size: 30rpx;
-			color: $font-color-dark;
-		}
-		.input {
-			flex: 1;
-			font-size: 30rpx;
-			color: $font-color-dark;
-		}
-		.iconlocation {
-			font-size: 36rpx;
-			color: $font-color-light;
-		}
-
-		.buttom {
-			color: $font-color-spec;
-			font-size: $font-base;
-		}
-	}
-}
-.add-btn {
-	&.modified {
-		color: $base-color;
-	}
-	&.up {
-		background-color: $base-color;
-		color: #fff;
-	}
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	width: 690rpx;
-	height: 80rpx;
-	margin: 0 auto;
-	margin-top: 30rpx;
-	font-size: $font-lg;
-	border-radius: 10rpx;
-	// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
-}
-
-.list {
-	padding-left: 30rpx;
-	margin-top: 30rpx;
-	background-color: #ffffff;
-	.box {
-		display: flex;
-		align-items: center;
-		width: 100%;
-		height: 120rpx;
-		border-bottom: 1px solid $border-color-light;
-		.icon {
-			font-size: 48rpx;
-			padding-right: 20rpx;
-			.icon-img {
-				height: 50rpx;
-				width: 50rpx;
-			}
-		}
-		.iconweixin1 {
-			color: #18bf16;
-		}
-		.iconzhifubao {
-			color: #08aaec;
-		}
-		.title-box {
-			flex-grow: 1;
-			text-align: left;
-			.title {
-				font-size: $font-base + 2rpx;
-				color: $font-color-base;
-			}
-			.node {
-				font-size: $font-sm;
-				color: $font-color-light;
-			}
-		}
-	}
-}
-/deep/ .uni-radio-input {
-	width: 45rpx;
-	height: 45rpx;
-}
-</style>
+<template>
+	<view class="content">
+		<!-- <uni-notice-bar single="true" text="每月25号到月底可提现上月结算余额"></uni-notice-bar> -->
+<!-- 		<view class="content-money">
+			<view class="flex ">
+				<view class="buttom">
+					<view class="text">可提现金额</view>
+					<view class="icon">{{ money | getMoneyStyle }}</view>
+				</view>
+				<view class="interval"></view>
+				 <view class="buttom">
+					<view class=" icon">{{ freeze | getMoneyStyle }}</view>
+					<text class="text">待审核提现金额</text>
+				</view>
+			</view>
+		</view> -->
+		<view class="row-box">
+			<!-- <view class="title">提现金额</view> -->
+			<view class="could">
+				<text class="">
+					可提现金额
+				</text>
+				<text class="num">
+					¥{{ money | getMoneyStyle }}
+				</text>
+			</view>
+			<view class="jg"></view>
+			<view class="sq">
+				<text class="">
+					申请提现金额
+				</text>
+				<text class="num">
+					¥{{ withdrawal | getMoneyStyle }}
+				</text>
+			</view>
+			<view class="jg"></view>
+			<view class="row">
+				<text class="tit">¥</text>
+				<input class="input" type="number" v-model="withdrawal" :placeholder="'最低提现金额' + minPrice + '元'" placeholder-class="placeholder" />
+				<view class="buttom" @click="withdrawal = money">全部提现</view>
+			</view>
+		</view>
+		<!-- #ifndef MP-WEIXIN -->
+		<view class="list" v-if="!weichatBsrowser">
+			<view style="padding-top: 28rpx; font-size: 32rpx; font-weight: 600;color: #4d4d4d;">
+				提现到
+			</view>
+			<radio-group @change="tabRadio">
+				<label>
+					<view class="box">
+						<view class="icon iconfont iconweixin1"></view>
+						<view class="title-box">
+							<view class="title"><text>提现至微信</text></view>
+						</view>
+						<view class="right"><radio value="weixin" color="#901b21" :checked="type == 'weixin'" /></view>
+					</view>
+				</label>
+				<label>
+					<view class="box">
+						<view class="icon iconfont iconzhifubao"></view>
+						<view class="title-box">
+							<view class="title">
+								<text v-if="aliData.fullname">提现至支付宝</text>
+								<text v-else>请创建支付宝账号</text>
+							</view>
+							<view class="node">
+								<text v-if="aliData.fullname">真实姓名({{ aliData.fullname }})</text>
+							</view>
+						</view>
+						<view class="right"><radio value="alipay" color="#901b21" :checked="type == 'alipay'" /></view>
+					</view>
+				</label>
+				<label>
+					<view class="box">
+						<view class="icon iconfont"><image class="icon-img" src="/static/icon/i8.png" mode="aspectFit"></image></view>
+						<view class="title-box">
+							<view class="title">
+								<text v-if="bankData.bankno">{{ bankData.bank + ' ' + bankData.bankno }}</text>
+								<text v-else>请创建银行账号</text>
+							</view>
+							<view class="node">
+								<text v-if="bankData.fullname">真实姓名({{ bankData.fullname }})</text>
+							</view>
+						</view>
+						<view class="right"><radio value="bank" color="#901b21" :checked="type == 'bank'" /></view>
+					</view>
+				</label>
+			</radio-group>
+		</view>
+		<!-- #endif -->
+		<button class="add-btn up" @click="confirm">提交申请</button>
+		<!-- <button class="add-btn modified" v-if="!weichatBsrowser" @click="navTo('/pages/money/account')">账号管理</button> -->
+	</view>
+</template>
+
+<script>
+import { getMoneyStyle } from '@/utils/rocessor.js';
+import { extractCash, extractBank, aliInfo, bankInfo } from '@/api/wallet.js';
+import uniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar.vue';
+export default {
+	filters: {
+		getMoneyStyle
+	},
+	components: {
+		uniNoticeBar
+	},
+	data() {
+		return {
+			type: 'weixin', //提现方式
+			money: '0.00', //可提现金额
+			freeze: '0.0', //冻结金额
+			withdrawal: '', //提现金额
+			minPrice: '', //最少提现金额
+			aliData: {},
+			bankData: {},
+			// #ifdef H5
+			weichatBsrowser: false
+			// #endif
+		};
+	},
+	onLoad(options) {
+		// #ifdef H5
+		this.weichatBsrowser = uni.getStorageSync('weichatBrowser');
+		// #endif
+		//加载提现信息
+		this.loadData();
+		// 加载提款账号信息
+		this.loadAli();
+		this.loadBank();
+	},
+	methods: {
+		// 更新数据
+		dataUp(){
+			this.loadAli();
+			this.loadBank();
+		},
+		//加载数据
+		async loadAli(source) {
+			aliInfo({}).then(e => {
+				this.aliData = e.data;
+			});
+		},
+		// 加载银行卡信息
+		async loadBank() {
+			bankInfo({}).then(e => {
+				this.bankData = e.data;
+			});
+		},
+		// 加载余额信息
+		async loadData() {
+			extractBank({}).then(({ data }) => {
+				this.money = data.moneyCount;//可提现余额
+				this.minPrice = data.minPrice;//最小提现
+				this.freeze =data.inmoneyCount//提现中的余额
+			});
+		},
+		// 跳转
+		navTo(url) {
+			uni.navigateTo({
+				url: url
+			});
+		},
+		// 切换选中对象
+		tabRadio(e) {
+			this.type = e.detail.value;
+		},
+		// 提交
+		confirm() {
+			let data = {
+				extract_type: this.type, //bank -银行卡 alipay-支付宝 weixin-微信
+				money: this.withdrawal, //金额
+				money_type: 1//0佣金1余额
+			}
+			if (this.type=='alipay') {
+				data.name = this.aliData.fullname;
+				data.alipay_code = this.aliData.alino;
+			}
+			if (this.type=='bank') {
+				data.name = this.bankData.fullname;
+				data.bankname = this.bankData.bank;
+				data.cardnum = this.bankData.bankno;
+			}
+			
+			
+			extractCash(data)
+				.then(e => {
+					uni.showToast({
+						title: '提交成功',
+						duration: 2000,
+						position: 'top'
+					});
+				})
+				.catch(e => {
+					console.log();
+				});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	height: 100%;
+}
+.content-money {
+	padding: 30rpx 0;
+	background: #ffffff;
+}
+.flex {
+	background-color: #ffffff;
+	text-align: center;
+	margin: 0 30rpx;
+	border-radius: $border-radius-sm;
+	justify-content: space-between;
+	flex-direction: row;
+	.buttom {
+		font-size: $font-lg;
+		width: 50%;
+	}
+	.interval {
+		width: 2px;
+		height: 60rpx;
+		background-color: #eeeeee;
+	}
+	.icon {
+		background-size: 100%;
+		font-size: 42rpx;
+		color: $font-color-dark;
+		font-weight: bold;
+		background-repeat: no-repeat;
+		background-position: center;
+	}
+	.text {
+		color: $font-color-light;
+	}
+}
+
+.row-box {
+	// margin-top: 30rpx;
+	padding: 20rpx 30rpx;
+	background: #fff;
+	.title {
+		font-size: $font-base + 2rpx;
+		color: $font-color-dark;
+	}
+	.row {
+		display: flex;
+		align-items: center;
+		position: relative;
+		height: 80rpx;
+		.tit {
+			flex-shrink: 0;
+			width: 40rpx;
+			font-size: 30rpx;
+			color: $font-color-dark;
+		}
+		.input {
+			flex: 1;
+			font-size: 30rpx;
+			color: $font-color-dark;
+		}
+		.iconlocation {
+			font-size: 36rpx;
+			color: $font-color-light;
+		}
+
+		.buttom {
+			// color: $font-color-spec;
+			color: #f34358;
+			font-size: $font-base;
+		}
+	}
+}
+.add-btn {
+	&.modified {
+		color: $base-color;
+	}
+	&.up {
+		background-color: $base-color;
+		color: #fff;
+	}
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	width: 690rpx;
+	height: 80rpx;
+	margin: 0 auto;
+	margin-top: 30rpx;
+	font-size: $font-lg;
+	border-radius: 10rpx;
+	// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
+}
+
+.list {
+	padding-left: 30rpx;
+	margin-top: 30rpx;
+	background-color: #ffffff;
+	.box {
+		display: flex;
+		align-items: center;
+		width: 100%;
+		padding:0 21rpx ;
+		height: 120rpx;
+		border-bottom: 1px solid $border-color-light;
+		.icon {
+			font-size: 48rpx;
+			padding-right: 20rpx;
+			.icon-img {
+				height: 50rpx;
+				width: 50rpx;
+			}
+		}
+		.iconweixin1 {
+			color: #18bf16;
+		}
+		.iconzhifubao {
+			color: #08aaec;
+		}
+		.title-box {
+			flex-grow: 1;
+			text-align: left;
+			.title {
+				font-size: $font-base + 2rpx;
+				color: $font-color-base;
+			}
+			.node {
+				font-size: $font-sm;
+				color: $font-color-light;
+			}
+		}
+	}
+}
+/deep/ .uni-radio-input {
+	width: 45rpx;
+	height: 45rpx;
+}
+
+.could, .sq {
+	height: 110rpx;
+	font-size: 32rpx;
+	font-weight: 600;
+	color: #333333;
+	line-height: 110rpx;
+	display: flex;
+	justify-content: space-between;
+	.num {
+		font-size: 40rpx;
+		font-weight: bold;
+		color: #333333;
+		// line-height: 46px;
+	}
+}
+.jg {
+	width: 100%;
+	height: 1px;
+	background-color: #E6E6E6;
+}
+</style>