Browse Source

Merge branch 'iterationApp' into dev

lex-xin 3 years ago
parent
commit
27f65f427d

+ 3 - 0
src/helpers/native-message.js

@@ -5,6 +5,9 @@ import { browser, getRandomKey } from '../common/common'
  *
  * openWebView
  *
+ * openMusicEvaluate 乐团课评价时调用
+ * backRefreshPage 返回时刷新页面
+ *
  */
 
 const loop = () => {}

+ 8 - 2
src/views/afterClassEvaluate/index.vue

@@ -36,7 +36,7 @@ import MEmpty from '@/components/MEmpty';
 import { browser } from "@/common/common";
 import { courseEvaluateList } from './api'
 import Item from './modal/item'
-import { postMessage } from '@/helpers/native-message'
+import { postMessage, listenerMessage } from '@/helpers/native-message'
 export default {
   name: "afterClassEvaluate",
   components: { MHeader, MEmpty, Item },
@@ -112,8 +112,14 @@ export default {
     if (browser().android || browser().iPhone) {
       this.headerStatus = false;
     }
-
     await this.getList()
+
+    listenerMessage({
+      api: 'backRefreshPage',
+      callback: () => {
+        this.onTabChange(this.params.evaluateFlag)
+      }
+    })
   },
 };
 </script>

+ 14 - 8
src/views/visitManager/visitList.vue

@@ -2,15 +2,21 @@
     <div class="visitList">
         <van-sticky>
             <m-header v-if="headerStatus" :isFixed="false" />
-            <van-tabs v-model="active" @change="tabChange" title-active-color="#000000" title-inactive-color="#808080" color="#01C1B5" class="van-hairline--bottom">
-                <van-tab title="待回访列表" name="all">
-                  <beforeVisitList />
-                </van-tab>
-                <van-tab title="回访记录" name="visited">
-                  <afterVisitList />
-                </van-tab>
-            </van-tabs>
         </van-sticky>
+        <van-tabs v-model="active" @change="tabChange" sticky offset-top="0.44rem" title-active-color="#000000" title-inactive-color="#808080" color="#01C1B5" class="van-hairline--bottom">
+            <van-tab title="待回访列表" name="all">
+                <beforeVisitList />
+            </van-tab>
+            <van-tab title="回访记录" name="visited">
+                <afterVisitList />
+            </van-tab>
+        </van-tabs>
+        <!-- <template v-if="active === 'all'">
+            <beforeVisitList />
+        </template>
+        <template v-else>
+            <afterVisitList />
+        </template> -->
     </div>
 </template>
 <script>