guo 3 年之前
父节点
当前提交
cc8b7957d6

+ 26 - 1
common/common.js

@@ -13,10 +13,35 @@ const isUserId = function() {
 	return
 } */
 
+// 防止处理多次点击
+function noMultipleClicks(methods, info) {
+    // methods是点击后需要执行的函数, info是函数需要传的参数
+    let that = this;
+    if (that.noClick) {
+        // 第一次点击
+        that.noClick= false;
+        if((info && info !== '') || info ==0) {
+            // info是执行函数需要传的参数
+            methods(info);
+        } else {
+            methods();
+        }
+        setTimeout(()=> {
+            that.noClick= true;
+        }, 2000)
+    } else {
+        //  这里是重复点击的判断
+    }
+}
+
 export default {
     commonData:{
         companyType:1,
     },
     isUserId,
 	
-}
+	noMultipleClicks,      // 禁止多次点击
+}
+
+
+

+ 4 - 1
main.js

@@ -36,4 +36,7 @@ Vue.prototype.$praseStrEmpty = function(str) {
         return "";
     }
     return str;
-}
+}
+
+// 防止多次点击
+Vue.prototype.$noMultipleClicks = common.noMultipleClicks;

+ 1 - 1
pages.json

@@ -16,7 +16,7 @@
 		{
 			"path": "pages/me/me",
 			"style": {
-				"navigationBarTitleText": "",
+				"navigationBarTitleText": "我的",
 				"navigationBarBackgroundColor": "#FFEDEA"
 			}
 		},

+ 1 - 1
pages/index/carModel.vue

@@ -813,7 +813,7 @@ export default {
 		/*  #endif  */
 	}
 	.brandList{
-		height: calc(100vh - 100rpx);
+		height: calc(100vh - 230rpx);
 	}
 	.brand-select-titleselect{
 		    color: #FF4F00 !important;

+ 19 - 2
pages/index/index.vue

@@ -58,7 +58,7 @@
 			<view class="mesView">
 				<view class="leftTitle">行驶里程</view>
 				<input class="mileageInput selectColor" type="number" v-model="mileage" placeholder="请输入"
-					placeholder-style="color:#999999" @confirm="upMileage" />
+					placeholder-style="color:#999999" @input="upMileage" />
 				<view class="kmStr">km</view>
 			</view>
 
@@ -150,7 +150,24 @@
 					}, 'POST').then(res => {
 						uni.hideLoading();
 						console.log(res);
-					
+						if (res.code == 0) {
+							var cardata = uni.getStorageSync("maintainCarData")
+							
+							if (cardata) {
+								
+								 cardata.milage = this.mileage
+								
+								uni.setStorage({
+									key: 'maintainCarData',
+									data: cardata,
+									success: function () {			
+								     }
+								}); 
+								
+							}
+							
+						}
+						
 					})
 				
 			},

+ 3 - 2
pages/module/confirmOrder.vue

@@ -107,7 +107,7 @@
 				<view class="hejiMs">共{{goodsCount}}件商品,{{itemCount}}项服务</view>
 			</view>
 		</view>
-		<view class="settlement" @click="settlement">提交订单</view>
+		<view class="settlement" @click="$noMultipleClicks(settlement)">提交订单</view>
 	</view>
 
 	
