lhl 3 роки тому
батько
коміт
95a7ab70d7

+ 1 - 1
manifest.json

@@ -74,7 +74,7 @@
             "proxy" : {
                 "/api" : {
                     // "target" : "http://tl.frp.liuniu946.com/api",
-					"target" : "http://tl.liuniu946.com/api",
+					"target" : "http://tl.frp.liuniu946.com/api",
                     // "changeOrigin": true,
                     "pathRewrite" : {
                         "/api" : "" // rewrite path

+ 15 - 1
pages/cart/cartt.vue

@@ -29,9 +29,13 @@
 </template>
 
 <script>
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
 	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
 	import empty from '@/components/empty';
-	
+	import { getUserInfo } from '@/api/user.js'
 	import { getProducts } from '@/api/product.js'
 	export default {
 		components: {
@@ -50,10 +54,19 @@
 		onLoad() {
 			this.getProductList()
 		},
+		onShow() {
+			this.getUserInfo()
+		},
 		onReachBottom() {
 			this.getProductList()
 		},
 		methods: {
+			...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
+			getUserInfo() {
+				getUserInfo({}).then( ({data}) => {
+					this.setUserInfo(data);
+				})
+			},
 			navto(url) {
 				uni.navigateTo({
 					url: url
@@ -73,6 +86,7 @@
 				getProducts({
 					page: obj.page,
 					limit: obj.limit,
+					is_beauty: 1,
 					is_gold: 0,
 					is_integral: 0
 				}).then(({data}) => {

+ 2 - 1
pages/category/fillTable.vue

@@ -274,7 +274,8 @@
 						day_time: day_time,
 						latlng: store.latlng,
 						detailed_address: store.detailed_address,
-						is_show: 0
+						is_show: 0,
+						level: obj.chooselevel == '美容院' ? 3 : 4
 					})
 					.then(res => {
 						uni.hideLoading();

+ 2 - 1
pages/money/pay.vue

@@ -228,7 +228,8 @@ export default {
 			// 获取下单页面数据
 			let prepage = obj.$api.prePage();
 
-			let data = {
+			let data = {
+				is_beauty: prepage.is_beauty,
 				is_gold: obj.is_gold,
 				real_name: prepage.addressData.real_name, //联系人名称
 				phone: prepage.addressData.phone, //联系人号码

+ 2 - 1
pages/money/wallet.vue

@@ -327,7 +327,8 @@ page {
 	}
 }
 .list-scroll-content {
-	height: 100%;
+	height: 100%;
+	padding-bottom: 130rpx;
 }
 .wallet-btn {
 	width: 674rpx;

+ 92 - 17
pages/money/withdrawal.vue

@@ -1,5 +1,8 @@
 <template>
-	<view class="content">
+	<view class="content">
+		<view class="" style="padding: 20rpx;font-size: 20rpx; color: #999;background-color: #fff;">
+			提现需收取{{commission || '0'}}%手续费
+		</view>
 		<view class="content-money">
 			<view class="buttom">
 				<text class="text">可提现金额</text>
@@ -21,7 +24,24 @@
 				<view class=" tip-icon" @click="all()">全部提现</view>
 			</view>
 		</view>
-
+		<template v-if="withdrawal*1 > 0">
+			<view class="sq">
+				<text class="" style="font-size: 28rpx;">
+					手续费
+				</text>
+				<text class="num" style="font-size: 28rpx;">
+					¥{{ sxf | getMoneyStyle }}
+				</text>
+			</view>
+			<view class="sq" >
+				<text class="" style="font-size: 28rpx;">
+					实际到账
+				</text>
+				<text class="num" style="font-size: 28rpx;">
+					¥{{ sjdz | getMoneyStyle }}
+				</text>
+			</view>
+		</template>
 		<view class="list">
 			<radio-group @change="tabRadio">
 				<!-- <label>
@@ -65,7 +85,7 @@
 				</label>
 			</radio-group>
 		</view>
-		<button class="add-btn up" @click="confirm">提交申请</button>
+		<button class="add-btn up" @click="loading?'':confirm()">提交申请</button>
 		<button class="add-btn modified" @click="navTo('/pages/set/userinfo')">账号管理</button>
 	</view>
 </template>
@@ -73,10 +93,17 @@
 <script>
 import { getMoneyStyle } from '@/utils/rocessor.js';
 import { extractCash, extractBank, aliInfo, bankInfo } from '@/api/wallet.js';
-import { mapState, mapMutations } from 'vuex';
-export default {
+import { mapState, mapMutations } from 'vuex';
+import { getUserInfo } from '@/api/user.js'
+export default {
+	filters: {
+		getMoneyStyle
+	},
 	data() {
-		return {
+		return {
+			loading: true,
+			// userInfo: {},
+			commission: 0,
 			type: 'alipay', //提现方式
 			money: '', //可提现金额
 			withdrawal: '', //提现金额
@@ -93,13 +120,23 @@ export default {
 		...mapState('user', ['userInfo', 'orderInfo', 'hasLogin']),
 		moneyMin() {
 			return '最低提现金额' + this.minPrice + '元';
+		},
+		//提现手续费
+		sxf() {
+			return (this.withdrawal*1*0.01*this.commission)
+		},
+		//实际到账
+		sjdz() {
+			return (this.withdrawal*1*(100-this.commission)*0.01)
 		}
 	},
-	onShow(options) {
+	async onShow(options) {
+	    
 		// #ifdef H5
 		this.weichatBsrowser = uni.getStorageSync('weichatBrowser');
 		// #endif
-		//加载提现信息
+		//加载提现信息
+		await this.getUserInfo()
 		this.loadData();
 		// 加载提款账号信息
 		this.aliData.fullname = this.userInfo.alipay_name;
@@ -109,15 +146,23 @@ export default {
 		this.bankData.bank = this.userInfo.account_Bank + '(' + this.userInfo.bank_branch + ')';
 		this.bankData.bankno = this.userInfo.bank_card;
 	},
-	methods: {
+	methods: {
+		...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
+		getUserInfo() {
+			getUserInfo({}).then(({data}) => {
+				this.setUserInfo(data)
+			})
+		},
 		// 加载余额信息
 		async loadData() {
 			extractBank({}).then(({ data }) => {
-				console.log(data);
+				console.log(data);
+				this.commission = data.commission
 				this.coldMoney = data.brokerage_price; //冻结中金额
 				this.money = data.commissionCount * 1; //可提现余额
 				this.minPrice = data.minPrice; //最小提现
-				this.freeze = data.inmoneyCount; //提现中的余额
+				this.freeze = data.inmoneyCount; //提现中的余额
+				this.loading = false
 			});
 		},
 		// 跳转
@@ -139,9 +184,13 @@ export default {
 			if (this.withdrawal === '') {
 				this.$api.msg('请填写需要提现的佣金');
 				return;
+			}
+			if(this.withdrawal*1 > this.money*1 ) {
+				this.$api.msg('可提金额不足!');
+				return;
 			}
 			if (this.withdrawal == 0) {
-				this.$api.msg('提现佣金不能为0');
+				this.$api.msg('提现红利不能为0');
 				return;
 			}
 			if (this.withdrawal < this.minPrice) {
@@ -151,7 +200,8 @@ export default {
 			let data = {
 				extract_type: this.type, //bank -银行卡 alipay-支付宝 weixin-微信
 				money: this.withdrawal, //金额
-				money_type: 'brokerage' //0佣金1余额
+				money_type: 'brokerage' ,//0佣金1余额
+				balance_type: 0,
 			};
 			if (this.type == 'alipay') {
 				data.name = this.aliData.fullname;
@@ -162,12 +212,19 @@ export default {
 				data.bankname = this.bankData.bank;
 				data.cardnum = this.bankData.bankno;
 			}
-
+			this.loading = true
 			extractCash(data)
 				.then(e => {
-					uni.navigateTo({
-						url: '/pages/money/success?type=1'
-					});
+					// uni.navigateTo({
+					// 	url: '/pages/money/success?type=1'
+					// });
+					uni.showToast({
+						title: '提交成功',
+						duration: 2000,
+						position: 'top'
+					});
+					this.getUserInfo()
+					this.loadData()
 				})
 				.catch(e => {
 					console.log();
@@ -303,5 +360,23 @@ page {
 /deep/ .uni-radio-input {
 	width: 45rpx;
 	height: 45rpx;
+}
+
+.sq {
+	// height: 110rpx;
+	padding: 10rpx 20rpx;
+	background-color: #fff;
+	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;
+	}
 }
 </style>

Різницю між файлами не показано, бо вона завелика
+ 2 - 1
pages/order/createOrder.vue


+ 7 - 4
pages/product/common/productContent.vue

@@ -1,10 +1,13 @@
 <template>
 	<view class="introduce-section">
 		<view class="price-box">
-			<text class="price-tip">现金</text>
-			<view class="price">
-				{{ (goodsObjact.price*1-goodsObjact.max_integral*1).toFixed(2) }}
-				
+			<text class="price-tip" v-if="goodsObjact.vip_price && goodsObjact.vip_price == 0">现金</text>
+			<text class="price-tip" v-if="goodsObjact.vip_price && goodsObjact.vip_price != 0">美容院价格</text>
+			<view class="price" v-if="goodsObjact.vip_price == 0">
+				{{ (goodsObjact.price*1-goodsObjact.max_integral*1).toFixed(2)}}
+			</view>
+			<view class="price" v-if="goodsObjact.vip_price != 0">
+				{{ (goodsObjact.vip_price*1-goodsObjact.max_integral*1).toFixed(2) }}
 			</view>
 			<view class="" v-if="isgold == 1" style="color: #ffac60;">
 				可获金豆{{goodsObjact.price}}

+ 2 - 1
pages/product/product.vue

@@ -348,6 +348,7 @@ export default {
 				productId: obj.goodsid, //商品编号
 				uniqueId: obj.uniqueId,
 				is_gold: obj.is_gold,//是否是金豆商品
+				is_beauty: obj.goodsObjact.is_beauty || '0'
 			};
 
 			if (obj.type == 2) {
@@ -359,7 +360,7 @@ export default {
 					if (obj.type == 1) {
 						// 跳转到支付页
 						uni.navigateTo({
-							url: '/pages/order/createOrder?id=' + da.cartId + '&is_gold=' + obj.is_gold + '&is_integral=' + obj.is_integral
+							url: '/pages/order/createOrder?id=' + da.cartId + '&is_gold=' + obj.is_gold + '&is_integral=' + obj.is_integral + '&is_beauty=' + obj.goodsObjact.is_beauty
 						});
 					}
 					if (obj.type == 2) {

+ 18 - 6
pages/set/userinfo.vue

@@ -247,12 +247,24 @@
 				}).then( res => {
 					obj.getUserInfo()
 					
-					obj.$api.msg('修改成功');
-					setTimeout(()=> {
-						uni.switchTab({
-							url:'/pages/user/user'
-						});
-					}, 1000);
+					obj.$api.msg('修改成功');
+					let pages = getCurrentPages();
+					let route = pages[pages.length - 2].route;
+					console.log(route,'route++++++++')
+					if(route == 'pages/money/withdrawal') {
+						setTimeout(()=> {
+							uni.navigateTo({
+								url:'/pages/money/withdrawal'
+							});
+						}, 1000);
+					}else {
+						setTimeout(()=> {
+							uni.switchTab({
+								url:'/pages/user/user'
+							});
+						}, 1000);
+					}
+					
 					
 				}).catch( err => {
 					console.log(err)

+ 1 - 1
pages/user/JDcool.vue

@@ -27,7 +27,7 @@
 							<image :src="item.user.avatar" mode=""></image>
 						</view>
 						<view class="order-font">
-							{{item.user.real_name}}{{item.title}}<text>{{item.number}}</text>
+							{{item.user.real_name}}{{item.title}}<text>{{item.use_integral}}</text>
 						</view>
 					</view>
 					<view class="time">

+ 1 - 1
unpackage/dist/build/h5/index.html

@@ -1,2 +1,2 @@
 <!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>商城</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
-            document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/index/static/index.a5c69d49.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/index/static/js/chunk-vendors.6808189b.js></script><script src=/index/static/js/index.d4c309b4.js></script></body></html>
+            document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/index/static/index.a5c69d49.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/index/static/js/chunk-vendors.6808189b.js></script><script src=/index/static/js/index.d5658be4.js></script></body></html>

Різницю між файлами не показано, бо вона завелика
+ 0 - 0
unpackage/dist/build/h5/static/js/index.d5658be4.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-product-product.8fbb4220.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-product-product.d192dbc4.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-user-JDcool.1b6a0cd8.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-user-JDcool.22fd4b6a.js


BIN
unpackage/dist/build/h5/tl-1-14-2.rar → unpackage/dist/build/h5/tl-1-17-1.rar


Деякі файли не було показано, через те що забагато файлів було змінено