Browse Source

1.邀请有礼

guo 3 years ago
parent
commit
be8cf67cfd
5 changed files with 221 additions and 139 deletions
  1. 85 84
      pages/homePage/homePage.vue
  2. 5 3
      pages/me/commissionHistory.vue
  3. 95 41
      pages/me/extract.vue
  4. 30 5
      pages/me/guize.vue
  5. 6 6
      pages/me/invite.vue

+ 85 - 84
pages/homePage/homePage.vue

@@ -81,94 +81,95 @@
 				<view class="btnName">特价车</view>
 			</view>
 		</view>
-        <!-- <view>shareID:{{shareID}}</view> -->
+		<!-- <view>shareID:{{shareID}}</view> -->
 		<!-- 优惠券中心 -->
 
 		<view class="quanImg">
 			<swiper class="swiper" :circular="true" :indicator-dots="true" indicator-active-color="#FF4F00"
 				v-if="bannerArr.length>0">
 				<swiper-item v-for="(item,index) in bannerArr">
-					<view class="swiper-item">
-						<image :src="item" mode="widthFix" class="swpImg" @click="goImg(index)"></image>
-					</view>
+				
+					<image :src="item" mode="" class="swpImg" @click="goImg(index)"></image>
+					
 				</swiper-item>
 
 			</swiper>
-			<!-- 车主评价 -->
-			<view class="pingjia" v-if="itemData.length != 0">
-				<view class="pingjiaTitle">车主评价</view>
-
-				<view class="itemContent">
-					<view v-for="(item,index) in itemData" :key="index">
-						<view class="item">
-
-							<view class="topMes">
-								<view class="leftView">
-									<image :src='item.HeadUrl' v-if="item.HeadUrl" class="storeImg"></image>
-									<image src="../../static/img/pic_def_ava.png" mode="" class="storeImg" v-else>
-									</image>
-								</view>
-								<view class="rightView">
-									<!-- 第一行 -->
-									<view class="firstView">
-										<view class="nickName">{{item.Evaluator}}</view>
-										<view class="time">{{item.CreateTime.slice(0,item.CreateTime.length-8)}}</view>
-
-									</view>
+		</view>
+		<!-- 车主评价 -->
+		<view class="pingjia" v-if="itemData.length != 0">
+			<view class="pingjiaTitle">车主评价</view>
+
+			<view class="itemContent">
+				<view v-for="(item,index) in itemData" :key="index">
+					<view class="item">
+
+						<view class="topMes">
+							<view class="leftView">
+								<image :src='item.HeadUrl' v-if="item.HeadUrl" class="storeImg"></image>
+								<image src="../../static/img/pic_def_ava.png" mode="" class="storeImg" v-else>
+								</image>
+							</view>
+							<view class="rightView">
+								<!-- 第一行 -->
+								<view class="firstView">
+									<view class="nickName">{{item.Evaluator}}</view>
+									<view class="time">{{item.CreateTime.slice(0,item.CreateTime.length-8)}}</view>
 
+								</view>
 
-									<!-- 第2行 -->
-									<view class="secondView" v-if="item.scoreState==1">
-										<!-- 星星 -->
-										<uni-rate :value="item.Overallevaluation" :max="5" color="#EEEEEE"
-											active-color="#FF4F00" :size="16" :margin="4" :readonly="true" />
 
-									</view>
+								<!-- 第2行 -->
+								<view class="secondView" v-if="item.scoreState==1">
+									<!-- 星星 -->
+									<uni-rate :value="item.Overallevaluation" :max="5" color="#EEEEEE"
+										active-color="#FF4F00" :size="16" :margin="4" :readonly="true" />
 
 								</view>
+
 							</view>
+						</view>
 
 
 
-							<view class="thirdView" v-if="item.scoreState==1">
-								<view class="count">服务态度:{{item.Serviceevaluation}}</view>
-								<view class="count">施工质量:{{item.Constructionevaluation}}</view>
-								<view class="count">店面环境:{{item.Storeevaluation}}</view>
-							</view>
-							<view class="contentMes" v-if="item.EContent">{{item.EContent}}</view>
+						<view class="thirdView" v-if="item.scoreState==1">
+							<view class="count">服务态度:{{item.Serviceevaluation}}</view>
+							<view class="count">施工质量:{{item.Constructionevaluation}}</view>
+							<view class="count">店面环境:{{item.Storeevaluation}}</view>
+						</view>
+						<view class="contentMes" v-if="item.EContent">{{item.EContent}}</view>
 
