Jing-Jiu 4 lat temu
rodzic
commit
25440f8ab9

+ 1 - 0
App.vue

@@ -16,6 +16,7 @@ export default {
 	user_headUrl:'',
 	isAuth:false,
 	session_key: '',
+	contact_name:'',
   },
   onLaunch: function () {
     console.log("App Launch");

+ 46 - 24
pages/appeal/appealCard.vue

@@ -1,17 +1,10 @@
 <template>
-  <div class="otherAppeal" >
-    <div class="title">
+  <div class="otherAppeal">
+    <!-- 标题 -->
+    <div class="title" v-if="isOther">
       {{ otherAppeal.title }}
     </div>
-    <div v-if="!isOther">
-      <img
-        src="/static/appeal/waited.svg"
-        class="state"
-        v-if="otherAppeal.process === 2"
-      />
-      <img src="/static/appeal/waiting.svg" class="state" v-else />
-    </div>
-    <div class="details" v-if="otherAppeal.process === '2'">
+    <div class="details" v-if="isOther && otherAppeal.process === '2'">
       <img src="/static/appeal/avator.png" class="icon" />
       <p class="msg">
         <span class="name">{{ otherAppeal.department_name }}</span
@@ -19,11 +12,22 @@
         <span class="msg_body">{{ otherAppeal.reply }}</span>
       </p>
     </div>
-    <div class="details" v-else>
+    <div class="details" v-if="!isOther">
+      <p class="content">
+        <img
+          src="/static/appeal/waited.svg"
+          class="state"
+          v-if="otherAppeal.process === 2"
+        />
+        <img src="/static/appeal/waiting.svg" class="state" v-else />
+        <span class="content_body">{{ otherAppeal.content }}</span>
+      </p>
+    </div>
+    <!-- <div class="details" v-else>
       <p class="msg">
         <span class="msg_body_waiting">正在处理中……</span>
       </p>
-    </div>
+    </div> -->
     <!-- <div class="details" v-else>
       <img src="/static/appeal/avator.png" class="icon" />
       <p class="msg">
@@ -43,22 +47,16 @@ export default {
 .otherAppeal {
   margin: 5% 8%;
   position: relative;
-  height: 200rpx;
+  height: 150rpx;
+  display: flex;
+  flex-flow: column;
+  justify-content: center;
   .title {
     margin-bottom: 5%;
     font-size: 30rpx;
-	font-weight: 600;
-  }
-  .state {
-    position: absolute;
-    right: 0;
-    top: 0;
-    transform: translateY(-30%);
-    width: 94rpx;
-    height: 74rpx;
+    font-weight: 600;
   }
   .details {
-    position: relative;
     .name {
       font-size: 26rpx;
       color: red;
@@ -78,6 +76,30 @@ export default {
         color: #aaa;
       }
     }
+    .content {
+      position: relative;
+      width: 100%;
+      font-size: 26rpx;
+      .state {
+        position: absolute;
+        right: 0;
+        top: 0;
+        width: 94rpx;
+        height: 74rpx;
+      }
+      .content_body {
+        width: 80%;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        display: -webkit-box;
+        -webkit-box-orient: vertical;
+        -webkit-line-clamp: 2;
+        word-wrap: break-word;
+        word-break: break-all;
+        line-height: 40rpx;
+        letter-spacing: 2rpx;
+      }
+    }
     .icon {
       width: 50rpx;
       height: 50rpx;

+ 2 - 2
pages/appeal/appeal_detail.vue

@@ -41,7 +41,7 @@
       <div class="msg_content" v-if="info.process === '2'">
         <div class="title">回复内容:</div>
         <div class="msg_res">
-          <span class="red">{{ info.reply }}:</span
+          <span class="red">{{ info.department_name }}:</span
           ><span>{{ info.reply }}</span>
         </div>
       </div>
@@ -100,7 +100,6 @@ export default {
           id: infoId,
         },
         success: (res) => {
-          console.log(res);
           if (res.data.code === 200) {
             let data = res.data.data
             let time = this.$options.filters["globalTime"](data.addtime);
@@ -109,6 +108,7 @@ export default {
             );
             data.addtime = time + " " + timeSecond;
             this.info = data;
+            console.log(data);
           }
         },
         fail: () => {

+ 1 - 2
pages/appeal/myAppeal.vue

@@ -3,8 +3,7 @@
     <div v-for="(otherAppeal, index) in otherAppealList" :key="index">
       <appealCard
         :otherAppeal="otherAppeal"
-        @tap="toDetail(otherAppeal.id)" :isOther='false' v-if="otherAppeal.ishow === '1'"
-      ></appealCard>
+        @tap="toDetail(otherAppeal.id)" :isOther='false'></appealCard>
     </div>
   </div>
 </template>

+ 7 - 2
pages/appeal/putAppeal.vue

@@ -48,7 +48,6 @@
           type="text"
           class="card ipt"
           v-model="question.contact_phone"
-          disabled="true"
         />
       </div>
     </div>
@@ -69,11 +68,14 @@ export default {
       imgIdList: [],
       question: {
         content: "",
-        contact_name: "",
+        contact_name: getApp().globalData.contact_name,
         contact_phone: getApp().globalData.user_phone,
       },
     };
   },
+  onLoad(){
+    console.log(getApp().globalData.contact_name);
+  },
   methods: {
     getImage(type) {
       let that = this;
@@ -197,6 +199,9 @@ export default {
               icon: "none",
               duration: 2500,
             });
+            
+            getApp().globalData.contact_name = this.question.contact_name,
+            getApp().globalData.user_phone = this.question.contact_phone,
             setTimeout(() => {
               uni.navigateBack({});
             }, 2500);