zizhong.wang преди 2 години
родител
ревизия
826ecb2c12
променени са 4 файла, в които са добавени 55 реда и са изтрити 38 реда
  1. 2 2
      pages.json
  2. 25 28
      pages/heatingPage/reportFix.vue
  3. 2 2
      pages/index/index.vue
  4. 26 6
      pages/selfCenter/with_house.vue

+ 2 - 2
pages.json

@@ -2,7 +2,7 @@
 	"pages": [{
 			"path": "pages/index/index",
 			"style": {
-				"navigationBarTitleText": "空i企",
+				"navigationBarTitleText": "聚达康暖通",
 				"navigationStyle": "custom",
 				"navigationBarTextStyle": "white"
 			}
@@ -60,7 +60,7 @@
 	],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",
-		"navigationBarTitleText": "空i企",
+		"navigationBarTitleText": "聚达康暖通",
 		"navigationBarBackgroundColor": "#F8F8F8",
 		"backgroundColor": "#F8F8F8"
 	},

+ 25 - 28
pages/heatingPage/reportFix.vue

@@ -3,7 +3,7 @@
     <view class="supplyInfo">
       <view class="update_photo">
         <view>问题说明:</view>
-        <textarea v-model="supplyInfo.msg" class="area card"
+        <textarea v-model="content" class="area card"
 		minlength="5" placeholder="您反映的内容要体现一下几个重点信息:事情有关的地址,具体事情概述以及您的期望是什么?内容不少于5个字。"></textarea>
       </view>
       <view class="update_photo">
@@ -41,11 +41,11 @@
       </view>
 	  <view class="tel flex">
 	    <label>联系人:</label>
-	    <input type="text" class="card input" v-model="company.tel" />
+	    <input type="text" class="card input" v-model="supplyInfo.name" />
 	  </view>
 	  <view class="tel flex">
 	    <label>联系方式:</label>
-	    <input type="text" class="card input" v-model="company.tel" />
+	    <input type="text" class="card input" v-model="supplyInfo.phone" />
 	  </view>
     </view>
 
