소스 검색

showModal

zizhong.wang 2 년 전
부모
커밋
6fa609f825
2개의 변경된 파일38개의 추가작업 그리고 24개의 파일을 삭제
  1. 24 22
      pages/selfCenter/index.vue
  2. 14 2
      pages/selfCenter/with_house.vue

+ 24 - 22
pages/selfCenter/index.vue

@@ -118,28 +118,8 @@ export default {
 		  url: "/pages/selfCenter/with_house",
 		}); 
 	},
-	goWithHouse(){
-		if (this.isWith == 0)
-		{
-			this.goHouse();
-			return;
-		}
-		//解除绑定
-		let md5Sign = md5(
-		  "method=" +
-		    "user" +
-		    "&timestamp=" +
-		    getApp().globalData.globalTimestamp +
-		    "&secret=" +
-		    getApp().globalData.secret
-		);
-		let url =
-		  getApp().globalData.shareUrl +
-		  "api/api.php" +
-		  "?method=user&action=unband_owner&timestamp=" +
-		  getApp().globalData.globalTimestamp +
-		  "&sign=" +
-		  md5Sign;
+	withoutHouse(){
+		let url = getApp().makeApiUrl("user","user","unband_owner");
 		uni.request({
 		  url: url,
 		  method: "POST",
@@ -167,6 +147,28 @@ export default {
 		  },
 		});
 	},
+	goWithHouse(){
+		if (this.isWith == 0)
+		{
+			this.goHouse();
+			return;
+		}
+		let that = this;
+		uni.showModal({
+		  title: "确定解除绑定?",
+		  success(res) {
+			if (res.confirm) {
+			 //确定继续后续操作。
+				that.withoutHouse();
+			} else if (res.cancel) {
+			  return;
+			}
+		  },
+		});
+		//解除绑定
+		
+		
+	},
     goDetailFn(index, url) {
       let that = this;
 	  if(!that.isAuth){

+ 14 - 2
pages/selfCenter/with_house.vue

@@ -360,7 +360,19 @@ export default {
 	},
 	houseSubmit(){
 	  //uni.navigateBack({});
-	  this.open()
+	  //this.open()
+	  let that = this;
+	  uni.showModal({
+	    title: "确定关联此住房信息吗?",
+	    success(res) {
+			if (res.confirm) {
+			//确定继续后续操作。
+				that.submit();
+			}else if (res.cancel) {
+				return;
+			}
+	    },
+	  });
 	},
 	hoodChange(e){
 	  console.log("e.pickerVal="+e.pickerVal);
@@ -401,7 +413,7 @@ export default {
 	  this.searchDetail(this.hoodName,this.buildList[this.buildIndex].name,this.unitList[this.unitIndex].name,this.numList[this.numIndex].name);
     },	
 	submitPop(){
-		this.closePopup()
+		//this.closePopup()
 		this.submit()
 	},
 	closePop(){