Prechádzať zdrojové kódy

Merge branch 'feature_业主工会' of http://192.168.4.246:3000/elab-damai-h5/h5-elab-open-ownerUnion into feature_业主工会

王晓晨 3 rokov pred
rodič
commit
543e1cd1ad

+ 18 - 27
components/subComponents/dmHomeChoose.vue

@@ -22,16 +22,11 @@
 					<view class="content_right">
 						<view class="content_city" v-if="tab==1">
 							<scroll-view scroll-y="true" class="city_province">
-								<view class="province_item" v-for="(item1,index1) in region" :key='index1.id' @click="chooceProvince(item1)" :style="{'color':provinceId==item1.id?color1:'#999999','background':provinceId==item1.id?'#FFFFFF':'transparent'}">
-									{{item1.name}}
+								<view class="province_item" v-for="(item1,index1) in region" :key='index1' @click="chooceProvince(item1)" :style="{'color':city==item1?color1:'#999999','background':city==item1?'#FFFFFF':'transparent'}">
+									{{item1}}
 								</view>
 							</scroll-view>
 							
-							<scroll-view scroll-y="true" class="city_town">
-								<view class="city_item" v-for="(item2,index2) in cities" :key='item2.id' @click="chooseCity(item2)" :style="{'color':cityId==item2.id?color1:'#999999'}">
-									{{item2.name}}
-								</view>
-							</scroll-view>
 						</view>
 						<view class="content_type" v-if="tab==2">
 							<view class="content_type_item" v-for="(item,index) in  types" :key='item.id' @click="typeChooce(item)" :style='{color:currentType==item.id?color1:"#999999"}'>
@@ -55,7 +50,6 @@
 	</view>
 </template>
 <script>
-	let region = require('@/static/region.json');
 	export default {
 		props: {
 			title: String,
@@ -107,10 +101,7 @@
 				currentType:"",
 				region:[],
 				cities:[],
-				province:"",
-				provinceId:"",
 				city:"",
-				cityId:"",
 				typeName:"",
 			}
 		},
@@ -119,8 +110,7 @@
 			this.globalData = app.globalData;
 			this.color2 = this.globalData.color2;
 			this.color1 = this.globalData.color1;
-			this.region = region;
-			this.cities = region[0].children;
+			this.queryCities();
 		},
 		methods: {
 			async queryCategoryBox(){
@@ -132,6 +122,19 @@
 				})
 				if(res.data.success){
 					this.types = res.data.list||[];
+					this.types = this.types.filter(item=>item.name.indexOf('注册')==-1)
+				}
+			},
+			async queryCities(){
+				let res = await this.$myRequest({
+					url: "/project/cities",
+					data: {
+						
+					},
+					method:"GET"
+				})
+				if(res.data.success){
+					this.region = res.data.list||[]
 				}
 			},
 			setOptionType(option){
@@ -143,7 +146,6 @@
 					this.maskBgColor = this.maskColor
 					this.containerVisible = true
 				}, 20)
-				console.log("regin",region)
 				this.queryCategoryBox();
 			},
 			hide() {
@@ -173,19 +175,10 @@
 				this.typeName = item.name;
 			},
 			chooceProvince(item){
-				this.cities = item.children;
-				this.province = item.name;
-				this.provinceId = item.id;
-			},
-			chooseCity(item){
-				this.city = item.name;
-				this.cityId = item.id;
+				this.city = item;
 			},
 			reset(){
 				this.city = "";
-				this.cityId = "";
-				this.province = "";
-				this.provinceId = "";
 				this.currentType = "";
 				this.typeName = "";
 			},
@@ -302,13 +295,11 @@
 							height: 100%;
 							box-sizing: border-box;
 							padding-top: 50rpx;
-							background: #f8f8f8;
 							overflow: hidden;
 							overflow-y: scroll;
 							.province_item{
-								width: 280rpx;
 								line-height: 60rpx;
-								text-align: center;
+								padding-left: 60rpx;
 								font-size: 28rpx;
 								font-family: Verdana, Verdana-Regular;
 								font-weight: 400;

+ 11 - 5
components/subComponents/dmPickerView.vue

@@ -1,7 +1,7 @@
 <template>
 	<dm-pop-view ref='popView' @confirm='handleConfirm' :title="title" :maskTapHide='maskTapHide'>
 		<picker-view class="pop-pickerView" indicator-style='height:80rpx' :value="selectValue" @change="handleChange">
-			<picker-view-column>
+			<picker-view-column class="picker_column">
 				<view class="column-item" v-for="(item,index) in options" :key="index">{{item.title}}</view>
 			</picker-view-column>
 		</picker-view>
@@ -66,16 +66,22 @@
 		margin: 40rpx 0;
 		width: 750rpx;
 		height: 300rpx;
+		
+		.picker_column{
+			width: 750rpx;
+		}
 
 		.column-item {
+			width: 80%;
 			height: 80rpx;
-			display: flex;
+			line-height: 80rpx;
 			box-sizing: border-box;
 			white-space: nowrap;
 			overflow: hidden;
-			flex-direction: row;
 			align-items: center;
-			justify-content: center;
-		}
+		    text-align: center;
+			text-overflow: ellipsis;
+			margin: 0 auto;
+		} 
 	}
 </style>