@@ -59,22 +59,24 @@ export default {
     return {
       index: 0,
       supplyInfo: {
-        title: "",
-        msg: "",
+        name : "",
+        phone : "",
+        content : "",
       },
+	  
       uploadList: [],
       imgIdList: [],
+	  pic_id : 0,
     };
   },
   methods: {
     submit() {
       if (
-        this.company.name === "" ||
-        this.company.code === "" ||
-        this.company.tel === ""
+        this.supplyInfo.name === "" ||
+        this.supplyInfo.phone === ""
       ) {
         uni.showToast({
-          title: "企业信息不完善",
+          title: "报修信息不完善",
           icon: "error",
         });
         return;
@@ -82,7 +84,7 @@ export default {
 
       let md5Sign = md5(
         "method=" +
-          "need" +
+          "user" +
           "&timestamp=" +
           getApp().globalData.globalTimestamp +
           "&secret=" +
@@ -91,18 +93,15 @@ export default {
       let url =
         getApp().globalData.shareUrl +
         "api/api.php" +
-        "?method=need&source=need&action=add&timestamp=" +
+        "?method=user&source=repair&action=post_repair&timestamp=" +
         getApp().globalData.globalTimestamp +
         "&sign=" +
         md5Sign;
       let postData = {
-        title: this.supplyInfo.title,
-        type: +this.index == 0 ? 2 : 1,
-        content: this.supplyInfo.msg,
-        company_name: this.company.name,
-        company_code: this.company.code,
-        phone: this.company.tel,
-        attach_ids: this.imgIdList.join(),
+        name: this.supplyInfo.name,
+        phone: this.supplyInfo.phone,
+        content: this.supplyInfo.content,
+        pic_id: this.pic_id,
         openId: getApp().globalData.open_id,
       };
       uni.request({
@@ -115,22 +114,20 @@ export default {
         success: (res) => {
           if (res.data.code === 200) {
             uni.showToast({
-              title: "发布供需成功",
+              title: "报修信息上传成功!",
               icon: "none",
               duration: 2000,
             });
-            uni.setStorageSync("supply_name", this.company.name);
-            uni.setStorageSync("supply_code", this.company.code);
-            uni.setStorageSync("supply_tel", this.company.tel);
-            setTimeout(() => {
-              uni.navigateBack({});
-            }, 1500);
+            uni.navigateTo({
+              url: "/pages/selfCenter/pay?my_fix",
+            });
           } else {
             uni.showToast({
               title: res.data.msg,
               icon: "none",
               duration: 2500,
             });
+			
           }
         },
         fail: () => {
@@ -143,9 +140,9 @@ export default {
     },
     getImage(type) {
       let that = this;
-      if (that.uploadList.length >= 3) {
+      if (that.uploadList.length >= 1) {
         uni.showToast({
-          title: "最多上传3张图片",
+          title: "最多上传1张图片",
           icon: "none",
           duration: 2500,
         });
@@ -153,7 +150,7 @@ export default {
       }
       uni.chooseImage({
         sourceType: [type],
-        count: 3 - that.uploadList.length,
+        count: 1 - that.uploadList.length,
         sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
         success: (res) => {
           for (let i = 0; i < res.tempFilePaths.length; i++) {

+ 2 - 2
pages/index/index.vue

@@ -90,7 +90,7 @@
 				{{item.time}}
 			</view>  
 			<view class="display-flex-start">
-				<view class="notice-content-time" style="color: {{statusColor[item.status]}};">{{statusObj[item.status]}}</view>
+				<view class="notice-content-time" style="">{{statusObj[item.status]}}</view>
 			</view>
           </view>
         </view>
@@ -168,7 +168,7 @@ export default {
   onShareAppMessage() {
   //  url: "/pages/index/index";
       return {
-        title: '爱企通',
+        title: '缴费系统',
         path: '/pages/index/index',
 		imageUrl:'/static/shareImg2.png',
       }

+ 26 - 6
pages/selfCenter/with_house.vue

@@ -181,8 +181,7 @@ export default {
 						name:obj[key]
 					}
 				 this.hoodList.push(child)
-				}
-			this.searchDetail(this.hoodList[this.hoodIndex].name)		
+				}		
 		    } 
 		  },
 		  fail: () => {
@@ -190,10 +189,17 @@ export default {
 		  },
 		});
 	},
-	searchDetail(hood,build,unit){
+	searchDetail(hood,build,unit,room){
 		let that = this, addressResult,searchType;
 		// let result = e.detail.value;
-		if(build && unit){
+		that.house.master = '';
+		that.house.area = '';
+		if (room)
+		{
+			searchType = 'houseRoom'
+			addressResult = hood + '/' + build + '/' + unit + '/' + room
+		}
+		if(build && unit && !room){
 			searchType = 'houseNumber'
 			addressResult = hood + '/' + build + '/' + unit
 		}
@@ -204,7 +210,8 @@ export default {
 		if(!build && !unit){
 			searchType = 'houseBuilding'
 			addressResult = hood
-		}		
+		}
+		
 		let md5Sign = md5(
 		  "method=" +
 		    "user" +
@@ -238,6 +245,11 @@ export default {
 					       title: "暂无数据",
 					       icon: "error",
 					     });
+						 that.buildList = [];
+						 that.unitList = [];
+						 that.numList = [];
+						 that.house.master = '';
+						 that.house.area = '';
 				   }else{
 					   that.makeHouseData(searchType,res.data.data)
 				   } 	
@@ -250,8 +262,10 @@ export default {
 	},
 	makeHouseData(type,dataList){
 		let that = this , obj = dataList;
+		
 		switch (type){
 			case 'houseBuilding':
+				that.buildList = [];
 				for (let key in obj) {
 					let child = {
 						name:obj[key]
@@ -261,6 +275,7 @@ export default {
 				that.searchDetail(that.hoodList[that.hoodIndex].name,that.buildList[0].name)
 				break;
 			case 'houseUnit':
+				that.unitList = [];
 				for (let key in obj) {
 					let child = {
 						name:obj[key]
@@ -270,6 +285,7 @@ export default {
 				that.searchDetail(that.hoodList[that.hoodIndex].name,that.buildList[that.buildIndex].name,that.unitList[0].name)
 				break;
 			case 'houseNumber':
+				that.numList = [];
 				for (let key in obj) {
 						let child = {
 							name:obj[key]
@@ -277,7 +293,11 @@ export default {
 						that.numList.push(child)
 					}
 					that.numList[that.numIndex].name = that.numList[0].name
+				that.searchDetail(that.hoodList[that.hoodIndex].name,that.buildList[that.buildIndex].name,that.unitList[that.unitIndex].name,that.numList[0].name);
 				break;	
+			case 'houseRoom':
+				that.house.master = obj.name;
+				that.house.area = obj.area;
 			default:
 				break;
 		}
@@ -321,7 +341,7 @@ export default {
 			return
 	  }			
       this.numIndex = e.detail.value;
-	  // this.searchDetail(this.hoodList[this.hoodIndex].name,this.buildList[this.buildIndex].name,this.unitList[this.unitIndex].name)
+	  this.searchDetail(this.hoodList[this.hoodIndex].name,this.buildList[this.buildIndex].name,this.unitList[this.unitIndex].name,this.numList[this.numIndex].name);
     },	
 	submitPop(){
 		this.closePopup()