twt 4 tygodni temu
rodzic
commit
af0017b43f

+ 12 - 0
pages.json

@@ -675,6 +675,18 @@
 							//"navigationBarTitleText": "报价单详情"
 							"navigationStyle": "custom"
 						}
+					},
+					{
+						"path": "promotion",
+						"style": {
+							"navigationBarTitleText": "我的推广"
+						}
+					},
+					{
+						"path": "promotionExtract",
+						"style": {
+							"navigationBarTitleText": "提现"
+						}
 					}
 					
 					

+ 246 - 0
pages/subPack/promotion.vue

@@ -0,0 +1,246 @@
+<template>
+<view class="box">
+  <view class="contBox">
+  	<view class="top">
+		<view class="topLeft">
+			<view class="topLeftTitle">未提现返利</view>
+			<view class="topLeftNum">11</view>
+		</view>
+		<view class="topRight" @click="goRouter('promotionExtract')">提现</view>
+	</view>
+	<view class="numBox">
+		<view class="numLine">总收益:120.34</view>
+		<view class="numLine">已到账:78.99</view>
+	</view>
+	
+	<view class="jlLine">
+		<view class="lineTop">
+			<view class="lineMs">集客活动名称</view>
+			<view class="lineNum">收益:<span class="spanNum">50.54</span></view>
+		</view>
+		<view class="lineBottom">
+			<view class="time">2020-07-20 19:08</view>
+			<view class="nickName"></view>
+		</view>
+	</view>
+	
+	
+  </view>
+</view>
+</template>
+
+<script>
+	export default {
+		components: {
+			
+		},
+		
+		data() {
+			return {
+				detail:'',
+				themeColor:'',
+				userInfo:'',
+			}
+		},
+		onLoad(opt) {
+			this.themeColor = uni.getStorageSync("themeColor");
+			this.userInfo = uni.getStorageSync("userInfo");
+			//this.getData();
+			//this.getExplain();
+		},
+		onShow() {
+			
+		},
+		methods: {
+			getData(){
+				uni.showLoading({
+					title: '加载中'
+				})
+				this.$http('openMCustomer/getIndexData', {
+				    
+				}, 'GET').then(res => {
+					uni.hideLoading();
+					this.detail = res.data
+					//console.log('list+=', this.queryShopList);
+				
+				})
+			},
+			getExplain(){
+				this.$http('openMCustomer/getExplain', {
+				    
+				}, 'GET').then(res => {
+					//uni.hideLoading();
+					//this.detail = res.data
+					//console.log('list+=', this.queryShopList);
+				
+				})
+			},
+			goRouter(url){
+				uni.navigateTo({
+					url:url
+				})
+			}
+			
+		}
+	}
+</script>
+
+<style scoped lang="less">
+.numBox{
+	display: flex;color: #666666;
+	padding-top: 20rpx;font-size: 26rpx;
+}
+.numLine{
+	padding-right: 20rpx;
+}
+.box {
+	width: 100vw;
+	min-height: 100vh;
+	background: #F4F5F7;
+}
+.contBox{
+	padding: 20rpx 24rpx;
+}
+.top{
+	background: #FFFFFF;
+	border-radius: 10rpx;
+	padding: 24rpx 20rpx;
+	display: flex;
+	justify-content: space-between;
+}
+.topLeftTitle{
+	font-size: 30rpx;
+	font-family: PingFangSC-Medium, PingFang SC;
+	font-weight: 500;
+	color: #333333;
+}
+.topLeftNum{
+	font-size: 40rpx;
+	font-family: PingFangSC-Semibold, PingFang SC;
+	font-weight: 600;
+	color: #EC0F0A;
+	padding-top: 24rpx;
+}
+.topRight{
+	width: 138rpx;
+	height: 64rpx;
+	background: #EC0F0A;
+	border-radius: 10rpx;
+	line-height: 64rpx;
+	text-align: center;
+	color: #FFFFFF;
+	font-size: 28rpx;
+	margin-top: 34rpx;
+}
+.xffl{
+	background: #FFFFFF;
+	margin-top: 20rpx;
+	padding: 20rpx;
+	border-radius: 10rpx;
+}
+.xfflTitle{
+	font-size: 30rpx;
+	font-family: PingFangSC-Medium, PingFang SC;
+	font-weight: 500;
+	color: #333333;
+}
+.xfflLine{
+	display: flex;
+	justify-content: space-between;
+	font-size: 24rpx;
+	font-family: PingFangSC-Regular, PingFang SC;
+	font-weight: 400;
+	color: #333333;
+	line-height: 33rpx;
+	padding: 15rpx 0;
+}
+.xfflyq{
+	width: 10rpx;
+	height: 10rpx;
+	background: #EC0F0A;
+	border-radius: 50%;
+	margin-top: 12rpx;
+	margin-right: 14rpx;
+}
+.xfflyq2{
+	width: 10rpx;
+	height: 10rpx;
+	background: #3F90F7;
+	border-radius: 50%;
+	margin-top: 12rpx;
+	margin-right: 14rpx;
+}
+.xfflyq3{
+	width: 10rpx;
+	height: 10rpx;
+	background: #FF4F00;
+	border-radius: 50%;
+	margin-top: 12rpx;
+	margin-right: 14rpx;
+}
+.xfflyq4{
+	width: 10rpx;
+	height: 10rpx;
+	background: #6F2BE8;
+	border-radius: 50%;
+	margin-top: 12rpx;
+	margin-right: 14rpx;
+}
+.xfflLineLeft{
+	display: flex;
+	width: 200rpx;
+}
+.xfflLineM{
+	width: 200rpx;
+	text-align: right;
+}
+.xfflLineR{
+	width: 200rpx;
+	text-align: right;
+}
+.lineLeftImg{
+	width: 34rpx;
+	height: 34rpx;
+}
+.lineLeftTxt{
+	color: #333333;font-size: 28rpx;line-height: 34rpx;padding-left: 24rpx;
+}
+.lineRIghtNUm{
+	color: #666666;font-size: 28rpx;line-height: 34rpx;padding-right: 16rpx;
+}
+.lineRightImg{
+	width: 12rpx;
+	height: 20rpx;
+	margin-top: 7rpx;
+}
+.lineBox{
+	background: #FFFFFF;width: 702rpx;margin-top: 20rpx;
+}
+.line{
+	display: flex;
+	justify-content: space-between;
+	padding: 38rpx 32rpx;
+}
+.lineLeft{
+		display: flex;
+}
+.lineRight{
+	display: flex;
+}
+.smImg{
+	width: 30rpx;height: 30rpx;
+}
+.smTxt{
+	font-size: 28rpx;
+	font-family: PingFangSC-Regular, PingFang SC;
+	font-weight: 400;
+	color: #999999;
+	line-height: 30rpx;
+	padding-left: 5rpx;
+}
+.smBox{
+	display: flex;
+	justify-content: center;
+	padding-top: 30rpx;
+}
+</style>