-							<!-- 照片 -->
-							<view class="imgBg">
-								<view v-for="(itemImg,indexImg) in item.imgs" :key="indexImg" class="pjimgBox">
+						<!-- 照片 -->
+						<view class="imgBg">
+							<view v-for="(itemImg,indexImg) in item.imgs" :key="indexImg" class="pjimgBox">
 
-									<image :src="itemImg.imageUrl" class="img"
-										@click="previewImage(itemImg.imageUrl,item.imgs)"></image>
-								</view>
+								<image :src="itemImg.imageUrl" class="img"
+									@click="previewImage(itemImg.imageUrl,item.imgs)"></image>
 							</view>
+						</view>
 
-							<view style="height: 20rpx;" v-if="!item.EContent && (item.imgs.length == 0)"></view>
+						<view style="height: 20rpx;" v-if="!item.EContent && (item.imgs.length == 0)"></view>
 
 
-							<view class="shopMes">
-								<image src="../../static/img/icon_storeName.png" mode=""
-									style="width: 33rpx; height: 30rpx;"></image>
-								<view class="shopName">{{item.ShopName}}</view>
-							</view>
+						<view class="shopMes">
+							<image src="../../static/img/icon_storeName.png" mode=""
+								style="width: 33rpx; height: 30rpx;"></image>
+							<view class="shopName">{{item.ShopName}}</view>
+						</view>
 
-							<!-- 商家回复 -->
-							<view class="writeBack" v-if="item.ReplyContent">商家回复:{{item.ReplyContent}}</view>
+						<!-- 商家回复 -->
+						<view class="writeBack" v-if="item.ReplyContent">商家回复:{{item.ReplyContent}}</view>
 
 
 
 
-						</view>
-						<view class="line" v-if="index != itemData.length-1"></view>
 					</view>
+					<view class="line" v-if="index != itemData.length-1"></view>
 				</view>
+			</view>
 
 
-			</view>
 		</view>
+
 	</view>
 </template>
 
@@ -193,15 +194,15 @@
 
 				bannerArr: [],
 				mileage: '',
-                shareID:'',
+				shareID: '',
 				brand: '',
 				cityRole: '',
-				share:{
-					title:'车蓝图4S店养车服务scene',
-					path:'/pages/homePage/homePage?scene=F16E7299-6850-4015-ABCE-A9F2794B45B5',
-					imageUrl:'',
-					desc:'',
-					content:''
+				share: {
+					title: '车蓝图4S店养车服务scene',
+					path: '/pages/homePage/homePage?scene=F16E7299-6850-4015-ABCE-A9F2794B45B5',
+					imageUrl: '',
+					desc: '',
+					content: ''
 				}
 			}
 		},
@@ -246,12 +247,12 @@
 			this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
 			this.page = 1
 			this.getItemData()
-			var shareID= opt.scene //'F16E7299-6850-4015-ABCE-A9F2794B45B5'
-			this.shareID=shareID
-			if(shareID){
-				this.$store.commit('mutationsshareID',shareID)
-			} 
-			
+			var shareID = opt.scene //'F16E7299-6850-4015-ABCE-A9F2794B45B5'
+			this.shareID = shareID
+			if (shareID) {
+				this.$store.commit('mutationsshareID', shareID)
+			}
+
 		},
 		methods: {
 			goCarList() {
@@ -463,20 +464,19 @@
 					icon: 'none',
 					duration: 2000,
 				});
-			},
-			goImg(index){
-				if (index == 0) {
-					uni.navigateTo({
-						url: 'allDiscountCard'
-					})
-				}
-				else if (index == 1) {
-					uni.navigateTo({
-						url: '../me/invite'
-					})
-				}
 			},
