App.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <template>
  2. <div id="app">
  3. <el-dialog title="温馨提示" top="30vh" :visible.sync="tipShow" width="30%" center>
  4. <span
  5. >为保护个人隐私信息,系统自动对敏感数据进行脱敏。如需编辑、查看完整信息,可通过“用户隐私二次认证”功能进行验证,验证通过之后,24小时内可查看完整信息。</span
  6. >
  7. <span slot="footer" class="dialog-footer">
  8. <el-button @click="tipShow = false">关闭</el-button>
  9. </span>
  10. </el-dialog>
  11. <router-view />
  12. </div>
  13. </template>
  14. <script>
  15. import { getPrivacySwitch } from "@/api/privacy";
  16. export default {
  17. name: "App",
  18. data() {
  19. return {
  20. tipShow: false,
  21. };
  22. },
  23. created() {
  24. if (this.$store.state.user.token) {
  25. this.getPrivacySwitch();
  26. }
  27. },
  28. methods: {
  29. getPrivacySwitch() {
  30. getPrivacySwitch().then((res) => {
  31. var IsTipshow = localStorage.getItem("IsTipshow");
  32. localStorage.setItem('privacyTime', res.data)
  33. if (this.$store.state.user.token && !IsTipshow && res.data === 0) {
  34. this.tipShow = true;
  35. localStorage.setItem("IsTipshow", true);
  36. }
  37. });
  38. },
  39. },
  40. };
  41. </script>
  42. <style lang="scss">
  43. .el-dialog__header {
  44. background-color: #3A68F2;
  45. text-align: left;
  46. }
  47. .el-dialog__title {
  48. color: #FFFFFF;
  49. }
  50. </style>