+ 283 - 0
pages/subPack/promotionExtract.vue

@@ -0,0 +1,283 @@
+<template>
+	<view class="box">
+		<view class="tixiancs">
+			<view class="tixiancsLeft">本月已提现{{detail.count}}次</view>
+			<view class="tixiancsRight" @click="goRouter('../referral/extractList')">提现明细</view>
+		</view>
+		<view class="header">
+			<view class="title">提现金额</view>
+			<view class="moneyView">
+				<text class="icon">¥</text>
+				<input type="digit" class="moneyInput" placeholder-style="color:#999999; font-size:30rpx"
+					placeholder="请输入提现金额" v-model="money" @input="inputValue" />
+				<view class="allBtn" @click="allBtn">全部提现</view>
+			</view>
+			<view class="zongMoney">可提现金额: <span style="color: #EC0F0A;padding-right: 10rpx;">¥{{detail.canMoney}}  </span>  (冻结金额:{{detail.freezeMoney}}) </view>
+
+			
+		</view>
+
+		<view class="tishi" style="padding:20rpx 20rpx 100rpx 20rpx ; ">
+			<view class="tishiLine">
+				<view class="tishiY"></view>
+				<view class="tishiTxt">提现冻结天数:{{detail.explain&&detail.explain.freezeDay}}天</view>
+			</view>
+			<view class="tishiLine">
+				<view class="tishiY"></view>
+				<view class="tishiTxt">最小提现金额:{{detail.explain&&detail.explain.singleLow}}元</view>
+			</view>
+			<view class="tishiLine">
+				<view class="tishiY"></view>
+				<view class="tishiTxt">每月可提现次数:{{detail.explain&&detail.explain.monthlyMost}}次</view>
+			</view>
+		</view>
+
+		<view class="sureBtn" @click="sure">申请提现</view>
+
+		
+
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				okMoney: '',
+				money: '',
+				name: '',
+				account: '',
+				detail: {},
+				couContent: '', //提现规则
+			}
+		},
+		onLoad() {
+			this.getDetailData()
+		},
+		methods: {
+			goRouter(url){
+				uni.navigateTo({
+					url:url
+				})
+			},
+			getDetailData() {
+				uni.showLoading({
+					title: '加载中'
+				})
+				
+				this.$http('openMCustomer/getWithdrawalInfo', {}, 'GET').then(res => {
+					uni.hideLoading();
+					this.detail = res.data;
+					this.okMoney=this.detail.canMoney
+
+				})
+			},
+			inputValue(event) {
+				if (event.detail.value < 0) {
+					setTimeout(() => {
+						this.money = 0; // 解决
+					}, 0)
+				} else {
+					this.money = event.detail.value;
+				}
+			},
+
+			allBtn() {
+
+				setTimeout(() => {
+					this.money = this.okMoney; // 解决
+				}, 0)
+
+
+				console.log('money,allmoney', this.money, this.okMoney);
+			},
+			sure() {
+				 if (this.money > this.okMoney) {
+				 	uni.showToast({
+				 		title: '提现金额不能大于可提现金额',
+				 		icon: 'none',
+						duration: 3000,
+				 	});
+				 	return;
+				 }
+				 if (this.money <= 0) {
+				 	uni.showToast({
+				 		title: '提现金额不能为空',
+				 		icon: 'none',
+						duration: 3000,
+				 	});
+				 	return;
+				 }
+				
+
+				this.postData();
+			},
+			postData() {
+				// uni.showLoading({
+				// 	title: '提现中'
+				// })
+				let url = 'openMCustomer/applyWithdrawal',
+					params = {
+						money: this.money,
+						
+					}
+				this.$http(url, params, 'POST').then(res => {
+					//uni.hideLoading();
+					if(res.code==0){
+						uni.showModal({
+							title: '提交成功',
+							content: '请耐心等待平台审核',
+							showCancel:false,
+							confirmText:'知道了',
+							success: function(res) {
+						
+								uni.navigateBack({
+						
+								})
+							}
+						});
+					}else{
+						// uni.showToast({
+						//  		title: '提现金额不能为空',
+						//  		icon: 'none',
+						//  		duration: 3000,
+						//  	});
+					}
+					
+
+
+
+				})
+			},
+		}
+	}
+</script>
+
+<style>
+	.box {
+		min-height: 100vh;
+		background: #F4F5F7;
+		padding-top: 20rpx;
+	}
+	.tishiLine{
+		display: flex;padding-top: 20rpx;
+	}
+	.tishiY{
+		width: 10rpx;
+		height: 10rpx;
+		background: #DDDDDD;
+		margin-top: 16rpx;
+		border-radius: 50%;
+	}
+	.tishiTxt{
+		padding-left: 18rpx;
+	}
+.tixiancs{
+	display: flex;
+	justify-content: space-between;
+	font-size: 24rpx;
+	padding-left: 24rpx;
+	padding-right: 24rpx;
+	padding-bottom: 20rpx;
+}
+.tixiancsLeft{
+	color: #999999;
+}
+.tixiancsRight{
+	color: #1677FF;
+}
+	.header {
+		background-color: #FFFFFF;
+		margin: 0 24rpx;
+		border-radius: 10rpx;
+		padding: 30rpx 20rpx;
+		
+	}
+
+	.title {
+		font-size: 28rpx;
+		color: #3C3C3C;
+		
+	}
+
+	.moneyView {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		margin: 15rpx 0;
+	}
+
+	.icon {
+		font-size: 50rpx;
+		color: #222222;
+		
+	}
+
+	.moneyInput {
+		font-size: 70rpx;
+		color: #222222;
+		font-weight: bold;
+		/* flex-grow: 1; */
+		height: 98rpx;
+		width: 100%;
+	}
+
+	.allBtn {
+		font-size: 26rpx;
+		color: #EC0F0A;
+		width: 200rpx;
+		height: 50rpx;
+		line-height: 50rpx;
+		margin-left: 10rpx;
+		text-align: right;
+	}
+
+	.zongMoney {
+		font-size: 26rpx;
+		color: #999999;
+		
+	}
+
+	.line {
+
+		background-color: #EEEEEE;
+		height: 1rpx;
+	}
+
+	.name {
+		display: flex;
+		justify-content: flex-start;
+		padding: 28rpx 0;
+	}
+
+	.leftTitle {
+		font-size: 30rpx;
+		color: #3C3C3C;
+		margin-right: 90rpx;
+	}
+
+	.Input {
+		font-size: 30rpx;
+		color: #333333;
+
+	}
+
+	.tishi {
+		padding: 0 44rpx;
+		font-size: 26rpx;
+		color: #999999;
+		line-height: 1.5;
+	}
+
+	.sureBtn {
+		width: 690rpx;
+		margin: 20rpx 30rpx;
+		border-radius: 37rpx;
+		height: 74rpx;
+        background: #EC0F0A;
+		color: #FFFFFF;
+		font-size: 30rpx;
+		text-align: center;
+		line-height: 74rpx;
+	}
+</style>