-			
+			goImg(index) {
+				if (index == 0) {
+					uni.navigateTo({
+						url: 'allDiscountCard'
+					})
+				} else if (index == 1) {
+					uni.navigateTo({
+						url: '../me/invite'
+					})
+				}
+			},
+
 			previewImage(img, arrDic) {
 				var arr = [];
 
@@ -693,17 +693,18 @@
 	}
 
 	.quanImg {
-		width: 100%;
+		
+		margin: 20rpx 24rpx;
+		width: calc(100vw - 46rpx);
 		height: 216rpx;
-		margin-top: 10rpx;
-		margin-bottom: 10rpx;
 	}
 
 	.swiper,
 	.swiper-item,
 	.swpImg {
 		width: 100%;
-		height: 216rpx;
+		height: 216rpx;
+		
 	}
 
 	.pingjia {

+ 5 - 3
pages/me/commissionHistory.vue

@@ -50,7 +50,7 @@
 
 		<view class="emptyView"></view>
 		<view class="bottomView">
-			<view class="goExtract" @click="gonavigateTo('extract?okMoney='+ detailData.cantidatMoney)">去提现</view>
+			<view class="goExtract" @click="gonavigateTo('extract')">去提现</view>
 		</view>
 
 
@@ -65,9 +65,11 @@
 				page: 1,
 				detailData: {},
 				arr: [],
-				noMoreShow: false,
+				noMoreShow: false,
+				
 			}
-		},
+		},
+		
 		onShow() {
 			this.getDetailData();
 			this.page = 1;

+ 95 - 41
pages/me/extract.vue

@@ -5,7 +5,7 @@
 			<view class="moneyView">
 				<text class="icon">¥</text>
 				<input type="digit" class="moneyInput" placeholder-style="color:#999999; font-size:30rpx"
-					placeholder="请输入提现金额" v-model="money" />
+					placeholder="请输入提现金额" v-model="money" @input="inputValue"/>
 				<view class="allBtn" @click="allBtn">全部提现</view>
 			</view>
 			<view class="zongMoney">可提现金额:¥{{okMoney}}</view>
@@ -28,11 +28,12 @@
 
 		<view class="tishi" style="padding: 20rpx 44rpx;">支付宝账号或姓名输入错误将无法提现到账</view>
 
-		<view class="sureBtn" @click="sure">确认提现</view>
-		<view class="tishi">温馨提示</view>
-		<view class="tishi">1、使用支付宝提现需要您已注册支付宝并在支付宝中实名认证过。</view>
-		<view class="tishi">2、支付宝账号是您注册支付宝的手机号或者邮箱号,您可登录支付宝查看。</view>
-		<view class="tishi">3、如您在提现中遇到其他问题,请在「我的」页面找到「联系我们」。</view>
+		<view class="sureBtn" @click="sure">确认提现</view>
+		
+		<view class="tishi">
+			<rich-text :nodes="couContent" ></rich-text>
+		</view>
+		
 
 	</view>
 </template>
@@ -40,50 +41,98 @@
 <script>
 	export default {
 		data() {
-			return {
-				okMoney:'',
+			return {
+				okMoney: '',
 				money: '',
 				name: '',
-				account: '',
+				account: '',
+				detailData:{},
+				couContent:'',//提现规则
 			}
-		},
-		onLoad(opt) {
-			this.okMoney = opt.okMoney
+		},
+		onLoad() {
+			this.getDetailData()
 		},
 		methods: {
-			allBtn(){
-				this.money = this.okMoney
-			},
-			sure(){
-				if (this.money > this.okMoney) {
-					uni.showToast({
-					     title: '提现金额不能大于可提现金额',
-					 	 icon:'none',
-					     duration: 3000,
-					 });
-					 return;
-				}
-				
-				this.postData();
-			},
-			postData() {
+			getDetailData() {
 				uni.showLoading({
-					title: '提现中'
+					title: '加载中'
 				})
-				let url = 'worldKeepCar/worldDistribution/applyWithdrawal',
+				let url = 'worldKeepCar/worldDistribution/queryDistributionIndexDetail',
 					params = {
-						money:this.money,
-						aliName:this.name,
-						aliPhone:this.account,
+			
 					}
-				this.$http(url, params, 'POST').then(res => {
+				this.$http(url, params, 'GET').then(res => {
 					uni.hideLoading();
-					uni.navigateBack({
-						
-					})
+					var data = res.data
+			
+			
+					// 处理 undefined和null转为空白字符串
+			
+					for (const key in data) {
+						data[key] = this.$praseStrEmpty(data[key])
+					}
+			
+					this.detailData = data
+					this.okMoney = this.detailData.cantidatMoney
+					if (this.detailData.tSSetting.withdrawalRules) {
+						this.couContent = this.detailData.tSSetting.withdrawalRules.replace(/\<p/gi, '<p style="display: inline-block"');
+					}
 					
-				
+					
+			
 				})
+			},
+			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;
+				}
+
+				this.postData();
+			},
+			postData() {
+				uni.showLoading({
+					title: '提现中'
+				})
+				let url = 'worldKeepCar/worldDistribution/applyWithdrawal',
+					params = {
+						money: this.money,
+						aliName: this.name,
+						aliPhone: this.account,
+					}
+				this.$http(url, params, 'POST').then(res => {
+					uni.hideLoading();
+					uni.navigateBack({
+
+					})
+
+
+				})
 			},
 		}
 	}
@@ -127,14 +176,19 @@
 		font-size: 70rpx;
 		color: #222222;
 		font-weight: bold;
-		flex-grow: 1;
-		height: 98rpx;
+		/* flex-grow: 1; */
+		height: 98rpx;
+		width: 100%;
 	}
 
 	.allBtn {
 		font-size: 26rpx;
 		color: #FF4F00;
-		width: 180rpx;
+		width: 200rpx;
+		height: 50rpx;
+		line-height: 50rpx;
+		margin-left: 10rpx;
+		text-align: right;
 	}
 
 	.zongMoney {

+ 30 - 5
pages/me/guize.vue

@@ -12,14 +12,39 @@
 			}
 		},
 		onLoad(opt) {
-			console.log('content',opt.couContent);
-			if (opt.couContent) {
-				this.couContent = opt.couContent.replace(/\<p/gi, '<p style="display: inline-block"');
-			}
+			this.getDetailData();
+			
 		},
 		methods: {
 
+			getDetailData() {
+				uni.showLoading({
+					title: '加载中'
+				})
+				let url = 'worldKeepCar/worldDistribution/queryDistributionIndexDetail',
+					params = {
+			
+					}
+				this.$http(url, params, 'GET').then(res => {
+					uni.hideLoading();
+					var data = res.data
+			
+			
+					// 处理 undefined和null转为空白字符串
+			
+					for (const key in data) {
+						data[key] = this.$praseStrEmpty(data[key])
+					}
+			
+					this.detailData = data
+					if (this.detailData.tSSetting.activityRules) {
+						this.couContent = this.detailData.tSSetting.activityRules.replace(/\<p/gi, '<p style="display: inline-block"');
+					}
+					
+					
 			
+				})
+			},
 		}
 
 	}
