hwq 3 éve
szülő
commit
933408aaa7

+ 8 - 1
api/wallet.js

@@ -98,5 +98,12 @@ export function balance(data) {
 	});
 }
 
-
+// 账户余额
+export function cashList(data) {
+	return request({
+		url: '/api/cash/list',
+		method: 'get',
+		data
+	});
+}
 

+ 6 - 6
pages/money/withdrawal.vue

@@ -4,21 +4,21 @@
 			<view class="flex ">
 				<view class="buttom">
 					<view class="icon">{{ money | getMoneyStyle }}</view>
-					<text class="text">可转金额</text>
+					<text class="text">可转金额</text>
 				</view>
 			</view>
 		</view>
 		<view class="row-box">
-			<view class="title">转金额</view>
+			<view class="title">转金额</view>
 			<view class="row">
 				<text class="tit">¥</text>
 				<input class="input" type="number" v-model="withdrawal" placeholder="请输入佣金数量" placeholder-class="placeholder" />
-				<view class="buttom" @click="withdrawal = money">全部转</view>
+				<view class="buttom" @click="withdrawal = money">全部转</view>
 			</view>
 		</view>
 		<button class="add-btn up" @click="confirm">提交申请</button>
 		<view class="tip" v-if="withdrawal != 0">
-			实际到账{{ realmoney }}现金,佣金流入{{ gy }}至公益池
+			实际到账{{ realmoney }}现金,{{ gy }}响亮积分
 		</view>
 	</view>
 </template>
