| 123456789101112131415161718192021222324252627282930313233343536373839404142 | 
							
- const isUserId = function() {
 
- 	var userId=uni.getStorageSync("logodata").uid;
 
- 	//console.log("userId---"+userId)
 
- 	if(!userId){
 
- 		   uni.navigateTo({
 
- 			  url:'../login/login'
 
- 		   })
 
- 	 }
 
- }
 
- /* const uid =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,      // 禁止多次点击
 
- }
 
 
  |