Kaynağa Gözat

代码上环

zhangqi 11 ay önce
ebeveyn
işleme
0e1a92e576
1 değiştirilmiş dosya ile 6 ekleme ve 0 silme
  1. 6 0
      src/components/noticeModal/index.vue

+ 6 - 0
src/components/noticeModal/index.vue

@@ -5,6 +5,7 @@
       <p><small>{{detailsData.checkdate}}</small>&nbsp;<small>{{detailsData.createby}}</small></p>
       <div style="width:100%" v-html="detailsData.content"></div>
       <template #footer>
+        <a-button key="back" type="text" @click="noTips"><small style="color:#888">本次登陆不再提醒</small></a-button>
         <a-button key="back" type="link" v-if="pageInfo.pageNumber <= 1" @click="prevdata">上一条</a-button>
         <a-button v-if="pageInfo.pageNumber == pageInfo.pageTotal" type="link" @click="visible = false">关闭</a-button>
         <a-button v-else type="link" :disabled="pageInfo.pageNumber == pageInfo.pageTotal" @click="nextdata">下一条</a-button>
@@ -23,6 +24,7 @@ import { log } from '@antv/g2plot/lib/utils'
      pageTotal:0
   })
   const notcieData = async () =>{
+    if (sessionStorage.getItem('noTips') == 'noshow') return visible.value = false
     const res = await Api.requested({
       id:20221111090904,
       "content": {
@@ -68,6 +70,10 @@ import { log } from '@antv/g2plot/lib/utils'
       notcieData()
     }
   }
+  const noTips = ()=>{
+    visible.value = false
+    sessionStorage.setItem('noTips','noshow')
+  }
   onMounted(()=>{
     notcieData()
   })