@@ -58,10 +58,10 @@ export default {
 	},
 	computed:{
 		realmoney() {
-			return (this.withdrawal * 0.9).toFixed(2) * 1
+			return (this.withdrawal * 0.7).toFixed(2) * 1
 		},
 		gy() {
-			return (this.withdrawal * 0.08).toFixed(2) * 1
+			return (this.withdrawal * 0.3).toFixed(2) * 1
 		}
 	},
 	methods: {

+ 3 - 3
pages/user/award.vue

@@ -4,15 +4,15 @@
 			<view class="status_bar"><!-- 这里是状态栏 --></view>
 			<view class="body-title">
 				<view class="goback-box" @click="toBack"><image class="goback" src="../../static/icon/fanhui.png" mode=""></image></view>
-				<view class="header">我的佣金</view>
+				<view class="header">我的补贴券</view>
 			</view>
 			<view class="content-bg"><image src="../../static/img/yongjin-bg.png" mode=""></image></view>
 			<view class="money-box">
 				<view class="money">{{ userInfo.brokerage_price }}</view>
-				<view>我的佣金</view>
+				<view>我的补贴券</view>
 			</view>
 			<view class="money-btn" @click="navto('/pages/money/withdrawal')">
-				佣金提现
+				补贴券转换
 				<text>></text>
 			</view>
 		</view>

+ 14 - 14
pages/user/cash.vue

@@ -4,15 +4,15 @@
 			<view class="status_bar"><!-- 这里是状态栏 --></view>
 			<view class="body-title">
 				<view class="goback-box" @click="toBack"><image class="goback" src="../../static/icon/fanhui.png" mode=""></image></view>
-				<view class="header">我的金</view>
+				<view class="header">我的金</view>
 			</view>
-			<view class="content-bg"><image src="../../static/img/yongjin-bg.png" mode=""></image></view>
+			<view class="content-bg"><image src="../../static/img/cash-bg.png" mode=""></image></view>
 			<view class="money-box">
-				<view class="money">{{ userInfo.brokerage_price }}</view>
-				<view>我的金</view>
+				<view class="money">{{ userInfo.cash }}</view>
+				<view>我的金</view>
 			</view>
-			<view class="money-btn" @click="navto('/pages/money/withdrawal')">
-				佣金转现金
+			<view class="money-btn" @click="navto('/pages/user/withdrawal')">
+				现金提现
 				<text>></text>
 			</view>
 		</view>
@@ -41,7 +41,7 @@
 						<view class="order-item flex" v-for="(item, index) in tabItem.orderList" :key="index">
 							<view class="title-box">
 								<view class="title">
-									<text>{{ item.title }}</text>
+									<text>{{ item.mark }}</text>
 								</view>
 								<view class="time">
 									<text>{{ item.add_time }}</text>
@@ -61,7 +61,7 @@
 </template>
 
 <script>
-import { spreadCommission, userBalance } from '@/api/wallet.js';
+import { cashList, userBalance } from '@/api/wallet.js';
 import { getMoneyStyle } from '@/utils/rocessor.js';
 import { mapState, mapMutations } from 'vuex';
 import uniLoadMore from '@/uview-ui/components/u-loadmore/u-loadmore.vue';
@@ -137,7 +137,7 @@ export default {
 			//这里是将订单挂载到tab列表下
 			let index = this.tabCurrentIndex;
 			let navItem = this.navList[index];
-			let state = navItem.state + 3;
+			let state = navItem.state;
 			if (source === 'tabChange' && navItem.loaded === true) {
 				//tab切换只有第一次需要加载数据
 				return;
@@ -149,16 +149,16 @@ export default {
 			// 修改当前对象状态为加载中
 			navItem.loadingType = 'loading';
 
-			spreadCommission(
+			cashList(
 				{
 					page: navItem.page,
-					limit: navItem.limit
-				},
-				state
+					limit: navItem.limit,
+					pm: state
+				}
 			)
 				.then(({ data }) => {
 					if (data.length > 0) {
-						navItem.orderList = navItem.orderList.concat(data[0].list);
+						navItem.orderList = navItem.orderList.concat(data);
 						console.log(navItem.orderList);
 						navItem.page++;
 					}

+ 3 - 3
pages/user/user.vue

@@ -29,16 +29,16 @@
 			<view class="order-section">
 				<view class="order-item" @click="navTo('/pages/user/award')" hover-class="common-hover" :hover-stay-time="50">
 					<view class="icon"><image class="icon-img" src="/static/icon/myyj.png" mode="aspectFit"></image></view>
-					<text>我的佣金</text>
+					<text>我的补贴券</text>
 				</view>
 				<view class="order-item" @click="navTo('/pages/money/wallet')" hover-class="common-hover" :hover-stay-time="50">
 					<view class="icon"><image class="icon-img" src="/static/icon/myqb.png" mode="aspectFit"></image></view>
 					<text>我的钱包</text>
 				</view>
-				<view class="order-item" @click="navTo('/pages/user/mygx')" hover-class="common-hover" :hover-stay-time="50">
+				<!-- <view class="order-item" @click="navTo('/pages/user/mygx')" hover-class="common-hover" :hover-stay-time="50">
 					<view class="icon"><image class="icon-img" src="/static/icon/mygx.png" mode="aspectFit"></image></view>
 					<text>我的贡献值</text>
-				</view>
+				</view> -->
 				<view class="order-item" @click="navTo('/pages/user/jiedian')" hover-class="common-hover" :hover-stay-time="50">
 					<view class="icon"><image class="icon-img" src="/static/icon/myjd.png" mode="aspectFit"></image></view>
 					<text>我的节点</text>

+ 19 - 37
pages/user/withdrawal.vue

@@ -1,19 +1,15 @@
 <template>
 	<view class="content">
-		<uni-notice-bar single="true" text="实际到账70%,剩余30%转化为响亮积分"></uni-notice-bar>
+		<!-- <uni-notice-bar single="true" text="实际到账98%"></uni-notice-bar> -->
 		<view class="content-money">
 			<view class="flex " style="width: 750rpx;justify-content: space-around;margin-left: 0;">
 				<view class="buttom">
 					<view class="icon">{{ money | getMoneyStyle }}</view>
-					<text class="text">可提现金</text>
+					<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">
@@ -22,6 +18,9 @@
 				<view class="buttom" @click="withdrawal = money">全部提现</view>
 			</view>
 		</view>
+		<view class="tip">
+			实际到账 {{ real }}元
+		</view>
 		<!-- #ifndef MP-WEIXIN -->
 		<view class="list" >
 			<radio-group @change="tabRadio">
@@ -95,6 +94,7 @@
 <script>
 import { getMoneyStyle } from '@/utils/rocessor.js';
 import { extractCash, extractBank, aliInfo, bankInfo } from '@/api/wallet.js';
+import { mapState, mapMutations } from 'vuex';
 import uniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar.vue';
 export default {
 	filters: {
@@ -103,6 +103,12 @@ export default {
 	components: {
 		uniNoticeBar
 	},
+	computed: {
+		...mapState('user', ['userInfo', 'orderInfo', 'hasLogin']),
+		real() {
+			return (this.withdrawal * 0.98).toFixed(2) * 1;
+		}
+	},
 	data() {
 		return {
 			type: 'alipay', //提现方式
@@ -133,29 +139,12 @@ export default {
 		// 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;
-		// 	});
-		// },
+		...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
 		// 加载余额信息
 		async loadData() {
+			this.money = this.userInfo.cash
 			extractBank({}).then(({ data }) => {
-				this.money = data.commissionCount;
 				this.minPrice = data.minPrice;
-				this.freeze = data.incommissionCount;
 			});
 		},
 		// 跳转
@@ -185,17 +174,6 @@ export default {
 				});
 				return;
 			}
-			// if (this.type == 'alipay') {
-			// 	console.log('alipay');
-			// 	data.name = this.aliData.fullname;
-			// 	data.alipay_code = this.aliData.alino;
-			// }
-			// if (this.type == 'bank') {
-			// 	console.log(bank);
-			// 	data.name = this.bankData.fullname;
-			// 	data.bankname = this.bankData.bank;
-			// 	data.cardnum = this.bankData.bankno;
-			// }
 			if (this.type == 'alipay') {
 				console.log('alipay');
 				data.name = this.alipay_name;
@@ -380,4 +358,8 @@ page {
 		color: $font-color-light;
 	}
 }
+.tip {
+	padding: 20rpx;
+	color: #FD3B39;
+}
 </style>

BIN
static/img/cash-bg.png