@@ -140,6 +140,7 @@ export default {
 			yhTotalSize:0,
 			orderShop:'',
 			brands:'',
+			 noClick:true,
 		}
 	},
 	onLoad(opt) {
@@ -254,7 +255,7 @@ export default {
 					            //console.log('用户点击确定');
 								var payMoney=that.goodsMoney+that.itemMoney;
 								uni.navigateTo({
-									url:'../me/discountCard?payMoney='+payMoney
+									url:'usableDiscountCard?payMoney='+payMoney
 								})
 					        } else if (res.cancel) {
 					           that.tosettlement()

+ 45 - 17
pages/module/maintain.vue

@@ -7,7 +7,7 @@
 				<image src="../../static/img/icon_edit.png" mode="" class="topEdit" @click="carEdit"></image>
 			</view>
 			<view class="topRight">
-				<input type="number" v-model="maintainCarData.milage" @confirm="milageEditconfirm" value="" placeholder="请输入当前里程" class="topInput" placeholder-style="color:#ffffff;"/>
+				<input type="number" v-model="maintainCarData.milage" @confirm="upMileage" value="" placeholder="请输入当前里程" class="topInput" placeholder-style="color:#ffffff;"/>
 				<image src="../../static/img/icon_edit.png" mode="" class="topEdit" @click="milageEdit"></image>
 			</view>
 		</view>
@@ -223,25 +223,53 @@ export default {
 		  const res = new Map();
 		  return arr1.filter((a) => !res.has(a.goodsID) && res.set(a.goodsID, 1))
 		},
-		milageEditconfirm(){
+		upMileage(){
 			this.getData();
-			var that=this;
-			for(let k in this.maintainCarData){this.maintainCarData[k] = this.maintainCarData[k]==null?'':this.maintainCarData[k]}
-			this.$http('miniAppMyBMemberCar/updateMemberCar',this.maintainCarData,'POST').then(res => {
-				uni.hideLoading();
-					uni.setStorage({
-						key: 'maintainCarData',
-						data: that.maintainCarData,
-						success: function () {
-								/* uni.navigateBack({
-									delta:1
-								}) */
+				this.$http('worldKeepCar/worldHome/updateTMemberCarByHome', {
+					id: this.maintainCarData.id,
+					milage: this.maintainCarData.milage?this.maintainCarData.milage:0,
+					
+				}, 'POST').then(res => {
+					uni.hideLoading();
+					console.log(res);
+					if (res.code == 0) {
+						var cardata = uni.getStorageSync("maintainCarData")
+						
+						if (cardata) {
+							cardata.milage = this.maintainCarData.milage
+							uni.setStorage({
+								key: 'maintainCarData',
+								data: cardata,
+								success: function () {			
+							     }
+							}); 
+							
+						}
+						
+					}
+					
+				})
+			
+		},
+		// milageEditconfirm(){
+		// 	this.getData();
+		// 	var that=this;
+		// 	for(let k in this.maintainCarData){this.maintainCarData[k] = this.maintainCarData[k]==null?'':this.maintainCarData[k]}
+		// 	this.$http('miniAppMyBMemberCar/updateMemberCar',this.maintainCarData,'POST').then(res => {
+		// 		uni.hideLoading();
+		// 			uni.setStorage({
+		// 				key: 'maintainCarData',
+		// 				data: that.maintainCarData,
+		// 				success: function () {
+		// 						/* uni.navigateBack({
+		// 							delta:1
+		// 						}) */
 								
-					     }
-					}); 
+		// 			     }
+		// 			}); 
 				
-			})
-		},
+		// 	})
+		// },
 		leftClick(item,index){
 			this.leftIndex=index
 		},

+ 2 - 1
pages/order/myorder.vue

@@ -40,7 +40,7 @@
 				</view>
 
 				<view class="itemLineBottom">
-					<view class="itemBtn2" v-if="item.SheetState==1" @click.stop="orderPay(item)">立即支付</view>
+					<view class="itemBtn2" v-if="item.SheetState==1" @click.stop="$noMultipleClicks(orderPay, item)">立即支付</view>
 					
 
 					<view class="itemBtn2" v-if="item.SheetState==5&&item.EvaluateState==0&&item.EState==1"
@@ -72,6 +72,7 @@
 				tabIndex: '',
 				items: [],
 				isload: false,
+				 noClick:true,
 			}
 		},
 		onLoad(opt) {

+ 5 - 5
pages/order/orderDetail.vue

@@ -261,22 +261,22 @@
 			<view style="height: 150rpx;"></view>
 			<view class="orderBottom" v-if="orderData.SheetState==1">
 				<view class="cancelBtn" @click="cancelOrder">取消订单</view>
-				<view class="payBtn" @click="orderPay">立即支付</view>
+				<view class="payBtn" @click="$noMultipleClicks(orderPay)">立即支付</view>
 			</view>
 
 			<view class="orderBottom" v-if="orderData.SheetState==2">
-				<view class="cancelBtn" v-if="(orderData.ServiceState == null || orderData.ServiceState == 3) && orderData.PayMoney>0" @click="refundMoney">申请退款</view>
+				<view class="cancelBtn" v-if="(orderData.ServiceState == null || orderData.ServiceState == 3) && orderData.PayMoney>0" @click="$noMultipleClicks(refundMoney)">申请退款</view>
 				<view class="cancelBtn" v-else-if="orderData.ServiceState == 1 || orderData.ServiceState == 2" @click="refundDetail">退款详情</view>
 
 			</view>
 
 			<view class="orderBottom" v-if="orderData.SheetState==3">
-				<view class="cancelBtn" v-if="(orderData.ServiceState == null || orderData.ServiceState == 3) && orderData.PayMoney>0" @click="refundMoney">申请退款</view>
+				<view class="cancelBtn" v-if="(orderData.ServiceState == null || orderData.ServiceState == 3) && orderData.PayMoney>0" @click="$noMultipleClicks(refundMoney)">申请退款</view>
 				<view class="cancelBtn" v-else-if="orderData.ServiceState == 1 || orderData.ServiceState == 2" @click="refundDetail">退款详情</view>
 			</view>
 
 			<view class="orderBottom" v-if="orderData.SheetState==4">
-				<view class="cancelBtn" v-if="(orderData.ServiceState == null || orderData.ServiceState == 3) && orderData.PayMoney>0" @click="refundMoney">申请退款</view>
+				<view class="cancelBtn" v-if="(orderData.ServiceState == null || orderData.ServiceState == 3) && orderData.PayMoney>0" @click="$noMultipleClicks(refundMoney)">申请退款</view>
 				<view class="cancelBtn" v-else-if="orderData.ServiceState == 1 || orderData.ServiceState == 2" @click="refundDetail">退款详情</view>
 				<view class="payBtn" @click="timeShowClick" v-if="orderData.OrderState==1">立即预约</view>
 			</view>
@@ -376,7 +376,7 @@
 				orderTimeIndex1: 0,
 				orderTimeIndex2: -1,
 				isShowMa: true,
-
+				 noClick:true,
 			}
 		},
 		onLoad(opt) {

+ 19 - 2
pages/shop/shopAppraise.vue

@@ -26,7 +26,12 @@
 								:size="16" :margin="4" :readonly="true" />
 							<view class="time">{{item.CreateTime.slice(0,item.CreateTime.length-8)}}</view>
 						</view>
-
+						
+						<view class="thirdView">
+							<view class="count">服务态度:{{item.Serviceevaluation}}</view>
+							<view class="count">施工质量:{{item.Constructionevaluation}}</view>
+							<view class="count">店面环境:{{item.Storeevaluation}}</view>
+						</view>
 						<view class="contentMes">{{item.EContent}}</view>
 
 						<!-- 照片 -->
@@ -220,12 +225,24 @@
 		font-size: 26rpx;
 		color: #999999;
 	}
+	
 
 	.deleteBtn {
 		width: 36rpx;
 		height: 36rpx;
 	}
-
+	
+	.thirdView{
+		display: flex;
+		justify-content: flex-start;
+		padding-top: 10rpx;
+		padding-bottom: 20rpx;
+	}
+	.count{
+		font-size: 24rpx;
+		color: #999999;
+		margin-right: 20rpx;
+	}
 	.contentMes {
 		font-size: 26rpx;
 		color: #666666;

+ 7 - 2
pages/shop/shopList.vue

@@ -109,7 +109,7 @@
 					lng:'',
 					lat:'',
 				},
-				cityName: '',
+				cityName: '选择城市',
 				cityCode: '',
 				queryShopList: '',
 				shopName: '',
@@ -138,12 +138,17 @@
 			
 			var selectCity = uni.getStorageSync("selectCity");
 			
+			this.location = uni.getStorageSync("locationCity");
+			
 			if (selectCity) {
 				//有选择的城市
 				this.cityName = selectCity.city
 				this.cityCode = selectCity.code
 			} 
-			this.location = uni.getStorageSync("locationCity");
+			else{
+				this.cityName = this.location.cityName
+				this.cityCode = this.location.cityCode
+			}