cmy 1 year ago
parent
commit
7ea7935327

+ 7 - 0
api/new.js

@@ -20,3 +20,10 @@ export function bank_info(data) {
 }
 
 
+// 计算手续费
+export function calculator(data) {
+	return request.post("extract/calculator", data, {
+		noAuth: true
+	});
+}
+

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "神英优选",
     "appid" : "__UNI__70BC0AE",
     "description" : "神英优选商城",
-    "versionName" : "2.7.7",
-    "versionCode" : 277,
+    "versionName" : "2.7.8",
+    "versionCode" : 278,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {

+ 25 - 13
pages/activity/goods_combination_details/index.vue

@@ -1419,20 +1419,32 @@
 			//#ifdef APP-PLUS
 			savePosterPath() {
 				let that = this
-				uni.saveImageToPhotosAlbum({
-					filePath: that.posterImage,
-					success: function(res) {
-						that.posterImageClose();
-						that.$util.Tips({
-							title: '保存成功',
-							icon: 'success'
-						});
+				uni.showModal({
+					title: '存储权限',
+					content: '是否允许保存邀请图片到手机?',
+					confirmText:'允许',
+					cancelText:'禁止',
+					success: res => {
+						if(res.confirm){
+							uni.saveImageToPhotosAlbum({
+								filePath: that.posterImage,
+								success: function(res) {
+									that.posterImageClose();
+									that.$util.Tips({
+										title: '保存成功',
+										icon: 'success'
+									});
+								},
+								fail: function(res) {
+									that.$util.Tips({
+										title: '保存失败'
+									});
+								}
+							});
+						}
 					},
-					fail: function(res) {
-						that.$util.Tips({
-							title: '保存失败'
-						});
-					}
+					fail: () => {},
+					complete: () => {}
 				});
 			},
 			// #endif

+ 25 - 13
pages/activity/goods_seckill_details/index.vue

@@ -1359,20 +1359,32 @@
 			//#ifdef APP-PLUS
 			savePosterPath() {
 				let that = this
-				uni.saveImageToPhotosAlbum({
-					filePath: that.posterImage,
-					success: function(res) {
-						that.posterImageClose();
-						that.$util.Tips({
-							title: '保存成功',
-							icon: 'success'
-						});
+				uni.showModal({
+					title: '存储权限',
+					content: '是否允许保存邀请图片到手机?',
+					confirmText:'允许',
+					cancelText:'禁止',
+					success: res => {
+						if(res.confirm){
+							uni.saveImageToPhotosAlbum({
+								filePath: that.posterImage,
+								success: function(res) {
+									that.posterImageClose();
+									that.$util.Tips({
+										title: '保存成功',
+										icon: 'success'
+									});
+								},
+								fail: function(res) {
+									that.$util.Tips({
+										title: '保存失败'
+									});
+								}
+							});
+						}
 					},
-					fail: function(res) {
-						that.$util.Tips({
-							title: '保存失败'
-						});
-					}
+					fail: () => {},
+					complete: () => {}
 				});
 			},
 			// #endif

+ 3 - 0
pages/columnGoods/static/yszc.html

@@ -1045,6 +1045,9 @@
 		<h4>&nbsp;</h4>
 		<h4>十、如何联系我们</h4>
 		<p>您可以通过以下方式与我们联系,我们将在15天内回复您的请求:</p>
+		<p>公司:浙江神英优选电子商务科技有限公司</p>
+		<p>地址:浙江省台州市路桥区路桥街道泰隆街508号 </p>
+		<p>电话:0576-82901068</p>
 		<p>1、如对本政策内容、儿童个人信息有任何疑问、意见或建议,您可通过【神英优选】客服邮箱:【ssjt202205@163.com】与我们联系。</p>
 		<p>2、如发现个人信息被泄露,您可以联系我们的客服人员进行投诉举报;</p>
 		<p>如果您对我们的回复不满意,特别是您认为我们的个人信息处理行为损害了您的合法权益,您还可以通过向被告住所地有管辖权的法院提起诉讼来寻求解决方案</p>

+ 25 - 13
pages/goods_details/index.vue

@@ -2221,20 +2221,32 @@
 			//#ifdef APP-PLUS
 			savePosterPath() {
 				let that = this
-				uni.saveImageToPhotosAlbum({
-					filePath: that.posterImage,
-					success: function(res) {
-						that.posterImageClose();
-						that.$util.Tips({
-							title: '保存成功',
-							icon: 'success'
-						});
+				uni.showModal({
+					title: '存储权限',
+					content: '是否允许保存邀请图片到手机?',
+					confirmText:'允许',
+					cancelText:'禁止',
+					success: res => {
+						if(res.confirm){
+							uni.saveImageToPhotosAlbum({
+								filePath: that.posterImage,
+								success: function(res) {
+									that.posterImageClose();
+									that.$util.Tips({
+										title: '保存成功',
+										icon: 'success'
+									});
+								},
+								fail: function(res) {
+									that.$util.Tips({
+										title: '保存失败'
+									});
+								}
+							});
+						}
 					},
-					fail: function(res) {
-						that.$util.Tips({
-							title: '保存失败'
-						});
-					}
+					fail: () => {},
+					complete: () => {}
 				});
 			},
 			// #endif

+ 123 - 147
pages/users/user_cash/index.vue

@@ -1,27 +1,27 @@
 <template>
 	<view :style="colorStyle">
 		<view class='cash-withdrawal'>
-			<!-- <view class='nav acea-row' v-if="navList.length>1">
+			<view class='nav acea-row' v-if="navList.length>1">
 				<view v-for="(item,index) in navList" :key="index" class='item fontcolor' @click="swichNav(item.id)">
 					<view class='line bg-color' :class='currentTab==item.id ? "on":""'></view>
 					<view class='iconfont' :class='item.icon+" "+(currentTab==item.id ? "on":"")'></view>
 					<view>{{item.name}}</view>
 				</view>
-			</view> -->
+			</view>
 			<view class='wrapper'>
 				<view :hidden='currentTab != 0' class='list'>
 					<form @submit="subCash">
-						<!-- <view class='item acea-row row-between-wrapper'>
+						<view class='item acea-row row-between-wrapper'>
 							<view class='name'>持卡人</view>
 							<view class='input'><input placeholder='请输入持卡人姓名' placeholder-class='placeholder'
 									name="name" onKeypress="javascript:if(event.keyCode == 32)event.returnValue = false;"></input></view>
-						</view> -->
-						<!-- <view class='item acea-row row-between-wrapper'>
+						</view>
+						<view class='item acea-row row-between-wrapper'>
 							<view class='name'>卡号</view>
 							<view class='input'><input type='number' placeholder='请填写卡号' placeholder-class='placeholder'
 									name="cardnum"></input></view>
-						</view> -->
-						<!-- <view class='item acea-row row-between-wrapper'>
+						</view>
+						<view class='item acea-row row-between-wrapper'>
 							<view class='name'>银行</view>
 							<view class='input'>
 								<picker @change="bindPickerChange" :value="index" :range="array">
@@ -29,20 +29,32 @@
 									<text class='iconfont icon-qiepian38'></text>
 								</picker>
 							</view>
-						</view> -->
+						</view>
+						<view class='item acea-row row-top row-between'>
+							<view class='name'>凭证</view>
+							<view class="input acea-row">
+								<view class="picEwm" v-if="qrcodeUrPZ">
+									<image :src="qrcodeUrPZ"></image>
+									<text class='iconfont icon-guanbi1 fontcolor' @click='DelPicP'></text>
+								</view>
+								<view class='pictrue acea-row row-center-wrapper row-column' @click='uploadpic("Z")'
+									v-else>
+									<text class='iconfont icon-icon25201'></text>
+									<view>上传图片</view>
+								</view>
+							</view>
+						</view>
 						<view class='item acea-row row-between-wrapper'>
 							<view class='name'>提现</view>
-							<view class='input'><input @input='inputNum' :maxlength="moneyMaxLeng"
-									:placeholder='"最低提现金额:¥"+minPrice' placeholder-class='placeholder' name="money"
-									type='digit'></input></view>
+							<view class='input'><input @input='inputNum' :maxlength="moneyMaxLeng" :placeholder='"最低提现金额:¥"+minPrice' placeholder-class='placeholder'
+									name="money" type='digit'></input></view>
 						</view>
 						<view class='tip'>
 							当前可提现金额: <text
 								class="price">¥{{userInfo.commissionCount}}</text>,冻结佣金:¥{{userInfo.broken_commission}}
 						</view>
 						<view class='tip'>
-							提现手续费: <text class="price">{{withdraw_fee}}%</text>,实际到账:<text
-								class="price">¥{{true_money}}</text>
+							提现手续费: <text class="price">¥{{withdraw_fee}}</text>,实际到账:<text class="price">¥{{true_money}}</text>
 						</view>
 						<view class='tip'>
 							说明: 每笔佣金的冻结期为{{userInfo.broken_day}}天,到期后可提现
@@ -55,15 +67,12 @@
 						<view class='item acea-row row-between-wrapper' v-if="extract_wechat_type == 0">
 							<view class='name'>账号</view>
 							<view class='input'><input placeholder='请填写您的微信账号' placeholder-class='placeholder'
-									name="name"
-									onKeypress="javascript:if(event.keyCode == 32)event.returnValue = false;"></input>
-							</view>
+									name="name" onKeypress="javascript:if(event.keyCode == 32)event.returnValue = false;"></input></view>
 						</view>
 						<view class='item acea-row row-between-wrapper'>
 							<view class='name'>提现</view>
-							<view class='input'><input @input='inputNum' :maxlength="moneyMaxLeng"
-									:placeholder='"最低提现金额:¥"+minPrice' placeholder-class='placeholder' name="money"
-									type='digit'></input></view>
+							<view class='input'><input @input='inputNum' :maxlength="moneyMaxLeng" :placeholder='"最低提现金额:¥"+minPrice' placeholder-class='placeholder'
+									name="money" type='digit'></input></view>
 						</view>
 						<view class='item acea-row row-top row-between' v-if="extract_wechat_type == 0">
 							<view class='name'>收款码</view>
@@ -84,8 +93,7 @@
 								class="price">¥{{userInfo.commissionCount}}</text>,冻结佣金:¥{{userInfo.broken_commission}}
 						</view>
 						<view class='tip'>
-							提现手续费: <text class="price">{{withdraw_fee}}%</text>,实际到账:<text
-								class="price">¥{{true_money}}</text>
+							提现手续费: <text class="price">¥{{withdraw_fee}}</text>,实际到账:<text class="price">¥{{true_money}}</text>
 						</view>
 						<view class='tip'>
 							说明: 每笔佣金的冻结期为{{userInfo.broken_day}}天,到期后可提现
@@ -98,15 +106,12 @@
 						<view class='item acea-row row-between-wrapper'>
 							<view class='name'>账号</view>
 							<view class='input'><input placeholder='请填写您的支付宝账号' placeholder-class='placeholder'
-									name="name"
-									onKeypress="javascript:if(event.keyCode == 32)event.returnValue = false;"></input>
-							</view>
+									name="name" onKeypress="javascript:if(event.keyCode == 32)event.returnValue = false;"></input></view>
 						</view>
 						<view class='item acea-row row-between-wrapper'>
 							<view class='name'>提现</view>
-							<view class='input'><input @input='inputNum' :maxlength="moneyMaxLeng"
-									:placeholder='"最低提现金额:¥"+minPrice' placeholder-class='placeholder' name="money"
-									type='digit'></input></view>
+							<view class='input'><input @input='inputNum' :maxlength="moneyMaxLeng" :placeholder='"最低提现金额:¥"+minPrice' placeholder-class='placeholder'
+									name="money" type='digit'></input></view>
 						</view>
 						<view class='item acea-row row-top row-between'>
 							<view class='name'>收款码</view>
@@ -127,8 +132,7 @@
 								class="price">¥{{userInfo.commissionCount}}</text>,冻结佣金:¥{{userInfo.broken_commission}}
 						</view>
 						<view class='tip'>
-							提现手续费: <text class="price">{{withdraw_fee}}%</text>,实际到账:<text
-								class="price">¥{{true_money}}</text>
+							提现手续费: <text class="price">¥{{withdraw_fee}}</text>,实际到账:<text class="price">¥{{true_money}}</text>
 						</view>
 						<view class='tip'>
 							说明: 每笔佣金的冻结期为{{userInfo.broken_day}}天,到期后可提现
@@ -145,9 +149,6 @@
 </template>
 
 <script>
-	import {
-		bank_info
-	} from '@/api/new.js';
 	import {
 		extractCash,
 		extractBank,
@@ -156,13 +157,18 @@
 	import {
 		toLogin
 	} from '@/libs/login.js';
+	
+	import {
+		calculator,
+	} from '@/api/new.js';
+	
 	import {
 		mapGetters
 	} from "vuex";
 	import colors from '@/mixins/color.js';
 	export default {
 		components: {},
-		mixins: [colors],
+		mixins:[colors],
 		data() {
 			return {
 				navList: [],
@@ -176,12 +182,12 @@
 				isShowAuth: false, //是否隐藏授权
 				qrcodeUrlW: "",
 				qrcodeUrlZ: "",
+				qrcodeUrPZ: "",
 				prevent: true, //避免重复提交成功多次
 				moneyMaxLeng: 8,
 				withdraw_fee: '0',
 				true_money: 0,
-				extract_wechat_type: 0,
-				isAuth: false, //判断是否认证
+				extract_wechat_type:0
 			};
 		},
 		computed: mapGetters(['isLogin']),
@@ -205,47 +211,21 @@
 			}
 		},
 		onShow() {
-			if (this.isLogin) {
-				this.bank_info();
-			}
 			uni.removeStorageSync('form_type_cart');
 		},
 		methods: {
-			bank_info() {
-				const that = this;
-				bank_info().then((res) => {
-					if (!res.data.bank_code) {
-						that.isAuth = false;
-						uni.showModal({
-							title: '提示',
-							content: '您还未认证请立即认证',
-							confirmText: '立即认证',
-							success: res => {
-								if (res.confirm) {
-									uni.navigateTo({
-										url: './WAuth'
-									})
-								}
-							},
-							fail: () => {},
-							complete: () => {}
-						});
-						return
-					} else {
-						that.isAuth = true;
-					}
-				})
-			},
-			inputNum: function(e) {
+			inputNum: async function(e) {
 				let val = e.detail.value;
 				let dot = val.indexOf('.');
-				if (dot > -1) {
-					this.moneyMaxLeng = dot + 3;
-				} else {
+				if(dot>-1){
+					this.moneyMaxLeng = dot+3;
+				}else{
 					this.moneyMaxLeng = 8
 				}
-				this.true_money = Math.floor((this.$util.$h.Mul(val, this.$util.$h.Div(this.$util.$h.Sub(100, this
-					.withdraw_fee), 100))) * 100) / 100 || 0;
+				
+				let money = await calculator({money:val});
+				this.withdraw_fee = money.data.fee;
+				this.true_money = val - this.withdraw_fee;
 			},
 			// uploadpicW(){
 			// 	this.uploadpic(this.qrcodeUrlW);
@@ -262,8 +242,10 @@
 				that.$util.uploadImageOne('upload/image', function(res) {
 					if (type === 'W') {
 						that.qrcodeUrlW = res.data.url;
-					} else {
+					} else if(type=="Z"){
 						that.qrcodeUrlZ = res.data.url;
+					}else if(type=="P"){
+						that.qrcodeUrPZ = res.data.url;
 					}
 				});
 			},
@@ -277,6 +259,9 @@
 			DelPicZ: function() {
 				this.qrcodeUrlZ = "";
 			},
+			DelPicP: function() {
+				this.qrcodeUrPZ = "";
+			},
 			onLoadFun: function() {
 				this.getUserInfo();
 				this.getUserExtractBank();
@@ -293,7 +278,6 @@
 					array.unshift("请选择银行");
 					that.$set(that, 'array', array);
 					that.minPrice = res.data.minPrice;
-					that.withdraw_fee = res.data.withdraw_fee;
 					that.extract_wechat_type = res.data.extract_wechat_type;
 				});
 			},
@@ -304,26 +288,32 @@
 				let that = this;
 				getUserInfo().then(res => {
 					that.userInfo = res.data;
-					if (res.data.user_extract_bank_status) {
-						this.navList.push({
-							'name': '银行卡',
-							'icon': 'icon-yinhangqia',
-							'id': 0
-						})
+					if(res.data.user_extract_bank_status){
+						this.navList.push(
+						{
+								'name': '银行卡',
+								'icon': 'icon-yinhangqia',
+								'id': 0
+							}
+						)
 					}
-					if (res.data.user_extract_wechat_status) {
-						this.navList.push({
-							'name': '微信',
-							'icon': 'icon-weixin2',
-							'id': 1
-						})
+					if(res.data.user_extract_wechat_status){
+						this.navList.push(
+							{
+								'name': '微信',
+								'icon': 'icon-weixin2',
+								'id': 1
+							}
+						)
 					}
-					if (res.data.user_extract_alipay_status) {
-						this.navList.push({
-							'name': '支付宝',
-							'icon': 'icon-icon34',
-							'id': 2
-						})
+					if(res.data.user_extract_alipay_status){
+						this.navList.push(
+							{
+								'name': '支付宝',
+								'icon': 'icon-icon34',
+								'id': 2
+							}
+						)
 					}
 					this.currentTab = this.navList[0].id;
 				})
@@ -337,58 +327,50 @@
 			subCash: function(e) {
 				let that = this,
 					value = e.detail.value;
-					if (!this.isAuth) {
-						uni.showModal({
-							title: '提示',
-							content: '您还未认证请立即认证',
-							confirmText: '立即认证',
-							success: res => {
-								if (res.confirm) {
-									uni.navigateTo({
-										url: './WAuth'
-									})
-								}
-							},
-							fail: () => {},
-							complete: () => {}
+				
+				if(!that.qrcodeUrPZ){
+					this.$util.Tips({
+						title: '请上传凭证'
+					})
+					return
+				}
+				value.image = that.qrcodeUrPZ;
+					
+				if (that.currentTab == 0) { //银行卡
+					if (value.name.length == 0) return this.$util.Tips({
+						title: '请填写持卡人姓名'
+					});
+					if (value.cardnum.length == 0) return this.$util.Tips({
+						title: '请填写卡号'
+					});
+					if (that.index == 0) return this.$util.Tips({
+						title: "请选择银行"
+					});
+					value.extract_type = 'bank';
+					value.bankname = that.array[that.index];
+				} else if (that.currentTab == 1) { //微信
+					value.extract_type = 'weixin';
+					if(that.extract_wechat_type == 0){
+						if (value.name.length == 0) return this.$util.Tips({
+							title: '请填写微信号'
+						});
+						if (that.qrcodeUrlW == '') return this.$util.Tips({
+							title: '请上传图片'
 						});
-						return
+						value.weixin = value.name;
+						value.qrcode_url = that.qrcodeUrlW;
 					}
-				// if (that.currentTab == 0) { //银行卡
-				// 	if (value.name.length == 0) return this.$util.Tips({
-				// 		title: '请填写持卡人姓名'
-				// 	});
-				// 	if (value.cardnum.length == 0) return this.$util.Tips({
-				// 		title: '请填写卡号'
-				// 	});
-				// 	if (that.index == 0) return this.$util.Tips({
-				// 		title: "请选择银行"
-				// 	});
-				// 	value.extract_type = 'bank';
-				// 	value.bankname = that.array[that.index];
-				// } else if (that.currentTab == 1) { //微信
-				// 	value.extract_type = 'weixin';
-				// 	if (that.extract_wechat_type == 0) {
-				// 		if (value.name.length == 0) return this.$util.Tips({
-				// 			title: '请填写微信号'
-				// 		});
-				// 		if (that.qrcodeUrlW == '') return this.$util.Tips({
-				// 			title: '请上传图片'
-				// 		});
-				// 		value.weixin = value.name;
-				// 		value.qrcode_url = that.qrcodeUrlW;
-				// 	}
-				// } else if (that.currentTab == 2) { //支付宝
-				// 	value.extract_type = 'alipay';
-				// 	if (value.name.length == 0) return this.$util.Tips({
-				// 		title: '请填写账号'
-				// 	});
-				// 	if (that.qrcodeUrlZ == '') return this.$util.Tips({
-				// 		title: '请上传图片'
-				// 	});
-				// 	value.alipay_code = value.name;
-				// 	value.qrcode_url = that.qrcodeUrlZ;
-				// }
+				} else if (that.currentTab == 2) { //支付宝
+					value.extract_type = 'alipay';
+					if (value.name.length == 0) return this.$util.Tips({
+						title: '请填写账号'
+					});
+					if (that.qrcodeUrlZ == '') return this.$util.Tips({
+						title: '请上传图片'
+					});
+					value.alipay_code = value.name;
+					value.qrcode_url = that.qrcodeUrlZ;
+				}
 				if (value.money.length == 0) return this.$util.Tips({
 					title: '请填写提现金额'
 				});
@@ -400,10 +382,6 @@
 				} else {
 					return
 				}
-				uni.showLoading({
-					title:'提交中',
-					mask:true
-				})
 				extractCash(value).then(res => {
 					//that.getUserInfo();
 					return this.$util.Tips({
@@ -430,11 +408,9 @@
 	page {
 		background-color: #fff !important;
 	}
-
-	.fontcolor {
+	.fontcolor{
 		color: var(--view-theme) !important;
 	}
-
 	.cash-withdrawal .nav {
 		height: 130rpx;
 		box-shadow: 0 10rpx 10rpx #f8f8f8;
@@ -583,4 +559,4 @@
 	.price {
 		color: var(--view-priceColor);
 	}
-</style>
+</style>

+ 586 - 0
pages/users/user_cash/sbIndex.vue

@@ -0,0 +1,586 @@
+<template>
+	<view :style="colorStyle">
+		<view class='cash-withdrawal'>
+			<!-- <view class='nav acea-row' v-if="navList.length>1">
+				<view v-for="(item,index) in navList" :key="index" class='item fontcolor' @click="swichNav(item.id)">
+					<view class='line bg-color' :class='currentTab==item.id ? "on":""'></view>
+					<view class='iconfont' :class='item.icon+" "+(currentTab==item.id ? "on":"")'></view>
+					<view>{{item.name}}</view>
+				</view>
+			</view> -->
+			<view class='wrapper'>
+				<view :hidden='currentTab != 0' class='list'>
+					<form @submit="subCash">
+						<!-- <view class='item acea-row row-between-wrapper'>
+							<view class='name'>持卡人</view>
+							<view class='input'><input placeholder='请输入持卡人姓名' placeholder-class='placeholder'
+									name="name" onKeypress="javascript:if(event.keyCode == 32)event.returnValue = false;"></input></view>
+						</view> -->
+						<!-- <view class='item acea-row row-between-wrapper'>
+							<view class='name'>卡号</view>
+							<view class='input'><input type='number' placeholder='请填写卡号' placeholder-class='placeholder'
+									name="cardnum"></input></view>
+						</view> -->
+						<!-- <view class='item acea-row row-between-wrapper'>
+							<view class='name'>银行</view>
+							<view class='input'>
+								<picker @change="bindPickerChange" :value="index" :range="array">
+									<text class='Bank'>{{array[index]}}</text>
+									<text class='iconfont icon-qiepian38'></text>
+								</picker>
+							</view>
+						</view> -->
+						<view class='item acea-row row-between-wrapper'>
+							<view class='name'>提现</view>
+							<view class='input'><input @input='inputNum' :maxlength="moneyMaxLeng"
+									:placeholder='"最低提现金额:¥"+minPrice' placeholder-class='placeholder' name="money"
+									type='digit'></input></view>
+						</view>
+						<view class='tip'>
+							当前可提现金额: <text
+								class="price">¥{{userInfo.commissionCount}}</text>,冻结佣金:¥{{userInfo.broken_commission}}
+						</view>
+						<view class='tip'>
+							提现手续费: <text class="price">{{withdraw_fee}}%</text>,实际到账:<text
+								class="price">¥{{true_money}}</text>
+						</view>
+						<view class='tip'>
+							说明: 每笔佣金的冻结期为{{userInfo.broken_day}}天,到期后可提现
+						</view>
+						<button formType="submit" class='bnt bg-color'>提现</button>
+					</form>
+				</view>
+				<view :hidden='currentTab != 1' class='list'>
+					<form @submit="subCash">
+						<view class='item acea-row row-between-wrapper' v-if="extract_wechat_type == 0">
+							<view class='name'>账号</view>
+							<view class='input'><input placeholder='请填写您的微信账号' placeholder-class='placeholder'
+									name="name"
+									onKeypress="javascript:if(event.keyCode == 32)event.returnValue = false;"></input>
+							</view>
+						</view>
+						<view class='item acea-row row-between-wrapper'>
+							<view class='name'>提现</view>
+							<view class='input'><input @input='inputNum' :maxlength="moneyMaxLeng"
+									:placeholder='"最低提现金额:¥"+minPrice' placeholder-class='placeholder' name="money"
+									type='digit'></input></view>
+						</view>
+						<view class='item acea-row row-top row-between' v-if="extract_wechat_type == 0">
+							<view class='name'>收款码</view>
+							<view class="input acea-row">
+								<view class="picEwm" v-if="qrcodeUrlW">
+									<image :src="qrcodeUrlW"></image>
+									<text class='iconfont icon-guanbi1 fontcolor' @click='DelPicW'></text>
+								</view>
+								<view class='pictrue acea-row row-center-wrapper row-column' @click='uploadpic("W")'
+									v-else>
+									<text class='iconfont icon-icon25201'></text>
+									<view>上传图片</view>
+								</view>
+							</view>
+						</view>
+						<view class='tip'>
+							当前可提现金额: <text
+								class="price">¥{{userInfo.commissionCount}}</text>,冻结佣金:¥{{userInfo.broken_commission}}
+						</view>
+						<view class='tip'>
+							提现手续费: <text class="price">{{withdraw_fee}}%</text>,实际到账:<text
+								class="price">¥{{true_money}}</text>
+						</view>
+						<view class='tip'>
+							说明: 每笔佣金的冻结期为{{userInfo.broken_day}}天,到期后可提现
+						</view>
+						<button formType="submit" class='bnt bg-color'>提现</button>
+					</form>
+				</view>
+				<view :hidden='currentTab != 2' class='list'>
+					<form @submit="subCash">
+						<view class='item acea-row row-between-wrapper'>
+							<view class='name'>账号</view>
+							<view class='input'><input placeholder='请填写您的支付宝账号' placeholder-class='placeholder'
+									name="name"
+									onKeypress="javascript:if(event.keyCode == 32)event.returnValue = false;"></input>
+							</view>
+						</view>
+						<view class='item acea-row row-between-wrapper'>
+							<view class='name'>提现</view>
+							<view class='input'><input @input='inputNum' :maxlength="moneyMaxLeng"
+									:placeholder='"最低提现金额:¥"+minPrice' placeholder-class='placeholder' name="money"
+									type='digit'></input></view>
+						</view>
+						<view class='item acea-row row-top row-between'>
+							<view class='name'>收款码</view>
+							<view class="input acea-row">
+								<view class="picEwm" v-if="qrcodeUrlZ">
+									<image :src="qrcodeUrlZ"></image>
+									<text class='iconfont icon-guanbi1 fontcolor' @click='DelPicZ'></text>
+								</view>
+								<view class='pictrue acea-row row-center-wrapper row-column' @click='uploadpic("Z")'
+									v-else>
+									<text class='iconfont icon-icon25201'></text>
+									<view>上传图片</view>
+								</view>
+							</view>
+						</view>
+						<view class='tip'>
+							当前可提现金额: <text
+								class="price">¥{{userInfo.commissionCount}}</text>,冻结佣金:¥{{userInfo.broken_commission}}
+						</view>
+						<view class='tip'>
+							提现手续费: <text class="price">{{withdraw_fee}}%</text>,实际到账:<text
+								class="price">¥{{true_money}}</text>
+						</view>
+						<view class='tip'>
+							说明: 每笔佣金的冻结期为{{userInfo.broken_day}}天,到期后可提现
+						</view>
+						<button formType="submit" class='bnt bg-color'>提现</button>
+					</form>
+				</view>
+			</view>
+		</view>
+		<!-- #ifdef MP -->
+		<!-- <authorize v-if="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"></authorize> -->
+		<!-- #endif -->
+	</view>
+</template>
+
+<script>
+	import {
+		bank_info
+	} from '@/api/new.js';
+	import {
+		extractCash,
+		extractBank,
+		getUserInfo
+	} from '@/api/user.js';
+	import {
+		toLogin
+	} from '@/libs/login.js';
+	import {
+		mapGetters
+	} from "vuex";
+	import colors from '@/mixins/color.js';
+	export default {
+		components: {},
+		mixins: [colors],
+		data() {
+			return {
+				navList: [],
+				currentTab: '',
+				index: 0,
+				array: [], //提现银行
+				minPrice: 0.00, //最低提现金额
+				userInfo: [],
+				isClone: false,
+				isAuto: false, //没有授权的不会自动授权
+				isShowAuth: false, //是否隐藏授权
+				qrcodeUrlW: "",
+				qrcodeUrlZ: "",
+				prevent: true, //避免重复提交成功多次
+				moneyMaxLeng: 8,
+				withdraw_fee: '0',
+				true_money: 0,
+				extract_wechat_type: 0,
+				isAuth: false, //判断是否认证
+			};
+		},
+		computed: mapGetters(['isLogin']),
+		watch: {
+			isLogin: {
+				handler: function(newV, oldV) {
+					if (newV) {
+						this.getUserInfo();
+						this.getUserExtractBank();
+					}
+				},
+				deep: true
+			}
+		},
+		onLoad() {
+			if (this.isLogin) {
+				this.getUserInfo();
+				this.getUserExtractBank();
+			} else {
+				toLogin()
+			}
+		},
+		onShow() {
+			if (this.isLogin) {
+				this.bank_info();
+			}
+			uni.removeStorageSync('form_type_cart');
+		},
+		methods: {
+			bank_info() {
+				const that = this;
+				bank_info().then((res) => {
+					if (!res.data.bank_code) {
+						that.isAuth = false;
+						uni.showModal({
+							title: '提示',
+							content: '您还未认证请立即认证',
+							confirmText: '立即认证',
+							success: res => {
+								if (res.confirm) {
+									uni.navigateTo({
+										url: './WAuth'
+									})
+								}
+							},
+							fail: () => {},
+							complete: () => {}
+						});
+						return
+					} else {
+						that.isAuth = true;
+					}
+				})
+			},
+			inputNum: function(e) {
+				let val = e.detail.value;
+				let dot = val.indexOf('.');
+				if (dot > -1) {
+					this.moneyMaxLeng = dot + 3;
+				} else {
+					this.moneyMaxLeng = 8
+				}
+				this.true_money = Math.floor((this.$util.$h.Mul(val, this.$util.$h.Div(this.$util.$h.Sub(100, this
+					.withdraw_fee), 100))) * 100) / 100 || 0;
+			},
+			// uploadpicW(){
+			// 	this.uploadpic(this.qrcodeUrlW);
+			// },
+			// uploadpicZ(){
+			// 	this.uploadpic(this.qrcodeUrlZ);
+			// },
+			/**
+			 * 上传文件
+			 * 
+			 */
+			uploadpic: function(type) {
+				let that = this;
+				that.$util.uploadImageOne('upload/image', function(res) {
+					if (type === 'W') {
+						that.qrcodeUrlW = res.data.url;
+					} else {
+						that.qrcodeUrlZ = res.data.url;
+					}
+				});
+			},
+			/**
+			 * 删除图片
+			 * 
+			 */
+			DelPicW: function() {
+				this.qrcodeUrlW = "";
+			},
+			DelPicZ: function() {
+				this.qrcodeUrlZ = "";
+			},
+			onLoadFun: function() {
+				this.getUserInfo();
+				this.getUserExtractBank();
+				this.isShowAuth = false;
+			},
+			// 授权关闭
+			authColse: function(e) {
+				this.isShowAuth = e
+			},
+			getUserExtractBank: function() {
+				let that = this;
+				extractBank().then(res => {
+					let array = res.data.extractBank;
+					array.unshift("请选择银行");
+					that.$set(that, 'array', array);
+					that.minPrice = res.data.minPrice;
+					that.withdraw_fee = res.data.withdraw_fee;
+					that.extract_wechat_type = res.data.extract_wechat_type;
+				});
+			},
+			/**
+			 * 获取个人用户信息
+			 */
+			getUserInfo: function() {
+				let that = this;
+				getUserInfo().then(res => {
+					that.userInfo = res.data;
+					if (res.data.user_extract_bank_status) {
+						this.navList.push({
+							'name': '银行卡',
+							'icon': 'icon-yinhangqia',
+							'id': 0
+						})
+					}
+					if (res.data.user_extract_wechat_status) {
+						this.navList.push({
+							'name': '微信',
+							'icon': 'icon-weixin2',
+							'id': 1
+						})
+					}
+					if (res.data.user_extract_alipay_status) {
+						this.navList.push({
+							'name': '支付宝',
+							'icon': 'icon-icon34',
+							'id': 2
+						})
+					}
+					this.currentTab = this.navList[0].id;
+				})
+			},
+			swichNav: function(current) {
+				this.currentTab = current;
+			},
+			bindPickerChange: function(e) {
+				this.index = e.detail.value;
+			},
+			subCash: function(e) {
+				let that = this,
+					value = e.detail.value;
+					if (!this.isAuth) {
+						uni.showModal({
+							title: '提示',
+							content: '您还未认证请立即认证',
+							confirmText: '立即认证',
+							success: res => {
+								if (res.confirm) {
+									uni.navigateTo({
+										url: './WAuth'
+									})
+								}
+							},
+							fail: () => {},
+							complete: () => {}
+						});
+						return
+					}
+				// if (that.currentTab == 0) { //银行卡
+				// 	if (value.name.length == 0) return this.$util.Tips({
+				// 		title: '请填写持卡人姓名'
+				// 	});
+				// 	if (value.cardnum.length == 0) return this.$util.Tips({
+				// 		title: '请填写卡号'
+				// 	});
+				// 	if (that.index == 0) return this.$util.Tips({
+				// 		title: "请选择银行"
+				// 	});
+				// 	value.extract_type = 'bank';
+				// 	value.bankname = that.array[that.index];
+				// } else if (that.currentTab == 1) { //微信
+				// 	value.extract_type = 'weixin';
+				// 	if (that.extract_wechat_type == 0) {
+				// 		if (value.name.length == 0) return this.$util.Tips({
+				// 			title: '请填写微信号'
+				// 		});
+				// 		if (that.qrcodeUrlW == '') return this.$util.Tips({
+				// 			title: '请上传图片'
+				// 		});
+				// 		value.weixin = value.name;
+				// 		value.qrcode_url = that.qrcodeUrlW;
+				// 	}
+				// } else if (that.currentTab == 2) { //支付宝
+				// 	value.extract_type = 'alipay';
+				// 	if (value.name.length == 0) return this.$util.Tips({
+				// 		title: '请填写账号'
+				// 	});
+				// 	if (that.qrcodeUrlZ == '') return this.$util.Tips({
+				// 		title: '请上传图片'
+				// 	});
+				// 	value.alipay_code = value.name;
+				// 	value.qrcode_url = that.qrcodeUrlZ;
+				// }
+				if (value.money.length == 0) return this.$util.Tips({
+					title: '请填写提现金额'
+				});
+				if (Number(value.money) < Number(that.minPrice)) return this.$util.Tips({
+					title: '提现金额不能低于:¥' + that.minPrice
+				});
+				if (this.prevent) {
+					this.prevent = false
+				} else {
+					return
+				}
+				uni.showLoading({
+					title:'提交中',
+					mask:true
+				})
+				extractCash(value).then(res => {
+					//that.getUserInfo();
+					return this.$util.Tips({
+						title: res.msg,
+						icon: 'success'
+					}, {
+						url: '/pages/users/user_spread_user/index',
+						tab: 2
+					});
+				}).catch(err => {
+					setTimeout(e => {
+						this.prevent = true
+					}, 1500)
+					return this.$util.Tips({
+						title: err
+					});
+				});
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		background-color: #fff !important;
+	}
+
+	.fontcolor {
+		color: var(--view-theme) !important;
+	}
+
+	.cash-withdrawal .nav {
+		height: 130rpx;
+		box-shadow: 0 10rpx 10rpx #f8f8f8;
+	}
+
+	.cash-withdrawal .nav .item {
+		font-size: 26rpx;
+		flex: 1;
+		text-align: center;
+	}
+
+	.cash-withdrawal .nav .item~.item {
+		border-left: 1px solid #f0f0f0;
+	}
+
+	.cash-withdrawal .nav .item .iconfont {
+		width: 40rpx;
+		height: 40rpx;
+		border-radius: 50%;
+		border: 2rpx solid var(--view-theme);
+		text-align: center;
+		line-height: 37rpx;
+		margin: 0 auto 6rpx auto;
+		font-size: 22rpx;
+		box-sizing: border-box;
+	}
+
+	.cash-withdrawal .nav .item .iconfont.on {
+		background-color: var(--view-theme);
+		color: #fff;
+		border-color: var(--view-theme);
+	}
+
+	.cash-withdrawal .nav .item .line {
+		width: 2rpx;
+		height: 20rpx;
+		margin: 0 auto;
+		transition: height 0.3s;
+	}
+
+	.cash-withdrawal .nav .item .line.on {
+		height: 39rpx;
+	}
+
+	.cash-withdrawal .wrapper .list {
+		padding: 0 30rpx;
+	}
+
+	.cash-withdrawal .wrapper .list .item {
+		border-bottom: 1rpx solid #eee;
+		min-height: 28rpx;
+		font-size: 30rpx;
+		color: #333;
+		padding: 39rpx 0;
+	}
+
+	.cash-withdrawal .wrapper .list .item .name {
+		width: 130rpx;
+	}
+
+	.cash-withdrawal .wrapper .list .item .input {
+		width: 505rpx;
+	}
+
+	.cash-withdrawal .wrapper .list .item .input .placeholder {
+		color: #bbb;
+	}
+
+	.cash-withdrawal .wrapper .list .item .picEwm,
+	.cash-withdrawal .wrapper .list .item .pictrue {
+		width: 140rpx;
+		height: 140rpx;
+		border-radius: 3rpx;
+		position: relative;
+		margin-right: 23rpx;
+	}
+
+	.cash-withdrawal .wrapper .list .item .picEwm image {
+		width: 100%;
+		height: 100%;
+		border-radius: 3rpx;
+	}
+
+	.cash-withdrawal .wrapper .list .item .picEwm .icon-guanbi1 {
+		position: absolute;
+		right: -14rpx;
+		top: -16rpx;
+		font-size: 40rpx;
+	}
+
+	.cash-withdrawal .wrapper .list .item .pictrue {
+		border: 1px solid rgba(221, 221, 221, 1);
+		font-size: 22rpx;
+		color: #BBBBBB;
+	}
+
+	.cash-withdrawal .wrapper .list .item .pictrue .icon-icon25201 {
+		font-size: 47rpx;
+		color: #DDDDDD;
+		margin-bottom: 3px;
+	}
+
+	.cash-withdrawal .wrapper .list .tip {
+		font-size: 26rpx;
+		color: #999;
+		margin-top: 25rpx;
+	}
+
+	.cash-withdrawal .wrapper .list .bnt {
+		font-size: 32rpx;
+		color: #fff;
+		width: 690rpx;
+		height: 90rpx;
+		text-align: center;
+		border-radius: 50rpx;
+		line-height: 90rpx;
+		margin: 64rpx auto;
+	}
+
+	.cash-withdrawal .wrapper .list .tip2 {
+		font-size: 26rpx;
+		color: #999;
+		text-align: center;
+		margin: 44rpx 0 20rpx 0;
+	}
+
+	.cash-withdrawal .wrapper .list .value {
+		height: 135rpx;
+		line-height: 135rpx;
+		border-bottom: 1rpx solid #eee;
+		width: 690rpx;
+		margin: 0 auto;
+	}
+
+	.cash-withdrawal .wrapper .list .value input {
+		font-size: 80rpx;
+		color: #282828;
+		height: 135rpx;
+		text-align: center;
+	}
+
+	.cash-withdrawal .wrapper .list .value .placeholder2 {
+		color: #bbb;
+	}
+
+	.price {
+		color: var(--view-priceColor);
+	}
+</style>

+ 24 - 12
pages/users/user_spread_code/index.vue

@@ -321,19 +321,31 @@
 			// #ifdef APP-PLUS
 			savePosterPathMp(url) {
 				let that = this;
-				uni.saveImageToPhotosAlbum({
-					filePath: url,
-					success: function(res) {
-						that.$util.Tips({
-							title: '保存成功',
-							icon: 'success'
-						});
+				uni.showModal({
+					title: '存储权限',
+					content: '是否允许保存邀请图片到手机?',
+					confirmText:'允许',
+					cancelText:'禁止',
+					success: res => {
+						if(res.confirm){
+							uni.saveImageToPhotosAlbum({
+								filePath: url,
+								success: function(res) {
+									that.$util.Tips({
+										title: '保存成功',
+										icon: 'success'
+									});
+								},
+								fail: function(res) {
+									that.$util.Tips({
+										title: '保存失败'
+									});
+								}
+							});
+						}
 					},
-					fail: function(res) {
-						that.$util.Tips({
-							title: '保存失败'
-						});
-					}
+					fail: () => {},
+					complete: () => {}
 				});
 			},
 			// #endif