2 Commitit 7237232eec ... 337612c0d0

Tekijä SHA1 Viesti Päivämäärä
  guo 337612c0d0 Merge branch 'master' of http://47.98.226.240:3000/twt/epc 2 vuotta sitten
  guo 979c6cc306 1.点选 2 vuotta sitten

+ 21 - 1
common/common.js

@@ -12,11 +12,31 @@ const isUserId = function() {
 	var userId=uni.getStorageSync("logodata").uid;
 	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;
+        }, 3000)
+    } else {
+        //  这里是重复点击的判断
+    }
+}
 
 export default {
     commonData:{
         companyType:1,
     },
     isUserId,
-	
+	noMultipleClicks,      // 禁止多次点击
 }

+ 4 - 1
main.js

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

+ 1 - 1
pages/mobile/OESearch.vue

@@ -18,7 +18,7 @@
 
 		<view class="history" v-if="inputValue.length==0">
 			<view class="historyTop">
-				<view class="historyTopTxt">历史搜索</view>
+				<view class="historyTopTxt">示例数据</view>
 				<!-- <image src="../../static/img/icon_delete.png" mode="" class="historyDelImg"></image> -->
 			</view>
 			<view v-for="(item,index) in 1" class="historyLIneBox">

+ 2 - 2
pages/mobile/OemSearch.vue

@@ -18,7 +18,7 @@
 
 		<view class="history" v-if="inputValue.length==0">
 			<view class="historyTop">
-				<view class="historyTopTxt">历史搜索</view>
+				<view class="historyTopTxt">示例数据</view>
 				<!-- <image src="../../static/img/icon_delete.png" mode="" class="historyDelImg"></image> -->
 			</view>
 			<view v-for="(item,index) in 1" class="historyLIneBox">
@@ -307,4 +307,4 @@
 		color: #3F90F7;
 		font-size: 24rpx;
 	}
-</style>
+</style>

+ 4 - 3
pages/mobile/SelectCarTwo.vue

@@ -24,7 +24,7 @@
 		<view v-if="carModelShow" class="cangBox">
 			<view v-for="(item,index) in xingList" :key="index">
 				<view class="cangTitle">{{item.fct_name}}</view>
-				<view @click="goNext(item2)" class="xingBox" v-for="(item2,index) in item.models" :key="index">
+				<view @click="$noMultipleClicks(goNext,item2)" class="xingBox" v-for="(item2,index) in item.models" :key="index">
 					<view class="xing">{{item2.model_name}}</view>
 					<image src="../../static/img/rightArrow.png" mode="" style="width: 12rpx; height: 20rpx"></image>
 				</view>
@@ -61,8 +61,9 @@
 				peizhiShow:false,
 				xingList: [],
 				peizhiList:[],
-				modelname:'',
-
+				modelname:'',
+				 noClick:true,
+			
 			}
 		},
 		onLoad(opt) {

+ 1 - 1
pages/mobile/index.vue

@@ -11,7 +11,7 @@
 		</view>
 		<view class="history">
 			<view class="historyTop">
-				<view class="historyTopTxt">历史搜索</view>
+				<view class="historyTopTxt">示例数据</view>
 				<!-- <image src="../../static/img/icon_delete.png" mode="" class="historyDelImg"></image> -->
 			</view>
 			<view v-for="(item,index) in 1" class="historyLIneBox">

+ 1 - 1
pages/mobile/oeindex.vue

@@ -11,7 +11,7 @@
 		</view>
 		<view class="history">
 			<view class="historyTop">
-				<view class="historyTopTxt">历史搜索</view>
+				<view class="historyTopTxt">示例数据</view>
 				<!-- <image src="../../static/img/icon_delete.png" mode="" class="historyDelImg"></image> -->
 			</view>
 			<view v-for="(item,index) in 1" class="historyLIneBox">