+ 4 - 0
pages/user/user.vue

@@ -353,6 +353,10 @@
 						<image class="klineIcon" src="../../static/img2/kefu.png" mode=""></image>
 					    <view class="KlineTxt2">{{showSetting.telTitle}}</view><!-- 联系客服 -->
 					</view>
+					<view class="klineRow" @click="gonavigateTo('../subPack/promotion')">
+						<image class="klineIcon" src="../../static/img2/kefu.png" mode=""></image>
+					    <view class="KlineTxt2">我的推广</view><!-- 我的推广 -->
+					</view>
 				</view>
 			</view>
 			

+ 6 - 1
utils/common.js

@@ -109,7 +109,12 @@ function getExtStoreId(type){
 		  			 "unionId":"903F3E3F-E2A5-4D1B-92D7-8D3560013F01",
 		  			 "appId":"wx2b59a5281464a89e"
 		  		  } */
-		  
+		 /* extConfig={
+		  			  "shopId": "471944C8-B664-4B7B-B6D4-F552E66BE554",
+		  			  "url":"https://apidms.66km.com",
+		  			  "unionId":"07206389-E726-48EC-A063-ED040A5E15AE",
+		  			  "appId":"wx5f2274fc8fb1c1e3"
+		  			 } */
 		  
 		console.log(extConfig,'extJson对象');
 		//return extConfig[type];