+ 1 - 0
pages/certificationResultPage/certificationResultPage.vue

@@ -55,6 +55,7 @@
 				}
 			},
 			toHome(){
+				uni.$emit('request');
 				uni.navigateBack({
 					delta:1
 				})

+ 36 - 17
pages/homePage/homePage.vue

@@ -197,7 +197,7 @@
 								<image src="https://dm.static.elab-plus.com/yezhu/icon_family.png" mode=""></image>
 								<text style="width: 100%;">{{item.projectLayout}}</text>
 							</view>
-							<text class="house_desc">{{item.shareRemark}}</text>
+							<text class="house_desc">{{item.taskEndTime}}</text>
 						</view>
 					</view>
 					
@@ -263,17 +263,17 @@
 				pageNo:1,
 				pageSize:10,
 				noMore:false,
-				city:"城市",
+				city:"筛选城市",
 				type:"",
-				typeName:"类型",
+				typeName:"任务类型",
 				optionType:1,
 				registAmount:null,
 				shareToken:"",
-				isFirst:true,
+				isVisiable:true
 			}
 		},
 		mounted() {
-			this.isFirst = true;
+			this.isFirst = true
 			this.color4 = app.globalData.color4;
 			this.getData();
 			uni.$on("request",()=>{
@@ -288,11 +288,11 @@
 			}
 		},
 		onShow() {
-			if(!this.isFirst){
-				this.getSingle();
-			}else{
-				this.isFirst = false
-			}
+			this.isVisiable = true;
+			this.getSingle();
+		},
+		onHide() {
+			this.isVisiable = false
 		},
 		onPullDownRefresh() {
 			this.getData();
@@ -325,11 +325,12 @@
 				this.getUserInfo();
 				this.getHomePage();
 				this.getRegistTask(); 
+				this.getSingle();
 			},
 			chooiceType(e){
-				this.city = e.city==''?"城市":(e.city).split('市')[0];
+				this.city = e.city==''?"筛选城市":(e.city).split('市')[0];
 				this.type = e.type;
-				this.typeName = e.typeName==''?'类型':e.typeName;
+				this.typeName = e.typeName==''?'任务类型':e.typeName;
 				this.pageNo = 1;
 				this.getHomePage();
 			},
@@ -353,7 +354,7 @@
 				let ret = await this.$myRequest({
 					url: "/project/homePage",
 					data: {
-						"city": this.city=='城市'?'':this.city,
+						"city": this.city=='筛选城市'?'':this.city,
 						"pageNo": this.pageNo,
 						"pageSize": this.pageSize,
 						"taskCategoryId": this.type,
@@ -513,7 +514,9 @@
 				});
 				if(res.data.success){
 					let single = res.data.single;
-					this.config(single.shareName,single.shareRemark,location.origin+location.pathname +"?shareToken="+this.shareToken,single.shareLogoImage)
+					if(this.isVisiable){
+						this.config(single.shareName,single.shareRemark,location.origin+location.pathname +"?shareToken="+this.shareToken,single.shareLogoImage)
+					}
 				}
 			}
 		},
@@ -1065,13 +1068,15 @@
 
 						.house_name {
 							width: 100%;
-							word-break:break-all;
 							font-size: 30rpx;
 							font-family: Verdana, Verdana-Bold;
 							font-weight: 700;
 							text-align: left;
 							color: #262626;
 							margin-top: 20rpx;
+							text-overflow: ellipsis;
+							overflow: hidden;
+							white-space: nowrap;
 						}
 
 						.house_hk {
@@ -1105,7 +1110,14 @@
 							}
 
 							text {
-								width: 80%;
+								  width: 80%;
+								  text-overflow: -o-ellipsis-lastline;
+								  overflow: hidden;
+								  text-overflow: ellipsis;
+								  display: -webkit-box;
+								  -webkit-line-clamp: 2;
+								  line-clamp: 2;
+								  -webkit-box-orient: vertical;
 							}
 						}
 
