Browse Source

推送解释说明

zhouna 5 năm trước cách đây
mục cha
commit
73d0e9ff0e
3 tập tin đã thay đổi với 35 bổ sung10 xóa
  1. 26 1
      src/common/PushSymptom.vue
  2. 8 8
      src/common/Tiptoast.vue
  3. 1 1
      src/less/base.less

+ 26 - 1
src/common/PushSymptom.vue

@@ -24,6 +24,7 @@
       <div :class="selecteds.length>0?'realSure sure':'sure'" @click="makeSuer">
         确定 <span v-if="numPlus">({{numPlus}})</span>
       </div>
+      <Tiptoast :show="showExp" :data="message" @close="closeTip"/>
     </div>
   </portal>
 </template>
@@ -31,6 +32,7 @@
   import api from '../utils/api.js';
   import {mapState} from 'vuex';
   import {delResymptoms} from '@utils/tools';
+  import Tiptoast from '../common/Tiptoast.vue';
   export default {
     props: ["num"],
     data() {
@@ -40,6 +42,11 @@
         symptoms:[],      //症状
         sure:false,
         numPlus:0,     //已选答案个数
+        showExp:false,
+        message:{
+          title:'',
+          text:''
+        },
       };
     },
     computed:{
@@ -116,6 +123,21 @@
 
         })
       },
+      showExplain(it){
+        if(it.explains){
+          this.message.title = it.description || it.name;
+          this.message.text = it.explains;
+        }else{
+          this.message.title = "";
+          this.message.text = "暂无资料";
+        }
+        this.showExp = true
+      },
+      closeTip(){
+        this.showExp = false;
+        this.message.title = '';
+        this.message.text = '';
+      },
       getSymptomLisCom(result){
         let symp = (result&&result.data.symptom)||[];
         let symped = JSON.parse(JSON.stringify(this.chooseSymp));//已选症状
@@ -183,6 +205,9 @@
         this.numPlus = this.selectedsName==="没有了"?0:this.selecteds.length;
         this.getPush(this.chooseSymp[0].name+this.selectedsName);
       }
+    },
+    components:{
+      Tiptoast
     }
   };
 </script>
@@ -233,7 +258,7 @@
     padding: 0.14rem 0.2rem;
     border:1px #DFE0E4 solid;
     border-radius: 0.36rem;
-    font-size: 0.26rem;
+    font-size: #font[select];
     margin: 0.15rem;
     float: left;
     color: #666;

+ 8 - 8
src/common/Tiptoast.vue

@@ -1,5 +1,5 @@
 <template>
-    <portal to="notification-outlet">
+    <!--<portal to="notification-outlet">-->
       <div class="toast-wrap" v-if="show">
             <div class="content">
               <p class="tit" v-show="data.title">{{data.title}}</p>
@@ -8,10 +8,10 @@
               </div>
                 <img src="../images/icon_close@2x.png"  class="close" @click="handleClose">
             </div>
-            
+
             <div class="mask" @click="handleClose"></div>
       </div>
-    </portal>
+    <!--</portal>-->
 </template>
 <script type="text/javascript">
 /**
@@ -59,21 +59,21 @@
       top:50%;
       left: 50%;
       transform: translate(-50%,-50%);
-      padding: .5rem .8rem .8rem;
+      padding: .6rem;
       box-sizing: border-box;
       border-radius: .20rem;
       z-index: 1000;
       .tit{
         font-family:PingFangSC;
         color:#333333;
-        font-size: .32rem;
+        font-size: #font[title];
         text-align: center;
         font-weight: 700;
       }
       .text{
         color:#colors[quest];
-        padding-top: .3rem;
-        font-size: .3rem;
+        padding-top: .4rem;
+        font-size: #font[select];
       }
       .close{
         width:.72rem;
@@ -88,4 +88,4 @@
       z-index: 999;
     }
   }
-</style>
+</style>

+ 1 - 1
src/less/base.less

@@ -191,7 +191,7 @@ input::placeholder,textarea::placeholder {
 .sure {
   width: 100%;
   height: 0.88rem;
-  font-size: .28rem;
+  font-size: .32rem;
   background-color: #colors[btn];
   line-height: 0.88rem;
   margin-top: 0.8rem;