+ 4 - 4
utils/request.js

@@ -1,7 +1,7 @@
 //测试地址
 //const baseUrl = 'http://api.dms.66km.com.cn/'
-//const baseUrl = 'http://192.168.0.121:20187/'
-//const baseUrl = 'http://192.168.0.126:20187/'
+//const baseUrl = 'http://192.168.1.8:20189/'
+//const baseUrl = 'http://192.168.1.19:20187/'
 //正式
 //const baseUrl = 'https://apidms.66km.com/'
 //正式地址
@@ -11,13 +11,13 @@ console.log(extConfig)
 const baseUrl=extConfig.url+'/'
 //const baseUrl='http://api2.dms.66km.com.cn/'
 //const baseUrl='http://dms.66km.com.cn/'
-//const baseUrl='http://192.168.1.2:20187/' 
+//const baseUrl='http://192.168.1.14:20187/' 
 //const baseUrl='https://store-api.qdbtl.cn/'
 //const baseUrl='https://apidms.66km.com/'
 //const baseUrl='https://dmsapi.chipaioil.com/'
 //京猫虎
 //const baseUrl='https://apidms.jcatt.cn/'
-//	wx2c6f04c0dcd15984正式  wx33053a645546ec31 E37BB296-5A08-4534-859D-B351BA611AF9 EEADACCD-8A19-499D-8AD7-6975D2C93243 
+//	wx2c6f04c0dcd15984正式  wx33053a645546ec31  wx5f2274fc8fb1c1e3  E37BB296-5A08-4534-859D-B351BA611AF9 EEADACCD-8A19-499D-8AD7-6975D2C93243 
 //测试地址
 //const webUrl = 'http://dms.32che.cn/'