| <template> | |
| 	<view class="u-page"> | |
| 		<view class="se-p-40 se-pos"> | |
| 			<image class="se-w-p-100 se-h-300 se-br-20" src="@/static/image/6584.png" mode=""></image> | |
| 			<view class="se-pos-lc se-fs-32 se-c-white se-flex se-flex-v se-flex-ff se-pl-60"> | |
| 				<text>钱包(元)</text> | |
| 				<text class="se-mt-20 se-fw-6 se-fs-34">¥{{myMoney}}元</text> | |
| 			</view> | |
| 		</view> | |
| 		<view class="se-mx-40"> | |
| 			<u-tabs :list="nav" | |
| 			:current="current" | |
| 			lineColor="#ff7a31" | |
| 			:activeStyle="{ | |
| 				color: '#ff7a31', | |
| 				transform: 'scale(1.05)' | |
| 			}" | |
| 			:inactiveStyle="{ | |
| 				color: '#333', | |
| 				transform: 'scale(1)' | |
| 			}" | |
| 			:scrollable="true" | |
| 			itemStyle="padding-left: 20rpx; padding-right: 20rpx;font-size:18rpx; height: 60rpx;" | |
| 			@click="tabClick"></u-tabs> | |
| 		</view> | |
| 		<withdrawalBox @onParent="onUserInfo()" :userId="userId" :myMoney="myMoney" v-if="current==0" /> | |
| 		<rechargeBox @onParent="onUserInfo()" :userId="userId" :myMoney="myMoney" v-if="current==1" /> | |
| 	</view> | |
| </template> | |
| 
 | |
| <script> | |
| 	import withdrawalBox from "./component/withdrawal.vue" | |
| 	import rechargeBox from "./component/recharge.vue" | |
| 	import { | |
| 		userInfo | |
| 	} from "@/common/api.js" | |
| 	export default{ | |
| 		components:{ | |
| 			withdrawalBox, | |
| 			rechargeBox | |
| 		}, | |
| 		data(){ | |
| 			return{ | |
| 				myMoney:0, | |
| 				userId:"", | |
| 				current:0, | |
| 				nav: [ | |
| 					{ | |
| 						name: '提现', | |
| 					},  | |
| 					// { | |
| 					// 	name: '充值', | |
| 					// } | |
| 				], | |
| 				money:null, | |
| 				 | |
| 			} | |
| 		}, | |
| 		onShow(options) { | |
| 			this.onUserInfo() | |
| 		}, | |
| 		methods:{ | |
| 			onUserInfo(){ | |
| 				let params={} | |
| 				userInfo(params).then(response=>{ | |
| 					console.info("userInfo",response) | |
| 					this.userId=response.result.id | |
| 					this.myMoney=response.result.amount?response.result.amount:0 | |
| 				}).catch(error=>{ | |
| 					 | |
| 				}) | |
| 			}, | |
| 			tabClick(event){ | |
| 				this.current = event.index | |
| 			} | |
| 		} | |
| 	} | |
| </script> | |
| 
 | |
| <style> | |
| </style> |