Просмотр исходного кода

feat:添加超过50自动跳转页面

wangsisi 2 недель назад
Родитель
Сommit
87db879cc7

+ 6 - 6
src/views/old_mini/chat_frame/consult.vue

@@ -1,6 +1,6 @@
 <template>
     <div class="consult">
-        <custom-header name="咨询专家" @goback="handleBack"></custom-header>
+        <custom-header name="咨询专家"></custom-header>
         <div class="consult-content">
             <!-- 聊天消息区域 -->
             <div class="chat-messages" ref="messagesContainer">
@@ -361,11 +361,6 @@ const handleReportClick = (msg) => {
     }
 }
 
-const handleBack = () => {
-    // router.go(-1);
-    router.replace(`/home`);
-}
-
 // 页面加载时自动添加欢迎消息
 onMounted(() => {
     createSession(route.query.userId);
@@ -478,6 +473,11 @@ onDeactivated(() => {
                 color: #000;
             }
         }
+        .question-message {
+            .question-title{
+                color: #000;
+            }
+        }
     }
 
     .avatar {

+ 5 - 0
src/views/old_mini/create_farm/index.vue

@@ -999,6 +999,11 @@ function handleMianjiInput(value) {
             // 标记已创建默认地块
             hasDefaultPolygon.value = true;
         }
+
+        // 如果路由type是farmer且亩数大于等于50,自动调用toSubPage方法
+        if (route.query.type === 'farmer' && mu >= 50) {
+            toSubPage();
+        }
     }, 500);
 }
 </script>

+ 2 - 9
src/views/old_mini/interactionList/index.vue

@@ -1,5 +1,5 @@
 <template>
-    <custom-header name="农情互动" bgColor="#f2f4f5" @goback="handleBack"></custom-header>
+    <custom-header name="农情互动" bgColor="#f2f4f5"></custom-header>
     <div class="interaction-list">
         <van-list v-model:loading="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
             <div class="list-item" v-for="(item, index) in listData" :key="item.id || index"
@@ -93,13 +93,6 @@ const mockData = [
     { id: 3, proportion: "10%", upload: true, expanded: false },
 ];
 
-const handleBack = () => {
-    console.log(query.value);
-    // router.go(-1);
-    router.push(`/consult?expertMiniUserId=${query.value.expertMiniUserId}`);
-    // router.push(`/consult?userId=81881`);
-}
-
 // 加载数据
 const onLoad = () => {
     loading.value = true;
@@ -161,7 +154,7 @@ const getFarmList = async () => {
     if(data && data.length === 0) {
         showTipPopup.value = true;
     }
-    showTipPopup.value = true;
+    // showTipPopup.value = true;
 }
 </script>
 <style scoped lang="scss">