Browse Source

修改诉求问题

306132416@qq.com 4 years ago
parent
commit
fd2fbff623
3 changed files with 31 additions and 11 deletions
  1. 2 2
      pages/appeal/appeal_detail.vue
  2. 1 1
      pages/appeal/myAppeal.vue
  3. 28 8
      pages/appeal/putAppeal.vue

+ 2 - 2
pages/appeal/appeal_detail.vue

@@ -29,8 +29,8 @@
         </div>
       </div>
     </div>
-    <div class="one"></div>
-    <div class="appealState">
+   <!-- <div class="one"></div> -->
+    <div class="appealState" style="margin-top: 30rpx;">
       <div class="msg_content" v-if="info.process !== '2'">
         <div class="title">处理进度:</div>
         <div class="msg_state">

+ 1 - 1
pages/appeal/myAppeal.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="content">
-    <div v-for="(otherAppeal, index) in otherAppealList" :key="index">
+    <div v-for="(otherAppeal, index) in otherAppealList" :key="index" style="border-bottom: 1rpx solid #e6e6e6;">
       <appealCard
         :otherAppeal="otherAppeal"
         @tap="toDetail(otherAppeal.id)" :isOther='false'></appealCard>

+ 28 - 8
pages/appeal/putAppeal.vue

@@ -45,7 +45,8 @@
       <div class="tel info_msg">
         <label>联系方式:</label>
         <input
-          type="text"
+          type="tel"
+		  disabled="true"
           class="card ipt"
           v-model="question.contact_phone"
         />
@@ -68,13 +69,13 @@ export default {
       imgIdList: [],
       question: {
         content: "",
-        contact_name: getApp().globalData.contact_name,
+        contact_name: uni.getStorageSync('appealName') || '',
         contact_phone: getApp().globalData.user_phone,
       },
     };
   },
-  onLoad(){
-    console.log(getApp().globalData.contact_name);
+  onShow(){
+	this.question.contact_phone = getApp().globalData.user_phone
   },
   methods: {
     getImage(type) {
@@ -164,6 +165,26 @@ export default {
       });
     },
     submit() {
+	  if(!this.question.content){
+		  uni.showToast({
+		  	title:'请输入诉求内容',
+			icon:'none'
+		  })
+		  return
+	  }	
+	 if(!this.question.contact_name){
+		  uni.showToast({
+			title:'请输入联系人名称',
+			icon:'none'
+		  })
+		  return
+	  }	
+		if(!this.question.contact_phone){
+			uni.navigateTo({
+				url:'../auth/index'
+			})
+			return
+		}	 
       let md5Sign = md5(
         "method=" +
           "consult" +
@@ -198,13 +219,12 @@ export default {
               title: "诉求提交成功",
               icon: "none",
               duration: 2500,
+			  mask:true
             });
-            
-            getApp().globalData.contact_name = this.question.contact_name,
-            getApp().globalData.user_phone = this.question.contact_phone,
+			uni.setStorageSync('appealName',this.question.contact_name);
             setTimeout(() => {
               uni.navigateBack({});
-            }, 2500);
+            }, 1000);
           } else {
             uni.showToast({
               title: res.data.msg,