zizhong.wang 2 vuotta sitten
vanhempi
commit
d3bc77abc7
1 muutettua tiedostoa jossa 18 lisäystä ja 7 poistoa
  1. 18 7
      pages/selfCenter/with_house.vue

+ 18 - 7
pages/selfCenter/with_house.vue

@@ -4,8 +4,8 @@
 	  <view class="tel flex">
 		<label>小区名称:</label>
 		<view class="picker card input">
-<!-- 		  <picker
-		    @change="hoodChange"
+ 		  <picker
+		    @change="hoodChangeOld"
 		    :value="hoodIndex"
 		    :range="hoodList"
 		    range-key="name"
@@ -19,9 +19,10 @@
 		      </view>
 		      <view class="triangle-down"></view>
 		    </view>
-		  </picker> -->
-		  <jPicker  class="cont"  position="top" @sure="hoodChange" showKey="name" valKey="name"
+		  </picker>
+		<!--  <jPicker  class="cont"  position="top" @sure="hoodChange" showKey="name" valKey="name"
 		   :val="hoodList.name" :options="hoodList" />
+		-->
 		</view>
 	  </view>
 	  <view class="tel flex"  style="margin-top:30rpx;">
@@ -272,7 +273,7 @@ export default {
 		    if (res.data.code === 200) {
                    if(res.data.data.length === 0){
 					     uni.showToast({
-					       title: "暂无数据",
+					       title: hood+"暂无数据",
 					       icon: "error",
 					     });
 				   }else{
@@ -377,7 +378,17 @@ export default {
 	hoodChange(e){
 	  console.log("e.pickerVal="+e.pickerVal);
 	  this.hoodName = e.pickerVal;
-	  this.searchDetail(this.hoodName)
+	  this.searchDetail(this.hoodName);
+	},
+	hoodChangeOld(e){
+		let name = this.hoodList[e.detail.value].name;
+		if (name === "请选择小区")
+		{
+			return;
+		}
+		this.hoodName = name;
+		this.hoodIndex = e.detail.value;
+		this.searchDetail(this.hoodName);
 	},
     buildingChange(e) {
 	  if(!this.hoodName){
@@ -385,7 +396,7 @@ export default {
 		      title: "请先选择小区",
 		      icon: "error",
 		    });
-			return
+			return;
 	  }
       this.buildIndex = e.detail.value;
 	  this.searchDetail(this.hoodName,this.buildList[this.buildIndex].name)