@@ -27,7 +52,7 @@
 
 <style scoped>
 	.content {
-		background: #F4F5F7;
+		background: #FFFFFF;
 		min-height: 100vh;
 		padding: 30rpx 24rpx;
 		

+ 6 - 6
pages/me/invite.vue

@@ -2,7 +2,7 @@
 	<view class="box">
 
 		<view class="header">
-			<image :src="detailData.tSSetting.bannerImg" mode="" class="bar"></image>
+			<image :src="detailData.tSSetting.ruleImg" mode="widthFix" class="bar"></image>
 			<image src="../../static/img/btn_act@2x.png" mode="" class="guizeBtn" @click="guize"></image>
 		</view>
 
@@ -109,7 +109,7 @@
 			guize() {
 
 				uni.navigateTo({
-					url: 'guize?couContent=' + this.detailData.tSSetting.activityRules
+					url: 'guize'
 				})
 			},
 			getDetailData() {
@@ -138,7 +138,7 @@
 				})
 			},
 			gonavigateTo(url) {
-
+				
 				uni.navigateTo({
 					url: url
 				})
@@ -171,19 +171,19 @@
 
 	.header {
 		width: 100%;
-		height: 750rpx;
+		
 		position: relative;
 	}
 
 	.bar {
 		width: 100%;
-		height: 750rpx;
+		
 	}
 
 	.guizeBtn {
 		position: absolute;
 
-		left: 580rpx;
+		right: 0;
 		top: 48rpx;
 		width: 169rpx;
 		height: 56rpx;