@@ -1126,7 +1138,14 @@
 							}
 
 							text {
-								width: 80%;
+								  width: 80%;
+								  text-overflow: -o-ellipsis-lastline;
+								  overflow: hidden;
+								  text-overflow: ellipsis;
+								  display: -webkit-box;
+								  -webkit-line-clamp: 2;
+								  line-clamp: 2;
+								  -webkit-box-orient: vertical;
 							}
 						}
 

+ 38 - 2
pages/ownerCertification/ownerCertification.vue

@@ -7,7 +7,7 @@
 			<view class="user_item">
 				<text class="item_name">姓名</text>
 				<view class="item_right">
-					<input placeholder-class="item_right_name_placeholder" class="item_right_name" type="text" :value="name" placeholder="请输入姓名" @blur='inputName' @confirm='inputName'/>
+					<input placeholder-class="item_right_name_placeholder" class="item_right_name" type="text" v-model="name" @input="onKeyYHKNameInput" placeholder="请输入姓名" @blur='inputName' @confirm='inputName'/>
 					<image class="icon_right" src="../../static/icons/icon_right_yezhu.png" mode=""></image>
 				</view>
 			</view>
@@ -71,7 +71,7 @@
 			<view class="user_item">
 				<text class="item_name">证件号</text>
 				<view class="item_right">
-					<input placeholder-class="item_right_name_placeholder" class="item_right_name" type="idcard" :value="certificateNo" placeholder="请输入"  @blur='inputId' @confirm='inputId'/>
+					<input placeholder-class="item_right_name_placeholder" class="item_right_name" type="text"  v-model ="certificateNo" placeholder="请输入" @input="idInput"  @blur='inputId' @confirm='inputId'/>
 					<image class="icon_right" src="../../static/icons/icon_right_yezhu.png" mode=""></image>
 				</view>
 			</view>
@@ -158,6 +158,31 @@
 			this.queryProjectBox();
 		},
 		methods:{
+			onKeyYHKNameInput(event){
+				let value = event.target.value;
+				let patt = /.*[0-9]{1,}.*/i;
+				var pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?%]");
+				let _str=""
+				for(let i=0,len=value.length;i<len;i++){
+					_str+=value[i].replace(pattern,'').replace(patt,'')
+				}
+				this.$nextTick(function(){
+					this.name = _str;
+				})
+			},
+			idInput(event){
+				let value = event.target.value;
+				let patt = /^[\u4e00-\u9fa5]+$/;
+				var pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?% ]");
+				let _str=""
+				for(let i=0,len=value.length;i<len;i++){
+					_str+=value[i].replace(pattern,'').replace(patt,'')
+				}
+				this.$nextTick(function(){
+					this.certificateNo = _str;
+				})
+				
+			},
 			agreeXieyi(){
 				this.agree = true
 			},
@@ -348,7 +373,18 @@
 						title:"请输入证件号"
 					})
 					return
+				}else{
+					if(this.certificateType==1){
+						if(this.certificateNo.length!=18){
+							uni.showToast({
+								icon:"none",
+								title:"请输入正确的身份证号"
+							})
+							return
+						}
+					}
 				}
+				
 				if(!this.roomNo){
 					uni.showToast({
 						icon:"none",

+ 7 - 2
pages/revenueRankingPage/revenueRankingPage.vue

@@ -13,7 +13,7 @@
 			</view>
 			<view class="tab_line"></view>
 			<view class="tab_item" @click="tab(3)"  :class="{active3:currentTab==3}" :style="{background:currentTab==3?color1:''}">
-				
+				
 			</view>
 		</view>
 		<view class="rank_list">
@@ -40,7 +40,7 @@
 				    <text  v-if="index!=0&&index!=1&&index!=2" >{{index+1}}</text>
 				</view>
 				<view class="rank_item_name" style="width: 30%;" :style="{color:(index==0||index==1||index==2)?color1:'auto'}">
-					{{item.name}}
+					{{item.name|nameFilter}}
 				</view>
 				<view class="rank_item_name" style="width: 20%;">
 					{{item.level?'Lv'+item.level:''}}
@@ -75,6 +75,11 @@
 				currentTab:1,
 			};
 		},
+		filters:{
+			nameFilter(val){
+				return val.charAt(0)+"*"
+			}
+		},
 		components:{
 			backHome
 		},